Usage

This page describes how to set up PipeT unit tests in a Maven environment.

Declaring dependencies

Add the pipet-test package to your POM as a dependency with scope test:

        <dependencies>
                <dependency>
                        <groupId>net.sf.pipet</groupId>
                        <artifactId>pipet-test</artifactId>
                        <version>1.2.15</version>
                        <scope>test</scope>
                </dependency>

                ...
        </dependencies>

Setting up test cases

Create test cases as described in the javadoc documentation. Copy your test case declarations to src/test/resources, and use the extension *.pipet.testcase to name the files, e.g.: mytestcase.pipet.testcase.

Using junit

Create a junit test class as usual; it can be as simple as this:

package org.example;

import net.sf.pipet.test.PipelineTest;

public class ExampleUnitTest {
        @org.junit.Test
        public void testPipelines() throws Exception {
                PipelineTest.scanDirectory();
        }
}

See the Maven Test Plugin manual and the JUnit manual for help on writing and performing unit tests in general.