In this tutorial you will learn how to "pipeline" several test campaign executions.
Imagine you have 3 tests campaigns, Campaign 1, Campaign 2 and Campaign 3.
Campaign 2 must be executed only if Campaign 1 had at least 90% of the testcases successful, less than 5% of failures and less than 4% of not executed.
Campaign 3 must be executed only if Campaign 2 had less than 2% of failures.
XStudio allows managing such kind of pipelining needs.
The mechanism relies on the xci launcher which allows having a complex pipeline of campaign execution all triggered or not from the previous campaign's results. More details about the xci launcher are available here.
The first thing to do is to prepare the N campaigns you wish to pipeline.
In each of those campaigns, you'll select a list of tests that you will order as you want.
The idea is to add a 'trigger' test at the end of each campaign whose role will be to start the next campaign if the results of the current campaign are acceptable.
You'll need to create a new category (associated with launcher xci) in the test tree, create a folder then a trigger test (i.e. you can call it Trigger test 1 for instance). You'll also need to prepare some test attributes (from the test tree's root node) that you will need during configuration:
Attribute name (case sensitive) | Content |
com.xqual.xci.campaingId | the id of the next campaign to run (if results are acceptable) |
com.xqual.xci.sutId | the id of the SUT for the next campaign's session |
com.xqual.xci.agentIds | ';' separated agent ids) |
com.xqual.xci.configurationsIds | ';' separated configuration ids) |
In your first campaign, add the test Trigger test 1 at the very end of the campaign.
Create a session under this first campaign so so than you can create a configuration for Trigger test 1 and provide the minimum success rate etc. you wish as KPI to trigger the execution of the next one.
Execute Campaign 1.
Campaign 2 will be executed automatically if results obtained on Campaign 1 are matching specified criteria.
Do the same for all the next campaigns you wish to pipeline.
If you're interested in pipelining, you may be interested in one of our white-paper: Continuous testing is on the road to DevOps