Skip to content
Advertisement

No runnable method in JUnit test Suites (Initialization error)

I am trying to implement JUnit TestSuites with my 3 Test Classes and run them at the same time. But when ever I run that test suite it gives me error as Initialization Error with “No runnable method found.”

This is my test Suite class named as AllTests.java

JavaScript

This is JUnitTesting_AddPatientPage.class

JavaScript

This is my JUnitTesting_DentalCategoryPage.class

JavaScript

This is my JUnitTesting_LoginPage

JavaScript

After running ALLTests.java as JUnit test it give me following error :-

JavaScript

Any help will be appreciated!

Advertisement

Answer

This kind of error message usually means you are mixing up JUnit 4 and JUnit 5.

In fact, if you look closer at your stacktrace you will find that you are using a JUnit 4 runner to run JUnit 5 tests.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement