| 151 | ==== Remote Tests ==== |
| 152 | |
| 153 | |
| 154 | The basic design for Selenium Tests- |
| 155 | |
| 156 | * Prerequisite 1: There are some more instances of Eden with varying configurations (template/python version/database type) running on some servers(preferably in local network with the CI Server, as this will increase the speed of handling requests by the CI Server). |
| 157 | * Prerequisite 2: There is an 'testing' instance of Eden running on the CI Server which contains the test suite. |
| 158 | * The 'testing' instance of Eden will shoot the test suite, while changing the base URL in the test suite. The base URL currently is 127.0.0.1. If we change it to the IP address of some of the currently running instances of Eden on other servers, the tests will start running for those servers. |
| 159 | * The above task can be done as a background process on the CI Server or running the tests using [http://selenium-grid.seleniumhq.org/ SeleniumGrid] to run them in parallel. |
| 160 | |
| 161 | Points 3 and 4 will be done on the CI Server using scripts(python or bash) and it will be built on top of the current test suite, so that we have to change minimal code in the current test suite. |
| 162 | |
| 163 | For this plan to succeed, we have to make sure that the Selenium tests run independent of the template. For this, I have investigated that some of the reasons why Selenium Tests fail on different templates are - |
| 164 | |
| 165 | * Text in Option field does not matches with that given in test data. |
| 166 | * Field type is incorrect. Most common example - autocomplete v/s option. |
| 167 | * Module is disabled. |
| 168 | |
| 169 | So, the above issues must be handled prior to running the tests remotely. |
| 170 | To find the field type, investigating it from the HTML in the test since we wish to run the tests remotely. |
| 171 | |
| 172 | Once this is done, we have a tests which can run on a class of templates which are not way too much different from default and IFRC templates. |
| 173 | |
| 174 | So, we run these tests on these templates for the enabled modules. |
| 175 | |