Add the ability for Xbot tests to pass triggering instance ID to the client
tl;dr: we would love being able to have Xbot tests with a Script Path of e.g. run_test.py $INSTANCE_ID
, which then executes run_test.py
on the target client with the actual ID of the instance that triggered the run as a commandline parameter.
To elaborate some more on our use case: we use PractiTest together with Xbot and Squish to automate running our BDD GUI tests on cloud VMs. However, we want to have per-step granularity in our logging of test results rather than just the pass/fail outcome determined by Xbot based on the exit code.
Our solution to this is to pass the test ID of the Xbot test to a Python script on the client, which runs the Squish test runner to execute the test and then imports the results using this process:
- Retrieve the Xbot test for the ID given from the PractiTest API
- Find an API test that has the same name and steps (creating a new API test if one doesn't exist)
- Parse Squish's JUnit report and use the PractiTest API to push results and logging for each step to a new run of the API test in PractiTest.
This way, we can just click "Run" on any of our tests in PT and get granular results, with screenshots taken by Squish uploaded to any failed test steps and a much more readable breakdown of logged test steps compared to just uploading the bare JUnit report to the Xbot test, including the ability for testers to file JIRA issues for failed steps using PractiTest's JIRA integration.
However, it can be difficult to associate the API test with the actual TestSet the run should be in - as such it would be really helpful to our use if Xbot tests could pass some dynamic parameters to the script they run (rather than static ones hard-coded into the test), such as the ID of the specific instance triggering the execution. This would allow us to get the ID of the TestSet the run came from, and automatically create a new Instance of the API test for results in that TestSet.