Share this page

# Create Gherkin tests

Create Gherkin tests in ALM Octane to test from a user perspective or to help transition manual testing to automated testing.

In this topic:

## Why use Gherkin tests?

Gherkin is a well-known syntax for writing tests using behavior-driven development (BDD). This syntax lets you test from the user perspective by using use-case scenarios.

Gherkin syntax uses plain-text English with a specific structure. Gherkin syntax is easy to learn but structured enough to allow specific examples.

Language support: Gherkin tests in ALM Octane support only English syntax.

Using Gherkin tests has advantages:

Choosing Gherkin tests helps transition from manual testing to automated testing | By creating Gherkin tests, you can move them to automated tests: Write the tests in ALM Octane using standard Gherkin syntax. Choose a few tests to automate. Download the test script, and in your IDE, write code for automation. Include the automated tests in your CI process. ALM Octane links the results back to the original Gherkin tests. For details on running Gherkin tests as part of a CI progress, see Automate Gherkin tests. View the results in ALM Octane.
Using Gherkin scenarios, add parameter-like functionality | Because Gherkin tests use scenarios, change the values used in the test run.

Back to top

## Create Gherkin tests

Before adding scenarios and steps to a Gherkin test, create the tests in ALM Octane.

To create Gherkin tests:

1. In the Backlog or Quality modules, or the Tests tab of a test suite, click + and select Gherkin Test.

2. Assign test attributes. Make sure to enter values for the following attributes:

   Test type | The type of test, such as Acceptance, End to End, Regression, Sanity, Security, or Performance.
   Backlog coverage | Select the backlog items the test covers. This helps you track release quality.
   Application modules | The product's application modules. This helps you track product quality, regardless of release.

3. Click Add & Edit.

4. In the Script tab, add the required feature and test scenarios. For details, see Add test scenarios.

5. Save the test.

Back to top

## Add test scenarios

Add features and scenarios to provide the content of the test. For details about the syntax, see Gherkin test syntax.

To add Gherkin test scenarios:

1. In the test, click the Script tab. ALM Octane generates the script with the Test ID (TID) and revision number (REV). If you automate the test, these lines help ALM Octane identify the Gherkin test for the test results.

                               1 #Auto generated Octane revision tag
       2 @TID1001REV0.1.0
       3 Feature:

   Note: ALM Octane uses the Test ID tag to map the automation results. DO NOT DELETE the Test ID tag!

2. In the Feature line, add a description of the feature.

3. In the toolbar, click Add Scenario or Add Scenario Outline. Enter the details in the scenario or scenario outline template.

4. Add scenarios or scenario outlines as needed.

5. Save the script.

   ALM Octane saves the script as a text file. Edit the file in ALM Octane or download it to your IDE.

Tip: While you work, save and label versions of your manual test. As you work with the test over time, compare versions to view modifications. For details, see Use versions of test scripts.

Back to top

## Prepare your Gherkin tests for automation

By default, when you create a Gherkin test, the test's automation status is Not automated.

To prepare Gherkin tests for automation:

1. In the test Details tab, set the Automation status to Ready for automation.

2. Download the Gherkin script and automate it in your preferred Java development environment. For details, see Automate Gherkin tests.

   When you complete the automation process in your IDE and CI server environment, and the script in ALM Octane matches that in the IDE, the Automation Status changes to Automated.

3. If the script version in your IDE does not match or is not synchronized with the script version in ALM Octane, adjust depending on the status:

   Requires update | The script was modified in ALM Octane and is not up-to-date in the automation code. Download the new version of the script from ALM Octane. Merge the script with the previous version in the IDE. Update the automation code. The CI server uses the latest version of the script from the automation code. If the script version in the automation code is not up-to-date, the test runs with an older script version than the one in ALM Octane.
   Requires approval | The script was modified in the IDE and is not up-to-date in ALM Octane. Click the Script changed externally link to compare script versions. Decide which script version you want to approve. Click Accept to update the script in ALM Octane according to the external version from the automation code. Click Decline to reject the externally modified script and to keep the ALM Octane script version. The script is now the same in the automation code and in ALM Octane. ALM Octane displays the test's Automation status as Automated.

Back to top

## Copy tests to another workspace

You can copy tests from one workspace to another, within the same shared space.

For details, see Copy or move items to another workspace.

Next steps:

- Use versions of test scripts
- Plan and run manual and Gherkin tests
- Automate Gherkin tests
- Gherkin test syntax

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ValueEdge & ALM Octane Help Center ValueEdge ALM Octane Help 16.0.100-16.0.400 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: