[ad_1]
I have two unit test projects, one for basic processing tests that only interact with mocks and another that needs to call an external loader before the tests can the called. The loader is used to invoke Spark via its Java runtime.
I can run my tests on the command line with something like:
spark-submit –class org.apache.spark.deploy.dotnet.DotnetRunner (more options) dotnet test mytest.dll
This successfully runs the tests and dotnet outputs a line like this:
Passed! – Failed: 0, Passed: 2, Skipped: 0, Total: 2, Duration: 10 ms – mytests.dll (netcoreapp3.1)
but the Visual Studio’s Test Explorer doesn’t know it ran and passed, so I get no green ticks. If I run a similar command line:
spark-submit –class org.apache.spark.deploy.dotnet.DotnetRunner (more options) debug
and run the tests from Visual Studio, everything works great and I get my green ticks. But I have to do it manually.
So the questions are:
- how to I configure Visual Studio so that if I run my tests, it will run them via the loader and show the results.
- how do I do it just for this one project and not the other unit test project? *.runsettings files seem to be solution wide.
[ad_2]