Most Viewed Pages

22.6.15

JBehave Archetypes

There are different archetypes available for JBehave, lets look at some of them...


Archetype 1:  jbehave-simple-archetype
URL -

Command to download the project via mvn:
mvn archetype:generate
-DarchetypeGroupId=org.jbehave
-DarchetypeArtifactId=jbehave-simple-archetype
-DarchetypeVersion=3.9.5
-DarchetypeRepository= https://nexus.codehaus.org/content/repositories/releases/org/jbehave/jbehave-simple-archetype/

Comments on this archetype:
  • Change to the latest version
  • This is the most simplest of the project structures that we have with jbehave. Its the default one that I use, and gradually 'build-out' as the project evolves.
  • This does not have the selenium jars by default
  • You can grow this project by adding maven dependencies in the pom.xml
  • You don’t need a selenium-only archetype because we are not going to work on a selenium-only framework, we need a simple archetype to start with, and build it as we grow.




Archetype 2: jbehave-web-selenium-java-spring-archetype
URL -

Command to download the project via mvn:
mvn archetype:generate
-DarchetypeGroupId=org.jbehave.web
-DarchetypeArtifactId=jbehave-web-selenium-java-spring-archetype
-DarchetypeVersion=3.5.5
-DarchetypeRepository= https://nexus.codehaus.org/content/repositories/releases/org/jbehave/web/jbehave-web-selenium-java-spring-archetype/

Comments on this archetype:
  • This has details of implementation for etsy, and is not a blank project like the simple archetype.
  • The implementation appears complex like that of LT
  • It does not seem to recognise the steps, so something is missing. Who knows if its due to the project being 3 years old!
  • This does not have the selenium jars by default
  • There are 3 different 'Stories' file which might be helpful in figuring out the different configurations for jbehave.
  • Also, though the LT framework had jbehave core+web, selenium, fluentlenium, spring, hamcrest and hibernate, you dont have to adopt all of these right now in your framework, because it would be too time consuming to do a PoC with all these. And even then, the LT framework did not have any data-driving capabilities!
  • Spring is a framework that provides APIs to avoid low level coding, for example connecting to a db.
  • Hibernate is a framework for mapping RDBMS or DBs like Sybase, MS SQL Server, etc; where the db tables and entities are exposed as objects that can be used in java code.



Resources -


No comments:

Post a Comment