-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
- Define 'pom.xml' file
An example is here.
Note:'InsertValueHere'
text should be replaced with company or project specific values.
- Define Spring context
An example is here.
Note:'InsertValueHere'
text should be replaced with company or project specific values.
- Create property files in 'resources' directory
Examples:
– store.properties (store main URL, HTTP and HTTPS ports)
– pages.properties (store page URLs and titles)
– jbehave.properties (browser name, number of threads, metafilters and mandatory jbehave settings)
– browser.properties (proxy & loading timeout settings)
– log4j.properties (logging level & main log patterns)
– mobile.properties (mobile apps data)
- Develop tests using BDD approach
a) Write test stories (in Given-When-Then style, find detailed syntax & examples here).
b) Describe pages (in new classes that extendAbstractPage
, then add these classes to Spring context, add URL & titles topages.properties
file).
c) Develop implementation of project-specific steps (common steps should be re-used fromCommonPageSteps
class).
Common tests execution parameters are as follows:
-Dthreads=1 -Dsuite.all=**/*Suite.java -Dsuite.list=SmokeWebSuite clean test -P runTests
Where
–Dthreads : Number of threads used to execute tests
–Dsuite.all : template for all suites to be included in execution (empty value is not allowed; * wildcard can be used)
–Dsuite.list : specific suite(s) from template that should be executed (can be empty or not specified – then all suites matchingsuite.all
will be executed)
–Dstory.list : specific stories belonging the suites that should be executed (can be empty or not specified – then all stories in suite(s) will be executed)
Note: Please make sure you've installed mobile prerequisites first.
Common tests execution parameters are as follows:
-Dmobile=android_app -Ddevice=true -Dsuite.all=**/*Suite.java -Dsuite.list=AndroidAppSuite clean test -P runTests
Where
–Dmobile : mobile platform and type of application to test.
Possible values:android_app
,android_browser
,ios_app
,ios_safari
.
–Ddevice : if true real device is used, if false or not specified an emulator is used.
–Dsuite.all, –Dsuite.list, –Dstory.list : see above.