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
Pass: hypertext-mobile//
Pass: hypertext-mobile//search
Pass: hypertext-mobile//scan_instructions
Pass: hypertext-mobile//museum_plan
Pass: hypertext-mobile//nearest_objects
Pass: hypertext-mobile//detail_history
Pass: hypertext-mobile//show_object?object_id=3flyYolsQZKB9bx0zpjL4g
Pass: hypertext-mobile//detailed_object_info?object_id=3flyYolsQZKB9bx0zpjL4g
Pass: hypertext-mobile//object_list_for_location?museum=Pohjois-Karjalan%20museo&section=Matkalla%20Karjalassa%20-perusnäyttely%20Carelicumin%202.%20kerros
Pass: hypertext-mobile//tag_search?tag=стал
Pass: hypertext-mobile//about_museum/Дом-музей%20Муртоваара
Statistic (fails/all): 0/11
OK

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