Skip to content

Commit

Permalink
Fixed: JENKINS-18206 - Total duration of a test class should include …
Browse files Browse the repository at this point in the history
…the times for the configuration methods
  • Loading branch information
nullin committed Jun 30, 2013
1 parent 9347a90 commit 3635399
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions README
Expand Up @@ -19,6 +19,7 @@ Release Notes
### v1.2
* Fixed: JENKINS-18498 - hudson.tasks.test.AggregatedTestResultAction$1 cannot be cast to hudson.tasks.test.TestResult
* Fixed: JENKINS-16832 - Do not show failed builds in trend graph
* Fixed: JENKINS-18206 - Total duration of a test class should include the times for the configuration methods

### v1.1
* Fixed: JENKINS-16592 - Invalid URL in testngreport on tests execution history chart
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/hudson/plugins/testng/results/ClassResult.java
@@ -1,15 +1,15 @@
package hudson.plugins.testng.results;

import hudson.model.AbstractBuild;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import hudson.model.AbstractBuild;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;

/**
* Handle results related to a single test class
*/
Expand Down Expand Up @@ -113,7 +113,6 @@ public void tally() {

for (MethodResult methodResult : this.testMethodList) {
if (!methodResult.isConfig()) {
this.duration += methodResult.getDuration();
if ("FAIL".equals(methodResult.getStatus())) {
this.fail++;
} else if ("SKIP".equals(methodResult.getStatus())) {
Expand All @@ -122,6 +121,7 @@ public void tally() {
this.pass++;
}
}
this.duration += methodResult.getDuration();
methodResult.setParent(this);
/*
* Setup testUuids to ensure that methods with same names can be
Expand Down

0 comments on commit 3635399

Please sign in to comment.