Site icon TestingDocs.com

Understanding Meta Tag Information

Introduction

Understanding Meta Tag Information: In this post, we will discuss the Meta tag and its uses in story files. Behavior Driven Development allows us to add as much as meaningful information to the business to be included in the Stories and Scenarios gherkin (. story files ). Also, these stories/scenarios might grow in nature as time spins, it might become difficult to handle and browse through all the story information. Therefore, it will become necessary to organize the growing number of stories by certain criteria.

Meta Information

JBehave framework allows the specification of meta information to gherkin (both at story level and scenario level). Meta information helps story writers better manage their stories (writing, running stories, etc..). We may specify the meta information as shown in the examples:

Meta information is provided as a list of name-value pairs. Sample examples below:

Meta:
@author Jarvis


Meta:
@Windows10   Windows 10 Test



Meta:
@WebTest  Web Browser Test

 

Filtering Stories

The main use of meta tag information is that later we can able to filter the stories based on the meta info provided. For example, while running the stories we can apply meta filter to filter the stories. Furthermore, more information about filtering based on met information can be found at http://jbehave.org/reference/stable/meta-filtering.html

Another use of meta tag information is we can attach some semantics to the tag. For example, let’s say a story has not yet been automated, we can tag it as below:

Meta:

@Manual  Not automated

 

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

Exit mobile version