Get your 6-month No-Cost Opt-Out offer for Unlimited software automation!

how to manage multiple test scripts

how to manage multiple test scripts

Home Forums Ask Expert how to manage multiple test scripts

  • This topic has 1 reply, 2 voices, and was last updated 7 years ago by Sasha ZAP.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31059
    Rob Browning
    Participant

      are there examples on how to manage multiple test scripts?

      I’ve so far only seen examples with one script.

      #31060
      Sasha ZAP
      Moderator

        Hello rob.browning,

        I believe you are asking how to create a testing script which contains calls to one or more testing scripts in it and how to handle (debug) such called tests – If this is correct please follow this explanation:
        1. To add call to another test from within the current one you need to use the method “Runtest” and next to it write the full directory of the test you wish to call, for example:
        Runtest “D:XYZTest.zap”
        Also you can insert the Runtest call in ZAPTEST by clicking the Edit -> Insert Call to Run Test…”, then the Open window will appear where you can locate the test you wish to add.
        This way you can add any amount of tests’ calls into a single test.

        2. If there is a need to send some values that the called test supposes to use, you can use the TestParameters feature in the following format (The following example is a call for a test located in HP ALM which requires the Username and Password values):
        TestParameters.SetItem “Username”, Datatable.Value(“dat_username”)
        TestParameters.SetItem “Password”, Datatable.Value(“dat_password”)
        Runtest “[QualityCenter] SubjectGeneric Reusable ActionsZAPTEST AutomationZapR_Login”, “Script 1”, TestParameters

        3. In order to debug such called tests you need to place a Breakpoint next to the specific Runtest method, and using the Debug -> Step Into (Or the F11 key) you can go inside the called test during run time phase of the test and examine its executed steps.

        Thanks,
        Sasha

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.