Wiki source code of How to Develop Selenium Tests
Version 12.1 by Kieran Kelleher on 2007/11/10 13:58
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
4.1 | 1 | == Introduction == |
2 | |||
3 | There are many ways to do any job. The following methodology and approach to Selenium testing is just one approach. There are other approaches and you should use an approach that works for you. The purpose of this article is to outline one integrated approach where someone new to ERSelenium and Selenium testing wants some direction on how to get effective robust Selenium testing implemented: | ||
4 | |||
5 | == Pre-requisites and Assumptions == | ||
6 | |||
7 | You have configured your application for "EntityDevelopmentDefaults" which saves you a lot of typing during general development of WebObjects pages requiring data entry and allows you tom quickly develop higher level Selenium tests that involve mostly clicking on page controls while the majority of data entry geta automatically taken care of by the "EntityDevelopmentDefaults" feature. | ||
8 | |||
9 | It is assumed you are using FireFox and the Selenium IDE and FireBug plugins | ||
10 | |||
11 | === General Approach to Developing a Test === | ||
12 | |||
![]() |
12.1 | 13 | === Using ERSeleniums meta tag features for advanced test development === |
![]() |
4.1 | 14 | |
15 | == Using @include meta tag == | ||
16 | |||
17 | The @include tag is ideal for those common setup and teardown tasks. It is common for a test to go to the main application entry page and to login as its first step. Here is how we could use @include meta tag to make this a reusable. | ||
18 | |||
19 | == Using @repeat, @values, @done meta tags == | ||
20 | |||
![]() |
12.1 | 21 | These allow you to specify portions of a test to be repeated. |
![]() |
4.1 | 22 | |
23 | The @repeat tag denotes the beginning of the portion to be repeated and the @done denotes the end of the portion to be repeated. These (can/cannot?) be nested? | ||
24 | |||
25 | The first pass thru the repeated segment, the actual values in the test are used and on consecutive repetitions the items from the @values list are substituted into the value part (the 3rd column) of the step immediately following the @values declaration |