We are in the process of converting our NetFramework products to NETCore. In the older NetFramework product our integration tests are published to TFS as a build artifact. The release pipeline gets these artifacts, and runs silent installs, and then runs the tests using the visual studio test build step.
The newer product suite is now getting its integration tests converted. It's integration test assemblies are NETCore assemblies. I notice that I can either run these tests using vstest.console.exe, or dotnet test (either way). And I have manually verified this. However, I am at a loss as to how to run them efficiently and automatically in the TFS release pipeline.
Lets start with my "dotnet test" question. "Dotnet test" wants the ".csproj" source, and when I have manually supplied it and run this command from the command prompt it appears to need all of the other sources as if it is building the assemblies. Of course, I can supply all of the sources to the release pipeline, but really, is there no way to avoid that? After all, there is no "GetSources" step in the release pipeline, and while I can surely write my own, or supply the entire source repository as a build artifact, that seems very wasteful and seems wrong.
On the other hand, when I run the tests through vstest.console.exe, they first inform me of missing dependencies that are listed in the .deps.json file. Each time I run the test I "nuget install" them and copy the runtime folders to under the bin folder, and re-run, get the next error, and repeat. After 5 iterations all of the missing dependencies are there, and the tests run and pass. Is there some automatic means of getting a list of these missing dependencies and getting them all before attempting the test run?
Or is there some other means of getting a NETCore integration test to run in the TFS release pipeline that I am missing? Something simpler, or more direct?
Thanks!