Open felixbarny opened 5 years ago
I’ll work on this one.
@JonasKunz took the time to remove one of the main blockers we had to make progress on this topic: we can now run our "version integration tests" with JUnit 5 : https://github.com/elastic/apm-agent-java/pull/2962.
I have updated the issue description with a checklist of all the modules that still use Junit4.
The only thing which might be in the way that there is currently no way of having class-level parameters. But that is on JUnit's roadmap
Looks like this is still is open, currently parametrization is only possible on method level (JUnit Issue). I think we should be able to switch to method-level parametrized tests, however there will be problems in cases were we use inheritance to reuse common tests, e.g. AbstractHttpClientInstrumentationTest
. Tests inheriting from this class can no longer be parametrized (e.g. our RestTemplate
tests). Maybe using Test Templates might be a viable solution here for such general-purpose tests bases.
Now that testcontains supports JUnit 5, we should be able to update all remaining JUnit 4 tests to 5. The only thing which might be in the way that there is currently no way of having class-level parameters. But that is on JUnit's roadmap
Checklist
apm-agent-plugins/
integration-tests/