-
Notifications
You must be signed in to change notification settings - Fork 1
Includes
Abhijit Gaikwad edited this page Mar 29, 2015
·
4 revisions
By using include
in our spun files, we're able to re-use common steps within our spun files.
Consider the common use case of signing into a form. For this we could create a sign-in.spun
file and include it within our test cases.
google.spun
get "http://google.com"
type "spun authoring" in "[name=q]"
submit
find "#search li h3"
assert "spun" in text
quit
sign-in.spun
find "form#login"
type "username" in "input[name=username]"
type "password" in "input[name=password]"
submit
some-test-case1.spun
include "./sign-in.spun`
#do something signed in
some-test-case2.spun
include "./sign-in.spun`
#do something signed in