Description
if (testMethodNames .length == 0 ) {
if (testClassNames .length > 0 ) {
Arrays .asList (testClassNames ).forEach (testClassName -> {
try {
final Class <?> clazz = customClassLoader .loadClass (testClassName );
requestBuilder .selectors (selectClass (clazz ));
} catch (ClassNotFoundException e ) {
if (numberOfFailedLoadClass .incrementAndGet () > nbFailingLoadClass ) {
throw new RuntimeException (e );
}
e .printStackTrace ();
}
}
);
} else {
try {
requestBuilder .selectors (selectClass (customClassLoader .loadClass (testClassNames [0 ])));
} catch (ClassNotFoundException e ) {
throw new RuntimeException (e );
}
}
} else {
Arrays .asList (testMethodNames ).forEach (testMethodName -> {
try {
// If there is no class name in the method name, we try the first class
if (!testMethodName .contains ("#" )) {
requestBuilder .selectors (selectMethod (customClassLoader .loadClass (testClassNames [0 ]), testMethodName ));
} else {
// Else we load the fully qualified method name
String className = testMethodName .split ("#" )[0 ];
String methodName = testMethodName .split ("#" )[1 ];
requestBuilder .selectors (selectMethod (customClassLoader .loadClass (className ), methodName ));
}
} catch (ClassNotFoundException e ) {
throw new RuntimeException (e );
}
}
);
}
Reactions are currently unavailable
You can’t perform that action at this time.
test-runner/src/main/java/eu/stamp_project/testrunner/runner/JUnit5Runner.java
Lines 61 to 99 in adb1c99