There are a few ways to run automation with PractiTest. You can read about them here.
The Cucumber integration uses the PractiTest FireCracker tool to automatically populate all of your Cucumber results into PractiTest. FireCracker’s unique Cucumber template helps you easily configure fields, mapping, examples, and more.
Create or Import BDD Tests
Start by importing or creating your BDD tests in PractiTest. This way, when you integrate the results later, they will be linked to your previously created BDD tests for full traceability and BDD capability utilization.
Configure Cucumber Results Integration
The Cucumber integration is based on FireCracker. Start by following the FireCracker instructions.
When you get to the Tool Template dropdown under the file upload, please choose Cucumber.
This will automatically fill in the details that will allow you to convert Cucumber results into PractiTest runs.
- Turn off the “Group test case” option so each test case (Scenario) will be created as a different Test in PractiTest.
- Turn on “Multiple Test Set” so each test suite (Feature file) will be created as a different Test Set in PractiTest.
- Turn on “Use test steps” so FireCracker will use the BDD test steps and will mark each one as Failed or Passed. When Cucumber will report only failed statements, PractiTest will mark the failed steps as failed and will automatically fetch the rest of the test steps (as they are described in PractiTest) and mark them as passed. This way, you can maintain accurate statistics and keep track of all BDD statements.
Test Field results modification: In the Step 2 table, you will find pre-populated template functions that you can modify according to your xml structure if needed. This will allow you to easily convert your Cucumber XML results into PractiTest field names and step parameters. The functions can be modified according to any XML convention.
Next, you will need to create the required Test Set, with the same name as mentioned in your Cucumber result file. In addition, you will also need to create the related test instances.
Continue configuring the integration by following the explanations on the FireCracker help page.