6.4.2 Creating Automation Test Cases with Cucumber

Important_icon.pngImportant:

  • You qTest user needs to be granted with Create Test Cases permission.

»Manually Creating Automation Test Cases in qTest

»Scanning Scripting Directory and Automatically Creating Automation Test Cases

Manually Creating Automation Test Cases in qTest

Follow one of these ways to create a new Automation Test Case:

  • Select a Module and click on New Automation Test Case icon on the toolbar
  • Right click on an existing module and select New > New Automation Test Case
  • Select a Module and press hot keys Shift + A

In the Test Case's main workspace, modify the name and its properties. You may want to define its Test Steps. It is the same as creating a manual Test Case. Refer to this instruction.

You will need to define the associated test in Automation Content field with the syntax:

  • To associate a Cucumber feature with a Test Case in qTest: [package_name].[feature_name]. Eg: resources\features.sample.helloword.feature
  • To associate a scenario with a Test Case in qTest: [package_name].[feature_name]#[scenario_description]. Eg: resources\features.sample.helloword.feature#Say hello => PASSED

 

Scanning Scripting Directory and Automatically Creating Automation Test Cases

Our Automation Agents feature the ability to scan and detect tests in your scripting directory; and then automatically create the associated Test Cases in qTest.

On the Agent Configuration Screen, click on Save and Scan button

 

Alternatively, select your desired agent and click on its Scan icon

The agent will start scanning your directory. After the process is done, all detected tests are listed out.

  1. You can select to view the result by Features or Scenarios.
  2. You can filter the result grid by package name, feature name or scenario description.
  3. By default, the suggested Test Case name is the same as the feature name or scenario description. You can click and modify it.
  4. Click on the check box on the first column of each row to select which Test Cases to be created.
  5. Click on Create button.

It will take a while to create the Test Cases in qTest. They will be located under module Automation Test Case. You can view the result's summarized information after the process is done.

button-round-warning-icon.pngHINT:

  • If a feature has 2 scenarios, when you create a Test Case from the feature, it will also have 2 steps with the same names as the scenarios.
  • When you create a Test Case from a scenario, it will have one Test Step associated with the scenario.

Important_icon.pngImportant:

  • Field Automation Content is the unique identification of an Automation Test Case. The agents will NOT create 2 Automation Test Cases with the same value in this field.
  • For now, the agents do not support updating your Automation Test Cases.
  • When you define a Test Step for an automation Test Case, there needs to be a matching scenario in your test script so that the step can be executed.