How can I use two test methods in single Test Class for JavaFx UI testing?

73 Views Asked by At

I am currently facing an exception while loading the UI controller.

Have written two separate methods for testing client requests for a server while loading files.

I have start methods which loads UI controller-

@Override
public void start(Stage stage) throws IOException {

and test methods are as follows:

  1. First test

    @Test
    @DisplayName("load the files")
    public void testRoutineA() throws URISyntaxException, NullPointerException, IOException {
    
  2. Second test

    @Test
    public static void testRoutineB() throws IOException {
    

Issue:

  • testRoutineA runs fine and load the UI.
  • But when testRoutineB runs it again call the Sart method and throws exception:

Exception in Async Thread --- Failed to load FXML files.

Any suggestion how to use both methods ?

0

There are 0 best solutions below