Reputation: 4269
Is it possible to load the step definitions I have defined into the calabash-android console?
I would like to be able to use them when navigating the app within the console.
Thanks
Upvotes: 1
Views: 401
Reputation: 158
Did you try step('<step_name>')
method?
To be honest I'm not sure if this will work. I know it's working insinde Ruby methods and step definitions - I wanted to post a comment but I can't with 28 points of reputation ;)
You can also try making ruby methods with code from within the step definition:
Then /^I do something$/ do
some code
goes here
end
def do_something
some code
goes here
# same code as in step definition
end
or just use step method
:
def do_something
step('I do something')
end
and then call it in a calabash console (I prefer using binding.pry
inside some script rather than calling "pure" calabash-console - it makes me sure that I will have all needed methods included).
Upvotes: 1
Reputation: 1163
No from the console you can not run a single step definition. But you can start execution of a test at a specific line appending parameter to the call to start your test
:<linenumber>
This will start execution of your feature file from that specific line and it will run from there to the end of the file.
So while it is not what you are looking for at least it is something.
Upvotes: 1