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

Unable to generate test report #118

Open
rahulgoelsharechat opened this issue Jan 10, 2022 · 2 comments
Open

Unable to generate test report #118

rahulgoelsharechat opened this issue Jan 10, 2022 · 2 comments

Comments

@rahulgoelsharechat
Copy link

rahulgoelsharechat commented Jan 10, 2022

  - name: Build check
    run: |
      xcodebuild test \
      -workspace $WORKSPACE \
      -scheme $SCHEME \
      -resultBundlePath TestResults \
      -sdk iphonesimulator \
      -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0'
      -skip-testing   XYZUITests
      

- uses: kishikawakatsumi/xcresulttool@v1
    with:
      path: TestResults.xcresult
    if: success() || failure()

For above getting Annotation Errors

The 'summary' will be truncated because the character limit (65535) exceeded.

@kishikawakatsumi
Copy link
Owner

The 'summary' will be truncated because the character limit (65535) exceeded.

This is a limitation of the GitHub API. The excess text will be truncated, but a test report should be generated.

Are you running tests triggered by Pull Requests? If the Pull Request doesn't exist, then it may not have Checks.

Anyway, more information is needed.
If it's an open source repository, I'd like to see what's happening.
If it's a private repository, please add as much information as you can to show what's going on. @rahulgoelsharechat

@AlexPerathoner
Copy link

AlexPerathoner commented Dec 21, 2022

The description of the issue is a big vague, so I'm not sure if I'm having the same issue...

However: my summary is less than 65k, doesn't get truncated. But the test report isn't generated.

Here's the branch I'm working on (sorry for the mess with the hundreds of commits, I'm still learning to use GitHub actions). In particular:

      - name: Test
        run: |
          xcodebuild -workspace SlimHUD.xcworkspace -scheme SlimHUD -destination platform=macOS -resultBundlePath TestResults test

      - name: Public test results
        uses: kishikawakatsumi/[email protected]
        if: always()
        with:
          path: "TestResults.xcresult"
          title: Coverage results
          upload-bundles: never
          show-code-coverage: true

However, as you can also see here, there are only two checks. The one with the title Coverage results never gets created.

At some point I managed to get it being created, see here. The workflow file used in this run consistently worked. Changing even just one line, in other steps of the workflow, made it fail.

Interestedly enough, this workflow now has two generated reports, one of them created an hour after the job had been run.

Looking at the source code of xcresulttool I'd expect the check with the output to be created, as soon as its step has been finished. In fact, with the workflow files that managed to create the report, it was available immediately (actually, before its completion, as soon as its step had finished).

Do you have any idea what could be causing this?


Edit / Solution

In my case the error was in the if: always(). Setting if: success() || failure() makes it always appear. Also note that it sometimes get added to other check suites.

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

3 participants