| 67 | |
| 68 | ==== Specefic ==== |
| 69 | |
| 70 | * Given that Sahana is a web-based tool, Selenium tests should be made robust, easy to use. The main idea is to have a set of functions(create, search, report, edit) which will take the tablename, labels of the field and the record data as input. The Testsuite should automatically check the type of field(option, autocomplete, text, date, datetime, etc) being used in the current template and fill the form accordingly. With this, we can create a code-template which just needs to be copied, pasted and fed in the record when creating a new Selenium test. This will ensure that writing Selenium tests are as easy as giving a test case. |
| 71 | |
| 72 | * So, the workflow of the developer will include running the unit tests to see if the new changes break anything and providing a Selenium test for the newly written module, which will be run in Continuous Integration. |
| 73 | |
| 74 | * The role tests currently run only on the IFRC template. The test suite should automatically generate data for multiple templates so that the role tests can be run on them as well. |
| 75 | |
| 76 | * To ensure that tests(role, selenium, smoke) work across templates and do not show false negatives when run on a different template, a check has to be made if the module it is to work on is enabled/disabled. If the module is disabled, then the test should automatically deactivate and an appropriate message should be included in the test report. |
| 77 | |
| 78 | * The load tests will test the amount of load Eden can take under normal and peak conditions. So, the load tests should be divided into phases, with each phase incrementally increasing the number of users and requests. Features of Tsung can be used to do this effectively. |
| 79 | |
| 80 | * The CI Server should run all the test across templates on a daily basis. For each test, it should include the template it is run on, test name and location. In case of failure of the test, it should include the traceback and the record details it was intended to work on also. It should send an aggregate report and a template specefic report for the bug marshalls and developers to investigate. |
| 81 | |
| 82 | |