com.github.jesg:dither

Test case generation strategies

License

License

GroupId

GroupId

com.github.jesg
ArtifactId

ArtifactId

dither
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

com.github.jesg:dither
Test case generation strategies
Project URL

Project URL

https://github.com/jesg/dither-java
Source Code Management

Source Code Management

https://github.com/jesg/dither-java

Download dither

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jesg/dither/ -->
<dependency>
    <groupId>com.github.jesg</groupId>
    <artifactId>dither</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jesg/dither/
implementation 'com.github.jesg:dither:0.2.0'
// https://jarcasting.com/artifacts/com.github.jesg/dither/
implementation ("com.github.jesg:dither:0.2.0")
'com.github.jesg:dither:jar:0.2.0'
<dependency org="com.github.jesg" name="dither" rev="0.2.0">
  <artifact name="dither" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jesg', module='dither', version='0.2.0')
)
libraryDependencies += "com.github.jesg" % "dither" % "0.2.0"
[com.github.jesg/dither "0.2.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Dither

An implementation of t-way test case generation with IPOG (In-Parameter-Order-General).

Maven

Dither is in the Maven Central Repository.

<dependency>
	<groupId>com.github.jesg</groupId>
	<artifactId>dither</artifactId>
	<version>0.2.0</version>
	<scope>test</scope>
</dependency>

Usage

import com.github.jesg.dither.Dither;

...

// 2-way IPOG
Object[][] results2 = Dither.ipog(new Object[][] {
		new Object[] { 0, 1 },
        new Object[] { 0, 1 },
        new Object[] { true, false },
        new Object[] { "cat", "dog", "bird" }});

// 3-way IPOG
Object[][] results3 = Dither.ipog(3, new Object[][] {
		new Object[] { 0, 1 },
        new Object[] { 0, 1 },
        new Object[] { true, false },
        new Object[] { "cat", "dog", "bird" }});

// 3-way IPOG with constraints and exclude previously tested cases
Object[][] results3constraints = Dither.ipog(3, new Object[][] {
		new Object[] { 0, 1 },
        new Object[] { 0, 1 },
        new Object[] { true, false },
        new Object[] { "cat", "dog", "bird" }},
        new Integer[][]{
			new Integer[]{null, null, 0, 1}}, // exclude true dog combination
		new Object[][]{new Object[]{ 0, 0, true, "cat" }});  // previously tested cases


// 3-way AETG with constraints and exclude previously tested cases
// AETG is a non-deterministic pairwise strategy
Object[][] resultsAetg = Dither.aetg(3,
    0, // seed for random number generator, can be null
    new Object[][] {
		    new Object[] { 0, 1 },
        new Object[] { 0, 1 },
        new Object[] { true, false },
        new Object[] { "cat", "dog", "bird" }},
        new Integer[][]{
			new Integer[]{null, null, 0, 1}}, // exclude true dog combination
		new Object[][]{new Object[]{ 0, 0, true, "cat" }});  // previously tested cases
...

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with pom.xml, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches

Copyright

Apache License, Version 2.0 Copyright (c) 2015 Jason Gowan See LICENSE for details.

Versions

Version
0.2.0
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1