Clojurians
#kaocha
<
2019-01-25
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

manuelrascioni12:01:23

Hi! I'm trying to setup kaocha with junit.xml report on my project, I was able to create and launch a test suite, but having some problems with reporting...I have these two failing tests (and something else good):

(deftest should-fail-test
  (testing "something"
    (is (= 2 0))))

(deftest should-fail2-test
  (testing "something else"
    (is (= 2 0))
    (throw (RuntimeException. "FAIL"))))
But in the xml report I have just:
<?xml version='1.0' encoding='UTF-8'?>
<testsuites>
<testsuite errors="1" package="" tests="6" name="unit" time="0.000000" hostname="localhost" id="0" timestamp="2019-01-25T13:02:31" failures="2">
<properties/>
<system-out>
</system-out>
<system-err/>
</testsuite>
</testsuites>
is it a matter of bad configuration that I don't have any details on passed/failing tests?

plexus13:01:38

Not unlikely that it's a bug. Could you file a ticket?

plexus13:01:23

If you have a repository that you could share that reproduces this issue that would be awesome, otherwise just put as much information as possible into the ticket, tests.edn, which tool you're using, versions of things...

manuelrascioni13:01:33

ok, I will setup something to replicate the error and fill in the issue, thanks!

plexus13:01:39

There's at least one known issue that is a bit similar, but what you're doing I would expect to work... Maybe it's some kind of version mismatch. Are you on the latest version of kaocha and kaocha-junit?

manuelrascioni13:01:20

I think so, I'm using kaocha 0.0-367 and kaocha-junit-xml "0.0-43"

plexus13:01:35

Yeah that seems about right...

manuelrascioni13:01:39

The weird thing I'm doing, is launching it manually

manuelrascioni13:01:56

basically I open the repl and execute:

(use 'kaocha.repl)

(run :unit)

plexus13:01:28

I see, does it make a difference if you run it from the command line?

manuelrascioni13:01:53

no I replicated the problem with a lein project, starting the repl and executing that instructions

plexus13:01:53

OK, put it all in a ticket and I'll try to investigate after the weekend. If you can reproduce it I can probably fix it quickly. Sorry for the inconvenience.

manuelrascioni14:01:55

I've created the ticket https://github.com/lambdaisland/kaocha-junit-xml/issues/4 , I will add more details later :slightly_smiling_face: