-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CucumberException when running Cucumber with Jacoco code coverage #258
Comments
The main reason for this exception to be thrown is to prevent people from adding step definitions in the class. We could relax the check to only raise if there are stepdef methods. This might be a little tricky since the cucumber-junit module doesn't depend on the cucumber-java module, where the stepdef annotations are, so we might have to use reflection here. |
Sounds like a good solution. |
I just made the change we agreed on. The changes were made in our fork so I am not sure how you can fetch that easily. As the changes are minor maybe just grab that by copy-and-paste. Here's the commit: https://github.com/PE-INTERNATIONAL/cucumber-jvm/commit/0caed66960af64d298b3f2a7af57e8146db35ed3 |
Ok, I cherry-picked that commit and made some minor changes. Please keep separate branches for unrelated fixes to make it easier for me to pick contributions independently. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
running cucumber tests with Jacoco code coverage enabled causes a cucumber exception.
Cause of this exception:
The Jacoco code coverage introduces new methods in the class using byte code manipulation. This then causes the following assertion to throw a cucumber exception:
I suggest to change this code so that a warning is logged instead of throwing an exception. After all even if methods are declared in that class it does not do much harm.
The text was updated successfully, but these errors were encountered: