Using JUnit4, what I want to do is to be able to test a group of different java projects that all do the same thing, but instead of have to write out a test case to test each project i was wondering is it possible to write a single test that can be run on multiple classes?
If this is not possible using JUnit4, is it possible to do this any other way?
I know this isnt right but this is just to give a brief idea of what I am on about:
@Test
public void test(Class insertClassNameHere, Method nameOfMethod){
Class insertClassNameHere = new Class();
assertEquals(insertClassNameHere.nameOfMethod(),1);
}
You can using JUnit’s @Parameterized.