can I call out to external programs in step definitions

28 views
Skip to first unread message

ziffification

unread,
Feb 26, 2015, 3:59:00 PM2/26/15
to cu...@googlegroups.com
just wondering if i can call premade scripts from stepdefinitions and read the output and act on in in a cucumber stepdefinition script.
I realize this might not be the spitrit of cucumber since the test should be writen in ruby/cucumber but these are allready existing python that output the words PASSED or FAILED + stderr 



Given /^I am testing a switch$/ do
end

When /^I run my python script$/ do
 /home/robm/python/testSwitch.py 172.168.101.139 5 >  /home/robm/python/172_168_101_138.txt
end

Then /^I should get back the word PASSED$/ do
 read /home/robm/python/172_168_101_138.txt
end


any ideas or suggestions on how to procede

Paolo Ambrosio

unread,
Feb 26, 2015, 4:08:20 PM2/26/15
to cu...@googlegroups.com
Is this what you are looking for?


Paolo 

ziffification

unread,
Feb 26, 2015, 11:58:51 PM2/26/15
to cu...@googlegroups.com
hmmm that looks promising ...


thanks Paolo
Reply all
Reply to author
Forward
0 new messages