Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie question! Please help!

Status
Not open for further replies.

humbleservant888

Programmer
Jan 12, 2005
4
US
Hi chaps:

I just created some new test files (around 19),can I write a small script to run all the test files one by one? Can winrunner do that?
eg. I have test1..........test19 and I dont want to open each test case one by one (total 19 times) instead of a script to run all the test cases one by one automatically, do you think winrunner have this feature? Thanks for your advance.

Kelvin
 
Hi Kelvin

Depends what you mean by test files. If you mean you set up 19 tests in Test Director, then Winrunner will not automatically run them for you.

If you mean you have 19 files with information which need opened, info extracted and processed, and closed to carry out the test then the answer is Yes, WR will do the job for you.

Let me know what you're trying to do and I'll try to help out.

Dave

"Probably the only Test Analyst on Tek-Tips"

Take a look at Forum1393 & sign up if you'd like
 
Hi Dave:

Actually I have 19 tests in Test Director, can I write a script to run those tests automatically? I want to write a script and run those tests one by one so I don't need to open them one by one. Thanks for your advance.

Kelvin
 
Hi Kelvin.

The only way to run the tests automatically would be to define them as automated tests rather than manual ones. You'll have to write a winrunner script to carry out each of the tests and import the script(s) into test director.

Then you can specify the group of automated tests as a test set (in Test Lab) and run it from there.

That will automate the run.

Have you considered if it is worth the effort? If this test run is only going to run once, it isn't worth the time spent to automate it.

Dave

"Probably the only Test Analyst on Tek-Tips"

Take a look at Forum1393 & sign up if you'd like
 
Hi Dave:

Could you show me how to write a winrunner script to carry out each of the tests and import the scripts into the test director? Where can I find the topic in the user guide? It is because I have no clue on this.
"Then you can specify the group of automated tests as a test set (in Test Lab) and run it from there."
What does that mean? Sorry I am really new to WinRunner. thanks for your advance.

Kelvin
 
Hi Kelvin,

First you need to get WinRunner up and running and create a script to carry out the actions in the tests.

You can record this in WR. Simply click on the record button and carry out the actions you would need to do to carry out the test. WR will write the automation code as you do this (like recording a macro in Excel).

WinRunner uses a scripting language called TSL, and is based on C.

Once you have a working script to run your test yoou create a new test in Test Director and specify it as an automated (WinRunner) test. YOu will then have to select Copy From on the Test Script tab to enter the test script you recorded and edited.

Once this is done, you will have a test that can be run automatically.

Repeat for the other 18.

In Test Lab, set up a test set and add all the automated tests. Run the test set and the tests will run automatically.

This is very high level - the online help in TD and WR will be useful to you. Try the provided tutorials wirh WR - this will help also.

Dave

"Probably the only Test Analyst on Tek-Tips"

Take a look at Forum1393 & sign up if you'd like
 
Hi Dave:

Thanks for your suggestions. This is what I already did. I finished all 19 tests but I have no idea how to run them one by one. Here is what I want to know:
"In Test Lab, set up a test set and add all the automated tests. Run the test set and the tests will run automatically."
Thanks. Can I run them one by one or they can run at the same time? It is because I need to run them one by one but not run them at the same time.
I need to do this test because I have to run them everyday. Thanks!

Kelvin
 
In Test Director, click on New Test Set. You will be propmpted to enter a name for the test set. Once you have done this you will be ready to add tests to it. If the tree on the right doesn't automatically appear, click the Add Tests button

Add your automated tests to the test set from the tree on the right of the screen.

Once you're done, click on Run Test Set.

This will execute the tests in the test set in turn. If they are automated, then it will run them in sequence.

Dave

"Probably the only Test Analyst on Tek-Tips"

Take a look at Forum1393 & sign up if you'd like
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top