Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…k.github.io repository
  • Loading branch information
damianszczepanik committed May 28, 2019
1 parent 1c548be commit 6b5485d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ matrix:
- jdk: oraclejdk8
env:
- DESC="tests"
script: mvn clean verify
script:
- mvn clean verify

- jdk: oraclejdk8
env:
Expand All @@ -47,6 +48,8 @@ before_deploy:

deploy:
provider: pages
repo: damianszczepanik/damianszczepanik.github.io
target_branch: master
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/HelloCucumberTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
public class HelloCucumberTest {

// test annotation only to make sure it is generated during "mvn test"
// what is needed to publish generated report via github.com
@Test
public void generateReport() throws IOException {
public void generateDemoReport() throws IOException {
File reportOutputDirectory = new File("target/demo");
List<String> jsonFiles = new ArrayList<>();
jsonFiles.add("src/test/resources/json/sample.json");
Expand All @@ -28,6 +29,7 @@ public void generateReport() throws IOException {
configuration.addClassifications("Branch", "release/1.0");
configuration.setSortingMethod(SortingMethod.NATURAL);
configuration.addPresentationModes(PresentationMode.EXPAND_ALL_STEPS);
configuration.setTrendsStatsFile(new File("target/test-classes/demo-trends.json"));

ReportBuilder reportBuilder = new ReportBuilder(jsonFiles, configuration);
reportBuilder.generateReports();
Expand Down
47 changes: 47 additions & 0 deletions src/test/resources/demo-trends.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"buildNumbers": [
"01_first", "other build", "05last"
],

"passedFeatures": [
9, 18, 25
],
"failedFeatures": [
1, 2, 5
],
"totalFeatures": [
10, 20, 30
],

"passedScenarios": [
10, 20, 20
],
"failedScenarios": [
10, 20, 20
],
"totalScenarios": [
10, 2, 5
],

"passedSteps": [
1, 3, 5
],
"failedSteps": [
10, 30, 50
],
"skippedSteps": [
100, 300, 500
],
"pendingSteps": [
1000, 3000, 5000
],
"undefinedSteps": [
10000, 30000, 50000
],
"totalSteps": [
100000, 300000, 500000
],
"durations": [
3206126182398, 3206126182399, 3206126182310
]
}

0 comments on commit 6b5485d

Please sign in to comment.