Skip to content

Convert between different test result formats

Notifications You must be signed in to change notification settings

seidtgeist/octobertest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 future format should ideally be a simple 1:1 mapping to TAP.

About

Convert between different test result formats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%