chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi,

I'm using Teamcity 6.5 and I have this calling Finalbuilder (via a command line runner).

However, I want to execute MSTest unit tests, under Typemock (the unit tests are mocked etc), and create NCover reports. I am assuming MSBuild is the right tool for this.

What would an example script look like?

Thanks
asked by GSS (2.8k points)

6 Answers

0 votes
Hello, sorry for the late reply.

Typemock Isolator includes a command line runner, TMockRunner.exe, that allows running tests with Isolator enabled.

You can run the tests with MSTest using the Execute Program task in Final Builder. In the program file, specify the file TMockRunner.exe, which is located in the Typemock Isolator installation directory. As the parameter, specify the command:

mstest.exe /testcontainer:<yourtestassembly>

So that together it executes:

TMockRunner.exe mstest.exe /testcontainer:<yourtestassembly>

(make sure to specify the correct full paths to the files)
answered by igal (5.7k points)
0 votes
Hi,

That doesn't answer how to implement NCover into the equation, though?

Thanks
answered by GSS (2.8k points)
0 votes
Hi,

That's true, in order to include NCover, you can execute it through the same command line:

TMockRunner.exe -first -link NCover3.0 ncover.console.exe mstest.exe /testcontainer:<yourtestassembly>

This way Isolator links with NCover and both profilers can work together.

Please let us know if it helps.

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
Hi,

NCover Console has arguments (See http://docs.ncover.com/ref/command-line-tools), can I pass in arguments in using typemockrunner?

Thanks
answered by GSS (2.8k points)
0 votes
Hi,

yes, anything written after ncover.console.exe behaves the same as if it would be executed alone.

This command line:
TMockRunner.exe -first -link NCover3.0 ncover.console.exe //log-file MyLog.log mstest.exe /testcontainer:<yourtestassembly>

Is the same a way to execute the command line:
NCover3.0 ncover.console.exe //log-file MyLog.log mstest.exe /testcontainer:<yourtestassembly>
While having both NCover profiler work and Isolator at the same time.

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
This blog post may also help: http://www.paraesthesia.com/archive/201 ... tudio.aspx

Don't get misled when you see a big block of MSBuild script at the beginning - it uses that as a demo, but it does talk about command line execution.
answered by tillig (6.7k points)
...