Testing scripts

Testing scripts
Tests are stored in geo2tag/branches/service_test_scripts/scripts/service. There is one script for such request. For example file login allow you to login in system and return a error if there is a problems. Example of usage: vood@Vood:~/geo2tag/branches/service_test_scripts/scripts/service$ ./login Mark test MMMMMMMMMM And now we give server wrong password

vood@Vood:~/geo2tag/branches/service_test_scripts/scripts/service$ ./login Mark test111 Error

Templates of all requests are stored into _template files. Example of such file for login File login replace USERNAME and PASSWORD for comandline arguments and send request using curl. {"user":"USERNAME","password":"PASSWORD"}

File test implement such test as:


 * subscribing for all channels
 * unsubscribing from all channels
 * subscribe for random channel
 * create and add random mark into subscribed channel
 * create and add random mark into unsubscribed channel

It takes the same parameters as a login script.

All test output are storaged into geo2tag.log file. Scripts get his name(and hostname and name of a service) from this variables
 * geo2tag_server
 * geo2tag_path
 * geo2tag_log

If use scripts for current request(without test script) you need to set them using export.

Also there is a applyRndMark script,that allow you to add random mark. Example of ussage: vood@Vood:~/geo2tag/branches/service_test_scripts/scripts/service$ ./applyRndMark KKKKKKKKKK "My Channel" 1 vood@Vood:~/geo2tag/branches/service_test_scripts/scripts/service$

We give to script auth_token and channel name, and script return us is mark added to channel or not(1 is added, 0 is not).

Also JSON schema validation are NOT implemented yet.