Automatyczne uruchamianie testów jednostkowych na budowie

Chciałbym wiedzieć, czy istnieje sposób, aby Visual Studio uruchomiło testy jednostkowe odpowiadające danemu zestawowi, gdy tylko go zbuduję.

Podane rozwiązanie zawierające projekty o takiej strukturze:

Assembly1

Assembly1.Tests 

Assembly2 

Assembly2.Tests

Czy Jest jakiś sposób na uruchomienie testów jednostkowych w Assembly2.Tests, gdy Assembly2 jest zbudowany?

To byłoby niesamowite.

Używam Visual Studio 2008 Standard Edition.

Author: abatishchev, 2010-08-13

1 answers

Możesz użyć narzędzia konsoli nUnit, aby uruchomić testy jako zdarzenie post-build dla danego projektu.

Dzwonisz do nunit-console.exe i dostarcz swój assembly zawierający Twoje testy jako argument.

"C:\Program Files\NUnit 2.5.7 \ bin \ net-2.0\nunit-console.exe "" PathToTestAssembly.dll "

LUB

Możesz uruchomić testy w GUI:

"C:\Program Files\NUnit 2.5.7 \ bin \ net-2.0 \ nunit.exe "" PathToTestAssembly.dll" / run

Edit:

Usunięto część o zdarzeniu post-build dla projektu test assembly.

 18
Author: fletcher,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2010-08-13 10:32:58