Integration testing
scripts/tst/sanity.py
The main script for integration testing.
Usage: sanity.py [-h] -host HOST -fileName FILENAME [-credentials CREDENTIALS]
FILENAME is a name of file with relative links to chec separated by \n :
/ /tools /search /returnCode|getRequest /returnCode|postRequest|postData |
---|
Notice that you also can test POST request providing post data - just use the last line as an example.
CREDENTIALS - login and password in case of admin* sites separated by ":" (user:password).
Examples:
./scripts/tst/sanity.py -host admin.openkarelia.org -fileName ./scripts/tst/urlLists/admin.openkarelia.org -credentials user:password ./scripts/tst/sanity.py -host m.openkarelia.org -fileName ./scripts/tst/urlLists/m.openkarelia.org |
---|
Output:
Checking site: hypertext-mobile |
---|
Notice: remember that non-admin sites use caching, so dont be afraid if tests gave 302 error code - it means that there were not enough time to build cache and you need to wait with testing.
Testing local, devel and production sites
Shortcuts for testing all local sites (hypertext-*, virtual-sortavala):
- ./scripts/tst/testLocalSites.sh
devel sites (hypertext-*.geo2tag.org):
- ./scripts/tst/testDevelSites.sh
production sites (*.openkarelia.org):
- ./scripts/tst/testProductionSites.sh
After deploy testing of the admin* sites
Targets hypertext-admin.geo2tag.org, admin.openkarelia.org, virtualsortavala-admin.jns.fi run next scripts to check validity of deploy:
- scripts/tst/test.admin.openkarelia.org.sh
- scripts/tst/test.virtualsortavala-admin.jns.fi.sh
- scripts/tst/test.hypertext-admin.geo2tag.org.sh