Skip to content
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

Twice the number of scenarios are displaying in the console and reports when specifying a fully qualified classpath in karate.options #861

Closed
kirksl opened this issue Aug 13, 2019 · 5 comments
Assignees
Milestone

Comments

@kirksl
Copy link
Contributor

kirksl commented Aug 13, 2019

triple-slash.zip

repro steps

referencing the attached project run the following command. (assuming the folder "git" is at the root of your drive).

On linux/mac
gradle clean test -b "/Git/triple-slash/build.gradle" -Dtest=KarateRunner -Dkarate.options="classpath:Git/triple-slash/src/test/java/org/company/tests"

on windows
gradle clean test -b "c:\Git\triple-slash\build.gradle" -Dtest=KarateRunner -Dkarate.options="classpath:c:\Git\triple-slash\src\test\java\org\company\tests"

expected
there are 3 feature files below the given classpath in the gradle command
each file will run 6 tests for a total of 6 x 3 = 18 tests/scenarios
the console output and reports should both show 18 scenarios

actual
the console output shows 36 scenarios
the timeline report shows 36 scenarios
sometimes the cucumber reports will show 36 scenarios

twice the number of scenarios are shown when specifying a fully qualified classpath path in karate.options. the duplicated scenarios are interesting. they are prefixed with a triple slash /// and their result has no impact on for example the cucumber report under /cucumber-html-reports.

@ptrthomas
Copy link
Member

@kirksl the correct usage in this case should be -Dkarate.options="/Git/triple-slash/src/test/java/org/company/tests" without the classpath: prefix if the user knows this is a "proper" OS path.

anyway, I have put in a fix so this should be detected and there is logic to de-dupe as well

would like @celcius112 to take a look at this if it impacts #751

@kirksl
Copy link
Contributor Author

kirksl commented Aug 17, 2019

@ptrthomas thanks for fixing. also curious does karate.options= accept the "file:" and "this:" prefixes and if so wondering if they should be specified.

@ptrthomas
Copy link
Member

@kirksl no, the file: and this: are designed only for the read() API

@celcius112
Copy link
Contributor

@ptrthomas Don't worry, it should not impact #751 as you modified unrelated methods

@ptrthomas
Copy link
Member

released 0.9.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants