TestingDocs.com
Software Testing website
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions

JBehave + Serenity Sample Project

Tweet
Pin it

Document Contents

  • Overview
  • Serenity BDD automation cycle:
  • Required Tools
  • Steps:

Overview

In this post, we would learn how to create a sample JBehave Serenity BDD project using Maven build tool. The quickest way to create a new automation project is to use Maven Archetypes.

Serenity BDD automation cycle:

 

BDD describes the process in which a customer uses the software under test orĀ  application under test.( AUT). This enables the development team a detailed view of the application that they would build. BDD stories often called Gherkin are written in plain English.

A sample Google search story could be as shown below:

——–

Search a keyword
Narrative:
In order to search web
As a user
I want to search keyword on the internet

Scenario: Looking up the keyword of 'Lasagne'
Given the Google home page
When I search the keyword 'lasagne'
Then I should see 'lasagne' search result

——–

As you can see, the story has a Role , Feature and the Benefit that the application under test provides to the role. What we need to verify as an automation engineer.

Required Tools

NetBeans IDE, JDK, JBehave, Serenity , Maven

Automation Environment Setup

Steps:

Launch NetBeans IDE.
Create new project by clicking
New >> New Project…
Choose Maven and Project from Archetype.

Sample Serenity Project
Sample Serenity Project

In-case you don’t have Maven enabled in your IDE, you can enable it
Tools > Options > Java > Maven

Click on Next > button.
In the search box, enter serenity-jbehave keyword.
Select the serenity-jbehave-archetype option and click on the Next > button.

Enter Project Information and click on the Finish button.

Project should be created successfully.

So far so good, you should see the following Maven Output:

————————————————————————
BUILD SUCCESS
————————————————————————

In the projects explorer, you can find the artifacts created for you.

Hooray! You have created an automation project using JBehave and Serenity.

Next steps are to add stories, features, Steps and step definitions, run the stories and view results.

 

JBehave Tutorials on this website can be found at:
https://www.testingdocs.com/jbehave-framework-tutorial/

For more details on the JBehave framework, visit the official JBehave website at:
http://jbehave.org

Related Posts

JBehave /

Cucumber Java BDD Selenium Framework

JBehave /

Serenity BDD Automation Framework

JBehave /

Serenity Maven Artifacts

JBehave /

Introduction to Serenity BDD

JBehave /

Install JBehave Plugins on Ubuntu

Tag Cloud

Agile Appium Tutorials C++ Eclipse Tutorials Git Tutorials IntelliJ Tutorials Java Java Tutorial JBehave Jenkins Jira Cloud JUnit Tutorial Maven Object-oriented Flowchart Python Tutorials Raptor Flowcharts Selenium IDE TestLink Tutorials

Random Posts

  • TestLink Bitnami Cloud Image
    Overview In this tutorial, we will see the steps

    Read more

  • Code Coverage Tools
    Overview Let’s look at some of the code coverage

    Read more

  • pCloudy Continuous Testing Cloud
    Overview pCloudy is a continuous testing cloud

    Read more

Latest Tweets

Tweets by @TestingDocs

Back to Top

TestingDocs.com

  • Privacy Policy
  • Cookie Policy
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions
www.TestingDocs.com | All Rights Reserved