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

JBehave Automation Story

Tweet
Pin it

Document Contents

  • Introduction
  • JBehave Story components
  • Sample automation  story
  • Recommendation

Introduction

In this post, we will discuss writing JBehave automation story. A story file is usually stored within a “.story” extension file. Also, it is usually called a story file.

JBehave Story components

An automation Jbehave story has 5 main components. ( although it might contain other parts like Examples table etc.)

1. Title

2. Meta: Meta information is mostly used to categorize the stories.

3. Narrative: Narrative is the description of the story i.e user story business description. The business flow consists of per-conditions, user actions, and expectations.

4. Scenario: A scenario is a collection of executable steps. A brief description of the scenario usually one-liner goes here. Also, a story can have multiple scenarios. Furthermore, steps are described below.

5. Steps: Steps are a user-based implementation of the story.

Given step represents a precondition to an event
When step represents the occurrence of the event
Then step represents the outcome of the event

 

Sample automation  story

To validate the ADD functionality of Calculator

Meta:
@Regression
@Automated

Narrative:
As a Calculator user
I want to add 2 integers with the add button
So, that I can verify the sum of added numbers Add functionality

Scenario: A user adds 2 integers and verifies the sum
Given I am a Calculator user
And I have two integer numbers to add
When I add the numbers with the plus button
Then I verify the sum of the two numbers

 

Recommendation

In conclusion, the stories contain references to the Step Java methods. Also, when you control-click on the text step the corresponding matched step method would be launched. Furthermore, it is always recommended to update the story file from within the IDE editor, so that you don’t miss out on any errors.

https://www.testingdocs.com/writing-step-class-for-a-jbehave-story/

As the number of automation stories increases in number, it must be important to maintain some kind of hierarchy and group similar tests within the same hierarchy. This makes debugging and story management easy.

 

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 /

JBehave + Serenity Sample Project

JBehave /

Serenity BDD Automation Framework

JBehave /

Serenity Maven Artifacts

JBehave /

Introduction to Serenity BDD

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

Back to Top

TestingDocs.com

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