Sandesh A D
Sandesh A D

Reputation: 172

How to run specfic scenario in VSTS without altering my CI pipeline

I'm trying to show all my specflow scenarios in VSTS and run the selected scenarios without altering my CI setup. How can I pass my scenario name to test assembly task in my build set up.

Upvotes: 0

Views: 48

Answers (1)

Charlie Drewitt
Charlie Drewitt

Reputation: 1583

AFAIK, there is no way in Azure Dev Ops to display a selectable list of scenarios at queue time and allow the user to choose from that.

I think the best you can do is add a variable to the build process which is settable at queue time:

enter image description here

Then, use this variable to filter which tests are run with the 'Test filter criteria' field.

enter image description here

When you queue the build, you'll be able to input the name of the specific scenario you want to run.

enter image description here

If you want your commit triggered CI build to continue to run all scenarios, you could have two test tasks in the pipeline (one for specific scenario, one for all scenarios) and use custom conditions to run either one or the other based on whether the ScenarioName value is set.

Under 'Control Options', set 'Run this task' to 'Custom condition' and then enter the condition in the 'Custom condition' box.

enter image description here

Upvotes: 2

Related Questions