Skip to content

Getting Started

Matt Barbour edited this page Oct 9, 2015 · 7 revisions

Adding maven dependency

The first step to getting started with Zucchini is to include it as a dependency in your pom.xml file. Zucchini is available publicly in the Maven Central Repository - you can include it in your pom as a dependency by adding the following:

    <dependency>
      <groupId>com.comcast.zucchini</groupId>
      <artifactId>zucchini</artifactId>
      <version>LATEST</version>
    </dependency>

Create test runner

Zucchini provides an abstract class, AbstractZucchiniTest which you should implement in your code base. The two most important parts of this class are the cucumberoptions annotation and the public List<TestContext> getTestContexts() method

CucumberOptions

Cucumber options is where you tell zucchini where your feature files and glue code live. Note that this annotation is exactly the CucumberOptions annotation from cucumber-jvm. For details on the available cucumber options, please see the documentation here

getTestContexts()

This method must be implemented and is how zucchini knows what needs to run in parallel. It is in this section where the test author would instantiate java objects which the tests can use to interact with the device under test (Selenium Webdriver instances, for example), insert them into a construct called the TestContext, and return a list of TestContexts for zucchini to run against in parallel. We will go into more detail in the next section on what the TestContext is and how it is used.

Next Topic : The Test Context

Shield

Clone this wiki locally