Test using Cucumber


Introduction

Cucumber is one of the tools for running automated tests. It combines business specification and test documentation into one – which results in the executable specification. Due to this collaboration, encourages teams to keep their organization’s business goals at the center.

Automated testing through Cucumber helps teams avoid heavy regressions and resultant cost.  

Here is how you can specify the Test Cases and Test Steps which will be created in QMetry as a part of the result files -

Test Case TagTest Step Tag
elements > nameelements > steps > name 


Supported Cucumber Version: 1.2.5

Supported file types : JSON, XML

Sample Test Result File

Click here to download the Sample Test Result File.


Story Association

While importing the test result file, if you want us to link Test Case or Test Scenario to any of the existing story then it's possible.

An annotation is added to the file to associate the test case with a particular story in JIRA.



Test Case Reusability

While importing test result file, if you want us to reuse Test Case then it is possible.

An annotation is added to the file to reuse test cases in JIRA.


How Test Case Reusability works if test case key is not defined in BDD file

While importing test result file, if you want us to reuse Test Case then it is possible.

  1. If Test case summary and Test step summary (for all steps) match with the automated Test case name ( elements > name) and steps (elements > steps > name), Test case key and version will be reused.
  2. If Test case summary matches with the automated Test case ( elements > name) but Test step summary does not match (for any of the steps), Test case key will be reused but a new version will be created.
  3. If Test case summary does not match, a new Test case will be created.

Execution Attachment

To add attachments in test run execution, you need to capture the log file and screenshots during the execution of automation. The attachment file needs to be base64 encoded with mime_type in the embedding tag of the report file.


Configure Cucumber Project


Result File Output with Attachment


List of file types (mime types) supported in the cucumber framework.

Types of AttachmentSupported File Types
Imageimage/png, image/bmp, image/gif, image/jpeg, image/x-icon
Text Documenttext/plain, text/richtext, text/scriptlet, text/html, application/xhtml+xml, text/css,  application/x-javascript, application/typescript, application/x-sh, application/pdf, application/rtf, application/xml
Excel, Word, PPTapplication/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation
Audio Fileaudio/mpeg
Compressed Fileapplication/zip, application/x-rar-compressed, application/x-7z-compressed, application/x-tar