SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    Manchester, NH. USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    verifying text from a notepad document

    Hello,

    I am currently evaluating WinRunner and SilkTest (among others) and I am doing a test that requires a file to be opened in notepad and the contents of that file to be verified. I have done this in SilkTest but I am having problems with it in WinRunner.

    The file is about 40 lines long (about 2k). I need to read all lines except line 20 becasue that line changes each iteration of the test.

    I found a way to do this but it seems as though I need to read the file in 255 character chunks. Is this true?

    The file that I am reading is very small compared to the files that I would be reading if we were to use this in a testing environment. Some of the files that I would be verifying would be 2 megs or more so this would not be an acceptable work around.

    So far I really like WinRunner better than SilkTest but if there is no other way to do this then I would not be able to use WinRunner.

    Thanks for any help that you may be able to give,

    Mark

    ------------------

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Is the fact that the text file is opened in Notepad an integral and essential part of the test you wish to perform?

    Or do you just wish to verify the contents of the text file itself?

    If so, I'd suggest you should retrieve the text from the file in a non-GUI fashion using WR's 'file_*' functions (see Help for further details).

    Automatrix

    ------------------

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    Manchester, NH. USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Thanks for the quick reply. I will look into the 'file_*' functions.

    But this seems to be alot of work (programming) to something that SilkTest can do very easily.

    My goal here is to compare the 2 products so please don't take me as a WinRunner basher or anything like that. Our QA department has very little exp. in programming so the less that is required the better. Have you used both of these products? Which do you prefer? Why?

    Thanks again for the info,
    Mark




    ------------------

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by mpalombo:
    But this seems to be alot of work (programming) to something that SilkTest can do very easily.<HR></BLOCKQUOTE>

    With all due respect (seriously! ), I don't doubt that SilkTest can do this quite easily (without programming), but the approaching you are taking is inelegant and potentially unreliable.

    I would hazard a guess that most automation developers would prefer to use a programmatic approach ('file_*' functions) to perform this task.

    Don't get me wrong: short-term your approach will work, but longer-term it'd be far wiser to take the time hit and learn how the 'file_*' (and other) functions work. They are (reasonably) well documented in Help and are not too difficult to use effectively.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Have you used both of these products? Which do you prefer? Why?<HR></BLOCKQUOTE>

    I've used ST for ~2 years and WR for about 1.5 - try 'Search'ing the Forums for previous threads on various pros/cons from myself and others.

    There is also a ST/WR feature comparison document in the 'Downloads' sections as far as I remember, which is useful. ([edit] here: http://www.qadownloads.com/cgi-bin/d...mp.cgi?ID=158)

    Hope this helps,

    Automatrix


    ------------------


    [This message has been edited by Automatrix (edited 05-11-2001).]

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Mark;

    Lots of people are comparing these two products. It should be hard to find papers comparing these tools and user opinions/preferences.

    I believe that success with either tool requires (at least some) programming. Straight record-playback scripts can only be used in the most simple of cases. Usually, you record a testcase "template" and extend it with variables, loops, ... ;i.e. programming.

    IMHO, SilkTest is favored by programmer-types, but requires more technical abilities. WinRunner strikes a nice balance between start-up ease and programming.

    I've recently completed a comparision for my company, and we've decided to go with Mercury's toolset.

    Jerry

    ------------------

  6. #6
    Junior Member
    Join Date
    May 2001
    Location
    Manchester, NH. USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Automatrix,

    Please bear with me, I have just started using both of these products this week so all of what I am saying is based on first impressions.

    Let me explain a little of what I am seeing:

    My test is based on a file that is downloaded from a server. This file could potentially have HUNDREDS of lines in it. Some of these lines will be different with each run of the test so they cannot be used in the comparison but most lines will be compared.
    So the way I think it might go in WinRunner is:

    1. Open the file
    2. get a line from the file
    3. Check if the line is one that should be ignored, if so then goto 2
    4. compare the line to known good data (which by the way is going to be different for every line in the file)
    5. if the comparison is good then goto 2
    6. if the comparison is not good then display an error and then go to line 2
    7. close file

    Now in SilkTest I did the following:
    1. I got a known good data file.
    2. I selected the text up to but not including the line that will be different
    3. I made that selection my known good data
    4. I repeated steps 2 and 3 skipping the lines that will be different
    5. I ran the test and it works great.

    Now I did this on Tuesday and I've been playing with WinRunner since then so I can't say for sure but I don't think I did any programming for that.

    Now with the staff that I have (none of which are automation developers) which one looks better?

    Also if you could explain why the SilkTest solution is unreliable I would appreciate it.

    Again, let me say that I am not picking one over the other, I actually was leaning towards WinRunner before I ran into this snag.

    Thanks,
    Mark


    ------------------

  7. #7
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Mark,

    I don't have any quibble with the logic you are using for the comparison of dynamic text files - this can be very tricky, but what you have looks good.

    My only point is that you are not using the recommended approach to read the data from a file. As such, if you were to contact Tech Support with this problem I think the first thing they'd do is tell you to use the file functions written for this very purpose, before investigating your problem any further.

    Granted if you do not have any programming experience available, the quick approach which readily works is often the best, but you should be aware that as you move towards the longer term this ceases to be the case. As the contributor above says, at least some programming will be required to get the best from the test tool and have a sustainable, manageable automation effort.

    My comment about the test being "potentially unreliable" related to your approach of opening the text file in 'Notepad' rather than SilkTest.

    By needlessly running Notepad and opening the file in it rather than using transparent file function calls you are:

    - increasing the risk of an application crash/hang (since more apps are running simultaneously and being interacted with by WinRunner).

    - reducing the reliability of the script (since GUI interaction is typically more prone to failure than non-GUI interaction functions).

    - increasing the setup overhead should you need to move your test to another machine (Is Notepad configured the same way on the other machine? For example, is 'Word Wrap' ON or OFF as this will affect how a line appears and is selected by WinRunner).

    On reflection, maybe the term I should have used was "potentially less reliable"...which is slightly different...

    Good luck with your evaluation and your automation project!

    Automatrix

    ------------------

  8. #8
    Junior Member
    Join Date
    May 2001
    Location
    Manchester, NH. USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    Automatrix,

    I just want to thank you for the time that you have spent discussing this issue with me. One of my criteria for choosing a tool is the amount of support that is available, both through the vendor and through users groups, forums, etc. It is nice to find a forum with members who are knowledgeable and who will take the time to fully discuss a problem. I hope that in the future I will have more discussions with you.

    Thanks again,
    Mark


    ------------------

  9. #9
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: verifying text from a notepad document

    No worries - happy to oblige!

    BTW, if you are looking for a really good practical guide to test automation you should check out 'Software Test Automation : Effective Use of Test Execution Tools'.
    http://www.amazon.com/exec/obidos/AS...303255-2526110

    I don't have any connection to the authors, but just thought it provided a really good summary of loads of useful information and 'gotchas' which I learned about the hard way!

    Automatrix


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:08 PM.

Copyright BetaSoft Inc.