Skip to end of metadata
Go to start of metadata

For information on running BDD test cases from JIRA within Jenkins, please see Jenkins.

Writing BDD (Behaviour Driven Development) test cases is simple and easy to do. TM4J allows the user to create BDD test cases in JIRA as well as export the test case to a feature file. This feature file can then be used as a reference for writing unit tests that will be needed for it to run. 

Gherkin Keywords

BDD test cases are written in Gherkin syntax. Below a run down of supported and not supported keywords.

  • Note 1: The 'Feature' and 'Scenario' part of the test case is not necessary - this will be added once you've exported your test cases.
  • Note 2: Supported Keywords such as 'Given', 'When', 'Then' will be highlighted as you type your test case.
SupportedNot Supported

Given

When

Then

And

But

Examples

Feature

Scenario

Background

Scenario Outline


Procedure

  1. Open the desired Test Case and then click on Test Script.

  2. Click the 'Type' drop down and select the 'BDD' option. Once you've selected this, you'll see the gherkin editor where you can enter the test case details 



  3. Write your test case - remember not to include 'Feature' or 'Scenario'. 



  4. Once you've finished editing the test case, click 'Save'. 
  5. Click 'Export' to download the feature file for your new test case. This can then be used by the developer as a reference for writing automated tests related to the test case. 


Have a question for us?







  • No labels