Skip to content

JUnit Pioneer Slides #11

Description

@smoyer64

JUnit Pioneer

Core features (no additional dependencies)

  • Mockito extension
  • Conditional execution extensions
  • JUnit 4 rule replacement extensions
  • Console testing extensions (System.in, System.out and System.err)
  • Migration help for TestNG users (extra assertions

Core features (continued)

Suite

  • Allows the definition of declarative suites
@IncludeClassNamePatterns({"**/*Tests.java"})
public class MySuite {

@BeforeAll
static void setUp() {
...
}

@AfterAll
static void tearDown() {
...
}

}

upREST

  • Declarative testing of RESTful APIs
@UpRest
@Paths({"/api/first-resource", "/api/second-resource", "/api/third-resource"})
@Methods({Method.POST, Method.PUT, Method.PATCH, Method.DELETE})
@Headers("Accept:application/json")
@Authenticator(Oauth2Authenticator.class)
public void dynamicTest(StatusLine status) {
  assertThat(status)
      .hasStatusCode(HttpStatus.SC_FORBIDDEN);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions