Automaticallyut MSTest all test methods in a solution in Command Line

StackOverflow https://stackoverflow.com/questions/22297354

  •  12-06-2023
  •  | 
  •  

Pregunta

The MSTest allows to run tests in specify assemblies to test through /testcontainer or metalist through /testmetadata; But is there a way to automatically run all tests in a solution, whithout specifing any name of dlls/meta files? Thanks.

¿Fue útil?

Solución

It's not what you want to hear, but the answer is no, by default you are limited to the /testcontainer or /testmetadata options for specifying which tests to run.

You could easily run MSTest multiple times for each DLL in your project which contains tests. You could even run a process that analyzes your DLLs for tests and build up a list of DLLs which contain tests and then run a script that calls mstest for each of those DLLs.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top