I require to test an application which uses a Swing GUI interface. I have a client/server design and want to simulate client input (from the client's interface) and retrieve the server response.
So far I have looked into jfcUnit and UISpec4J for JDK 7, with use under NetBeans. Attempting to find a named component from the window instance returned nothing using jfcUnit (using the NamedComponentFinder), example comes from here under the login screen example. I assume the name is its string variable name in the class.
The test method I used for searching a client 'Connect' button which gave the empty list result is as follows, where gui is the client gui class(following the rest of the login example above):
@Test
public void testConnectVisible () {
NamedComponentFinder finder = new NamedComponentFinder(JComponent.class, "connectBtn" );
List allItems = finder.findAll(gui);
System.out.println(allItems.toString());
}
Another was UISpec4J, although I can't find a .jar compatible with JDK 7. Its documentation is fuller and would be more suitable.
Does anyone know of a suitable GUI testing framework under JDK 7, or a working example of either of UISpec4J/jfcUnit for JDK 7? I need some way of emulating event-based triggering on the client side.
Edit I would also like to simulate multiple clients, which would require a testing framework that supports several client windows in one test instance.
Many thanks :)