Skip to content

Run OrientationLockScreenshotTest last to stabilize HelloCodenameOne screenshots#4582

Merged
shai-almog merged 1 commit intomasterfrom
codex/move-screenshot-rotation-test-to-end
Mar 1, 2026
Merged

Run OrientationLockScreenshotTest last to stabilize HelloCodenameOne screenshots#4582
shai-almog merged 1 commit intomasterfrom
codex/move-screenshot-rotation-test-to-end

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • The orientation-change screenshot (OrientationLockScreenshotTest) is flaky because its orientation state can affect subsequent screenshot tests, so it must run last to avoid state leakage and reduce CI flakiness.

Description

  • Reordered the test list in scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java so OrientationLockScreenshotTest runs after the other screenshot-producing tests.
  • Added an inline comment next to the test entry noting that the orientation test must remain the last screenshot test to prevent orientation changes from leaking into later screenshots.

Testing

  • Ran the quick smoke script ./scripts/fast-core-unit-smoke.sh; the run failed due to a preexisting Maven/Surefire issue (No tests were executed in codenameone-factory) that is unrelated to the ordering change.

Codex Task

@shai-almog
Copy link
Collaborator Author

shai-almog commented Mar 1, 2026

Compared 32 screenshots: 32 matched.

Native Android coverage

  • 📊 Line coverage: 7.31% (3716/50867 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.71% (18268/320093), branch 2.75% (857/31113), complexity 3.41% (1014/29746), method 6.01% (833/13858), class 9.83% (180/1831)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 7.31% (3716/50867 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.71% (18268/320093), branch 2.75% (857/31113), complexity 3.41% (1014/29746), method 6.01% (833/13858), class 9.83% (180/1831)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Mar 1, 2026

Compared 32 screenshots: 32 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 343 seconds
  • Compilation Time: 250 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 28258 ms
Extract Extensions 16 ms
Google Services Setup 2 ms
Scan Classes 622 ms
Extract Libs 787 ms
Inject Build Hints 83 ms
Generate Unit Tests 3 ms
Generate Stubs 1677 ms
Compile Stubs 2454 ms
Generate Icons 1351 ms
Prepare ParparVM 258 ms
ParparVM Execution 201134 ms
Post-VM Setup 242 ms
CocoaPods 4449 ms
Finalize 47 ms
Total Time 241384 msMaven Overhead : 102000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot 68000 ms
Simulator Boot (Run) 3000 ms
App Install 13000 ms
App Launch 5000 ms
Test Execution 144000 ms

@shai-almog shai-almog merged commit e246921 into master Mar 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant