Wiki source code of How to test a Diva app with Selenium
Last modified by Pascal Robert on 2012/07/19 21:10
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
38.1 | 1 | = How to test a Diva app with Selenium = |
| 2 | |||
| 3 | In a 100% ajax world it becomes more than necessary to maintain a set of tests for your application. | ||
| |
40.1 | 4 | Here's how to get started with Selenium testing a Diva app. |
| |
38.1 | 5 | |
| 6 | === Setup === | ||
| 7 | |||
| |
40.1 | 8 | 1. Add the WebObjects {{code language="none"}}ERSelenium{{/code}} framework to your project build path Libraries. |
| 9 | 1. Create the folder {{code language="none"}}Selenium{{/code}} in the project {{code language="none"}}Resources{{/code}} directory. | ||
| |
38.1 | 10 | 1. Place your Selenium tests in this folder |
| |
44.1 | 11 | 1. Enable the [[ERSelenium>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]] test-runner by adding {{code language="none"}}SeleniumTestsEnabled=true{{/code}} to the command-line arguments of the app (or to the {{code language="none"}}Properties{{/code}} file). |
| |
38.1 | 12 | |
| |
44.1 | 13 | You will find an in depth explanation of creating Selenium tests for WebObjects [[here>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]]. |
| |
38.1 | 14 | |
| 15 | {{info title="Note"}} | ||
| |
42.1 | 16 | The semantically rich markup of [[ERDivaLook>>doc:documentation.Home.Frameworks.ERDivaLook.WebHome]] makes it **easy** to write **maintainable** Selenium tests |
| |
38.1 | 17 | {{/info}} |
| 18 | |||
| 19 | === Running Selenium Tests === | ||
| 20 | |||
| |
40.1 | 21 | Launch your application in development mode (i.e with {{code language="none"}}er.extensions.ERXApplication.developmentMode=true{{/code}}). |
| 22 | Then click on //Run Test// link in your page menu: | ||
| |
38.1 | 23 | |
| |
40.1 | 24 | [[image:attach:RunTests.png]] |
| |
38.1 | 25 | |
| |
44.1 | 26 | Next you will see the [[ERSelenium>>doc:documentation.Home.Frameworks.ERSelenium Framework.WebHome]] test runner: |
| |
38.1 | 27 | |
| |
40.1 | 28 | [[image:attach:TestRunner.png]] |
| |
38.1 | 29 | |
| 30 | You may run the entire suite of Selenium tests or run them individually by clicking on the buttons marked by the oval. | ||
| 31 | |||
| |
40.1 | 32 | See also: [[doc:WO.Selenium]] |