shekharpro / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Enhancement: run custom extensions via Icarus #425

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, custom extension addins (classes that derive 
from 'TestRunnerExtension') can only be used via command line with 
Gallio.Echo.exe, using the '/runner-extension' switch.

This is ok for continuous integration, or if you run Gallio through 
NCover, or some command line based tool. But I cannot find a way to run an 
extension directly with anything that has a GUI (Icarus, ReSharper, 
TD.Net...). There should be an option to do that, e.g. through Icarus 
project settings or at least some manual editing of the config files...

Regards
Thomas

Original issue reported on code.google.com by thomaswe...@googlemail.com on 17 Apr 2009 at 11:12

GoogleCodeExporter commented 8 years ago

Original comment by grahamr...@gmail.com on 18 Apr 2009 at 9:58

GoogleCodeExporter commented 8 years ago

Original comment by grahamr...@gmail.com on 18 Apr 2009 at 9:58

GoogleCodeExporter commented 8 years ago
I've implemented this as an options page, which means the settings would be 
stored
per-user rather than per-project. Then I re-read the issue, and you mentioned 
having
it at the project level, so I started implementing that. And then I started 
thinking
about it too much. :)

What would be more useful to you? Do you want this information to be stored 
with the
project? Or would it be better as a user setting? (Or maybe even both?).

Original comment by grahamr...@gmail.com on 19 Apr 2009 at 9:36

GoogleCodeExporter commented 8 years ago
My usual use-case scenario is as follows:

I maintain a .gallio project file with my solution. This is in the repository 
and 
serves as the execution target for automated builds (CC.Net). On my dev box, I 
run 
Gallio mostly through ReSharper directly in Visual Studio - the .gallio project 
file 
serves mainly as a project-specific target for CI builds.
(Note: The actual extension that I have in mind collects and displays 
performance 
data (which is not relevant during actual development anyway).)

So, storing the setting in the .gallio file on project level (not user, this 
could 
lead to inconsistent results when invoking the project file during a CI build) 
would 
be fine for me. 

I imagine another input box for Icarus' project properties tab...

This way, it would not be possible to invoke the extension through ReSharper, 
but 
that would be ok for me/now. If I'd really need to run an extension, I could 
always 
do it through Icarus.

Regards
Thomas

Original comment by thomaswe...@googlemail.com on 20 Apr 2009 at 7:59

GoogleCodeExporter commented 8 years ago
OK, now you can add test runner extensions at the user (.settings) or the 
project
(.gallio) level. How are you running CI builds, with Echo?

Original comment by grahamr...@gmail.com on 24 Apr 2009 at 7:05

GoogleCodeExporter commented 8 years ago
Thanks very much for the fast work!

I run CI builds through the NCover2 MSBuild task, which receives a command line 
for 
Gallio.Echo.exe as an argument. - I have to do it this rather complicated way 
because my dev box is 32bit, but my CI server is 64bit. So I need a way to 
provide 
the x86-version of Gallio.Host.exe as an argument for CI builds.

Regards
Thomas

Original comment by thomaswe...@googlemail.com on 25 Apr 2009 at 7:55

GoogleCodeExporter commented 8 years ago
I'd better fix Echo to take note of the addition to project files then!

Original comment by grahamr...@gmail.com on 25 Apr 2009 at 2:07

GoogleCodeExporter commented 8 years ago
Thx!

It took me 3 days to figure this 32/64bit story out. But once you know it it's 
just 
a matter of copy/paste. Now it works like a charm, and as a side effect I can 
be 
sure that my newly developed assemblies do work on both 32bit and 64bit as 
expected.

Regards
Thomas

Original comment by thomaswe...@googlemail.com on 25 Apr 2009 at 6:15

GoogleCodeExporter commented 8 years ago
I'm not sure I understand why you have to provide a 32bit version of 
Gallio.Host.exe
to NCover v2.  If there are test assemblies that must be run 32bit then you can
compile them with the "x86" flag and Gallio will detect the fact that it must 
use a
32bit host automatically.

The preferred way to run with NCover v2 is to specify the NCover2 runner type.  
You
can also pass in additional arguments for NCover as runner options.  This 
feature is
new in v3.0.6 and is described in the release notes.

Original comment by jeff.br...@gmail.com on 25 Apr 2009 at 6:40

GoogleCodeExporter commented 8 years ago
Ok then, I didn't work that out with 3.0.6, but with 3.0.5. And I wasn't able 
to make
NCover run without explicitely specifying the x86 host AND compiling the 
assemblies 
to x86 (I think this is because NCover requires the host to be explicitely 
specified). Can't remember the details anymore, in the end I was happy to have 
it 
all running, and I didn't investigate all the details...

So if I can use the Gallio task with the runner type set to NCover2 now this 
will be 
a great help. It will make the build script much clearer (and shorter). 

Thanks for the hint. I will definitely try this.

Regards
Thomas

Original comment by thomaswe...@googlemail.com on 26 Apr 2009 at 8:52