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

Collect test run information on CircleCI #169

Merged
merged 1 commit into from
Aug 10, 2018
Merged

Collect test run information on CircleCI #169

merged 1 commit into from
Aug 10, 2018

Conversation

marco-m
Copy link
Contributor

@marco-m marco-m commented Aug 7, 2018

When running the tests on CicleCI, emit XUNIT test reports so
that CircleCI call collect and show test statistics.

Tests statistics are shown in two places:

  1. Each single build gives an overview of the failing tests. Compare:
  1. The build-insights page. Compare:

When running the tests on CicleCI, emit XUNIT test reports so
that CircleCI call collect and show test statistics.

Tests statistics are shown in two places:
- each single build gives an overview of the failing tests
- the build-insights page at
  https://circleci.com/build-insights/gh/igrishaev/etaoin/master
@marco-m
Copy link
Contributor Author

marco-m commented Aug 7, 2018

Note that it says "All checks have failed" because there are still the broken tests of before ...

@marco-m marco-m mentioned this pull request Aug 7, 2018
; When running the tests as `lein test2junit`, emit XUNIT test reports to enable CircleCI
; to collect statistics over time
:plugins [[test2junit "1.1.2"]]
:test2junit-output-dir "target/test2junit"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marco-m It would be great to put the reports into a special CI folder to collect them afterwards. The folder's path is kept in the CIRCLE_ARTIFACTS env variable. So that value passed to the :test2junit-output-dir parameter would be:

(or (System/getenv "CIRCLE_ARTIFACTS")
    (System/getenv "ETAOIN_ARTIFACTS")
    "target/test2junit")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Ivan, I had something very similar to what you are proposing on my first attempt. Then I realized that the documentation mentioning CIRCLE_TEST_REPORTS (see https://github.com/kimh/circleci-build-recipies/tree/clojure-test-metadata-with-test2junit) is outdated, it works with CircleCI 1.0, while we are using 2.0 (and 1.0 will be unsupported end of Aug 2018).

So let me see if I understand correctly: with the PR as-is you are already getting test details as in the 4 links in the first comment of this PR. What you would like is to store the XUNIT test output as an artifact, so that you can consult it offline ? I know that CircleCI supports this, but I wanted to be sure this is what you want.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marco-m well, I just want to achieve the following: if the tests are run on CI, the reports should be stored in a special CI's folder that can be referenced with a special env variable. The profit of it is CI stores those artefacts and you may download them any time you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igrishaev The CIRCLE_ARTIFACTS env variable is available only for CircleCI 1.0. With 2.0, they don't do any automatic handling of artifacts (see https://circleci.com/docs/2.0/artifacts/ and https://circleci.com/docs/2.0/env-vars/, variable CIRCLE_ARTIFACTS is NOT mentioned). It is possible, but it requires more code.

Personally I don't see the added value, since if one month from now I am curious about the test results of one month ago, well, I can go to the CircleCI web page and see all the test results since the project has been added to CircleCI, no need to download any XUNIT file.

To me, given my understanding, this feature request is outside the scope of this PR :-)

@igrishaev igrishaev merged commit 8a3b274 into clj-commons:master Aug 10, 2018
@marco-m marco-m deleted the circleci-xunit branch August 10, 2018 14:21
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.

2 participants