Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3388

Migrate tests to use JUnit 5

XMLWordPrintable

    Overview

    Tests should be migrated to use JUnit 5. There are some tests currently which already use this, however we should continue this trend.

    This JIRA will act as the parent for the conversion. Each module should have a sub-task created from this JIRA to migrate its tests. Commits should be done one module at a time. Multiple commits may be submitted in a single PR with one exception. The resteasy-testuite migration should be a PR of it's own. It's going to take a lot of work to get these modules done.

    Creating Sub-Taks

    The simplest way to create a sub-task is likely to clone RESTEASY-3389 and make the necessary changes to the description and summary.

    Things to Know

    One of the biggest changes, besides imports and annotation names, is the order of the arguments for Assertions. In JUnit 4 the first parameter was typically a message. This is now the last parameter and may be a Supplier<String>. In some cases using a Supplier<String> might have some benefits if the message is expensive to create or possibly relies on behavior that would cause the object to fail latter on in the test. An example would be reading the output from a jakarta.ws.rs.core.Response. Care will need to taken when using an assertion like Assertions.assertEquals(String, String, String). You'll need to ensure the first argument is NOT the message and is the expected string.

      1.
      Migrate the resteasy-client module to JUnit 5 Sub-task Resolved Major James Perkins
      2.
      Migrate some modules to JUnit 5 Sub-task Resolved Major Christina Dasoula
      3.
      Migrate the server-adapters module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      4.
      Migrate the profiling-tests module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      5.
      Migrate the resteasy-jsapi module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      6.
      Migrate the resteasy-links module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      7.
      Migrate the resteasy-reactor module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      8.
      Migrate the resteasy-rxjava2 module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      9.
      Migrate the resteasy-servlet-initializer module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      10.
      Migrate the resteasy-wadl module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      11.
      Migrate the resteasy-wadl-undertow-connector module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      12.
      Migrate the security-jose-jwt module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      13.
      Migrate the security-crypto module to JUnit 5 Sub-task Resolved Major Dimitris Kafetzis
      14.
      Migrate the multipart-provider module to JUnit 5 Sub-task Resolved Major James Perkins
      15.
      junit5 migration: @ExtendWith replaced @Rule Sub-task Resolved Major James Perkins
      16.
      junit5 migration: remove Hamcrest Sub-task Resolved Blocker r searls
      17.
      junit5 migration: Fix manual mode tests Sub-task Resolved Blocker James Perkins
      18.
      Migrate the resteasy-atom-provider module to JUnit 5 Sub-task Resolved Major James Perkins
      19.
      Migrate the resteasy-html module to JUnit 5 Sub-task Resolved Major James Perkins
      20.
      Migrate the resteasy-jax-provider module to JUnit 5 Sub-task Resolved Major James Perkins
      21.
      Migrate the resteasy-netty4-cdi module to JUnit 5 Sub-task Resolved Major James Perkins

          rsearls r searls
          jperkins-rhn James Perkins
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: