0
votes

I currently have CI running via Teamcity. My automated tests are Specflow with NUnit as the generated code behind. I have BeforeTestRun hooks to log test information. The NUnit build step is using the NUnit runner from Teamcity. I've tried using command line and nunit-console however my team likes the ability to be able to see failing tests on the fly (these tests take about 15 minutes to run and being able to see failures early is beneficial).

In Teamcity the tests are run with a dependency on another build project. We get the artifacts from the build project and run the tests against them.

Is it possible to pass the version from the build project dependency to the test project and then I can write that information via my BeforeTestRun method?

Thanks for any tips or advice you may have.

1

1 Answers

0
votes

You could load the dll built by the other process and interrogate the certain number that us stored in there and then print this out in your method that runs before the tests run.

I'm on my phone at the moment so getting exact details is awkward but basically you want to look at loading the assembly manually (if it's not already loaded at that point) then querying the metadata to get the assembly version.

If you don't already inject a version into your assemblies with teamcity then you might want to do that as well.

I'll try and add some more useful links later on.