Conversation
eftest/src/eftest/report/junit.clj
Outdated
| (test/inc-report-counter :error) | ||
| (push-result m)) | ||
|
|
||
|
|
There was a problem hiding this comment.
Whoops! Too many new lines.
|
Reopening this as I think the approach may be sound but we need to maybe change the way the JUnit reporter is configured because there will always be more output on stdout than just the XML. |
|
There shouldn't be; |
|
@weavejester I added an integration test that captures the output from running tests and it looks like this: You can see the XML from the JUnit formatter, and then "Error encountered performing task 'eftest'…". Given that we probably always want the JUnit report in a file and not printed to stdout, maybe requiring a path where we write the XML is a good solution? |
|
To enable writing to a file from the Leiningen plugin, two options spring to mind. The first would be to allow more than just a symbol in the (defn- report-namespace [project]
(-> project :eftest (:report 'eftest.report.progress/report) namespace symbol))
(defn- require-form [project]
`(require 'eftest.runner '~(report-namespace project)))Alternatively, we could add an additional option to the :eftest {:report eftest.report.junit/report
:output-path "target/junit.xml"}We could even support an environment variable as test2junit does, but I suppose people can use Maybe you have a better idea? |
|
I like the idea of adding an option, perhaps |
I can use |
|
See #25 for the ability to redirect test output to a file, which will be useful here too. |
I haven't tested this out; just made the change via the GitHub web UI.
Doesn't work!