Skip to content

Commit

Permalink
Merge 7dee318 into 827c9d1
Browse files Browse the repository at this point in the history
  • Loading branch information
DesHorsley committed Oct 16, 2019
2 parents 827c9d1 + 7dee318 commit 6bb29a3
Show file tree
Hide file tree
Showing 27 changed files with 1,021 additions and 219 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ node_js:
script:
- npm run ci

branches:
except:
- /build-.*-.*/ # build-develop-23
- /v\d\.\d\.\d/ # v1.2.3

after_success:
- export GIT_TAG=build-$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER
- npm run coveralls
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"cucumberautocomplete.stepsInvariants": true,
"cucumberautocomplete.onTypeFormat": true,
"cucumberautocomplete.gherkinDefinitionPart": "(Given|When|Then)\\(",
"peacock.color": "#38224c"
"peacock.color": "#38224c",
"git.enableCommitSigning": true
}
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# YACHR
[![Build Status](https://travis-ci.org/yachr/yachr.svg?branch=GH-18-Roll-up-steps-to-scenarios-to-features)](https://travis-ci.org/yachr/yachr/branches)
[![Coverage Status](https://coveralls.io/repos/github/yachr/yachr/badge.svg?branch=GH-18-Roll-up-steps-to-scenarios-to-features)](https://coveralls.io/github/yachr/yachr?branch=GH-18-Roll-up-steps-to-scenarios-to-features)
[![Build Status](https://travis-ci.org/yachr/yachr.svg?branch=GH-27)](https://travis-ci.org/yachr/yachr/branches)
[![Coverage Status](https://coveralls.io/repos/github/yachr/yachr/badge.svg?branch=develop)](https://coveralls.io/github/yachr/yachr?branch=develop)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
---
Note: This library is under development, there are several features outstanding.

Feel free to use it or trial it, pull requests and issues are welcome, and will be addressed as time allows.

---
Yet another cucumber html reporter is a simple html reporter that runs off the standard json file produced by cucumberjs.

This reporter targets cucumberjs 3.
Expand Down Expand Up @@ -63,6 +69,10 @@ exports.config = {
...
}
```

# Sample Output
![Sample Image of Report](https://i.imgur.com/cDJ5VYk.png)

# Custom Templates
yachr makes use of [handlebarsjs](https://handlebarsjs.com/) for its templating. If there is a particular look you are going for, you can include a custom html file in your repo, and pass it in as a parameter.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ability: Understand how features and scenarios are given a status

As a report reader
I wan't to understand how a scenario or feature gets assigned its status
So I can better understand the stats on the report

Scenario: View description of statuses
Given Lina is viewing a cucumber report
Then Lina should be able to see a legend explaining the status
8 changes: 8 additions & 0 deletions e2e/features/abilities/user/view-data-tables.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Ability: View data tables in report

Scenario: View data table
Given Virginia has a step has a data table like the following:
| A heading |
| a row |
| or two |
Then the report Virginia generates report should display the data table
10 changes: 10 additions & 0 deletions e2e/features/abilities/user/view-feature-tags.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@GH-30
Ability: View tags in report
As a user who makes use of tags
I want to see any tags defined in the gherkin present in the report

@GH-30
Scenario: View Feature tag
Given Ira has results from a cucumber test containing the tag '@GH-30' against the feature 'View Feature tag'
When Ira runs yachr against the result
Then Ira will see the tag '@GH-30' in the tile bar of the 'View Feature tag' feature
10 changes: 10 additions & 0 deletions e2e/features/abilities/user/view-summary-tags.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@GH-30
Ability: View tags in report
As a user who makes use of tags
I want to see any tags defined in the gherkin present in the report

@GH-30
Scenario: View Scenario tag
Given Jon has results from a cucumber test containing the tag '@GH-30' against the scenario 'View scenario tag'
When Jon runs yachr against the result
Then Jon will see the tag '@GH-30' in the title bar of the scenario 'View Scenario tag' in the generated report
69 changes: 69 additions & 0 deletions e2e/resources/dataTableExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[
{
"description": " Starting point",
"keyword": "Ability",
"name": "View data tables in report",
"line": 1,
"id": "view-data-tables-in-report",
"tags": [],
"uri": "e2e\\features\\abilities\\user\\view-data-tables.feature",
"elements": [
{
"id": "view-data-tables-in-report;view-data-table",
"keyword": "Scenario",
"line": 3,
"name": "View data table",
"tags": [],
"type": "scenario",
"steps": [
{
"arguments": [
{
"rows": [
{
"cells": [
"A heading"
]
},
{
"cells": [
"a row"
]
},
{
"cells": [
"or two"
]
}
]
}
],
"keyword": "Given ",
"line": 4,
"name": "Virginia has a step has a data table like the following:",
"match": {
"location": "e2e\\step_definitions\\view-data-tables.steps.js:9"
},
"result": {
"status": "passed",
"duration": 1000000,
"error_message": "function has 0 arguments, should have 1 (if synchronous or returning a promise) or 2 (if accepting a callback)"
}
},
{
"arguments": [],
"keyword": "Then ",
"line": 8,
"name": "the report Virginia generates report should display the data table",
"match": {
"location": "e2e\\step_definitions\\view-data-tables.steps.js:17"
},
"result": {
"status": "passed"
}
}
]
}
]
}
]

0 comments on commit 6bb29a3

Please sign in to comment.