简体   繁体   中英

Ruby Cucumber running multiple feature files

I can have cucumber run all the features in a directory or a file of scenarios (like the rerun formatter). If I have two feature files in different directories, how can I execute them in a single cucumber execution? I want to execute features 1 and 3 below:

features
--dir1
----feature1.feature
----feature2.feature
--dir2
----feature3.feature
----feature4.feature
--dir3
----#more feature files
--dir4
----#more feature files
cucumber --require features features/dir1/feature1.feature features/dir2/feature3.feature

"--require features" is needed if you are using subdirectories.

After that simply list the feature files you want to run.

I could not imagine why you would want to manage your feature testing like that. Cuke has tags that allow you to categorize your feature files and scenarios within them. You can even tag Example tables (with multiple tables for one scenario outline).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM