Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
test
.gitignore
Makefile
README.md
index.js
package.json
syntax.json

README.md

octobertest

octobertest lets you convert between different test result formats.

The current main focus is to convert a custom JSON-representable format into JUnit.xml for jenkins.

Usage

octobertest -i json -o xml foo.json bar.xml

Formats will be guessed from file extensions, so this will also work:

octobertest foo.json bar.xml

Example conversion

This JSON:

{ "suites":
  [
    {
      "name": "foo",
      "tests": [
        {
          "name": "Foo should bar the baz",
          "passed": false,
          "expected": 1337,
          "actual": 1338,
          "error": "Expected 1337 to be 1338",
          "stacktrace": "foo()\nbar()\nbaz()\n"
        }
      ]
    }
  ]
}

would result in the following JUnit XML output:

<?xml version="1.0" encoding="UTF-8" ?><testsuites><testsuite name="foo"><testcase name="Foo should bar the baz"><failure message="Expected 1337 to be 1338">foo()
bar()
baz()
</failure></testsuite></testsuites>

JSON format

The JSON format is very alpha and hasn't been battle tested yet. It is contrived to having test suites with test cases. Ideally it should also just accept a simple list of tests and derive the suite name from the file name.

Something went wrong with that request. Please try again.