-
Notifications
You must be signed in to change notification settings - Fork 434
Fixed CI to avoid dynamic classloading #4152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fa6f7b4
30dd950
52b1171
617b329
83baaea
e17ec30
951062e
8c274da
57d37a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,26 +4,41 @@ | |
| import com.codename1.testing.TestReporting; | ||
| import com.codename1.ui.Display; | ||
| import com.codename1.ui.Form; | ||
| import com.codename1.testing.AbstractTest; | ||
|
|
||
| public final class Cn1ssDeviceRunner extends DeviceRunner { | ||
| private static final String[] TEST_CLASSES = new String[] { | ||
| MainScreenScreenshotTest.class.getName(), | ||
| BrowserComponentScreenshotTest.class.getName(), | ||
| MediaPlaybackScreenshotTest.class.getName(), | ||
| GraphicsPipelineScreenshotTest.class.getName(), | ||
| GraphicsShapesAndGradientsScreenshotTest.class.getName(), | ||
| GraphicsStateAndTextScreenshotTest.class.getName(), | ||
| GraphicsTransformationsScreenshotTest.class.getName(), | ||
| GraphicsMethodsScreenshotTest.class.getName() | ||
| private static final AbstractTest[] TEST_CLASSES = new AbstractTest[] { | ||
| new MainScreenScreenshotTest(), | ||
| new GraphicsPipelineScreenshotTest(), | ||
| new GraphicsShapesAndGradientsScreenshotTest(), | ||
| new GraphicsStateAndTextScreenshotTest(), | ||
| new GraphicsTransformationsScreenshotTest(), | ||
| new GraphicsMethodsScreenshotTest(), | ||
| new BrowserComponentScreenshotTest(), | ||
| new MediaPlaybackScreenshotTest() | ||
| }; | ||
|
|
||
| public void runSuite() { | ||
| for (String testClass : TEST_CLASSES) { | ||
| runTest(testClass); | ||
| for (AbstractTest testClass : TEST_CLASSES) { | ||
| log("CN1SS:INFO:suite starting test=" + testClass); | ||
| try { | ||
| testClass.prepare(); | ||
| testClass.runTest(); | ||
| testClass.cleanup(); | ||
|
Comment on lines
+22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The suite now executes each Useful? React with 👍 / 👎. |
||
| log("CN1SS:INFO:suite finished test=" + testClass); | ||
| } catch (Throwable t) { | ||
| log("CN1SS:ERR:suite test=" + testClass + " failed=" + t); | ||
| t.printStackTrace(); | ||
| } | ||
| } | ||
| log("CN1SS:SUITE:FINISHED"); | ||
| TestReporting.getInstance().testExecutionFinished(getClass().getName()); | ||
| } | ||
|
|
||
| private static void log(String msg) { | ||
| System.out.println(msg); | ||
| } | ||
|
|
||
| @Override | ||
| protected void startApplicationInstance() { | ||
| Cn1ssDeviceRunnerHelper.runOnEdtSync(() -> { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runSuite now calls
testClass.prepare(); testClass.runTest(); testClass.cleanup();directly and never checks the boolean returned byrunTest()or notifiesTestReportingabout start/finish. If any test returnsfalse(e.g.,MediaPlaybackScreenshotTestwhen media creation fails), the suite logs it as “finished” and still emitsCN1SS:SUITE:FINISHED, so CI andCn1ssDeviceRunnerReporterwill never mark the test as failed. Please capture the return value and callstartingTestCase/finishedTestCaseso failed tests are surfaced.Useful? React with 👍 / 👎.