WebWork 2.2.6 have Selenium test cases for the showcase web application that comes with the distribution. Showcase is there to help us make sure the functionalities in WebWork works as expected.

Run Showcase Selenium Test Cases

To run Selenium test cases for showcase.

Step Description
1 Start up Tomcat with WebWork showcase deployed in it
2 Navigate to
http://localhost:8080/selenium/core/TestRunner.html
3 Click the "go" button on the left side of the frame, the text suite text field should be filled in with
../tests/TestSuite.html

This will load all the test cases

4 Click on the "Run All Test" button on the right of the frame, it should be the first button
or
Click on the particular test case and then the "Run Test" button on the right of the frame, it should be the second button

Structure

The selenium core source files are under the directory

[Directory Where WebWork Distribution is Unziped]/webapps/showcase/src/webapp/selenium/core

in the distribution of WebWork.

The tests are under the directory

[Directory Where WebWork Distribution is Unzipped]/webapps/showcase/src/webapp/selenium/tests

Adding more test cases

To add more test cases, create the test cases and place them in

[Directory Where WebWork Distribution is Unzipped]/webapps/showcase/src/webapp/selenium/tests

Then alter

[Directory Where WebWork Distribution is Unzipped]/webapps/showcase/src/webapp/selenium/tests/TestSuite.html

to add the newly created test case. TestSuite.html looks something like

...
<body onload="filterTestsForBrowser()">
    <table id="suiteTable"    
           cellpadding="1"
           cellspacing="1"
           border="1"
           class="selenium">
        <tbody>
        <tr>
            <td><b>Test Suite</b></td>
        </tr>
	<tr>
            <td>
                <a href="./../tests/ConfigBrowserTest.jsp">ConfigBrowserTest</a>
            </td>
        </tr>
        
        <!-- here is where the newly created test case should be linked -->
        ...
        
       </tbody>
    </table>
<body>
...

Enjoy.