You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The constructor of TestRunner encountered NBC changes in 7.8.0 #2928
When our project upgraded to version 7.8.0 and found that the TestRunner constructor had been changed, we thought it was an NBC change and would bring us a lot of changes.
Expected behavior
Keep the original constructor and add a new method if there are new requirements.
Actual behavior
The original constructor method has been modified.
Is the issue reproducible on runner?
Shell
Maven
Gradle
Ant
Eclipse
IntelliJ
NetBeans
Test case sample
Please, share the test case (as small as possible) which shows the issue
Contribution guidelines
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
Previously, I need to create a custom SuiteRunner instance in my project, and I implemented ITestRunnerFactory to customize how TestRunner is implemented:
SuiteRunner baseSuiteRunner = new SuiteRunner(configuration, suite,
"outputDir",
new ITestRunnerFactory() {
@Override
public TestRunner newTestRunner(ISuite suite, XmlTest xmlTest,
Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
TestRunner runner =
new TestRunner(configuration, suite, xmlTest,
false,
listeners, classListeners);
//...
return runner;
}
},
xxx,
xxx);
But now the TestRunner constructor needs to fill in an instance of SuiteRunner.
Activity
juherr commentedon Jun 30, 2023
I agree it is a breaking change but I don't understand what is difficult to change on your side.
Could you explain what is your use case?
Hkh9966 commentedon Jul 3, 2023
Previously, I need to create a custom SuiteRunner instance in my project, and I implemented ITestRunnerFactory to customize how TestRunner is implemented:
But now the TestRunner constructor needs to fill in an instance of SuiteRunner.
Decouple SuiteRunner and TestRunner
Decouple SuiteRunner and TestRunner