I've been doing some build validation testing for a project. I'm running two tests. The class running those tests has a class fixture that is configuring and running the set up and tear down before and after the tests are ran.
I'm using Visual studio to implement the BVTs and the test are running fine here locally. However, I deployed the repository with the BVTs to Azure Dev Ops release pipeline using the Visual Studio Test stage and its failing.
Has anyone else ran into this issue?
Before running the Visual Studio Test task, you need to build the related projects within the solution at first. Then use the output DLL files to do the tests.
If you want to directly run the test project without an addition previous build step, you can check out the source code into the pipeline working directory, then use the .NET Core task to execute the '
dotnet test
' command with the test project.The '
dotnet test
' will automatically build all the related projects before starting the tests.For example, there are two projects within the same solution:
MathCalc/MathCalc.csproj
TestMathCalc/TestMathCalc.csproj
Using below task can directly execute the test project without adding a previous build step.