-
-
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
Cucumber tests fails when run with Gradle test task. (Gradle 1.4) #468
Comments
This seems to be an issue with how cucumbers junitreporter works, http://forums.gradle.org/gradle/topics/beforetest_descriptor_is_null_and_the_test_is_not_actually_run_trying_to_run_groovy_and_java_cucumber_step_definition |
What Cucumber-JVM version? |
It's version 1.1.2, perhaps there is a snaphot for 1.1.3 available? |
This seems to solve the problem with gradle (tested on 1.5): What do you think? Edit: There still seem to be some issues with the test report generation. The HTML report index page lists the cucumber tests only when at least one test failed. The page for the default-package always lists the results. Maybe the root cause is calling testStart testStart testFinish testFinish events instead of always pairing them. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective |
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. |
Hello, I'm experiencing some problems when I try to run Cucumber-jvm tests. The file RunCukesTest is annotated with @RunWith(Cucumber.class). It can be seen below.
Execution failed for task ':test'.
Also I've been able to verify that the tests run and succeed in Intellij. In my quest to solve this on my own I checked out the gradle source code and ran som debugging on my own. I managed to narrow it down to that when writing the xml-report file the last test doesn't have a name which makes the method write in the class JUnitXmlResultWriter at the row .attribute("name", methodResult.getName()) throw a null pointer.
The test suite reports 4 tests for a scenario with three steps in it:
Scenario: Blabha lba
Given: assdf
When: aslkdfj
Then: asdf
The given, when and then steps succeed and have a name, but then a fourth TestMethodResult is added which I belive is the conclusion of the scenario and that one lacks a name.
I'm not sure if this is a bug with Gradle test which can't handle test methods with null names or if this is a problem with cucumber-jvm, thus I'll post this here and also on the gradle issue tracker.
Best regards, Kamil
The text was updated successfully, but these errors were encountered: