Giter VIP home page Giter VIP logo

Comments (3)

cherylking avatar cherylking commented on June 3, 2024

@KyleAure I took a look at this last week and it seems that it is not a straight forward change. The test cases in https://github.com/OpenLiberty/arquillian-liberty-dependencies fail after making the change, and my first couple of attempts to resolve the failures did not work. The @RunsWith is no longer available and neither is the org.jboss.arquillian.junit.Arquillian used in the @RunsWith.

If you have some insight as to the changes needed in the testcases in that repo (which is also where the Junit runner would need updating), please let me know.

One other point, I don't think we would want to make this change for the non-Jakarta artifacts.

from liberty-arquillian.

KyleAure avatar KyleAure commented on June 3, 2024

@cherylking For testing, we will need to have a separate test package and it will need to run in a separate JVM.
Junit5 has a vintage Junit4 runner which can be used to run the Junit4 test classes.
But the problem is the Arquillian container, only one container can be loaded per JVM.

Long story short: Junit5 supports running Junit4 tests, but the Arquillian Junit5 Container cannot run Junit4 Container tests.

The @RunsWith is no longer available and neither is the org.jboss.arquillian.junit.Arquillian used in the @RunsWith.

The proper way to annotate Junit5 tests is with extensions (instead of runners):

@ExtendWith(ArquillianExtension.class)
public class WLPJunit5TestCase {
}

One other point, I don't think we would want to make this change for the non-Jakarta artifacts.

I agree

from liberty-arquillian.

KyleAure avatar KyleAure commented on June 3, 2024

Options:

  1. Refactor all existing tests to use JUnit5
  2. Keep liberty-managed tests using JUnit4, and Refactor liberty-remote to use JUnit5
  3. Create a subproject inside liberty-managed and liberty-remote that tests JUnit5 (Need to duplicate tests or write simple tests)
  4. Don't automate testing for JUnit5, and release a pom artifact for Junit5 for manual testing (risky).

from liberty-arquillian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.