Cannot customize paths to feature folders using cucumber.yml

348 views
Skip to first unread message

the_zonker

unread,
Dec 21, 2010, 11:50:48 AM12/21/10
to Cukes
Hi guys

I faced with the following problem.

My automation project is large and need to be structured and grained
well.
And hierarchy of project is so:

ROOT folder
- Folder 1
* Subfolder1
+ features folder

* Subfolder2
+ features folder
- Folder 2
* Subfolder1
+ features folder

* Subfolder2
+ features folder

etc.

! I need to run all my Feature-files from ROOT folder and generate the
common report for all features.!
Indeed it possible if I run from console following command:

ROOT>cucumber Folder1\Subfolder1 Folder2\Subfolder2 etc.. --
tags .....-- format ...

But such solution is unacceptable in case of large project with many
Folders and Subfolders.



So I tried to use cucumber.yml to add all subfolders to default run.
Here is its content:

<%report_path = File.expand_path(File.dirname(__FILE__) + '/Reports/
report.html')%>
<% puts report_path %>
<% path= ' Folder1\Subfolder1 ' + ' Folder2\Subfolder2 ' %>
<% puts path %>

all_features: <%= path %> --format html > <%= report_path %>


I put cucumber.yml into ROOT/config/cucumber.yml. The example of
cucumber.yml I see here:
https://github.com/aslakhellesoy/cucumber/wiki/cucumber.yml

When I tried to run cucumber for defined in cucumber.yml profile
"all_features" in verbose (-v) mode I get following errors:
ROOT>cucumber --profile all_features -v

ROOT/Reports/report.html
Folder1\Subfolder1 Folder2\Subfolder2
Using the all_features profile...
Code:
* ./Genealogy/WebAPI/features/support/env.rb
C:/Ruby186/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/
abstract_response.rb:50: warning: parenthesize argument(s) for future
version
* D:/My Dropbox/personal activity/work/automation/xxx/
Folder2\Subfolder2/features/support/env.rb
* D:/My Dropbox/personal activity/work/automation/xxx_dupl/mfg/
features/support/env.rb
* D:/Project/WatirAutomation/Cucumber/sigmasure/mfg/features/support/
env.rb
D:/Project/WatirAutomation/Cucumber/xxx/mfg/features/support/env.rb:
28: warning: already initialized constant Browser
Failed to load 'pdf' programming language for file ./Genealogy/WebAPI/
documentation/SQ WebServices API Documentation v1.5.1.pdf: no such
file to loa
d -- cucumber/pdf_support/pdf_language
* ./Genealogy/WebAPI/documentation/SQ WebServices API Documentation
v1.5.1.pdf [NOT SUPPORTED]
Failed to load 'docx' programming language for file ./Genealogy/WebAPI/
documentation/WebAPI Dictionary.docx: no such file to load -- cucumber/
docx_s
upport/docx_language
* ./Genealogy/WebAPI/documentation/WebAPI Dictionary.docx [NOT
SUPPORTED]
* ./Genealogy/WebAPI/features/step_definitions/api.rb
* ./Genealogy/WebAPI/features/step_definitions/parts_steps.rb
Failed to load 'html' programming language for file ./Genealogy/WebAPI/
report.html: no such file to load -- cucumber/html_support/
html_language
* ./Genealogy/WebAPI/report.html [NOT SUPPORTED]
* ./Genealogy/WebAPI/test_config.rb
Failed to load 'xml' programming language for file ./Genealogy/WebAPI/
test_data/success_assemble_Parts.xml: no such file to load -- cucumber/
xml_sup
port/xml_language
* ./Genealogy/WebAPI/test_data/success_assemble_Parts.xml [NOT
SUPPORTED]
* ./Genealogy/WebAPI/test_data/success_create_APS.xml [NOT
SUPPORTED]
Failed to load 'yml' programming language for file ./config/
cucumber.yml: no such file to load -- cucumber/yml_support/
yml_language
* ./config/cucumber.yml [NOT SUPPORTED]
Failed to load 'ini' programming language for file D:/$RECYCLE.BIN/
S-1-5-21-1717023327-1151268377-1284445148-5639/desktop.ini: no such
file to load
-- cucumber/ini_support/ini_language
* D:/$RECYCLE.BIN/S-1-5-21-1717023327-1151268377-1284445148-5639/
desktop.ini [NOT SUPPORTED]
* D:/$RECYCLE.BIN/S-1-5-21-3073446634-3966918885-3821282082-1000/
desktop.ini [NOT SUPPORTED]

etc.


It means that Cucumber tried to load every file on my local disc. As
you can see in the begining of the stack it puts correct values for
path and report_path variables declared in cucumber.yml.

Why in case of defining folders in console it works well, but
completely doesn't work in case of defining folders in cucumber.yml?

Please help me to cope with this strange behavior or suggest other
ways to customize paths to Feature Folders.

Regards, Vadim

Rob Hunter

unread,
Dec 21, 2010, 5:38:01 PM12/21/10
to cu...@googlegroups.com

Have you tried specifying just the top-level folders? I thought Cucumber searched the given folders recursively.

C:> cucumber Folder1 Folder2

It might be a simpler option than expanding paths yourself.

--
Rob Hunter
(Sent from my phone)

the_zonker

unread,
Dec 22, 2010, 5:28:03 AM12/22/10
to Cukes
You are right. If I run just "cucumber ROOT" everything works correct
- cucumber finds all features inside ROOT.

Thanks

On Dec 22, 12:38 am, Rob Hunter <robertjhun...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages