psdi.unittest

Class TestSuiteResult

  • java.lang.Object
    • psdi.unittest.TestSuiteResult
  • All Implemented Interfaces:
    java.io.Serializable


    public class TestSuiteResult
    extends java.lang.Object
    implements java.io.Serializable
    Represents a test suite result.
    See Also:
    Serialized Form
    • Constructor Detail

      • TestSuiteResult

        public TestSuiteResult(java.lang.String suiteid)
        Parameters:
        suiteid - the test script id
    • Method Detail

      • getTestDate

        public java.util.Date getTestDate()
        Returns:
        the test execution date
      • getSuiteId

        public java.lang.String getSuiteId()
      • addResult

        public void addResult(UnitTestResult result)
        Api to add UnitTestResult for each test case.
        Parameters:
        result - the UnitTestResult for the test case
      • getResults

        public java.util.List getResults()
        Returns:
        the test case results.
      • createResult

        public UnitTestResult createResult(java.lang.String id,
                                           java.lang.String desc,
                                           java.lang.Throwable thr,
                                           int stateVal)
        Factory method for creating a UnitTestResult object.
        Parameters:
        id - the test case id
        desc - the test case description
        thr - the error for the test case
        stateVal - the test case state [FAIL,PASS,SKIP,BADSETUP]
        Returns:
      • getTotalTime

        public long getTotalTime()
        Returns:
        the total time taken for executing all the test cases.
      • getTotalRun

        public int getTotalRun()
        Returns:
        the total number of test cases executed.
      • getTotalFailed

        public int getTotalFailed()
        Returns:
        the total number of test cases in failed state.
      • getTotalPassed

        public int getTotalPassed()
        Returns:
        the total number of test cases in passed state.
      • getTotalSkipped

        public int getTotalSkipped()
        Returns:
        the total number of test cases in skipped state.