You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reporting test cases marked with "pending" Kaocha tag as "skipped" in JUnit XML output #20
Kaocha allows tests to be marked with a pending tag. This allows tests to be filtered when running tests using Kaocha but still have the data reported in the output. This is useful for building a suite of tests for a pending, yet-to-be-implemented feature. The following is an example of a simple test marked with this tag:
(nssample.project.sample-test
(:require [clojure.test :refer [deftest is]]))
(deftest ^:kaocha/pending pending-test
(is (=11)
"This should be marked as 'skipped' by JUnit!"))
I am working in a Polylith codebase using polylith-kaocha as the test runner Running tests yield the following output:
We've configured our polylith-kaocha tests to generate JUnit XML test results using this plugin in our Kaocha config. This is being generated however we're hitting a snag because the pending tests aren't actually running (as expected), but in the JUnit XML test results they look like they are running and passing:
Note the pending-test result in the JUnit XML test report is missing the <skipped /> element that would usually be nested within <testcase> element to indicate that the test has been skipped.
Observe the test result for sample-test is correctly tagged as skipped
Please let me know if I can provide any more detail, as this is my first time raising an issue on GitHub. Thanks in advance for any help you can provide!
Thanks for the report, I suspect it's just missing a filter and these can be straightforwardly elided. A pull request with a fix would be much appreciated.
Hi @plexus , I have a PR candidate ready on a new branch, however it looks like I don't have permission to push this - please let me know if this is something you can help with! Thanks again in advance.
Hi @plexus , I have a PR candidate ready on a new branch, however it looks like I don't have permission to push this - please let me know if this is something you can help with! Thanks again in advance.
Hi @plexus , just checking if there's any update on this access issue? 👆
I have a fix ready to raise as a Pull Request, but am getting blocked by GitHub when trying to do so with an error:
ERROR: Permission to lambdaisland/kaocha-junit-xml.git denied to samcarver4.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Activity
plexus commentedon Nov 11, 2025
Thanks for the report, I suspect it's just missing a filter and these can be straightforwardly elided. A pull request with a fix would be much appreciated.
Looking at the code it's probably easiest to already filter these out in the
leaf-testsfunction: https://github.com/lambdaisland/kaocha-junit-xml/blob/main/src/kaocha/plugin/junit_xml.clj#L32-L35If this is your first time hacking on kaocha, start here for an overview of the data model: https://cljdoc.org/d/lambdaisland/kaocha/1.91.1392/doc/9-extending
samcarver4 commentedon Nov 12, 2025
Thanks for the quick reply @plexus , I'll check it out and have a look!
samcarver4 commentedon Nov 17, 2025
Hi @plexus , I have a PR candidate ready on a new branch, however it looks like I don't have permission to push this - please let me know if this is something you can help with! Thanks again in advance.
samcarver4 commentedon Dec 1, 2025
Hi @plexus , just checking if there's any update on this access issue? 👆
I have a fix ready to raise as a Pull Request, but am getting blocked by GitHub when trying to do so with an error:
plexus commentedon Dec 1, 2025
You normally don't push to the upstream repo, you push to your own fork of the repo, you can then make a PR from there.
samcarver4 commentedon Dec 2, 2025
Thanks for the update @plexus - I have a PR available for review here. Thanks in advance!