Skip to content

Commit

Permalink
Merge pull request #24 from trivago/0.1.2
Browse files Browse the repository at this point in the history
0.1.2
  • Loading branch information
Benjamin Bischoff authored Jan 16, 2018
2 parents 22f0b6a + a4e1f37 commit a9a7ac4
Show file tree
Hide file tree
Showing 53 changed files with 522 additions and 130 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Back to [Readme](README.md).

## [0.1.1] - 2017-12-12
## [0.2.0] - 2017-12-12

# Added

- Support for data tables within steps
- Cleaner report headers

# Removed

- Javascript back method is replaced with simple links on the detail pages

# Fixed

- Report generation is now much more resilient if information is missing in the JSON sources

## [0.1.1] - 2018-01-16

# Removed

Expand Down Expand Up @@ -68,7 +83,7 @@ Back to [Readme](README.md).

Initial project version on GitHub and Maven Central.

[Unreleased]: https://github.com/trivago/cluecumber-report-plugin/compare/0.1.1...HEAD
[0.2.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.2.0
[0.1.1]: https://github.com/trivago/cluecumber-report-plugin/tree/0.1.1
[0.1.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.1.0
[0.0.6]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.6
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@


- [Cluecumber Report Maven Plugin](#cluecumber-report-maven-plugin)
- [Changelog](#changelog)
- [Prerequisites](#prerequisites)
- [Maven POM settings](#maven-pom-settings)
- [Mandatory Configuration Parameters](#mandatory-configuration-parameters)
Expand Down Expand Up @@ -41,6 +42,10 @@ This project was created because

**Note:** If you need to run Cucumber tests in parallel, please check out our [Cucable](https://github.com/trivago/cucable-plugin) project!

## Changelog

All changes are documented in the [full changelog](CHANGELOG.md).

# Prerequisites

In order to have the JSON files as a source for the Cluecumber Report generation, you need to specify this option in your Cucumber runner configuration:
Expand Down Expand Up @@ -141,7 +146,7 @@ Cluecumber requires Java 8 and Maven 3.3.9. It is available in [Maven central](h

# License

Copyright 2017 trivago NV
Copyright 2018 trivago NV

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.trivago.rta</groupId>
<artifactId>cluecumber-report-plugin</artifactId>
<version>0.1.1</version>
<version>0.2.0</version>
<url>https://github.com/trivago/cluecumber-report-plugin</url>

<name>Cluecumber Maven Plugin for Cucumber Reports</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/CluecumberReportPlugin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trivago/rta/constants/ChartColor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/trivago/rta/constants/Status.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,12 @@
* Enum to manage all states for steps and scenarios.
*/
public enum Status {
PASSED("passed"), FAILED("failed"), SKIPPED("skipped"), PENDING("pending"), UNDEFINED("undefined");
PASSED("passed"),
FAILED("failed"),
SKIPPED("skipped"),
PENDING("pending"),
UNDEFINED("undefined"),
AMBIGUOUS("ambiguous");

private final String status;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trivago/rta/filesystem/FileIO.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trivago/rta/json/JsonPojoConverter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trivago/rta/json/pojo/After.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trivago/rta/json/pojo/Before.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/com/trivago/rta/json/pojo/Element.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,12 +25,12 @@
public class Element {
private List<Before> before = new ArrayList<>();
private int line;
private String name;
private String description;
private String id;
private String name = "";
private String description = "";
private String id = "";
private List<After> after = new ArrayList<>();
private String type;
private String keyword;
private String type = "";
private String keyword = "";
private List<Step> steps = new ArrayList<>();
private List<Tag> tags = new ArrayList<>();

Expand Down Expand Up @@ -60,14 +60,22 @@ public void setLine(final int line) {
this.line = line;
}

public String getEncodedName(){
return RenderingUtils.escapeHTML(getName());
}

public String getName() {
return name;
return !name.isEmpty() ? name : "[Unnamed]";
}

public void setName(final String name) {
this.name = name;
}

public String getEncodedDescription(){
return RenderingUtils.escapeHTML(getDescription());
}

public String getDescription() {
return description;
}
Expand Down Expand Up @@ -149,6 +157,7 @@ public Status getStatus() {
}
}
}

return Status.FAILED;
}

Expand Down
13 changes: 11 additions & 2 deletions src/main/java/com/trivago/rta/json/pojo/Embedding.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,15 +17,20 @@
package com.trivago.rta.json.pojo;

import com.google.gson.annotations.SerializedName;
import com.trivago.rta.rendering.RenderingUtils;

public class Embedding {
private String data;

@SerializedName("mime_type")
private String mimeType;
private String mimeType = "unknown";

private transient String filename;

public String getEncodedData(){
return RenderingUtils.escapeHTML(getData());
}

public String getData() {
return data;
}
Expand Down Expand Up @@ -58,4 +63,8 @@ public boolean isImage() {
mimeType.equalsIgnoreCase("image/svg+xml");

}

public boolean isPlainText(){
return mimeType.equalsIgnoreCase("text/plain");
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/trivago/rta/json/pojo/Match.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@
import java.util.List;

public class Match {
private String location;
private String location = "";
private List<Argument> arguments = new ArrayList<>();

public String getLocation() {
Expand Down
25 changes: 17 additions & 8 deletions src/main/java/com/trivago/rta/json/pojo/Report.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,18 +16,19 @@

package com.trivago.rta.json.pojo;

import java.time.Duration;
import com.trivago.rta.rendering.RenderingUtils;

import java.util.ArrayList;
import java.util.List;

public class Report {
private int line;
private List<Element> elements = new ArrayList<>();
private String name;
private String description;
private String id;
private String keyword;
private String uri;
private String name = "";
private String description = "";
private String id = "";
private String keyword = "";
private String uri = "";

public int getLine() {
return line;
Expand All @@ -45,14 +46,22 @@ public void setElements(final List<Element> elements) {
this.elements = elements;
}

public String getEncodedName() {
return RenderingUtils.escapeHTML(getName());
}

public String getName() {
return name;
return !name.isEmpty() ? name : "[Unnamed]";
}

public void setName(final String name) {
this.name = name;
}

public String getEncodedDescription() {
return RenderingUtils.escapeHTML(getDescription());
}

public String getDescription() {
return description;
}
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/com/trivago/rta/json/pojo/Result.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 trivago N.V.
* Copyright 2018 trivago N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,9 +26,7 @@ public class Result {
private String status = Status.UNDEFINED.toString();

@SerializedName("error_message")
private String errorMessage;

private transient String durationString;
private String errorMessage = "";

public long getDuration() {
return duration;
Expand All @@ -46,6 +44,10 @@ public String getStatus() {
return status;
}

public boolean hasErrorMessage() {
return !errorMessage.isEmpty();
}

public String getErrorMessage() {
return errorMessage;
}
Expand All @@ -72,7 +74,6 @@ public String toString() {
"duration=" + duration +
", status='" + status + '\'' +
", errorMessage='" + errorMessage + '\'' +
", durationString='" + durationString + '\'' +
'}';
}
}
Loading

0 comments on commit a9a7ac4

Please sign in to comment.