Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-11-01 Thread Maganti Suryanarayana murthy
s()
> .withFormats(Format.STATS,
>  Format.CONSOLE,
>  Format.XML,
>  Format.TXT,
>  /*Format.HTML,*/
>  screenShootingFormat)
> .withFailureTrace(true)
> );
> }
>
> private String getListOfStoriesToRun() throws IOException {
> if (System.getProperty("stories") == null) {
> //System.out.print(System.getProperty("story"));
> return readProperties.getStories();
> } else {
> return System.getProperty("stories");
> }
> }
>
> @Override
> protected List storyPaths() {
> return new 
> StoryFinder().findPaths(CodeLocations.codeLocationFromPath("./src/main/resources"),
>  "**/*.story", "");
> }
>
>
> On Thu, Nov 1, 2018 at 8:02 AM Maganti Suryanarayana murthy <
> suryai...@gmail.com> wrote:
>
>> Latest jbehave jars solved the problem
>>
>> On Wed, Oct 31, 2018, 10:45 PM Gajendra Sahu > wrote:
>>
>>> Any updates on this? I am facing the same issue.
>>>
>>> Running using JunitStories and the storyDuration.props has durations 0.
>>>
>>> On Friday, 23 February 2018 11:58:17 UTC-6, mauro.talevi wrote:
>>>>
>>>> Please package all this in a downloadable zip that can be opened and
>>>> run.  Don't forget a readme with tool versions etc
>>>>
>>>> On 23 Feb 2018, at 18:32, Maganti Suryanarayana murthy <
>>>> sury...@gmail.com> wrote:
>>>>
>>>> Hi Mauro Talevi,
>>>>
>>>> I have used gradle as a build file and please find the code base that i
>>>> am using. I am pasing build.gradle file and apptechJbehaveStories.java
>>>>
>>>> Build.gradle:
>>>>
>>>> def buildNumber = System.getProperty('buildNumber') ?: '0'
>>>> def buildVersion = '1.0.0-' + buildNumber
>>>>
>>>> version = buildVersion
>>>>
>>>> apply plugin: 'groovy'
>>>> apply plugin: 'java'
>>>> apply plugin: 'maven'
>>>>
>>>>
>>>> repositories {
>>>> mavenCentral()
>>>>}
>>>>
>>>> configurations {
>>>> jbehave
>>>> }
>>>>
>>>> dependencies {
>>>> testCompile group: 'junit', name: 'junit', version: '4.11'
>>>> compile(group: 'org.jbehave.web', name: 'jbehave-web-selenium',
>>>> version:'4.0-beta-1') {
>>>> exclude(module: 'selenium-remote-control')
>>>> exclude(module: 'selenium-java')
>>>> exclude(module: 'jbehave-core')
>>>> }
>>>> compile 'org.springframework:spring-webmvc:5.0.2.RELEASE'
>>>> compile 'org.jbehave.site:jbehave-site-resources:3.3.1'
>>>> compile 'org.jbehave:jbehave-spring:4.1.3'
>>>> compile 'org.jbehave:jbehave-core:4.1.3'
>>>> compile 'log4j:log4j:1.2.16'
>>>> compile group: 'org.seleniumhq.selenium', name: 'selenium-java',
>>>> version: '3.7.1'
>>>> compile group: 'commons-collections', name: 'commons-collections',
>>>> version: '3.2.1'
>>>> testCompile group: 'org.jbehave', name: 'jbehave-core', version:
>>>> '4.1.3'
>>>> compile 'org.jbehave.site:jbehave-site-resources:3.3.1:@zip'
>>>> }
>>>>
>>>> /** userDefined task to copy the srories from /src/main/stories into
>>>> build/classes/test/stories*/
>>>> task copyStories(type: Copy) {
>>>> from 'src/main/resources' into "${buildDir}/classes/test"
>>>> from 'src/main/stories' into "${buildDir}/classes/test/stories"
>>>> }
>>>>
>>>>
>>>> task copyJbehaveStyle(type: Copy) {
>>>> from(zipTree(jarPath("jbehave-core"))) {
>>>> include "style/*"
>>>> }
>>>> into("${buildDir}/classes/jbehave/view")
>>>> }
>>>>
>>>> task copyJbehaveUtilities(type: Copy) {
>>>> from(zipTree(jarPath("jbehave-site-resources"))) {
>>>> include "js/**/*"
>>>> include "style/**/*"
>>>> include "images/*"
>>>> }
>>>> into("${bu

Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-11-01 Thread Maganti Suryanarayana murthy
Latest jbehave jars solved the problem

On Wed, Oct 31, 2018, 10:45 PM Gajendra Sahu  Any updates on this? I am facing the same issue.
>
> Running using JunitStories and the storyDuration.props has durations 0.
>
> On Friday, 23 February 2018 11:58:17 UTC-6, mauro.talevi wrote:
>>
>> Please package all this in a downloadable zip that can be opened and
>> run.  Don't forget a readme with tool versions etc
>>
>> On 23 Feb 2018, at 18:32, Maganti Suryanarayana murthy 
>> wrote:
>>
>> Hi Mauro Talevi,
>>
>> I have used gradle as a build file and please find the code base that i
>> am using. I am pasing build.gradle file and apptechJbehaveStories.java
>>
>> Build.gradle:
>>
>> def buildNumber = System.getProperty('buildNumber') ?: '0'
>> def buildVersion = '1.0.0-' + buildNumber
>>
>> version = buildVersion
>>
>> apply plugin: 'groovy'
>> apply plugin: 'java'
>> apply plugin: 'maven'
>>
>>
>> repositories {
>> mavenCentral()
>>}
>>
>> configurations {
>> jbehave
>> }
>>
>> dependencies {
>> testCompile group: 'junit', name: 'junit', version: '4.11'
>> compile(group: 'org.jbehave.web', name: 'jbehave-web-selenium',
>> version:'4.0-beta-1') {
>> exclude(module: 'selenium-remote-control')
>> exclude(module: 'selenium-java')
>> exclude(module: 'jbehave-core')
>> }
>> compile 'org.springframework:spring-webmvc:5.0.2.RELEASE'
>> compile 'org.jbehave.site:jbehave-site-resources:3.3.1'
>> compile 'org.jbehave:jbehave-spring:4.1.3'
>> compile 'org.jbehave:jbehave-core:4.1.3'
>> compile 'log4j:log4j:1.2.16'
>> compile group: 'org.seleniumhq.selenium', name: 'selenium-java',
>> version: '3.7.1'
>> compile group: 'commons-collections', name: 'commons-collections',
>> version: '3.2.1'
>> testCompile group: 'org.jbehave', name: 'jbehave-core', version:
>> '4.1.3'
>> compile 'org.jbehave.site:jbehave-site-resources:3.3.1:@zip'
>> }
>>
>> /** userDefined task to copy the srories from /src/main/stories into
>> build/classes/test/stories*/
>> task copyStories(type: Copy) {
>> from 'src/main/resources' into "${buildDir}/classes/test"
>> from 'src/main/stories' into "${buildDir}/classes/test/stories"
>> }
>>
>>
>> task copyJbehaveStyle(type: Copy) {
>> from(zipTree(jarPath("jbehave-core"))) {
>> include "style/*"
>> }
>> into("${buildDir}/classes/jbehave/view")
>> }
>>
>> task copyJbehaveUtilities(type: Copy) {
>> from(zipTree(jarPath("jbehave-site-resources"))) {
>> include "js/**/*"
>> include "style/**/*"
>> include "images/*"
>> }
>> into("${buildDir}/classes/jbehave/view")
>> }
>>
>> def jarPath(String jarName) {
>> configurations.testCompile.find({ it.name.startsWith(jarName)
>> }).absolutePath
>> }
>>
>>
>> /** to specify the source for java and resources for test task, by
>> default this is refered to src/test folder in gradle and maven*/
>> sourceSets {
>> test {
>> java {
>> srcDir "src/main/java"
>> }
>> resources {
>> srcDir "src/main/resources"
>> }
>> }
>> }
>>
>> test {
>> systemProperty "metaFilters", System.getProperty("metaFilters", "")
>> doFirst {
>> copy {
>> from(zipTree(jarPath("jbehave-core"))) {
>> include "style/*"
>> }
>> into("build/reports/jbehave/view")
>>
>> }
>> copy {
>> from(zipTree(jarPath("jbehave-site-resources"))) {
>> include "js/**/*"
>> include "style/**/*"
>> include "images/*"
>> }
>> into("build/reports/jbehave/view")
>> }
>> }
>> systemProperties System.getProperties()
>> dependsOn([clean,copyStories,copyJbehaveUtilities,copyJbehaveStyle])
>> }
>>
>>
>> apptechJBehaveStories.java
>>
>> package com.apptech.qmo;
>>
>> import com.apptech.qmo.ipt.QMOHtmlOutput;
>> import com.apptech.qmo.ipt.QMOStoryData;
>

Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-02-23 Thread Maganti Suryanarayana murthy
st(metaFilterStr.split(","));
log.info(" MetaFilters = " + metaFilters);
return metaFilters;
}

private String getClassPath() {
URL fileUrl = codeLocationFromClass(this.getClass());
String classpath = getPathFromURL(fileUrl);
System.out.println("getClassPath classpath = " + classpath);
// class may come from a jar file
if (classpath.endsWith(".jar!")) {
int idx = classpath.lastIndexOf('.');
classpath = classpath.substring(0, idx);
}
return classpath;
}

@Override
public InjectableStepsFactory stepsFactory() {
if (this.applicationContext == null) {
AnnotationConfigApplicationContext applicationContext = new 
AnnotationConfigApplicationContext(com.apptech.qmo.ipt.configurations.SpringConfiguration.class);
this.applicationContext = applicationContext;
}
return new SpringStepsFactory(configuration(), 
this.applicationContext);
}

public static class CustomTimeoutParser implements 
StoryTimeouts.TimeoutParser {

public boolean isValid(String timeout) {
return timeout.matches("(\\d+)secs");
}

public long asSeconds(String timeout) {
return 
Long.parseLong(org.apache.commons.lang3.StringUtils.substringBefore(timeout, 
"secs"));
}

}

@Override
public void run() throws Throwable {
Embedder embedder = configuredEmbedder();
embedder.useMetaFilters(getMetaFilters());
// These should be enabled so that even though the stories fail it 
wont go to catch method. Its useful when running multiple scenarios
embedder.embedderControls().doIgnoreFailureInStories(true);
embedder.embedderControls().doIgnoreFailureInView(false);
embedder.embedderControls().doGenerateViewAfterStories(true);

embedder.configuration().storyControls().doIgnoreMetaFiltersIfGivenStory(true);
embedder.useTimeoutParsers(new CustomTimeoutParser());
List storyPaths = storyPaths();
try {
embedder.runStoriesAsPaths(storyPaths);
} catch (Exception e) {
Loggers.CONSOLE_LOGGER.error("STORY FAILED DUE TO:");
e.printStackTrace(System.err);
Loggers.FILE_LOGGER.error("STORY FAILED DUE TO:");
e.printStackTrace(System.err);
Loggers.CONSOLE_LOGGER.info("Driver instance is closing");
Loggers.FILE_LOGGER.info("Driver instance is closing");
embedder.generateCrossReference();
throw new Throwable(e.fillInStackTrace());
} finally {
try {
Loggers.CONSOLE_LOGGER.info("Driver instance is closing");
driver.quit();
Loggers.FILE_LOGGER.info("Driver instance is closing");
} catch (Exception e) {
System.out.println("Issue in closing driver instance in run 
method: " + e.getMessage());// Wantedly not caught the exception
}
embedder.generateCrossReference();
}
}

public String getStoryFromStoryPaths(String storyName, List 
storyPaths) {
for (String story : storyPaths) {
System.out.println("story = " + story);
int stroryLength = story.split("/").length;
if (story.split("/")[stroryLength - 
1].equalsIgnoreCase(storyName)) return story;
}
return "";
}

@Override
protected List storyPaths() {
final List globList = new ArrayList();
final String[] globs = storyFilter().split(_STORIES_SEPARATOR);
for (final String story : globs) {
globList.add("**/*" + story + (story.endsWith(".story") ? "" : 
".story"));
}
String classpath = getClassPath();
log.info("classpath=" + classpath);
List paths = new StoryFinder().findPaths(classpath, 
globList, null);
log.info(" story paths = " + paths.toString());
return paths;
}

private String storyFilter() {
String storyFilter = System.getProperty("story.filter");
if (storyFilter == null) {
storyFilter = "";
}
return storyFilter;
}

public String captureReportName() {
String storyName = null;
    String fileNames[] = reporterBuilder.outputDirectory().list();
for (int i = 0; i < fileNames.length; i++) {
if (fileNames[i].contains("html") & 
!fileNames[i].contains("BeforeStories")) {
String name[] = fileNames[i].split(".html");
storyName = name[0];
}
}
return storyName;
}
}



On Thursday, February 22, 2018 a

Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-02-21 Thread Maganti Suryanarayana murthy
Any help on this 
?

On Tuesday, February 20, 2018 at 10:16:58 AM UTC-6, Maganti Suryanarayana 
murthy wrote:
>
> Any one is facing above issue ?
>
> On Tuesday, February 20, 2018 at 9:42:28 AM UTC-6, Maganti Suryanarayana 
> murthy wrote:
>>
>> Jbehave story report is not showing the time in report i.e., the Duration 
>> is shown as 00:00:00.000. I am using gradle as a build tool. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/6376be18-29ad-444f-9670-79a4a6eae694%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JBehave Story Report ( Report.html) showing StoryVersion instead of Story Name

2018-02-21 Thread Maganti Suryanarayana murthy
R u getting duration of time in jbehave reports, if yes could you please 
send me the configuration you made. I am using gradle as build tool. 

On Wednesday, February 21, 2018 at 4:11:43 AM UTC-6, neha@gmail.com 
wrote:
>
> When stories are executed from JIRA using JBehaveForJira plugin , 
> resulting JBehave Reports ( Reports.html) show story version instead of 
> story name .
>
>
> Story Report Name  : ART.ART-64.38.story
>
>
> Inside reports.html , Story name Column shows 38 ( Only Version ) 
>
>
> Please let me know which method can I override to get proper Story name in 
> reports.html 
>
> Thanks 
>
> Neha
>

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/4efe3e3c-9f4a-4df4-9681-f5d2d417f0fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-02-20 Thread Maganti Suryanarayana murthy
Jbehave story report is not showing the time in report i.e., the Duration 
is shown as 00:00:00.000. I am using gradle as a build tool. 

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/b3082a20-6e97-42b5-93de-348eb3fdbca3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Getting error as pending steps

2017-11-29 Thread Maganti Suryanarayana murthy
Posted in stack overflow. Could anyone sort out the issue ?

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/e694a0f2-9ac8-43c9-b7c7-0588c7d3a278%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Selenium 3.0 ?

2017-11-28 Thread Maganti Suryanarayana murthy
Upgrade the jbehave-core to 4.*

On Wednesday, January 25, 2017 at 6:38:13 AM UTC-6, Da Vid wrote:
>
> Does anyone use JBehave with selenium 3.0? it looks like upgrade selenium 
> version to 3.0 caused JBehave stops working.
> All troubles are about "java.lang.NoClassDefFoundError: 
> com/thoughtworks/selenium/condition/ConditionRunner", it seems this class 
> has been removed on selenium 3.0.
> Is there any workAround ?
>
> (for example it is used on:
>
> package org.jbehave.web.selenium;
>
> public SeleniumPage(Selenium selenium, ConditionRunner 
> conditionRunner) {
> this.selenium = selenium;
> this.conditionRunner = conditionRunner;
> }
>

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/07875583-edd6-4748-a7da-1509b2c54017%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


All steps are marked as Pending steps

2017-11-28 Thread Maganti Suryanarayana murthy
Hi, I am using Jbehave with spring for past 2 years. There are no issues, 
but when i upgraded jbehave core to 4.* and slenium to 3.7.1,  i am finding 
issue with story steps. All java classes are public only.

For Ex:

@Given("I login")

is read as givenILogin(@Pending step)

Could any one please help me to figure out the issue with jbehave ?

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/80d6902e-7a0e-4f70-95ae-90cd387909e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.