Skip to content

Commit

Permalink
Merge pull request #66 from BogdanLivadariu/master
Browse files Browse the repository at this point in the history
fixed error for generating junit reports
  • Loading branch information
BogdanLivadariu committed Nov 29, 2016
2 parents 7ccb959 + 2c60e5a commit d0615a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bootstraped-multi-test-results-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<packaging>hpi</packaging>
<properties>
<cucumber-reporting-handlebars.version>1.1.6</cucumber-reporting-handlebars.version>
<junit-reporting-handlebars.version>1.0.9</junit-reporting-handlebars.version>
<junit-reporting-handlebars.version>1.0.10</junit-reporting-handlebars.version>
<testng-reporting-handlebars.version>1.0.9</testng-reporting-handlebars.version>
<rspec-reporting-handlebars.version>1.0.6</rspec-reporting-handlebars.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.bogdanlivadariu.reporting.junit.xml.models;

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

Expand Down Expand Up @@ -57,7 +58,7 @@ public void postProcess() {
int errorsCount = 0;
Double totalTime = 0.0;

for (TestCaseModel test : testcase) {
for (TestCaseModel test : getTestcase()) {
if (test.getOverallStatus().equals(Constants.FAILED)) {
failuresCount++;
} else if (test.getOverallStatus().equals(Constants.ERRORED)) {
Expand All @@ -76,7 +77,7 @@ public void postProcess() {
skipped = Integer.toString(skippedCount);
}
if (tests == null) {
tests = Integer.toString(testcase.size());
tests = Integer.toString(getTestcase().size());
}
if (time == null) {
time = Double.toString(totalTime);
Expand Down Expand Up @@ -122,11 +123,11 @@ public String getName() {
}

public List<PropertyModel> getProperties() {
return properties;
return properties == null ? new ArrayList<PropertyModel>() : properties;
}

public List<TestCaseModel> getTestcase() {
return testcase;
return testcase == null ? new ArrayList<TestCaseModel>() : testcase;
}

public String getOverallStatus() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.bogdanlivadariu.reporting.junit.xml.models;

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

Expand Down Expand Up @@ -48,7 +49,7 @@ public void postProcess() {
int errorsCount = 0;
Double totalTime = 0.0;

for (TestSuiteModel suite : testsuite) {
for (TestSuiteModel suite : getTestsuite()) {
if (suite.getOverallStatus().equals(Constants.FAILED)) {
failuresCount++;
} else if (suite.getOverallStatus().equals(Constants.ERRORED)) {
Expand All @@ -62,7 +63,7 @@ public void postProcess() {
failures = Integer.toString(failuresCount);
}
if (tests == null) {
tests = Integer.toString(testsuite.size());
tests = Integer.toString(getTestsuite().size());
}
if (time == null) {
time = Double.toString(totalTime);
Expand Down Expand Up @@ -104,7 +105,7 @@ public String getName() {
}

public List<TestSuiteModel> getTestsuite() {
return testsuite;
return testsuite == null ? new ArrayList<TestSuiteModel>() : testsuite;
}

public String getOverallStatus() {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<properties>
<parent.version>1.4.23</parent.version>
<cucumber-reporting-handlebars.version>1.1.6</cucumber-reporting-handlebars.version>
<junit-reporting-handlebars.version>1.0.9</junit-reporting-handlebars.version>
<junit-reporting-handlebars.version>1.0.10</junit-reporting-handlebars.version>
<testng-reporting-handlebars.version>1.0.9</testng-reporting-handlebars.version>
<rspec-reporting-handlebars.version>1.0.6</rspec-reporting-handlebars.version>
<e2e-reporting.version>1.0.0</e2e-reporting.version>
Expand All @@ -51,7 +51,7 @@
<module>junit-reporting-handlebars</module>
<module>testng-reporting-handlebars</module>
<module>rspec-reporting-handlebars</module>
<module>e2e-reporting</module>
<!-- <module>e2e-reporting</module> -->
<module>bootstraped-multi-test-results-report</module>
</modules>
<dependencies>
Expand Down

0 comments on commit d0615a6

Please sign in to comment.