avocado-framework/avocado — pull request #63 by ruda (2014-05-15 18:15:14+00:00)
Title: Add plugin to collect test results as JSON.

Run Avocado and return the test results as JSON.

Note: This PR is an improved version of collector.py inside the PR #62 with unit test included.

Example:

avocado --collect run 'sleeptest failtest'

{
"tests": [
{
"test": "sleeptest.1",
"url": "sleeptest",
"status": "PASS",
"time": 1.200882911682129
},
{
"test": "failtest.1",
"url": "failtest",
"status": "FAIL",
"time": 0.19649291038513184
}
],
"errors": 0,
"skip": 0,
"time": 1.3973758220672607,
"debuglog": "/home/rmoura/avocado/logs/run-2014-05-15-15.07.46/debug.log",
"pass": 1,
"failures": 1,
"total": 2
}

Signed-off-by: Ruda Moura