项目作者: igorstojanovski

项目描述 :
Samebug integration for JUnit 5.
高级语言: Java
项目地址: git://github.com/igorstojanovski/SamebugExtension.git
创建时间: 2018-07-12T20:56:51Z
项目社区:https://github.com/igorstojanovski/SamebugExtension

开源协议:Apache License 2.0

下载


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:

  1. <dependency>
  2. <groupId>co.igorski</groupId>
  3. <artifactId>samebug-junit-extension</artifactId>
  4. <version>1.0.0</version>
  5. </dependency>

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

  1. @ExtendWith(SamebugExtension.class)
  2. public class SampleTest {
  3. @Test
  4. public void shouldCompareNumbers() {
  5. assertEquals(1, 3);
  6. }
  7. }

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:

  1. 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.