Skip to content
Christoph Burgmer edited this page Apr 17, 2018 · 18 revisions

FAQ

Help, my tests don't generate JUnit XML!

Buildviz can take in test results in a simple JSON format:

[
    {
        "name": "My test suite",
        "children": [
            {
                "classname": "My class under test",
                "name": "My test",
                "runtime": 42,
                "status": "fail"
            }
        ]
    }
]

Please don't forget the appropriate header: Content-Type: application/json.

I'm building my own upload - now how can I upload multiple JUnit XML files?

Generate a joint XML file, then upload that file.

$ find . -name "*.xml" -exec xmllint --xpath "testsuites/*| testsuite" {} + \
  | (echo '<?xml version="1.0" encoding="UTF-8"?>' && echo '<testsuites>' && cat && echo '</testsuites>') \
  > joined_xml
$ mv joined_xml joined.xml # Avoid the output being mixed up with the input

Or if all you have is basic Unix commands: https://gist.github.com/cburgmer/adefa258c967613baf9f

I'd like to change the port

PORT=4000 java -jar buildviz-*-standalone.jar

... the directory where the data is stored

BUILDVIZ_DATA_DIR=/my/directory java -jar buildviz-*-standalone.jar

... the title it is showing

BUILDVIZ_PIPELINE_NAME="My Project" java -jar buildviz-*-standalone.jar