Skip to content

Errors happening in test reporter break generated XML files. #17

Description

@kamituel

We're using a custom test reporter (by binding to clojure.test/report). That reporter does plenty of stuff, i.e. it sets up fixtures, logs user in, and so on. If an error happens there - before the test case runs - test2junit will produce a file like this:

<?xml version="1.0" encoding="UTF-8"?>

This happens on 1.2.2 as well as 1.3.3. It works badly with our CI (Attlasian Bamboo) as this XML file doesn't flag the build as failed. So it's possible for a test to fail, and the build be green.

This can be fixed using a (try ...) block, see here: https://github.com/kamituel/test2junit/blob/v0.2.2/src/test2junit/junit.clj#L235

I did fix it on 1.2.2 and published our custom artifacts as this is the version we're using, but I didn't open a PR against master because I needed a fix quickly, and I'm not able to bump dependency to 1.3.3 because of issue #16. But let me know if you consider this fix viable - I'll open a PR then.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions