Re: [jbehave-user] jbehave-web master build weirdness

2013-10-05 Thread Kendall Shaw

Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800)
Maven home: /home/kshaw/java/apache-maven-3.0.4
Java version: 1.7.0_40, vendor: Oracle Corporation
Java home: /opt/jdk1.7.0_40/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.8.13-100.fc17.x86_64", arch: "amd64", 
family: "unix"


On 10/05/2013 11:19 AM, Mauro Talevi wrote:

What's your mvn -v?
On 05/10/2013 19:18, Kendall Shaw wrote:

Hi,

Sorry about sending the failure notice to the list.

I'm sort of using master by accident. But, to get it to build and 
have tests succeed I changed:


PropertyWebDriverProvider.createDriver so that the case statement has 
default: at the end and defaults to firefox.


PropertyWebDriverProviderTest.shouldSupportFirefoxByDefault to save 
and then clear the browser property before running the test (it was 
set to htmlunit somehow). I then restore the property if it is not null


That is not the end of the story, but I stopped after it completed 
successfully.


After failure, and running mvn install -rf :jbehave-web-selenium, the 
browser property was set to "htmlunit". After the fixes I mention 
above (except for checking if the property was null), apparently the 
browser property was unset. I can't make sense of that. But, I think 
it means that the browser property is different if you run the entire 
suite vs. the selenium test. Maybe an unintentional dependency,


My employer has rights to my brain so I cannot provide a diff... sorry.

Kendall




-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






--
ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
This.is.easy. This-is-easy-too. Almost as easy to read as this.


-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] jbehave-web master build weirdness

2013-10-05 Thread Mauro Talevi

What's your mvn -v?
On 05/10/2013 19:18, Kendall Shaw wrote:

Hi,

Sorry about sending the failure notice to the list.

I'm sort of using master by accident. But, to get it to build and have 
tests succeed I changed:


PropertyWebDriverProvider.createDriver so that the case statement has 
default: at the end and defaults to firefox.


PropertyWebDriverProviderTest.shouldSupportFirefoxByDefault to save 
and then clear the browser property before running the test (it was 
set to htmlunit somehow). I then restore the property if it is not null


That is not the end of the story, but I stopped after it completed 
successfully.


After failure, and running mvn install -rf :jbehave-web-selenium, the 
browser property was set to "htmlunit". After the fixes I mention 
above (except for checking if the property was null), apparently the 
browser property was unset. I can't make sense of that. But, I think 
it means that the browser property is different if you run the entire 
suite vs. the selenium test. Maybe an unintentional dependency,


My employer has rights to my brain so I cannot provide a diff... sorry.

Kendall




-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




[jbehave-user] jbehave-web master build weirdness

2013-10-05 Thread Kendall Shaw

Hi,

Sorry about sending the failure notice to the list.

I'm sort of using master by accident. But, to get it to build and have 
tests succeed I changed:


PropertyWebDriverProvider.createDriver so that the case statement has 
default: at the end and defaults to firefox.


PropertyWebDriverProviderTest.shouldSupportFirefoxByDefault to save and 
then clear the browser property before running the test (it was set to 
htmlunit somehow). I then restore the property if it is not null


That is not the end of the story, but I stopped after it completed 
successfully.


After failure, and running mvn install -rf :jbehave-web-selenium, the 
browser property was set to "htmlunit". After the fixes I mention above 
(except for checking if the property was null), apparently the browser 
property was unset. I can't make sense of that. But, I think it means 
that the browser property is different if you run the entire suite vs. 
the selenium test. Maybe an unintentional dependency,


My employer has rights to my brain so I cannot provide a diff... sorry.

Kendall

--
ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
This.is.easy. This-is-easy-too. Almost as easy to read as this.


-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




[jbehave-user] Fwd: failure notice

2013-10-05 Thread Kendall Shaw




 Original Message 
From:   - Sat Oct 5 11:13:27 2013
X-Account-Key:  account3
X-UIDL: 1380996756.20195_0.b.spam,S=3620
X-Mozilla-Status:   0001
X-Mozilla-Status2:  
X-Mozilla-Keys: 
Return-Path:
X-Spam-Checker-Version: 	SpamAssassin 3.3.2 (2011-06-06) on 
a.spam.sonic.net

X-Spam-Level:   
X-Spam-Status: 	No, score=-0.8 required=5.0 tests=DCC_REPUT_00_12, 
MSGID_FROM_MTA_HEADER autolearn=disabled version=3.3.2
Received: 	from g.mx.sonic.net (g.mx.sonic.net [69.12.221.236]) by 
b.spam.sonic.net (8.14.4/8.14.4) with ESMTP id r95ICZVZ020185 for 
; Sat, 5 Oct 2013 11:12:35 -0700
Received: 	from mail.codehaus.org (mail.codehaus.org [199.193.192.103]) 
by g.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id 
r95ICVI0006252 for ; Sat, 5 Oct 2013 11:12:35 -0700

Message-Id: <201310051812.r95icvi0006...@g.mx.sonic.net>
Received:   (qmail 26969 invoked for bounce); 5 Oct 2013 18:12:30 -
Date:   5 Oct 2013 18:12:30 -
From:   mailer-dae...@mail.codehaus.org
To: ks...@kendallshaw.com
Subject:failure notice
X-Sonic-SB-IP-RBLs: IP RBLs .



Hi. This is the qmail-send program at mail.codehaus.org.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:
Sorry, only subscribers may post. If you are a subscriber, please forward this 
message to user-ow...@jbehave.codehaus.org to get your new address included. 
(#5.7.2)

--- Below this line is a copy of the message.

Return-Path: 
Received: (qmail 26963 invoked by uid 89); 5 Oct 2013 18:12:30 -
Received: from unknown (HELO b.mail.sonic.net) (64.142.19.5)
  by 63-246-24-167.contegix.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 5 Oct 
2013 18:12:30 -
Received-SPF: none (63-246-24-167.contegix.com: domain at kendallshaw.com does 
not designate permitted sender hosts)
Received: from nekobasu.localdomain (c-67-161-38-155.hsd1.ca.comcast.net 
[67.161.38.155])
(authenticated bits=0)
by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id 
r95ICSrD011834
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
for ; Sat, 5 Oct 2013 11:12:29 -0700
Message-ID: <5250568c.1030...@kendallshaw.com>
Date: Sat, 05 Oct 2013 11:12:28 -0700
From: Kendall Shaw 
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 
Thunderbird/17.0.4
MIME-Version: 1.0
To: user@jbehave.codehaus.org
Subject: jbehave-web master build weirdness
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm sort of using master by accident. But, to get it to build and have
tests succeed I changed:

PropertyWebDriverProvider.createDriver so that the case statement has
default: at the end and defaults to firefox.

PropertyWebDriverProviderTest.shouldSupportFirefoxByDefault to save and
then clear the browser property before running the test (it was set to
htmlunit somehow). I then restore the property if it is not null

That is not the end of the story, but I stopped after it completed
successfully.

After failure, and running mvn install -rf :jbehave-web-selenium, the
browser property was set to "htmlunit". After the fixes I mention above
(except for checking if the property was null), apparently the browser
property was unset. I can't make sense of that. But, I think it means
that the browser property is different if you run the entire suite vs.
the selenium test. Maybe an unintentional dependency,

My employer has rights to my brain so I cannot provide a diff... sorry.

Kendall

--
ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
This.is.easy. This-is-easy-too. Almost as easy to read as this.





-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Re: [jbehave-user] Parsing GivenStories

2013-10-05 Thread Andreas Ebbert-Karroum
Hi,

looks great. Thanks, will try that out!

--
Andreas Ebbert-Karroum (mobil)
Am 05.10.2013 13:36 schrieb "Mauro Talevi" :

>  Hi Andreas,
>
> in StoryRunner you'll find the method that does the parsing based on the
> configuration and story path:
>
> public Story storyOfPath(Configuration configuration, String
> storyPath) {
> String storyAsText =
> configuration.storyLoader().loadStoryAsText(storyPath);
> return configuration.storyParser().parseStory(storyAsText,
> storyPath);
> }
>
> Cheers
>
> On 04/10/2013 10:08, Andreas Ebbert-Karroum wrote:
>
>  Hi,
>
>  as Hans correctly pointed out in a recent post, the jbehave-junit-runner
> currently ignores the given stories. I agree that this is a feature, that
> is desireable to have. When we wrote the extension to JBehave, we have not
> implemented that, since we thought - and still think - that the
> jbehave-junit-runner provided enough value to be released. But the time has
> come to think about including that feature.
>
>  Now, the way the jbehave-junit-runner works is that it needs to know all
> stories, scenarios and steps, before the execution starts, in order to
> forward that information to JUnit, so that it knows how many and which
> tests to expect.
>
>  I do have access to the Story object, but from there I "only" get the
> given stories as paths and probably need to parse them myself. Can somebody
> point me to some source code in the original JBehave sources how that
> should be done best?
>
>  Here's the class that generates the JUnit description objects:
>
>
> https://github.com/codecentric/jbehave-junit-runner/blob/master/src/main/java/de/codecentric/jbehave/junit/monitoring/JUnitDescriptionGenerator.java
>
>  The method should include a addAllGivenStories(...) in between.
>
>  public Description createDescriptionFrom(Story story) {
>
>   Description storyDescription = createDescriptionForStory(story);
>
>   addAllScenariosToDescription(story, storyDescription);
>
>   return storyDescription;
>
>
>   }
>
>  ​​
>  ​Thanks for your help!​
>
>
>  --
> Mit freundlichen Grüßen / Best regards
>
> Andreas Ebbert-Karroum | Agile Principal Consultant
>
> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0)
> 175.2664109
> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
> www.more4fi.de
>
> Sitz der Gesellschaft: Düsseldorf | HRB 63043
> Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko
> Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen
> Schütz
>
> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
> und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
> Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
> bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
> beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
> evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
> nicht gestattet.
>
>
>


