Blog: JUnit 5 tests for Codename One apps#5079
Closed
shai-almog wants to merge 1 commit into
Closed
Conversation
Covers the new com.codename1.testing.junit package from PR #5032: standard @test methods against the JavaSE simulator, with annotations for @RunOnEdt, @SimulatorProperty / @SimulatorProperties, and the visual-config set (@theme, @DarkMode, @LargerText, @orientation, @rtl). Calls out: - Simulator-only by design so tests get full JVM reflection (Mockito, AssertJ, etc.). - Annotations resolve method-over-class and are applied in a single batched setup on the EDT with one theme refresh. - junit-jupiter moves from test to provided scope so it does not leak onto the simulator's runtime classpath for non-opted-in apps. - AbstractTest / DeviceRunner stays for on-device and screenshot tests; the two frameworks are complementary.
3 tasks
Contributor
Cloudflare Preview
|
Collaborator
Author
|
Superseded — consolidating the follow-up posts so this release week ships fewer, broader posts. New merged versions in the follow-up PRs to this one. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
com.codename1.testing.junitpackage shipped in PR Add JUnit 5 test support for the JavaSE simulator #5032.@CodenameOneTest,@RunOnEdt,@SimulatorProperty/@SimulatorProperties,@Theme,@DarkMode,@LargerText,@Orientation,@RTL), the EDT-batched application of visual config, the dependency-scope change (junit-jupitertest→providedso it does not leak onto the simulator runtime classpath), and the "AbstractTest stays for on-device tests" framing.File
docs/website/content/blog/junit-5-for-codename-one-apps.md— single new file.Sequencing
Branches off
master; intended to publish after the share result callback post (#5078). Front matter date is2026-06-03.Test plan
docs/websitesucceeds./static/blog/junit-5-for-codename-one-apps.jpg.