NOTE: octane-cucumber-jvm supports injecting BDD test results into ALM Octane for Cucumber JVM versions up to 4.8.1. A newer tool is available for injecting BDD test results into ALM Octane. That tool supports multiple BDD frameworks including Cucumber 5.x and later. See bdd2octane
ALM Octane cucumber-jvm formatter enables uploading cucumber-jvm tests back into ALM Octane.
- You use this plugin in your JUnit Cucumber tests (see instructions below).
- When running the tests, the plugin outputs files with the results.
- ALM Octane plugin for Jenkins reads these files and uploads the results back to ALM Octane (see how to configure ALM Octane Jenkins plugin in the ALM Octane online help).
- You can see the results in your Gherkin test in ALM Octane.
- You are using Java language and the cucumber-jvm library to develop Cucumber tests.
- You are using Junit Runner to run the cucumber-jvm library as explained here
The JUnit runner uses the JUnit framework to run Cucumber. The default configuration require a single empty class with an annotation:
/**********************************
before the plugin configuration
***********************************/
package mypackage;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
public class RunCukesTest {
}
- Add a dependency in your pom file:
<dependencies>
<dependency>
<groupId>com.microfocus.adm.almoctane.bdd</groupId>
<artifactId>octane-cucumber-jvm</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
- Add the OctaneGherkinFormatter plugin to the CucumberOptions of each test class, and provide a unique result file path:
package feature.manualRunner;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(plugin="com.hpe.alm.octane.OctaneGherkinFormatter:gherkin-results/ManualRunnerTest_OctaneGherkinResults.xml",
features="src/test/resources/feature/manualRunner")
public class ManualRunnerTest{
}
- Add a dependency in your pom file:
<dependencies>
<dependency>
<groupId>com.hpe.alm.octane</groupId>
<artifactId>octane-cucumber-jvm</artifactId>
<version>12.55.7</version>
</dependency>
</dependencies>
- Import the formatter into the Junit Runner class:
import com.hpe.alm.octane.OctaneCucumber;
- Change the cucumber.class to OctaneCucumber.class:
package feature.manualRunner;
import com.hpe.alm.octane.OctaneCucumber;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(OctaneCucumber.class)
@CucumberOptions(features="src/test/resources/feature/manualRunner")
public class ManualRunnerTest{
}