def _get_result(self, step, report, error_message=False):
        result = {}
        if report.passed or not step["failed"]:  # ignore setup/teardown
            result = {"status": "passed"}
        elif report.failed and step["failed"]:
            result = {
                "status": "failed",
                "error_message": force_unicode(report.longrepr) if error_message else "",
            }
        elif report.skipped:
            result = {"status": "skipped"}
        result['duration'] = long(math.floor((10 ** 9) * step["duration"]))  # nanosec
        return result
Get scenario test run result.
dataset/ETHPy150Open pytest-dev/pytest-bdd/pytest_bdd/cucumber_json.py/LogBDDCucumberJSON._get_result