Reputation: 172
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
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:
Then, use this variable to filter which tests are run with the 'Test filter criteria' field.
When you queue the build, you'll be able to input the name of the specific scenario you want to run.
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.
Upvotes: 2