Skip to content
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

Suggestion on Rerun Tests Documentation #8771

Open
grndvl1 opened this issue May 17, 2024 · 1 comment
Open

Suggestion on Rerun Tests Documentation #8771

grndvl1 opened this issue May 17, 2024 · 1 comment

Comments

@grndvl1
Copy link

grndvl1 commented May 17, 2024

jekyll/_cci2/rerun-failed-tests.adoc

Here in the documentation there is no example of how to rerun a failed test with CI and using Android or iOS builds.

Typically you'll see something like this for android a gradle command to run the UI tests that are annotated with @regression. Then because of sharding and using a gradle managed phone device the tests and data relevant are in multiple directories. These are copied into one and stored for reading and acting on the xml results with another action/CI job

    steps:
      - run:
          name: Android Test - App module (Regression/No fail)
          command: ./gradlew app:phonesGroupDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.android.annotation.Regression -info || true

      - run:
          name: Finding Artifacts
          command: |
            mkdir -p ~/test-results/junit/ \;
            mkdir -p ~/test-results/ui-tests/ \;
            mkdir -p ~/test-results/ui-tests/html/ \;
            mkdir -p ~/test-results/ui-tests/html/css \;
            mkdir -p ~/test-results/ui-tests/html/js \;
            find . -type f -regex ".*/build/outputs/androidTest-results/managedDevice/debug/*/*.*" -exec cp {} ~/test-results/ui-tests/ \;
            find . -type f -regex ".*/build/reports/androidTests/managedDevice/debug/allDevices/*.*" -exec cp {} ~/test-results/ui-tests/html/ \;
            find . -type f -regex ".*/build/reports/androidTests/managedDevice/debug/allDevices/css/*.*" -exec cp {} ~/test-results/ui-tests/html/css/ \;
            find . -type f -regex ".*/build/reports/androidTests/managedDevice/debug/allDevices/js/*.*" -exec cp {} ~/test-results/ui-tests/html/js/ \;
          when: always

      - store_test_results:
          path: ~/test-results

      - store_artifacts:
          path: ~/test-results/ui-tests

I don't see how the rerun tests will work for Android or iOS

@rosieyohannan
Copy link
Contributor

Hi @grndvl1 thanks for this. Firstly, can I just check if your use case is very different to this example? https://circleci.com/docs/rerun-failed-tests/#configure-a-job-running-kotlin-or-gradle-tests

Thanks

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

No branches or pull requests

2 participants