Git Product home page Git Product logo

cucumber-example's Introduction

Cucumber Integration Example

This is an example project on how to use the integration of Zephyr Scale and Zephyr Squad with automated tests when using Cucumber.

The integration is based on the JSON output files generated by Cucumber, so this output option needs to be configured properly. In addition to that, scenarios can be mapped to test cases in Zephyr Scale or Zephyr Squad by using the test case key as a scenario tag: @TestCaseKey=ABC-T123

Usage

Firstly, the JSON output format for Cucumber needs to be configured on the TestRunner class:

@RunWith(Cucumber.class)
@CucumberOptions(
        features = "src/test/resources/calculatorFeatures"
        ,glue={"com/adaptavist/tm4j/cucumberExample/stepDefinition"}
        ,plugin = {"junit:target/cucumber/result.xml", "json:target/cucumber/calculator.json"}
)

public class TestRunner {

}

On the example above, both JUnit XML and JSON output are enabled.

The next step is to add a tag to your scenarios @TestCaseKey=ABC-T123 or do not annotate at all, if the Test Case doesn't exist yet.

Feature: Calculator

  @TestCaseKey=ABC-T123
  Scenario: Add a number
    Given a calculator I just turned on
    And I add 4 and 4
    Then the result is 8

Now, you can run your tests with mvn test and the Cucumber execution results will be generated in target/cucumber/*.json.

cucumber-example's People

Contributors

poorvid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.