We have dotnet core test projects that we are trying to test in a pipeline, but I want to test all projects, except one. So the command I use is
find ./test -type f -name *.csproj ! -name *WebAPI* -exec dotnet test {} \;
However, when this runs and one test fails, the pipeline is listed as succeeding.
In the step I get Test Run Failed. but the pipeline shows a green tick.
Hi @gummia
This is not a Pipelines limitation, but rather the way the command find returns error codes when doing such task.
There is a good article about this here:
There you will find suggestions to overcome this issue.
I think in your case you could change your command to something like:
find ./test -type f -name *.csproj ! -name *WebAPI* | xargs dotnet test
Please let me know if that solves your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.