Commit eb576806 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke

Removed GUI tests for the moment

parent 3176b518
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker-trace-diagnosis-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../kieker-trace-diagnosis-parent</relativePath>
</parent>
<artifactId>kieker-trace-diagnosis-guitest-architecture</artifactId>
<dependencies>
<dependency>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker-trace-diagnosis-application</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
package kieker.diagnosis.test.architecture.ui;
import org.testfx.api.FxRobotInterface;
public class Button extends Component {
public Button( final FxRobotInterface aRobot, final String aSelectorId ) {
super( aRobot, aSelectorId );
}
public void click( ) {
getRobot( ).clickOn( getNode( ) );
}
}
package kieker.diagnosis.test.architecture.ui;
import org.testfx.api.FxRobotInterface;
import javafx.scene.Node;
public abstract class Component {
private final FxRobotInterface ivRobot;
private final String ivSelectorID;
public Component(final FxRobotInterface aRobot, final String aSelectorId) {
ivRobot = aRobot;
ivSelectorID = aSelectorId;
}
protected final Node getNode() {
return ivRobot.lookup(ivSelectorID).queryFirst();
}
protected final FxRobotInterface getRobot() {
return ivRobot;
}
}
package kieker.diagnosis.test.architecture.ui;
import java.util.concurrent.TimeoutException;
import org.junit.BeforeClass;
import org.testfx.api.FxRobot;
import org.testfx.api.FxToolkit;
import org.testfx.toolkit.ApplicationFixture;
import javafx.stage.Stage;
import kieker.diagnosis.KiekerTraceDiagnosis;
public abstract class GuiTestBase {
private static final FxRobot cvRobot = new FxRobot( );
@BeforeClass
public static void setUp( ) {
try {
FxToolkit.registerPrimaryStage( );
FxToolkit.setupApplication( new KiekerTraceDiagnosisApplicationFixture( ) );
} catch ( final TimeoutException ex ) {
throw new IllegalStateException( ex );
}
}
public static FxRobot getRobot( ) {
return cvRobot;
}
private static final class KiekerTraceDiagnosisApplicationFixture implements ApplicationFixture {
@Override
public void stop( ) throws Exception {
}
@Override
public void start( final Stage stage ) throws Exception {
final KiekerTraceDiagnosis kiekerTraceDiagnosis = new KiekerTraceDiagnosis( );
kiekerTraceDiagnosis.start( stage );
}
@Override
public void init( ) throws Exception {
}
}
}
package kieker.diagnosis.test.architecture.ui;
import com.google.inject.AbstractModule;
public class KiekerTraceDiagnosisGUITestArchitectureModule extends AbstractModule {
@Override
protected void configure( ) {
}
}
package kieker.diagnosis.test.architecture.ui;
import org.testfx.api.FxRobotInterface;
public class Menu extends Component {
public Menu(final FxRobotInterface aRobot, final String aSelectorId) {
super(aRobot, aSelectorId);
}
public void click() {
getRobot().clickOn(getNode());
}
}
package kieker.diagnosis.test.architecture.ui;
import org.testfx.api.FxRobotInterface;
public class MenuItem extends Component {
public MenuItem(final FxRobotInterface aRobot, final String aSelectorId) {
super(aRobot, aSelectorId);
}
public void click() {
getRobot().clickOn(getNode());
}
}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker-trace-diagnosis-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../kieker-trace-diagnosis-parent</relativePath>
</parent>
<artifactId>kieker-trace-diagnosis-guitest</artifactId>
<dependencies>
<dependency>
<groupId>net.kieker-monitoring</groupId>
<artifactId>kieker-trace-diagnosis-guitest-architecture</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Duser.country=US -Duser.language=us</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
package kieker.diagnosis.test.ui;
import org.junit.Test;
import kieker.diagnosis.test.architecture.ui.GuiTestBase;
import kieker.diagnosis.test.ui.main.MainView;
import kieker.diagnosis.test.ui.main.OkCancelDialog;
public class ApplicationCloseTest extends GuiTestBase {
@Test
public void closeApplication( ) {
// First we cancel the dialog
final MainView mainView = new MainView( getRobot( ) );
mainView.getFileMenu( ).click( );
mainView.getFileMenu( ).getCloseMenuItem( ).click( );
final OkCancelDialog dialog = new OkCancelDialog( getRobot( ) );
dialog.getCancelButton( ).click( );
// Now we close the application
mainView.getFileMenu( ).click( );
mainView.getFileMenu( ).getCloseMenuItem( ).click( );
dialog.getOkButton( ).click( );
}
}
package kieker.diagnosis.test.ui.main;
import org.testfx.api.FxRobotInterface;
import kieker.diagnosis.test.architecture.ui.Menu;
import kieker.diagnosis.test.architecture.ui.MenuItem;
public class FileMenu extends Menu {
private MenuItem ivCloseMenuItem;
public FileMenu( final FxRobotInterface aRobot ) {
super( aRobot, "#file" );
ivCloseMenuItem = new MenuItem( aRobot, "#close" );
}
public MenuItem getCloseMenuItem( ) {
return ivCloseMenuItem;
}
}
package kieker.diagnosis.test.ui.main;
import org.testfx.api.FxRobotInterface;
public class MainView {
private final FileMenu ivFileMenu;
public MainView( final FxRobotInterface aRobot ) {
ivFileMenu = new FileMenu( aRobot );
}
public FileMenu getFileMenu( ) {
return ivFileMenu;
}
}
package kieker.diagnosis.test.ui.main;
import org.testfx.api.FxRobot;
import kieker.diagnosis.test.architecture.ui.Button;
public class OkCancelDialog {
private final Button ivOkButton;
private final Button ivCancelButton;
public OkCancelDialog( final FxRobot aRobot ) {
ivOkButton = new Button( aRobot, "OK" );
ivCancelButton = new Button( aRobot, "Cancel" );
}
public Button getOkButton( ) {
return ivOkButton;
}
public Button getCancelButton( ) {
return ivCancelButton;
}
}
......@@ -14,8 +14,6 @@
<module>kieker-trace-diagnosis-application</module>
<module>kieker-trace-diagnosis-architecture</module>
<module>kieker-trace-diagnosis-dependencies</module>
<module>kieker-trace-diagnosis-guitest</module>
<module>kieker-trace-diagnosis-guitest-architecture</module>
<module>kieker-trace-diagnosis-parent</module>
<module>kieker-trace-diagnosis-release-engineering</module>
</modules>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment