I've created a JUnit test for the toy app using Windows Tester. The test runs to completion with no errors or failures, and it tells me "Runs: 1/1". But the green bar I normally see, indicating a successful JUnit test run, is instead a gray bar:
Here is the full test:
- Code: Select all
package david.playground;
import com.windowtester.runtime.swing.locator.LabeledTextLocator;
import com.windowtester.runtime.swing.UITestCaseSwing;
import com.windowtester.runtime.IUIContext;
import com.windowtester.runtime.swing.locator.JButtonLocator;
public class WindowsTesterAppTest extends UITestCaseSwing {
/**
* Create an Instance
*/
public WindowsTesterAppTest() {
super(david.playground.WindowsTesterApp.class);
}
/**
* Main test method.
*/
public void testWindowsTesterApp() throws Exception {
IUIContext ui = getUI();
ui.click(new LabeledTextLocator("Enter Text: "));
ui.enterText("Four Score");
assertCapsified( ui);
ui.click(new JButtonLocator("Exit"));
}
protected void assertCapsified( IUIContext ui) throws Exception {
ui.assertThat(
new LabeledTextLocator( "ALL YOUR TEXT: ")
.hasText( "FOUR SCORE"));
}
}
This is with Eclipse Helios SR2, and Windows Tester 6.0.0.
Am I missing something? Thanks.
-David