Setting up multiple test projects in Azure Pipeline
AnsweredHello, I managed to setup a single Nunit test project and setup an Azure pipeline to build, run, and show results in Azure livingDocs tab.
Now I created several other Testprojects in the same solution and was wondering how to specify this in the specflow+ pipeline task: for example, something like this: "all my test projects names end with "Tests" (project1Tests.csproj", project2Tests.csproj, etc). and they run on the Test task. I used *below in as a guess, but that does not work. Thanks
-
Hello,
This is currently not supported. The build task only accepts 1 input (1 feature folder, 1 test assembly, 1 feature data).
However, as a workaround, you could add for each project a build task. This should work, because the Build task (during it's run) will merge the previous build task results into one.I don't know how many projects you have currently, hopefully not a lot of work to create the tasks. If you wish, you can open a feature request here: https://support.specflow.org/hc/en-us/community/topics/360000519178-Feature-Requests
0 -
Thank you for the reply, I imagine there will be many test projects, Having to modify the Pipeline each time a new test project is created is a bit of an overhead. Ideally some sort of pattern matching within a folder structure would be ideal. In the meantime I will test your multiple build steps suggestion and report back. Thanks again.
EDIT:
Multiple steps is working. so far. Just have to test the "Unused Step Definitions" field. I though I had one showing up before but now is 0. not sure if it is being overwritten by latest built step.
EDIT:Confirmed, the "Unused Step Definitions" field under the analytics tab is not working as expected. My first test project has 1 unused step, while the second does not. I have two build steps for LivingDocs and the las step seems to be overwriting this field and showing up as "0"0
Please sign in to leave a comment.
Comments
2 comments