Managing Test Files - WinRunner

You use the commands in the File menu to create, open, save, print, and close test files.

Creating a New Test

Choose File New or click New. A new window opens, titled Noname, and followed by a numeral (for example, Noname7). You are ready to start recording or programming a test script.

Saving a Test

The following options are available for saving tests:

  • Save changes to a previously saved test by choosing FileSaveor by clicking Save.
  • Save two or more open tests simultaneously by choosing File > Save All.
  • Save a new test script by choosing File > Save As or by clicking Save.

To save a test to the file system:

  1. On the File menu, choose a Save command or click Save, as described above. The Save Test dialog box opens.
  2. To save a test to the file system

  3. In the Save in box, click the location where you want to save the test.
  4. Enter the name of the test in the File name box.
  5. Select or clear the Save test results check box to indicate whether you want to save any existing test results with your test.

    Note that if you clear this box, your test result files will not be saved with the test, and you will not be able to view them later. Clearing the Save test results check box can be useful for conserving disk space if you do not require the test results for later analysis, or if you are saving an existing test under a new name and do not need the test results

  6. Click Save to save the test.

To save a test to a TestDirector project:

  1. On the File menu, choose a Save command or click Save, as described above. If you are connected to a TestDirector project, the Save Test to TestDirector Project dialog box opens.
  2. Note that the Save Test to TestDirector Project dialog box opens only when WinRunner is connected to a TestDirector project.

  3. Select the relevant subject in the test plan tree or click the New Folder button to create a new subject folder. To expand the subject tree, double-click a closed folder icon. To collapse a sublevel, double-click an open folder icon.
  4. In the Test Name text box, enter a name for the test. Use a descriptive name that will help you easily identify the test.
  5. Click OK to save the test and close the dialog box.

Opening an Existing Test

To open an existing test, choose File > Open or click Open.

To open a test from the file system:

  1. Choose File > Open or click Open to open the Open Test dialog box.
  2. To open a test from the file system:
  3. In the Look in box, click the location of the test you want to open.
  4. In the File name box, click the name of the test to open.
  5. If the test has more than one set of expected results, click the folder you want to use on the Expected list. The default folder is called exp.
  6. Click Open to open the test.

If you select to open a test that is already opened by another WinRunner user, a message similar to the following opens:

To open a test from the file system:
Click Cancel to open the test as a locked, editable test. You can edit and run the test, but you cannot save the test with its current name.

Click OK to unlock the test only if you are sure that your work will not interfere with other users.

To open a test from a TestDirector project

  1. Choose File > Open or click Open. If you are connected to a TestDirector project, the Open Test from TestDirector Project dialog box opens and displays the test plan tree.
    Note that the Open Test from TestDirector Project dialog box opens only when WinRunner is connected to a TestDirector project.
  2. Click the relevant subject in the test plan tree. To expand the tree and view sublevels, double-click closed folders. To collapse the tree, double-click open folders.
  3. Note that when you select a subject, the tests that belong to the subject appear in the Test Name list.

  4. Select a test in the Test Name list. The test appears in the read-only Test Name box.
  5. If desired, enter an expected results folder for the test in the Expected box. (Otherwise, the default folder is used.)
  6. Click OK to open the test. The test opens in a window in WinRunner. Note that the test window’s title bar shows the full subject path.

Zipping and Extracting WinRunner Tests

You can zip your WinRunner test for easy distribution using the Export to Zip File option. When you choose this option, all files that are saved in your test folder are zipped, including the Data Table, test results, GUI files, etc. External files stored in locations outside your test folder are not zipped.

You can use the Import from Zip File option to extract the files for any test that was zipped using the Export to Zip File option. Note that you cannot use this option to extract files from a test that was zipped using another utility.

To zip a test:

  1. Open the test you want to zip.
  2. If the open test contains unsaved changes, save the test.
  3. Choose File > Export to Zip File. The Export to Zip File dialog box opens and displays the source path of the test and a suggested zip file name.
  4. To zip a test

  5. Accept the default zip file name and path or specify a new one.
  6. Click OK. The dialog box displays a progress bar as it zips the test. The dialog box closes when the zip process is complete.

To extract a zipped test:

  1. Choose File > Import from Zip File. The Import from Zip File dialog box opens.
  2. To extract a zipped test

  3. Enter or browse to the location of the zipped test you want to extract.
  4. Accept the default location for extracting the test, or specify a new location.
  5. Click OK. The dialog box displays a progress bar as it extracts the test. When the extraction process is complete, the dialog box closes and the extracted test is displayed in the WinRunner window.

Printing a Test

To print a test script, choose File > Print to open the Print dialog box.

  • Choose the print options you want.
  • Click OK to print.

Closing a Test

  • To close the current test, choose File > Close.
  • To simultaneously close two or more open tests, choose File > Close All.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics