Skip to content

Fix robolectric not working#87

Open
uOOOO wants to merge 10 commits into
allure-framework:masterfrom
uOOOO:fix-robolectric-not-working
Open

Fix robolectric not working#87
uOOOO wants to merge 10 commits into
allure-framework:masterfrom
uOOOO:fix-robolectric-not-working

Conversation

@uOOOO
Copy link
Copy Markdown

@uOOOO uOOOO commented Mar 10, 2026

Context

Fix #84, #86 issue

{
    "name": "addition test",
    "start": 1773148369447,
    "stop": 1773148370930,
    "stage": "finished",
    "description": "Checks if addition is implemented correctly",
    "status": "passed",
    "steps": [
        {
            "name": "Add values",
            "start": 1773148370689,
            "stop": 1773148370691,
            "stage": "finished",
            "status": "passed",
            "steps": [
                {
                    "name": "Verify correctness",
                    "start": 1773148370689,
                    "stop": 1773148370691,
                    "stage": "finished",
                    "status": "passed"
                }
            ]
        }
    ],
    ...
}

Checklist

uOOOO added 7 commits March 10, 2026 21:17
Kotlin 1.5.0 → 2.3.10, kotlinx-serialization 1.2.1 → 1.10.0,
JUnit5 5.5.2 → 5.14.2, AssertJ 3.19.0 → 3.27.7, MockK 1.10.6 → 1.14.9,
AGP 4.2.1 → 9.1.0, compileSdk/targetSdk 30 → 36, minSdk 18 → 21,
and Android test library versions.
Remove package attribute from manifests (now declared in build.gradle.kts)
and add android:exported to SampleActivity.
AllureThreadContext now uses a shared volatile activeRoot field so that
test steps are correctly recorded when the test body runs on a different
thread from the one that started the test case (e.g. Robolectric).
Add AllureRobolectricRunner that excludes allure packages from
Robolectric's SandboxClassLoader, ensuring a single shared Allure
singleton between test code and the JUnit listener.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 10, 2026

CLA assistant check
All committers have signed the CLA.

uOOOO added 3 commits March 10, 2026 21:41
- Fix sharedTest source set not recognized (java → kotlin directories)
- Add isReturnDefaultValues for unmocked Android API calls
- Narrow doNotAcquirePackage to io.qameta.allure.kotlin to avoid classloader conflict with ActivityScenario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allure.step() not recorded in result file

2 participants