Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 30, 2019 14:24

If you use Perfecto IDE Native scripts, you will probably face the need of parametrizing them and structure them in  Test Suits. Even going further you can execute your tests in parallel. This way you can have properly structured Regression and Smoke tests as well as the fact the you will save time from the executions itself. You can also go forward and use the scheduler to automate this process.

Step-by-step guide how to create parametrized tests

You can refer to this video or check the steps bellow it:


  1. Create the test you want to parametrize, adding all steps and command you need to make one fully functional scenario.
  2. Create new test script, where you have Open device, then add your already created full test as many times as your parametrization needs. Finally close your device:



  3. For each of the added copies of your script now you have to add the values that you want to use in your parametrization. By doing this, each of the executions of your script will use different data values.



  4. The steps above will execute your test against the same device one after another. To ensure this mode of executions, confirm that your execution mode is either unticked or it is with selected "sync" or "embedded" option:



  5. To ensure that your execution won't stop if any of the scenarios fails, go to "On Error" tab, and from the drop down menu pick "CATCH". This way, if any of the parametrized versions of your main script fails, the next version will still starts. You can do the same for the Open Device command. By doing this, you will ensure that if your device is busy, you can implement device handling mechanism.



  6. If you need to run your tests on several devices, not just on one but you still prefer to keep the test running one after another, you will need to create few variables containing the devices you will need. 



  7. Then double click the scripts themselves and change the way they allocate device, to use the specific variable you created:



  8. Please note that is really important that you will untick "Allocate device automatically" option from the "More Menu".



    Step-by-step guide how to create parallel executions for your tests




  9. The first thing you have to change in your Test Suit/Runner (basically the big test that holds your parametrzied options of your scripts) is to remove the open and close device commands. It will contain just your scripts and looks like this:

  10. The only other thing you have to change, to make your tests run in parallel is double click your scripts and change the script execution mode to "Async"


  11. If you now want to automate the test executions, please refer to Scheduler - scheduling script executions.
  12. If you want to improve even more your Reporting, please refer to Perfecto IDE: Add Job Name and Job Number to CI Jobs, where you can follow the steps and add dynamic Job Number and Name