When you have deployed your application on multiple servers you might want to reuse same test scripts to test multiple environments. You can easily do that with our test automation feature. To demonstrate, we'll assume that you have a web application deployed on a staging and a production server.

Now during a typical application life cycle you might run into issues which requires you to verify both of the environments individually.

We'll do just that using parameter-based automation commands.

We'll assume that you have already specified automation related commands and details in your test cases. If not, please check it out here.

Defining execution-specific variable

Another requirement is that you should have custom properties defined for the executions. For web app that is to be tested on multiple servers, we'll define 'URL' as custom variable (or custom fields) for executions.

You can do so by going to your project, then Settings > Custom Fields

Running parameterized automated tests

Now you'll be prompted with additional text box asking "URL" every time you create an execution.

For creating this execution I've specified my URL which is now ready to be passed on to the machine that will carry out the actual execution.

Before that, let's see how we can insert variables like URL in our automation command template. Go to Settings > Automation Settings

 

On this page we'll write our command that triggers our automated test cases. Note that we have to parameterize it too so individual test cases can be executed.

We're using our dummy command as stated above:

testrun [[TestCase]] [[TestSuite]] --url [[Exec.url]]

The first two parameters are test case specific, the last one [[Exec.url]] is our execution-specific variable.

[[Exec.url]] will automatically be replaced by the URL you specify at the time of creating the execution.

Other user cases & ideas

Similarly, you can have a mobile app to test with multiple mobile platforms. In that case you would need to create 'platform' named custom field and so on.

Cross browser or cross OS testing.

Did this answer your question?