Re: [jbehave-user] Parsing GivenStories

2013-10-05 Thread Mauro Talevi

Hi Andreas,

in StoryRunner you'll find the method that does the parsing based on the 
configuration and story path:


public Story storyOfPath(Configuration configuration, String 
storyPath) {
String storyAsText = 
configuration.storyLoader().loadStoryAsText(storyPath);
return configuration.storyParser().parseStory(storyAsText, 
storyPath);

}

Cheers

On 04/10/2013 10:08, Andreas Ebbert-Karroum wrote:

Hi,

as Hans correctly pointed out in a recent post, the 
jbehave-junit-runner currently ignores the given stories. I agree that 
this is a feature, that is desireable to have. When we wrote the 
extension to JBehave, we have not implemented that, since we thought - 
and still think - that the jbehave-junit-runner provided enough value 
to be released. But the time has come to think about including that 
feature.


Now, the way the jbehave-junit-runner works is that it needs to know 
all stories, scenarios and steps, before the execution starts, in 
order to forward that information to JUnit, so that it knows how many 
and which tests to expect.


I do have access to the Story object, but from there I "only" get the 
given stories as paths and probably need to parse them myself. Can 
somebody point me to some source code in the original JBehave sources 
how that should be done best?


Here's the class that generates the JUnit description objects:

https://github.com/codecentric/jbehave-junit-runner/blob/master/src/main/java/de/codecentric/jbehave/junit/monitoring/JUnitDescriptionGenerator.java

The method should include a addAllGivenStories(...) in between.

public Description createDescriptionFrom(Story story) {


Description storyDescription = createDescriptionForStory(story);


addAllScenariosToDescription(story, storyDescription);


return storyDescription;
}
​​
​Thanks for your help!​


--
Mit freundlichen Grüßen / Best regards

Andreas Ebbert-Karroum | Agile Principal Consultant

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 
175.2664109
www.codecentric.de  | blog.codecentric.de 
 | www.meettheexperts.de 
 | www.more4fi.de 


Sitz der Gesellschaft: Düsseldorf | HRB 63043
Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko 
Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . 
Jürgen Schütz


Diese E-Mail einschließlich evtl. beigefügter Dateien enthält 
vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie 
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte 
Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die 
unbefugte Weitergabe dieser E-Mail ist nicht gestattet.




Re: [jbehave-user] Story language settings improvement suggestion

2013-10-05 Thread Mauro Talevi

or good suggestions on how to achieve the goal.

The problem is striking a balance between flexibility and 
configurability.   We don't like setter and static injection.  We prefer 
CDI.  The issue here is how to make this easier to configure and what is 
the sensible default.


We could make the language default to the platform locale, for example, 
instead of the English locale.


Please raise a JIRA issue for this.

Cheers
On 04/10/2013 14:49, Cristiano Gavião wrote:

good code contributions are always welcomed !


2013/10/4 Hans Schwäbli >


I tried to use JBehave with German language.
Then I discovered that you have to configure a lot to achieve this.
This is because you have to create a Keywords object and set it
into many other objects. See
http://jbehave.org/reference/stable/stories-in-your-language.html
If you forget to set the Keyword object into one of the other
objects, then it does not work correctly, tests fail. Or if
JBehave is changed in a future version, your language
configuration might not work anymore.
Furthermore you need to configure that in the Eclipse plugin.
I think this could be made much simpler. Can you make setting a
language simpler please (suggestion)?
The Eclipse plugin could detect the language of the story files
automatically by default for instance.
And there could be made a JBehave utility method (and maintained
in the JBehave Core project) which sets the language into all
required objects. Or it could even auto-detect the language
(according to the translations shipped which JBehave) by default.
This is just a suggestion.




--
"Tudo vale a pena se a alma não é pequena..."




Re: [jbehave-user] Result report with css files and images, how to do?

2013-10-05 Thread Mauro Talevi
That's correct, the view resources are bundled the zip which is separate 
from the core jar.


You can either use the Maven goal or unzip it manually yourself (Ant or 
other tool).


Cheers

On 05/10/2013 00:53, Alex Filatau wrote:
I might be missing the question, but that's what working for me out of 
the box, by deploying jbehave with maven artifact.

You need following dependency:



org.jbehave.site

jbehave-site-resources

${jbehave.site.version}

zip



And then you need for your jbehave-maven-plugin add following execution:




unpack-view-resources

process-resources



unpack-view-resources






That's it. It results in target/jbehave directory to get images and 
css etc in my case.


Or were you asking about customization of all this?


Regards,

Alex Filatau.



On Fri, Oct 4, 2013 at 7:54 AM, Hans Schwäbli 
mailto:bugs.need.love@gmail.com>> 
wrote:


The test result report of JBehave are HTML files.
Unfortunately the referenced images and CSS file is not present in
the target folder.
I spend quite some time figuring out how to add these resources by
some Maven configuration, but I could not get it working.
Is there a small example for dummies showing how to do it? Please
with no parents, really simple POM file or snippet please.