You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Alex Dettinger (Jira)" <ji...@apache.org> on 2019/09/05 07:47:00 UTC

[jira] [Resolved] (CAMEL-13826) Create a camel-test-junit5 module

     [ https://issues.apache.org/jira/browse/CAMEL-13826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Dettinger resolved CAMEL-13826.
------------------------------------
    Resolution: Fixed

> Create a camel-test-junit5 module
> ---------------------------------
>
>                 Key: CAMEL-13826
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13826
>             Project: Camel
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0.M4
>            Reporter: Alex Dettinger
>            Assignee: Alex Dettinger
>            Priority: Minor
>             Fix For: 3.0.0, 3.0.0.RC2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We start this effort with below directions:
> + Users should be able to keep old JUnit 4 tests for a while
> + Ideally, it would be possible to migrate camel test per camel test
> + Keeping CamelTestSupport class name and the test by inheritance approach would make adoption and migration easier
> + CamelTestSupport based tests looks more concise than tests that would use some kind of  injection (e.g.  injection of the CamelContext and so on)
> + Adding a new module would allow users to get rid of JUnit 4 when they want (they simply stop using camel-test)
> Conclusion:
>  Users who want to stay on JUnit4 can still use the {{camel-test}} module.
>  Users who want to migrate to JUnit5 could use the new {{[camel-test-junit5|https://github.com/apache/camel/tree/master/components/camel-test-junit5]}} module and migrate their tests helped with the [migration guide|https://github.com/apache/camel/blob/master/components/camel-test-junit5/src/main/docs/test-junit5.adoc#migrating-camel-tests-from-junit-4-to-junit-5]. Few camel components have been migrated, some tests could be migrated simply by changing few imports.
> Note that it's possible to mix JUnit4 and JUnit5 tests by using {{camel-test}}, {{camel-test-junit5}} in combination with {{junit-vintage-engine}}. Camel-xstream is intentionally mixing JUnit4/5 tests at this stage.
> Migrating flaky tests to JUnit 5 is not recommended yet as there are still open discussions at [JUnit 5|https://github.com/junit-team/junit5/issues/1558] as well as [Surefire|https://issues.apache.org/jira/browse/SUREFIRE-1584] level.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)