org.apache.maven.surefire.suite
Class RunResult

java.lang.Object
  extended by org.apache.maven.surefire.suite.RunResult

public class RunResult
extends Object

Represents a test-run-result; this may be from a single test run or an aggregated result.

In the case of timeout==true, the run-counts reflect the state of the test-run at the time of the timeout.

Author:
Kristian Rosenvold

Field Summary
static int SUCCESS
           
 
Constructor Summary
RunResult(int completedCount, int errors, int failures, int skipped)
           
RunResult(int completedCount, int errors, int failures, int skipped, String failure, boolean timeout)
           
 
Method Summary
 RunResult aggregate(RunResult other)
           
 boolean equals(Object o)
           
static RunResult failure(RunResult accumulatedAtTimeout, Exception cause)
           
static RunResult fromInputStream(InputStream inputStream, String encoding)
           
 int getCompletedCount()
           
 int getErrors()
           
 Integer getFailsafeCode()
           
 String getFailure()
           
 int getFailures()
           
 int getSkipped()
           
 int hashCode()
           
 boolean isErrorFree()
           
 boolean isFailure()
           
 boolean isFailureOrTimeout()
           
 boolean isTimeout()
           
static RunResult noTestsRun()
           
static RunResult timeout(RunResult accumulatedAtTimeout)
           
 void writeSummary(File summaryFile, boolean inProgress, String encoding)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values
Constructor Detail

RunResult

public RunResult(int completedCount,
                 int errors,
                 int failures,
                 int skipped)

RunResult

public RunResult(int completedCount,
                 int errors,
                 int failures,
                 int skipped,
                 String failure,
                 boolean timeout)
Method Detail

timeout

public static RunResult timeout(RunResult accumulatedAtTimeout)

failure

public static RunResult failure(RunResult accumulatedAtTimeout,
                                Exception cause)

getCompletedCount

public int getCompletedCount()

getErrors

public int getErrors()

getFailures

public int getFailures()

getSkipped

public int getSkipped()

getFailsafeCode

public Integer getFailsafeCode()

isErrorFree

public boolean isErrorFree()

isFailureOrTimeout

public boolean isFailureOrTimeout()

isFailure

public boolean isFailure()

getFailure

public String getFailure()

isTimeout

public boolean isTimeout()

aggregate

public RunResult aggregate(RunResult other)

noTestsRun

public static RunResult noTestsRun()

fromInputStream

public static RunResult fromInputStream(InputStream inputStream,
                                        String encoding)
                                 throws FileNotFoundException
Throws:
FileNotFoundException

writeSummary

public void writeSummary(File summaryFile,
                         boolean inProgress,
                         String encoding)
                  throws IOException
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.