Liking cljdoc? Tell your friends :D

MonkeyCI JUnit Plugin

This is a Clojure library that provides plugin functionality for MonkeyCI to allow build jobs to extract information from JUnit test results so they can be added to the build results. The plugin reads a junit.xml compatible file from a configured artifact and parses the information.


Clojars Project

First include the library in your build deps.edn:

{:deps {com.monkeyci/plugin-junit {:mvn/version "VERSION"}}}

Then make sure you require it in your build script. It registers itself on a tag named junit, which should contain the necessary configuration. For example:

(require '[])
(require '[ :as bc])

;; Some build job
(def test-job
    (fn [ctx]
      ;; Test functionality goes here
    {:save-artifacts [{:id "test-results"
                       :path "junit.xml"}]
     ;; Configuration for the plugin
     :junit {:artifact-id "test-results"
             :path "junit.xml"}}))

;; Jobs in your build script

The plugin will read the artifact with id test-results and extract the junit.xml file from it, parsing it as xml. The information is added to the build job results under the key


Copyright (c) 2024 by Monkey Projects.

MIT License

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close