JBehave Testing Questions
JBehave Testing Questions
In this post, we will discuss some common JBehave Behavior Driven Development (BDD) testing interview questions.
What is JBehave?
JBehave is a framework for Behavior-Driven Development (BDD). BDD is an evolution of Test-driven development, also called acceptance test-driven development. The picture shows how to work with the JBehave framework.
What is BDD?
Behavior-driven development (or BDD in short) emerged from the process known as Test-Driven Development (or TDD in short ). It combines the basic principles of TDD with object-oriented analysis and design, to make the process of creating software as optimized and effective. BDD takes into consideration both technical & business interests in software development. BDD makes use of simple domain-specific language( known as DSL ). This language uses plain English and logical statements to express the behavior of the application.
Â
What is Business Readable DSL?
Business Readable, Domain Specific Language:Â with this programmers write application code but they show that code frequently to business people who can understand what it means. These customers can then make changes. Based on those developers make improvements and do debug/testing.
What is Gherkin?
It is a Business Readable, Domain Specific Language that lets you describe software’s behavior without detailing how that behavior is implemented. Gherkin helps with documentation and tests. Gherkin is a line-oriented language that uses indentation to define the structure.
Sample gherkin story file below:
Story Title
Meta Information
Scenario: <Business situation>
As a <role>
I want to <goal>
So that <value>
Given <Precondition>
When <Action by actor>
Then <Testable outcome>
Â
Login page gherkin
Sample generic gherkin in BDD Style below.
Login to the system with valid username and password Meta: @Login @Positive Scenario: <Scenario Title> Given <Pre-condition> And <Optional Additional Pre-Condition> … When <Action> And <Optional Additional Action> … Then <Post-condition> And <Optional Additional Post-Condition> … Examples: |username|password| |admin|admin1234|
JBehave Tutorials on this website can be found at:
For more details on the JBehave framework, visit the official JBehave website at:
Â