Class Result

  • All Implemented Interfaces:
    java.io.Serializable

    public class Result
    extends java.lang.Object
    implements java.io.Serializable
    A Result collects and summarizes information from running multiple tests. All tests are counted -- additional information is collected from tests that fail.
    Since:
    4.0
    See Also:
    Serialized Form
    • Field Detail

      • serialPersistentFields

        private static final java.io.ObjectStreamField[] serialPersistentFields
      • count

        private final java.util.concurrent.atomic.AtomicInteger count
      • ignoreCount

        private final java.util.concurrent.atomic.AtomicInteger ignoreCount
      • failures

        private final java.util.concurrent.CopyOnWriteArrayList<Failure> failures
      • runTime

        private final java.util.concurrent.atomic.AtomicLong runTime
      • startTime

        private final java.util.concurrent.atomic.AtomicLong startTime
    • Method Detail

      • getRunCount

        public int getRunCount()
        Returns:
        the number of tests run
      • getFailureCount

        public int getFailureCount()
        Returns:
        the number of tests that failed during the run
      • getRunTime

        public long getRunTime()
        Returns:
        the number of milliseconds it took to run the entire suite to run
      • getFailures

        public java.util.List<Failure> getFailures()
        Returns:
        the Failures describing tests that failed and the problems they encountered
      • getIgnoreCount

        public int getIgnoreCount()
        Returns:
        the number of tests ignored during the run
      • wasSuccessful

        public boolean wasSuccessful()
        Returns:
        true if all tests succeeded
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream s)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream s)
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • readResolve

        private java.lang.Object readResolve()
      • createListener

        public RunListener createListener()
        Internal use only.