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:
- samebug.api-key - defaults to empty.
- samebug.endpoint - defaults to: https://samebug.io/rest
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.