Use params in a test case example to test remote port and REST API

In this article, you get an example on how to use the Params of Test Case.

how to use the Params in a Testcase

how these params are passed to the test script

How a script can use them

How the results and a log file from the test case can be uploaded back to XStudio

For this example:

we use simple scripts in '.Bat' (for windows).

the script is able to parse any number of arguments

then it launches a tool in a command line (taking advantage of the params)

throughout the script we log information in a 'log.txt' file

at the end of the script, we exit with 0 as an error code if the action succeeded, something else if it failed

the launcher then return all information to XStudio DB (success/failure, messages, and uploaded 'log.txt' file)

so you get a result like the following one:

Note: the launcher we use in this example is a derivation the standard 'bat.jar' launcher. It has been tested to work with XStudio 3.1. A version for 3.0 can be tried (see as attachment of this article) - for the moment let's call it "bat_with_params.jar"

We used the same script to enable 2 differents tests:

TestTCPportAvailability: ensures that a MYsql database is reachable of a remote server (we use PORTQRYV2 for that)