Skip to content

Commit

Permalink
Merge pull request #41 from trivago/0.6.0
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
Benjamin Bischoff authored Apr 12, 2018
2 parents 5334408 + 5df8043 commit da90bc4
Show file tree
Hide file tree
Showing 120 changed files with 1,138 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.iml
.idea/
/target
*/target
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ sudo: false # faster builds
before_install:
- pip install --user codecov

script: "mvn cobertura:cobertura"
script:
- cd plugin-code
- mvn cobertura:cobertura

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,18 @@ It shows:

The tag statistics page shows an overview about the used tags and passed, failed and skipped scenarios with those tags.

# Building
# Example project

You can test the complete flow and POM configuration by checking out the [Cucable example project](example-project).

# Additional Information

## Building

Cluecumber requires Java >= 8 and Maven >= 3.3.9. It is available in [Maven central](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.trivago.rta%22%20AND%20a%3A%22cluecumber-report-plugin%22).
It is available in [Maven central](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.trivago.rta%22%20AND%20a%3A%22cluecumber-report-plugin%22).

# License
## License

Copyright 2018 trivago NV

Expand All @@ -172,7 +179,7 @@ http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

# Credits
## Credits

This project is being tested on

Expand Down
2 changes: 2 additions & 0 deletions example-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
cluecumber-test-project.iml
18 changes: 18 additions & 0 deletions example-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# cluecumber-test-project

Test project to simulate the behavior of Cluecumber - a Maven plugin that generates test reports from [Cucumber](https://cucumber.io) JSON files.

This test project always uses the latest Cluecumber version.

## Change plugin configuration

The whole plugin configuration is managed via the pom.xml file in this test project.

## Run the project

To run the project you need to have at least Java 8 and Maven 3.3.9 installed on your system.

Just run the Maven command ```mvn clean verify``` to see the runner and feature generation of Cluecumber in action.

The example Cucumber JSON files are located in the project#s `json` directory. These are based on the https://github.com/aslakhellesoy/cucumber-json-formatter project.
The report is generated inside the `target/cluecumber-report` directory.
34 changes: 34 additions & 0 deletions example-project/json/001-one-passing-scenario.feature.java.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 3,
"match": {
"location": "NativeConstructorAccessorImpl.java:-2"
},
"name": "this step passes",
"result": {
"duration": 244280571,
"status": "passed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/001-one-passing-scenario.feature"
}
]
35 changes: 35 additions & 0 deletions example-project/json/001-one-passing-scenario.feature.js.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"elements": [
{
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"arguments": [],
"keyword": "Given ",
"line": 3,
"match": {
"location": "support/js/env.js:3"
},
"name": "this step passes",
"result": {
"duration": 6,
"status": "passed"
}
}
],
"tags": [],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"tags": [],
"uri": "features/001-one-passing-scenario.feature"
}
]
34 changes: 34 additions & 0 deletions example-project/json/001-one-passing-scenario.feature.rb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 3,
"match": {
"location": "/Users/aslakhellesoy/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-core-1.5.0/lib/cucumber/core/test/filters/activate_steps_for_self_test.rb:22"
},
"name": "this step passes",
"result": {
"duration": 2990,
"status": "passed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/001-one-passing-scenario.feature"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";;;2",
"keyword": "Scenario Outline",
"line": 7,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 3,
"match": {
"location": "NativeConstructorAccessorImpl.java:-2"
},
"name": "this step passes",
"result": {
"duration": 251868476,
"status": "passed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/002-one-passing-scenario-outline-row.feature"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"elements": [
{
"id": ";",
"keyword": "Scenario",
"line": 7,
"name": "",
"steps": [
{
"arguments": [],
"keyword": "Given ",
"line": 3,
"match": {
"location": "support/js/env.js:3"
},
"name": "this step passes",
"result": {
"duration": 5,
"status": "passed"
}
}
],
"tags": [],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"tags": [],
"uri": "features/002-one-passing-scenario-outline-row.feature"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";;;2",
"keyword": "Scenario Outline",
"line": 7,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 7,
"match": {
"location": "/Users/aslakhellesoy/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-core-1.5.0/lib/cucumber/core/test/filters/activate_steps_for_self_test.rb:22"
},
"name": "this step passes",
"result": {
"duration": 3014,
"status": "passed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/002-one-passing-scenario-outline-row.feature"
}
]
35 changes: 35 additions & 0 deletions example-project/json/003-one-failing-scenario.feature.java.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 3,
"match": {
"location": "NativeConstructorAccessorImpl.java:-2"
},
"name": "this step fails",
"result": {
"duration": 340604218,
"error_message": "java.lang.RuntimeException: this step failed\n\tat Steps.lambda$new$2(Steps.java:14)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat cucumber.runtime.Utils$1.call(Utils.java:40)\n\tat cucumber.runtime.Timeout.timeout(Timeout.java:16)\n\tat cucumber.runtime.Utils.invoke(Utils.java:34)\n\tat cucumber.runtime.java8.Java8StepDefinition.execute(Java8StepDefinition.java:106)\n\tat cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:40)\n\tat cucumber.api.TestStep.executeStep(TestStep.java:102)\n\tat cucumber.api.TestStep.run(TestStep.java:83)\n\tat cucumber.api.TestCase.run(TestCase.java:58)\n\tat cucumber.runner.Runner.runPickle(Runner.java:80)\n\tat cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:140)\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\n\tat cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:99)\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:41)\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\n\tat cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:108)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)\n\tat org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)\n\tat org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)\n\tat org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)\n\tat org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)\n\tat ✽.this step fails(features/003-one-failing-scenario.feature:3)\n",
"status": "failed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/003-one-failing-scenario.feature"
}
]
36 changes: 36 additions & 0 deletions example-project/json/003-one-failing-scenario.feature.js.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"elements": [
{
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"arguments": [],
"keyword": "Given ",
"line": 3,
"match": {
"location": "support/js/env.js:7"
},
"name": "this step fails",
"result": {
"duration": 10,
"error_message": "Error: this step failed\n at World.<anonymous> (/Users/aslakhellesoy/git/cucumber/cucumber-json-formatter/support/js/env.js:8:12)",
"status": "failed"
}
}
],
"tags": [],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"tags": [],
"uri": "features/003-one-failing-scenario.feature"
}
]
35 changes: 35 additions & 0 deletions example-project/json/003-one-failing-scenario.feature.rb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"description": "",
"elements": [
{
"description": "",
"id": ";",
"keyword": "Scenario",
"line": 2,
"name": "",
"steps": [
{
"keyword": "Given ",
"line": 3,
"match": {
"location": "/Users/aslakhellesoy/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-core-1.5.0/lib/cucumber/core/test/filters/activate_steps_for_self_test.rb:18"
},
"name": "this step fails",
"result": {
"duration": 34879,
"error_message": "Cucumber::Core::Test::Filters::ActivateStepsForSelfTest::Failure (Cucumber::Core::Test::Filters::ActivateStepsForSelfTest::Failure)\n/Users/aslakhellesoy/.rbenv/versions/2.4.0/bin/bundle:22:in `load'\n/Users/aslakhellesoy/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'\nfeatures/003-one-failing-scenario.feature:3:in `Given this step fails'",
"status": "failed"
}
}
],
"type": "scenario"
}
],
"id": "",
"keyword": "Feature",
"line": 1,
"name": "",
"uri": "features/003-one-failing-scenario.feature"
}
]
Loading

0 comments on commit da90bc4

Please sign in to comment.