No output with Gallio's Icarus?

Jul 25, 2009 at 3:00 PM

I tried Gallio + MbUnit + NBehave some months ago and lijed the combo very much.

I'm now using build 0.4.0.138 a not seeing the output in Gallio's Icarus any more.

I've also noticed that, when using

NBehave-console /storyOutput=xxx

with the code I created using the techniques described in http://www.codeproject.com/KB/testing/bddnbehave.aspx the narrative is not displayed.

Any hint?

Thanks in advance.

-Xavier

Coordinator
Jul 26, 2009 at 2:55 PM
Edited Jul 26, 2009 at 2:57 PM

Well, the author of that article mix the SpecBase baseclass with the "story stuff".
Spec classes that inherit from any of the SpecBase classes are intended to be run by that frameworks testrunner or any other runner that supports it, like testdriven.net or Resharper. nbehave test runners cannot run these tests. I would personally dont use a SpecBase baseclass for my stories, I use specbase classes when I get to the "low level details" of a scenario where I dont use Given/When/Then syntax.

You can mix them as the author of the article did, but there are a few things to keep in mind. NBehave runners will only call methods decorated with the Story attribute, so no setup or teardown will be executed. NBehave runners looks for classes decorated with NBehave.Narrator.Framework.ThemeAttribute (or NBehave.Narrator.Framework.ActionStepsAttribute)
So to get the narrative output with a nbehave runner you must have a ThemeAttribute on the class. without that attribute you get "Scenarios run: 0, Failures: 0, Pending: 0" as I think you get when you run your code with nbehave-console.

Jul 29, 2009 at 4:33 PM

Well, not that I'm specially interested in that technique. I just want to use the fluent inteface and run it with Icarus.

If the narrartive is lost but I can still obtain it using NBehave-console, that would be a minor problem.

But a basic set of files to get me going would be a good thing...

Modifying

http://nbehave.codeplex.com/Wiki/View.aspx?title=With%20NBehaves%20fluent%20interface

I managed to execute the test with Gallio, but had NBehave-console crash

-Xavier