Skip to content

A plugin to enable upload of cucumber test results into ALM Octane.

License

Notifications You must be signed in to change notification settings

MicroFocus/octane-cucumber-jvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

octane-cucumber-jvm

ALM Octane cucumber-jvm formatter enables uploading cucumber-jvm tests back into ALM Octane.

How does it work

  1. You use this plugin in your JUnit Cucumber tests (see instructions below).
  2. When running the tests, the plugin outputs files with the results.
  3. 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).
  4. You can see the results in your Gherkin test in ALM Octane.

Prerequisites:

  • 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 {

}

How to configure octane-cucumber-jvm in your project:

For Cucumber 4.2 - 4.8.1

  1. 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>
  1. 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{

}

For cucumber 1.2

  1. 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>
  1. Import the formatter into the Junit Runner class:
import com.hpe.alm.octane.OctaneCucumber;
  1. 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{

}

About

A plugin to enable upload of cucumber test results into ALM Octane.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published