I use the following when using JUnit runner@Cucumber.Options( tags= {"@test1", "@test2"}, glue = "uk.co.mycompany.myStepsDef", format= {"pretty", "html:target/cucumber", "json:target/cucumber.json"})When running test using CLI, this worksjava -jar myjarfile.jarĀ classpath:uk/co/mycompany/features --glueĀ classpath:uk/co/mycompany/myStepsDef --tags @test1 --formatĀ html:target/cucumberhowever, how do I add or specify more tags and features?ĀSo I want -- tags @test1 @test2 --formatĀ pretty html:target/cucumber json:target/cucumber.json
Roberts, I tried Ā --tags @test1 --tags@test2, unfortunately, it Ā didn't work. I got an exception.
I managed to get it working by using comma with no space, so --tags @test1,@test2 worked.
With the format values, I got that to work as well using : Ā --format html:target/cucumber --format json:target/cucumber.json.To run multiple features, you do not need to use the tags option, just give the classpath to the folder containing your feature files, it will run all the feature files in that classpath.
ThanksAyoseg
On Monday, 17 December 2012 03:33:57 UTC, Robert wrote:
On Sunday, December 16, 2012 11:11:06 AM UTC-8, Ayoseg wrote:I use the following when using JUnit runner@Cucumber.Options( tags= {"@test1", "@test2"}, glue = "uk.co.mycompany.myStepsDef", format= {"pretty", "html:target/cucumber", "json:target/cucumber.json"})
When running test using CLI, this worksjava -jar myjarfile.jarĀ classpath:uk/co/mycompany/features --glueĀ classpath:uk/co/mycompany/myStepsDef --tags @test1 --formatĀ html:target/cucumberhowever, how do I add or specify more tags and features?ĀSo I want -- tags @test1 @test2 --formatĀ pretty html:target/cucumber json:target/cucumber.jsontry the following for tags--tags @test1 --tags @test2I'm not too clear on how to run multiple features.ĀI have tried using comma to separate the option values, but it didn't work.
--
-- Rules --
Ā
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
Ā
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
Ā
Ā
On Mon, Dec 17, 2012 at 9:25 AM, Ayoseg <seg...@hotmail.com> wrote:Roberts, I tried Ā --tags @test1 --tags@test2, unfortunately, it Ā didn't work. I got an exception.What exception?
On Monday, 17 December 2012 10:35:36 UTC, Aslak HellesĆøy wrote:On Mon, Dec 17, 2012 at 9:25 AM, Ayoseg <seg...@hotmail.com> wrote:Roberts, I tried Ā --tags @test1 --tags@test2, unfortunately, it Ā didn't work. I got an exception.What exception?Ā Exception in thread "main" cucumber.runtime.CucumberException: None of the featuresĀat [classpath:uk/co/mycompany/features] matched the filters: [@test1, @test2]Ā Ā Ā Ā at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:45)Ā Ā Ā Ā at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:93)Ā Ā Ā Ā at cucumber.runtime.Runtime.run(Runtime.java:81)Ā Ā Ā Ā at cucumber.cli.Main.run(Main.java:20)Ā Ā Ā Ā at cucumber.cli.Main.main(Main.java:12)Please note that I am using tags to select which feature files to run, not scenarios on this occasion