Using Cucumber for bundle testing #4950
Replies: 3 comments 6 replies
-
You should not embed cucumber into your plugin but instead wrap it (e.g. maven target location) and consume it as an external dependency. |
Beta Was this translation helpful? Give feedback.
-
cucumber-demo.zip |
Beta Was this translation helpful? Give feedback.
-
I have successfully integrated Cucumber within Tycho, although it necessitated modifications to the junit59 provider. The primary issue stemmed from conflicts between JUnit classes originating from the junit provider and those from the test fragment, which also depends on JUnit. Specifically, these conflicts arose from classes loaded by To resolve this conflict, I altered the junit59 fragment by removing all JUnit artifacts, retaining only The objective is not to modify any existing JUnit Provider but to create a new one devoid of JUnit artifacts, allowing the testing fragment to explicitly declare the target JUnit framework to be utilized. Does this make sense? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to embed Cucumber within my plugin testing but it looks like the classloader management within Tycho Surefire plugin is not compatible with this configuration.
Currently, I'm able to run cucumber scenarios in Eclipse IDE when using "JUnit Plug-in Test" configuration as it doesn't involve tycho bundles, but when running the same test with a tycho an error is raised telling that the CumcumberTestEngine is not a subtype of the JUnit's TestEngine class during the ServiceLoader discovery process as the TestEngine class comes from two different bundles: the one loaded by Tycho (which is the main one) and the one that comes from the dependency bundle as my test plugin embeds cucumber jar and hence I needed to declare a dependency to junit bunldes.
Do you think that embedding cucumber jar within the ClassLoader construction step in Tycho Surefire or exposing a parameter for dynamically loading jar during the startup process could solve the issue?
Beta Was this translation helpful? Give feedback.
All reactions