From 0f3a577bed4d828472469675e90fcab032e33f44 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 2 Jun 2006 18:27:02 +0000 Subject: merge from 3.0 branch till 1133. --- tests/FunctionalTests/selenium/doc/testrunner.html | 213 --------------------- 1 file changed, 213 deletions(-) delete mode 100644 tests/FunctionalTests/selenium/doc/testrunner.html (limited to 'tests/FunctionalTests/selenium/doc/testrunner.html') diff --git a/tests/FunctionalTests/selenium/doc/testrunner.html b/tests/FunctionalTests/selenium/doc/testrunner.html deleted file mode 100644 index 86cac0cb..00000000 --- a/tests/FunctionalTests/selenium/doc/testrunner.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -TestRunner Reference - - - -

TestRunner Reference

-
-
-

Test Suites

-
-

A test suite is represented by an HTML document containing a single-column table. Each entry in the table should be a hyperlink to a test-case document. The first row will be ignored by Selenium, so this can be used for a title, and is typically used to hold a title.

-

By default Selenium will attempt to load the test-suite from "tests/TestSuite.html". An alternative test-suite source can be specified by appending a "test" parameter to the TestRunner.html URL, e.g.:

-
-http://localhost:8000/TestRunner.html?test=AllTests.php
-
-

The "test" URL is interpreted relative to the location of TestRunner.html.

-
-
-
-

Test Cases

-
-

A test-case is represented by an HTML document, containing a table with 3 columns: command, target, value. Not all commands take a value, however. In this case either leave the column blank or use a &nbsp; to make the table look better.

-

The first row will be ignored by Selenium, so this can be used for a title or any other information.

-

Example:

-
- ----- - - - - - - - - - - - - - - - - - - - - -
Simple Test Table
open/mypage 
typenameFieldJohn Smith
clicksubmitButtonTrue
verifyTextnameJohn Smith
-
-
-
-
-

SetUp / TearDown

-
-

There are no setUp and tearDown commands in Selenium, but there is a way to handle these common testing operations. On the site being tested, create URLs for setUp and tearDown. Then, when the test runner opens these URLs, the server can do whatever setUp or tearDown is necessary.

-

Example:

-
-

For the T&E project, we wanted the functional tests to run as a dummy user. Therefore, we made a /setUpFT URL that would create a dummy user and write the userID to the page. Then, we can store this value (using the command storeValue) and use it in the script. Finally, we made a /tearDownFT URL which takes the dummy userID as a parameter and deletes the user. Therefore, our tests look like this:

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Setup and Teardown
open/setUpFT 
storeValueuserid 
open/login 
typeuserID${userid}
clicksubmit 
open/tearDownFT?userid=${userid} 
-
-
-
-
-

Continuous Integration

-
-

Selenium can be integrated with an automated build. When the parameter "auto=true" is added to the URL, Selenium will run the entire suite of tests, and then post the results to a handling URL. The default URL is "/postResults", but an alternative handler location can be provided by specifying a "resultsUrl" parameter.

-

The fields of the post are:

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterDescription
resultthe word "passed" or "failed" depending on whether the whole suite passed or at least one test failed.
totalTimethe time in seconds for the whole suite to run
numTestPassestht total number of tests which passed
numTestFailuresthe total number of tests which failed.
numCommandPassesthe total number of commands which passed.
numCommandFailuresthe total number of commands which failed.
numCommandErrorsthe total number of commands which errored.
suitethe suite table, including the hidden column of test results
testTable.1the first test table
testTable.2the second test table
......
testTable.NThe Nth test table
-
-
-
Therefore, the steps for continuous integration are:
-
    -
  1. Create a servlet-type application at the url /postResults which can read the parameters above and write them to a file

    -
  2. -
  3. -
    Create a script which can start up a brower and send to to the URL: selenium?auto=true
    -
    -
    -
    -
  4. -
  5. -
    Make your continuous build:
    -
      -
    • Call the script from step 2, preferably using more than one browser
    • -
    • Wait for it to finish, possibly by checking for the existence of the file(s) from step 1
    • -
    • Parse these files to determine whether the build passed or failed
    • -
    • Act accordingly (send emails, update a build web page, etc.)
    • -
    -
    -
    -
  6. -
-
-
-
-
- --- - - - - - - - - - -
Authors:Paul Gross, Jason Huggins
Created Date:08/23/2004
Modified Date:28/01/2005
Created With:reStructuredText: http://docutils.sourceforge.net/rst.html
-
-
- - -- cgit v1.2.3