Skip to content

Instantly share code, notes, and snippets.

@fatlazycat
Created January 22, 2012 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatlazycat/1657773 to your computer and use it in GitHub Desktop.
Save fatlazycat/1657773 to your computer and use it in GitHub Desktop.
HTML Reports
$(document).ready(function() {var formatter = new CucumberHTML.DOMFormatter($('.cucumber-report'));formatter.uri('src/test/resources/basic_arithmetic.feature');
formatter.feature({
"id": "basic-arithmetic",
"tags": [
{
"name": "@foo",
"line": 1
}
],
"description": "",
"name": "Basic Arithmetic",
"keyword": "Feature",
"line": 2
});
formatter.scenario({
"id": "basic-arithmetic;adding",
"description": "",
"name": "Adding",
"keyword": "Scenario",
"line": 4,
"type": "scenario"
});
formatter.step({
"name": "I add 4 and 5",
"keyword": "When ",
"line": 6,
"comments": [
{
"value": "# Try to change one of the values below to provoke a failure",
"line": 5
}
]
});
formatter.step({
"name": "the result is 9",
"keyword": "Then ",
"line": 7
});
formatter.match({
"arguments": [
{
"val": "4",
"offset": 6
},
{
"val": "5",
"offset": 12
}
],
"location": "RpnCalculatorStepDefinitions.scala:10"
});
formatter.result({
"duration": 104828000,
"status": "passed"
});
formatter.match({
"arguments": [
{
"val": "9",
"offset": 14
}
],
"location": "RpnCalculatorStepDefinitions.scala:16"
});
formatter.result({
"duration": 4227000,
"status": "passed"
});
formatter.uri('target/test-classes/basic_arithmetic.feature');
formatter.feature({
"id": "basic-arithmetic",
"tags": [
{
"name": "@foo",
"line": 1
}
],
"description": "",
"name": "Basic Arithmetic",
"keyword": "Feature",
"line": 2
});
formatter.scenario({
"id": "basic-arithmetic;adding",
"description": "",
"name": "Adding",
"keyword": "Scenario",
"line": 4,
"type": "scenario"
});
formatter.step({
"name": "I add 4 and 5",
"keyword": "When ",
"line": 6,
"comments": [
{
"value": "# Try to change one of the values below to provoke a failure",
"line": 5
}
]
});
formatter.step({
"name": "the result is 9",
"keyword": "Then ",
"line": 7
});
formatter.match({
"arguments": [
{
"val": "4",
"offset": 6
},
{
"val": "5",
"offset": 12
}
],
"location": "RpnCalculatorStepDefinitions.scala:10"
});
formatter.result({
"duration": 98000,
"status": "passed"
});
formatter.match({
"arguments": [
{
"val": "9",
"offset": 14
}
],
"location": "RpnCalculatorStepDefinitions.scala:16"
});
formatter.result({
"duration": 55000,
"status": "passed"
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment