ilog.rules.dvs.rbtesting

Class IlrRBTTraceTester

  • java.lang.Object
    • ilog.rules.dvs.rbtesting.IlrRBTTraceTester
  • All Implemented Interfaces:
    IlrTraceTester


    public class IlrRBTTraceTester
    extends java.lang.Object
    implements IlrTraceTester
    The trace tester implementation for rule based testing. Use an IlrRBTTraceTester instance to handle calls to the testing ruleset and to build the results for a scenario.
    Since:
    7.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrRBTTraceTester(java.lang.String scenarioName, java.util.Map<java.lang.String,java.lang.Boolean> placeHoldersStatus, java.util.Map<java.lang.String,java.lang.Object> placeHoldersValues, java.util.Map<java.lang.String,java.lang.Throwable> testsInError)
      Creates a new IlrRBTTraceTester instance.
    • Constructor Detail

      • IlrRBTTraceTester

        public IlrRBTTraceTester(java.lang.String scenarioName,
                         java.util.Map<java.lang.String,java.lang.Boolean> placeHoldersStatus,
                         java.util.Map<java.lang.String,java.lang.Object> placeHoldersValues,
                         java.util.Map<java.lang.String,java.lang.Throwable> testsInError)
        Creates a new IlrRBTTraceTester instance.
        Parameters:
        scenarioName - The name of the scenario.
        placeHoldersStatus - A Map containing the placeholder_name/status entries that reflect the status of the placeholders. For example, for the empty cells in an Excel provider.
        placeHoldersValues - A Map containing the placeholder_name/value entries with the value of each placeholder.
        testsInError - A Map containing the tests with data errors.
    • Method Detail

      • getScenarioName

        public java.lang.String getScenarioName()
        Returns the name of the scenario.
        Returns:
        The name of the scenario.
      • getPlaceHoldersStatus

        public java.util.Map<java.lang.String,java.lang.Boolean> getPlaceHoldersStatus()
        Returns the placeholder status Map.
        Returns:
        The placeholder status Map.
      • getPlaceHoldersValues

        public java.util.Map<java.lang.String,java.lang.Object> getPlaceHoldersValues()
        Returns the placeholder values Map.
        Returns:
        The placeholder values Map.
      • getTestsWithDataError

        public java.util.Map<java.lang.String,java.lang.Throwable> getTestsWithDataError()
        Returns a Map containing the tests with data errors.
        Returns:
        A Map containing the tests with data errors. The key is the name of the test, the value is the data error.
      • test

        public java.util.List<IlrTestResult> test(IlrScenarioSuiteExecutionContext context,
                                         IlrSessionRequest request,
                                         IlrSessionResponse response)
                                           throws java.lang.Exception
        Performs the scenario tests and returns a list of test results. This method is called by the DVS runner.
        Specified by:
        test in interface IlrTraceTester
        Throws:
        IlrSessionException - if a problem occurs while creating or controlling the rule session used to run the test ruleset.
        java.lang.Exception - if a problem occurs at the scenario verification level. A global error for the scenario is added to the test report.
        Parameters:
        context - The scenario suite execution context.
        request - The session request used to invoke the production (tested) ruleset.
        response - The session response returned by calling the production (tested) ruleset.
        Returns:
        A list of test results. This list is created by executing the underlying test ruleset.
      • computeTestRulesetPath

        public static IlrPath computeTestRulesetPath(IlrPath prodRulesetPath)
        Compute the name of the test ruleset to use to test a ruleset.
        Parameters:
        prodRulesetPath - the ruleset path of the ruleset to test
        Returns:
        the ruleset path of the test ruleset

© Copyright IBM Corp. 1987, 2017