Creating a new feature

You need to create a new feature to execute your tests. This can be done in a new folder or in a GitHub feature branch.

Option 1: Creating a new feature without using Git and GitHub

  1. Inside the folder where you want to add the automated test, click New File to add a new automated test.

  2. The file should have the following naming convention “testname”.feature.

Option 2: Creating a new feature using Git and GitHub

Note - tip

It is always recommended to create and work in a feature branch before creating an automated test.

This will ensure you will work in an isolated space before adding your changes into the master branch.

Do not create the feature file, stage or commit changes directly in the master branch.

Prerequisites

  1. Move inside the folder where your Git project has been created or cloned.

  1. Create a new branch from the master branch.

    Click master branch.

  1. Select Create a new branch from.

  1. Enter a unique branch name and press the Enter key.

  1. Select origin/master.

  1. Confirm that you've created the branch and are working in that branch.

Note - informationIf you used VS Code assistance, you need to press Enter in the terminal to see the new branch.
  1. In the folder where you want to add the automated test, click New File to add a new automated test.

The file should have the following naming convention: “testname”.feature.

The file extension should be “.feature” so that the file can be recognized as a Cucumber automation test.

Selecting an X3 template

You need to select a template depending on the type of test you want to run.

  • CRUD_X3_TEMPLATE: used to test simple object Creation, Read, Update, Delete actions

  • FLOW_X3_TEMPLATE: used to test business flows or specific controls

  1. Start typing X3 and the template list displays.

  1. After selecting a template, you need to define the steps for the test.

Note - settingsThe templates are not designed to be used as-is. You need to define the steps according to your testing needs.
  1. Update the template with your step definitions for a desired test scenario.

  2. Execute the test to check that everything is okay.