- Activate Automation Integration
- Install and Register the Automation Host
- Install the Cucumber or JBehave Plugin
- For JBehave, make sure to add the qTest Log Collector into your JBehave source code.
There are 2 ways to create test cases from Cucumber or JBehave
- Manually create automated test cases in Test Design and input the Automation Content field to correspond to the feature or scenario
- Scan the scripting directory to automatically create the test cases in the Automation Content auto-populated based on the feature or scenario
You need to have Create Test Cases permission within your qTest project to create test cases from Cucumber or JBehave.
Manually Creating Automation Test Cases in qTest
Through the UI, create a new Automation Test Case in Test Design:
- Select a Module and click on New Automation Test Case icon from the top of the left navigation 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 page, modify the name and its properties. You may want to define its Test Steps. It is the same as creating a manual Test Case.
You will need to define the associated test in Automation Content field with the syntax:
- To associate a 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
Scan Directory for 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.
- You can select to view the result by Features or Scenarios.
- You can filter the result grid by package name, feature name or scenario description.
- By default, the suggested Test Case name is the same as the feature name or scenario description. You can click and modify it.
- Click on the check box on the first column of each row to select which Test Cases to be created.
- 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.
- 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.
- 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 method in your test script so that the step can be executed.