Problem when running tests with snapshots generated on Windows OS #1417
Unanswered
xavimolloy
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Did you forget the link @xavimolloy? Also do you have the full stack, that would probably help in diagnostics. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, it is probably something silly but we have added snapshot testing to our CI in GitHub Actions.
tests run and are successfull locally. However when we upload the generated images to github and tests run on Github Actions tests fail with a Null pointer exception.
I've reviewed open and closed issues and found some people had similar issues regarding the NPE and that it might be related to Git LFS. it is already implemented on the project, and I have implemented it on my device but I can't seem to find the problem code. Other colleagues in the team use Linuz and when they generate the images and upload them to the repo tests pass successfully everytime without them doing anything differently.
The similar issues I found where only talking about how the NPE exception did not display relevant information and no information on how to resolve the issue.
Has anyone experienced anything similar?
thankfully the project where we have implemented the snapshot tests are public so we can share them without any worries
This is a PR where we have created a new snapshot test that fails if generated on windows but passes when generated on Linux.
PR with new snapshot test:
dhis2/dhis2-mobile-ui#236
Git hub Action that fails if image generated and pushed on windows:
https://github.com/dhis2/dhis2-mobile-ui/actions/runs/9003227033/job/24733378036
Successfull one with same proccess on linux:
https://github.com/dhis2/dhis2-mobile-ui/actions/runs/9004273183
Stacktrace:
1m 17s
Run ./gradlew designsystem:verifyPaparazziDebug
org.hisp.dhis.mobile.ui.designsystem.ButtonSnapshotTest > launchButtonSnapshot FAILED
java.lang.NullPointerException at ButtonSnapshotTest.kt:27
11 tests completed, 1 failed
FAILURE: Build failed with an exception.
Execution failed for task ':designsystem:testDebugUnitTest'.
For more on this, please refer to https://docs.gradle.org/[8](https://github.com/dhis2/dhis2-mobile-ui/actions/runs/9003227033/job/24733378036#step:7:9).2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
27 actionable tasks: 17 executed, 10 up-to-date
BUILD FAILED in 1m 17s
Error: Process completed with exit code 1.
In the PR you can see the line of code that is failing but it is simply the initialization of the test
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions