Run Jobs Sequentially
Understand how to set up Azure DevOps pipelines to execute Selenium Java tests sequentially based on priority levels. Learn to use jobs, strategies, and matrix configurations in YAML to control test execution order and customize artifact names for logs and screenshots.
So far, we have executed all tests in a single job.
The Priority variable is passed to the goals of the Maven task so the tests with the specific priority are executed:
goals: 'clean test -Dgroups=$(Priority)'
Let’s say that we want to execute tests sequentially by priority:
- First, the
Highpriority tests should run. - Then, the
Mediumpriority should run. - Finally, the
Lowpriority ones should run.
How to execute jobs sequentially
To execute jobs sequentially, we need to change the pipeline code as follows so that it uses jobs and strategies:
The pipeline has a jobs section, which can include one job or more (line 4). ...