TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

JBehave

JBehave Automation Story Components

JBehave

Introduction

In this post, we will discuss writing the 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

Create a New Project Eclipse

JBehave /

Cucumber Java BDD Selenium Framework

JBehave + Serenity Sample Project

JBehave /

JBehave + Serenity Sample Project

Serenity BDD Automation Framework

JBehave /

Serenity BDD Automation Framework

Serenity Maven Artifacts

JBehave /

Serenity Maven Artifacts

Introduction to Serenity BDD

JBehave /

Introduction to Serenity BDD

‹ Write Simple JBehave Story› Install JBehave Plugins in IntelliJ IDEA IDE

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version