How to read data from properties file instead of a feature file in Cucumber BDD Framework? -
i have scenario want log in multiple users, cucumber provides scenario outline examples perform action requires user details entered in feature file. there way keep user details in properties file , call there in step definition class?
if there is, can please provide me example code gmail login scenario? using junit cucumber framework,any suggestion junit highly appreciated.
thanks fola
i've been searching sorta same thing , found lot of ridiculous "answers" this. overly complicated, when super easy.
my goal read .txt file here solution in ruby.
#inject environment properties given /^i enter environment url field$/ file.open("/path/to/your/env.txt") |envfile| envfile.each_line |environment| puts environment keyboard_enter_text environment end end end
now jenkins can create parameterized build writes properties file. viola you're tests dynamic, enjoy!
Comments
Post a Comment