Afton

Suppress unit test failures while github/jira issues are open

License

License

Categories

Categories

Ant Build Tools
GroupId

GroupId

com.antwerkz.afton
ArtifactId

ArtifactId

afton-core
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Afton
Suppress unit test failures while github/jira issues are open
Project URL

Project URL

https://github.com/evanchooly/afton.git
Source Code Management

Source Code Management

https://github.com/evanchooly/afton.git

Download afton-core

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
com.atlassian.jira » jira-rest-java-client jar 2.0.0-m2
org.slf4j : slf4j-api jar 1.7.5
ch.qos.logback : logback-core jar 1.0.13
junit : junit jar 4.11
org.kohsuke : github-api jar 1.44

Project Modules

There are no modules declared in this project.

afton

TestNG and JUnit extensions to suppress test failures so long as the documented jira or github issues are still open.

Why?

When testing against multiple versions of a release, some tests might fail because of upstream bugs in one version but not another. In those case, you still want to be able to write tests that fully exercise your featureset without having to worry overly much about those upstream bugs. This project allows you to write your tests so that you can test against versions you know should work while waiting on the upstream project to fix its bugs. Once those issues are resolved and closed, any subsequent failures in your tests will begin to be reported.

For example, a regression in mongodb 2.5.4 causes a Morphia test to fail against that server but works fine against, say, 2.4.7. Using afton, we can test as if everything is fine while we wait for that regression to be resolved knowing that we're at least always testing against 2.4.7 in the meantime.

JUnit

To ignore tests based on open github issues, mark up your tests like this:

@RunWith(AftonJUnitRunner.class)
public class GitHubTest {
  @Test
  @GitHubIgnore(repository = "evanchooly/afton", issue = 1)
  public void ignoreMe() {
    fail("Forced failure");
  }
}

TestNG

Pending

Jira

To ignore tests based on open jira issues, mark up your tests like this:

@RunWith(AftonJUnitRunner.class)
public class JiraTest {
  @Test
  @JiraIgnore(server = "https://jira.example.com", issue = "DUDE-1")
  public void ignoreMe() {
    fail("Forced failure");
  }
}

Versions

Version
0.1