Samebug Junit Extension

JUnit 5 extension for Samebug.

License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

co.igorski
ArtifactId

ArtifactId

samebug-junit-extension
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Samebug Junit Extension
JUnit 5 extension for Samebug.
Project URL

Project URL

https://github.com/igorstojanovski/SamebugExtension
Source Code Management

Source Code Management

https://github.com/igorstojanovski/SamebugExtension

Download samebug-junit-extension

How to add to project

<!-- https://jarcasting.com/artifacts/co.igorski/samebug-junit-extension/ -->
<dependency>
    <groupId>co.igorski</groupId>
    <artifactId>samebug-junit-extension</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/co.igorski/samebug-junit-extension/
implementation 'co.igorski:samebug-junit-extension:1.0.0'
// https://jarcasting.com/artifacts/co.igorski/samebug-junit-extension/
implementation ("co.igorski:samebug-junit-extension:1.0.0")
'co.igorski:samebug-junit-extension:jar:1.0.0'
<dependency org="co.igorski" name="samebug-junit-extension" rev="1.0.0">
  <artifact name="samebug-junit-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='co.igorski', module='samebug-junit-extension', version='1.0.0')
)
libraryDependencies += "co.igorski" % "samebug-junit-extension" % "1.0.0"
[co.igorski/samebug-junit-extension "1.0.0"]

Dependencies

compile (9)

Group / Artifact Type Version
org.junit.platform : junit-platform-launcher jar 1.2.0
org.junit.jupiter : junit-jupiter-engine jar 5.2.0
org.assertj : assertj-core jar 3.10.0
org.jboss.resteasy : resteasy-jackson2-provider jar 3.5.0.Final
org.jboss.resteasy : resteasy-client jar 3.5.0.Final
org.slf4j : slf4j-api jar 1.8.0-beta2
javax.xml.bind : jaxb-api jar 2.3.0
org.hamcrest : hamcrest-all jar 1.3
org.junit-pioneer : junit-pioneer jar 0.1.2

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.0

test (3)

Group / Artifact Type Version
org.mockito : mockito-core jar 2.19.0
org.mockito : mockito-junit-jupiter jar 2.19.0
com.github.tomakehurst : wiremock jar 2.17.0

Project Modules

There are no modules declared in this project.

Codacy Badge Codacy Badge

SamebugExtension

Samebug integration for JUnit 5.

Samebug is a debugging assistant for developers. It analyzes JVM stack traces to provide deep insights, rich context and technical expertise on them.

Latest Release

Samebug JUnit5 Extension 1.0.0

Usage

Add the dependency first:

<dependency>
    <groupId>co.igorski</groupId>
    <artifactId>samebug-junit-extension</artifactId>
    <version>1.0.0</version>
</dependency>

Then, add the SamebugExtension.class to your test as you would add any other extension:

@ExtendWith(SamebugExtension.class)
public class SampleTest {

    @Test
    public void shouldCompareNumbers() {
        assertEquals(1, 3);
    }
}

Then if and when a test fails, the extension will take the stack trace, take it to Samebug for analysis and will generate a url where one can see more details about the error and a possible solution for it.

The extension will log the url when you can all the additional info from the analysis:

Please visit https://samebug.io/searches/10116757 for more info.

Properties file

Optionaly, you can add the application.properties file in your resource folder. You can set two different options:

Requirements

  • Java 10.
  • The URL that you need access to see the results is logged, not printed. Because of that you will need a SLF4J implementation on your class path. Logback being the default choice.

License

Released under the terms of Apache License 2.0.

Samebug is a registered trademark of Samebug, Inc. Other names may be trademarks of their respective owners.

Versions

Version
1.0.0