-
Notifications
You must be signed in to change notification settings - Fork 9
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
Can you give a valid cucumber-js example? #34
Comments
We've come to a working example: the output:
The xml: cucumber-junit.xml:
the wdio config:
Is it normal that we have to use jvm as framework for a javascript testing framework such as wdio? |
In Jarno's first comment, we used a junit report generated by the npm library @wdio/junit-reporter along with its associated error when compiling the junit report with the bdd2octane tool. In Jarno's second comment with the workaround of using 'cucumber-jvm' instead of 'cucumber-js', we used a junit report which was generated by the npm library @cucumber/cucumber. The bdd2octane tool was able to convert this junit report to an octane report BUT it works only for junit reports that contain successful tests only. If the junit report contains failed tests, we get a StringIndexOutOfBoundsException and the octane report won't be generated:
The cucumber-junit.xml file with a failed test step:
The approach using cucumber-jvm is a workaround that somewhat works (for junit reports containing passed tests only), but we expected to be able to set 'cucumber-js' as framework when using wdio instead of 'cucumber-jvm' which is not related towards each other. When we use a passed cucumber-junit.xml with 'cucumber-js', then we get following java.util.NoSuchElementException error:
|
Hello, |
Hello @nissimshitrit, we are using @wdio/cucumber-framework library with version 9.2.2 which is the latest, this library uses @cucumber/cucumber version 10.3.1. |
Those are the supported verified versions for cucumber-js: 4.2.1, 5.1.0, 6.0.5, 7.3.0 |
@nissimshitrit, We'll create a ticket for this, thanks! |
I am facing similar issues with bdd2octane, the problem is that I am not using wdio and can’t setup the /*.ts file which matches the feature file and the feature files are skipped. |
Hi @NikolaZag , |
@nissimshitrit The Setup is a little bit odd, but it is working. |
This is my junit file:
<?xml version="1.0" encoding="UTF-8"?> <testsuites tests="1" failures="0" errors="0" skipped="0"> <testsuite name="Zoekopdracht op google" timestamp="2024-10-14T08:39:03" time="6.184" tests="1" failures="0" errors="0" skipped="0"> <properties> <property name="specId" value="0"/> <property name="featureName" value="Zoekopdracht op google"/> <property name="capabilities" value="chrome.129_0_6668_59.windows"/> <property name="featureFile" value="file:///C:/APPS/test-project/tests/features/google-voorbeeld.feature"/> </properties> <testcase classname="CucumberJUnitReport-chrome.129_0_6668_59.windows.Zoekopdracht op google" name="abc" time="5.489"> <system-out><![CDATA[ ✅ Gegeven dat de google zoekpagina geladen is✅ Als er wordt gezocht naar "ABC"✅ Dan wordt "abc.nl" als eerste resultaat getoond ]]></system-out> </testcase> </testsuite> </testsuites>
This is my feature file:
`#Auto generated Octane revision tag
@BSPID40002REV0.2.0
Feature: Zoekopdracht op google
"""
Als ABC
Wil ik controleren dat ABC het eerste resultaat is op Google
Zodat ABC snel te vinden is
"""
@TSCID247004
Scenario: abc
Given dat de google zoekpagina geladen is
When er wordt gezocht naar "ABC"
Then wordt "ABC.nl" als eerste resultaat getoond`
This my output in commandline:
java -jar "C:\temp_TA\bdd2octane-1.1.9.jar" --framework="cucumber-js" --reportFiles="**/junit-report.xml" --featureFiles="**/tests/features/*.feature" --resultFile="bdd2octane\octane-report.xml" All xml files matching pattern "**/junit-report.xml": junit-report.xml All feature files matching pattern "**/tests/features/*.feature": tests\features\google-voorbeeld.feature Feature name is empty in element: <testsuite tests="1" failures="0" name="Zoekopdracht op google" time="6.184" errors="0" timestamp="2024-10-14T08:39:03" skipped="0" >...</testsuite> try searching by scenario name Cannot locate a feature file by scenario name for: Zoekopdracht op google, skipping... 0 test case(s) processed 1 test case(s) skipped
The cucumber version and junit version is imo irrelevant for this issue. We've tried to adjust our junit to the unit test examples in this repository but no success. Please provide a working example.
The text was updated successfully, but these errors were encountered: