Thank you very much, Mauro.

I had assumed that invoking the no args constructor would create a 
StepsConfiguration object devoid of all the default config objects (this was 
not clear to me even reading the API docs).

Great about the JIRA improvement.

Cheerio,
B.

From: Mauro Talevi [mailto:[email protected]]
Sent: 23 March 2010 07:46
To: [email protected]
Subject: Re: [jbehave-user] Using StepsConfiguration

Hi Barbara,

in your Scenario class:

StepsConfiguration configuration = new StepsConfiguration();

configuration.useMonitor(new PrintStreamStepMonitor());

addSteps(new StepsFactory(configuration).createCandidateSteps(new YourSteps()); 
// if YourSteps is a POJO



or



addSteps(new YourSteps(configuration)); // if YourSteps extends Steps
A fully working example of configuration can be found in the trader example:

https://svn.codehaus.org/jbehave/trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/TraderScenario.java

Cheers

On 21/03/2010 15:48, Barbara Rosi-Schwartz wrote:
Hello everyone.

I am a JBehave newbie and I am trying to figure out how to use a 
StepsConfiguration. What I want to do is to use the default StepsConfiguration, 
but to configure it to use
a PrintStreamStepMonitor, in order to do some debugging. I cannot find a way to 
get hold of the default StepsConfiguration object that is used in my Steps 
subclass. I see I can create a StepsConfiguration object and then give it as a 
constructor arugment to my Steps class, but, as I said, I only want to replace 
the default monitor.

A little code snippet would be greatly appreciated.

TIA,
Barbara

[cid:[email protected]]

Barbara Rosi-Schwartz
Java Developer
IG Group p<http://www.iggroup.com/>lc

[email protected]<mailto:[email protected]>
+44 (0)20 7896 0011 ext. 4208


________________________________
The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index Ltd is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.


________________________________
The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index Ltd is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

<<inline: image001.gif>>

Reply via email to