jbehave-tutorial's People
Forkers
epall paul-hammant jamesflorentino russdewolfe rrangana ranrop srr84 wilgustavo ziranov asifmohammed dhavalxshah nick-zhang olu180 madelynfreed concisebruce chamaster nningego mhuckaby donalredd alexspurling ahsan2600 rvarlikli vactowb howdypanda rajaboobalan martin-scholz jeffbj anoop2811 kashu4055 richardwthompson amarnathrayudu charmsstyler agilemobiledev mayurk hmunfru dorobisz gumbercules garyleija gaboom ashokkumarch martin-suky digbijayabiswal djangofan jsala1990 apaladino gulyami audippanaidu ajumangit fatori gallo1 psecyugu ceokot havanero cvillalba epestela davidodowd staritza carlos-ricci sanjtan pradeeparao coolasat amber-h roundface123 dkumar4 ashwyn030 billschofield armeo srismiley cgamarra dveryby lingfakong codelobby megathor oyedotun2002 williamjablonski kevinhorvatin narendrachoudhary geethveera kharsh patzifist tenkensui rahmanqaeng xdy2001 himanshugawari igalep sudheertest kora64 winklerandr magantisuryanarayana ystarling csantos0 mattcook83 qingfeng0512 rohanbaraskar pottermm rickvig swethamayur artemdwo dome313 sandroqzjbehave-tutorial's Issues
not able to generate jbehave reports properly.
i am using ur sample code
package sample_stepsfactory;
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Named;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
public class ExampleSteps {
int x;
@Given("a variable x with value $value")
public void givenXValue(@Named("value") int value) {
x = value;
}
@When("I multiply x by $value")
public void whenImultiplyXBy(@Named("value") int value) {
x = x * value;
}
@Then("x should equal $value")
public void thenXshouldBe(@Named("value") int value) {
if (value != x)
throw new RuntimeException("x is " + x + ", but should be " + value);
}
}
package sample_stepsfactory;
import java.util.Arrays;
import java.util.List;
import org.jbehave.core.junit.JUnitStories;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.junit.runner.RunWith;
import de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner;
@RunWith(JUnitReportingRunner.class)
public class SimpleJBehave extends JUnitStories {
public SimpleJBehave() {
super();
}
@Override
public InjectableStepsFactory stepsFactory() {
return new InstanceStepsFactory(configuration(), new ExampleSteps());
}
@Override
protected List<String> storyPaths() {
return Arrays.asList("Math");
}
}
it is not creating any reports.
please suggest where i am going wrong.
i am referign below jars
freemarker2.319,jbehave3.7.4,commons collections3.2.1,commons-lang-2.5,commons-io-1.4,paranamer2.4,plexux-utils-20.5,junit4.8.1,jbehave-junit-runner10.2-snapshot.
mvn install does not work
Hi,
I tried to tweak the versions to fix any compatibility, no matter what I chose ended up the below error on master branch. Please check
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project etsy-stories-java-spring: Compilation failure: Compilation failure:
[ERROR] /Volumes/pdata/myprojects/jbehave-tutorial-master/etsy-selenium/java-spring/src/main/java/org/jbehave/tutorials/etsy/pages/Home.java:[10,7] error: cannot access HasInputDevices
[ERROR]
[ERROR] class file for org.openqa.selenium.HasInputDevices not found
[ERROR] /Volumes/pdata/myprojects/jbehave-tutorial-master/etsy-selenium/java-spring/src/main/java/org/jbehave/tutorials/etsy/pages/Home.java:[17,8] error: cannot find symbol
[ERROR]
[ERROR] class Home
Do you know how to set timeout for every step?
i have a problem, my test scenario have more than 30 steps, and One step took more than 30 minutes to execute shell script on linux server, However, if the step exceeds 30 minutes, it will timeout and terminate the test scenario. Do you know how to set the step timeout?
How to modify/update content of tabular parameter in JBehave example table
I need to modify content value of Example table of Scenario of JBehave story file through a Step-file(Java-method) will it be possible ?
eg.Story file
*Scenario* :Modifying_Example_Table
**Given** Previous values of example_table_row <Product_Sold>
**Given** Change the status of Product_Sold by Java method
**Given** Print both previous and current status of Product_Sold
*Examples*:
|Product_Sold |
|"No"|
So can we update the value of Column Product_Sold by the step
"Given Change the status of Product_Sold by Java method"
as below
|Product_Sold |
|"Yes"|
!--value of Product_Sold changed from "No" to "Yes" that I want by some code inside Step file
Step File :
@Given(Change the status of Product_Sold by Java method )
public void SomeJavaMethod()
{
//Some ExampleTable code to modify the value of tabular parameter "Product_Sold"
}
so what should be the code inside above method in step file ?
Redmine - problems to import stories
I'm testing the integration of jbehave with redmine.
I'm able to read a specific story:
String text = loader.loadResourceAsText("http://localhost/redmine/projects/my-project/wiki/i_can_toggle_a_cell");
But when I try to read all the stories to the file system:
ResourceImporter importer = new ImportToFilesystem(indexer, loader, targetPath, targetExt);
importer.importResources("http://localhost/redmine/projects/my-project/wiki");
I get the following exception:
Exception in thread "main" org.jbehave.core.io.InvalidStoryResource: Invalid story resource for http://localhost/redmine/projects/apmjava-des/wiki/Wiki
Caused by: java.lang.IllegalStateException: Not a JSON Object: null
Probably I'm not publishing the set of stories in redmine correctly. I'm creating one wiki page for each story. The format is plain text. I haven't found any example.
Regards. Mauro.
Test fails... because of Etsy web site redesign?
I cloned the repo and was able to run the tests, but got lots of exceptions on the console. I found the result html pages and saw the error. Turns out that the scenario is looking for a "Treasury" link, and there is none. It makes sense, but my first reaction was that the project is not working.
Note: I am running the tests from Switzerland, I don't know if I hit a localized version of the site that might have a different content...
How to run the class related with story
hi,below is my java code, I run it in idea,but it seemed that the test class of CreateStarRocksDataNodeSteps were not run
the error info is below
java.lang.NullPointerException
at de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner.(JUnitReportingRunner.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder.buildRunner(DefensiveAllDefaultPossibilitiesBuilder.java:114)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:57)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:110)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
my code is below :
import de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.configuration.MostUsefulConfiguration;
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.io.StoryFinder;
import org.jbehave.core.junit.JUnitStoryMaps;
import org.jbehave.core.reporters.Format;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.CandidateSteps;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.junit.runner.RunWith;
import steps.CreateStarRocksDataNodeSteps;
import java.util.List;
import static java.util.Arrays.asList;
import static org.jbehave.core.io.CodeLocations.codeLocationFromClass;
@RunWith(JUnitReportingRunner.class)
public class createStarRocksNodeStories extends JUnitStoryMaps {
public createStarRocksNodeStories()
{
super();
super.useConfiguration(
new MostUsefulConfiguration().useStoryReporterBuilder(
new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, TXT)));
}
// Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed
@Override
public Configuration configuration() {
return new MostUsefulConfiguration()
// where to find the stories
.useStoryLoader(new LoadFromClasspath(this.getClass()))
// CONSOLE and TXT reporting
.useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT));
}
@Override
public List<String> storyPaths() {
return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
}
// Here we specify the steps classes
@Override
public InjectableStepsFactory stepsFactory() {
// varargs, can have more that one steps classes
return new InstanceStepsFactory(configuration(), new CreateStarRocksDataNodeSteps());
}
public List<CandidateSteps> candidateSteps(){
return new InstanceStepsFactory(configuration(),new CreateStarRocksDataNodeSteps()).createCandidateSteps();
}
@Override
public List<String> metaFilters() {
return asList(); // will be specified by values in the pom.xml file when run from Maven
}
}
Repos needed to build this project
Hi,
I had a problem running lasted code push, because of missing repos in pom.xml.
After adding two repos, all runs flawlessly.
Could you somehow add those repos or inform ppl to add them manually to the mavem config?
Cheers,
J
<repositories>
<repository>
<id>jbehave-web-repo</id>
<name>jbehave web repo</name>
<url>https://nexus.codehaus.org/content/groups/snapshots-group</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>codehausSnapshots</id>
<name>Codehaus Snapshots</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>https://nexus.codehaus.org/content/groups/snapshots-group</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
modification of the jbehave tutorial readme file
Hello, I am currently in master 1 computer science and as part of my tp in project management I must make a contribution to your project.
I therefore propose a modification of the Jbehave-Tutorial readme concerning the display of command lines
Before modification:
I propose this modification to you and if you allow it to me I would like to make a commit And if you allow me, can you tell me the next steps to follow
problem installing the tutorial
I get this error after 'mvn install' : Plugin org.jbehave:jbehave-maven-plugin:3.7-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.jbehave:jbehave-maven-plugin:jar:3.7-SNAPSHOT: Could not find artifact org.jbehave:jbehave-maven-plugin:pom:3.7-SNAPSHOT
any leads on how to resolve this problem. its my first steps with JBehave, and maybe jar installation might do the trick. on case of jar installations, which path variable should i used under windows?
thanks in advance
Yuval
http://www.qatestingtools.com
Why JBehave AfterScenario is not picking the tag value
Hi All,
I am trying to write some specific step based on given tags for scenario . But my After scenario is not picking the tags and i am not sure what i am missing here. I am using Serenity and JBehave
in my story file i am using
META:@test test
and in my step definitions i am using
@AfterScenario public void AfterScenario( @ Named("test") String Testname) // **but testname is always coming empty { { } }
**
Am I missing anything here.
Thanks for the help.
Doesn't work with jbehave core 3.8
I am trying to use this tutorial and I am also using JBehave core 3.8 and jbehave-web 3.5.5. There appears to be some differences with the later versions of JBehave because I cannot compile your code as there is no annotation called @UsingSpring nor class SpringAnnotatedEmbedderRunner.
Does this tutorial need to be updated?
Detailed Tutorial please?
Hi, where can I find a detailed step by step eclipse JBehave tutorial?
Repos needed to build this project
What are the repos needed to get the jbehave snapshots? I tried https://nexus.codehaus.org/content/repositories/snapshots and it does not have org.jbehave.web:jbehave-web-queue:jar:3.4-SNAPSHOT and org.jbehave.web:jbehave-web-selenium:jar:3.4-SNAPSHOT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.