mercredi 28 janvier 2015

How can I test my project using testFX

I'm a student working on a small javaFX project and I'm really new on testing a Software specially with GUI. I want to know how can I provide the method getRootNode with my rootNode from my GUI. I'm using testFX as framework


public class ButtonTest extends GuiTest {



@Override
protected Parent getRootNode() {
return null;
}


}



public class MainApp extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("/fxml/PhotoOverview.fxml"));

Scene scene = new Scene(root);
scene.getStylesheets().add("/styles/Styles.css");

stage.setTitle("Easy Manager");
stage.setScene(scene);
stage.show();
}

/**
* The main() method is ignored in correctly deployed JavaFX application.
* main() serves only as fallback in case the application can not be
* launched through deployment artifacts, e.g., in IDEs with limited FX
* support. NetBeans ignores main().
*
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}


}


Aucun commentaire:

Enregistrer un commentaire