Skip to content

Maven plugin for randoop

Latest
Compare
Choose a tag to compare
@5aab 5aab released this 30 Apr 15:52
· 4 commits to master since this release

randoop-maven-plugin

A plugin for using Randoop in Maven. See https://randoop.github.io for more information.

Todo

  1. Use maven dependency for Randoop as soon as available
  2. Check if if need all or which configuration parameters from Randoop should be available via
    Maven.
  3. Should the ErrorTest be excluded by default since it is red until code change?
  4. Fix redirect console from Randoop process into Maven for logging purposes

How to use

A brief description of needed steps.

1. Step

Run maven initialize goal first, followed by following goals

Install into local Maven repository:

mvn clean install

To override Randoop version 3.1.5 if needed run instead:

mvn clean install -Drevision=new.version

A new version of Randoop will be download from the GitHub releases.

2. Step

Integrate into another (local) Maven project by adding to the plugins section the following
plugin:

<build>
    ...
    </plugins>
        ...
        <plugin>
            <groupId>com.5aab.automation</groupId>
            <artifactId>randoop-maven-plugin</artifactId>
            <version>4.0.3</version>
            <configuration>
                <packageName>my.base.package</packageName>
            </configuration>
            <executions>
                <execution>
                    <id>generate-tests</id>
                    <goals>
                        <goal>gentests</goal>
                    </goals>
                    <phase>generate-test-sources</phase>
                </execution>
            </executions>
        </plugin>
        ...
    </plugins>
    ...
</build>

It will collect all class from the (base) package name and run Randoop.

3. Step

Run mvn clean test in the Maven project from step 2 to let the test be generated and executed.