ilog.rules.studio.dvs.execution

Class IlrDVSRunner

  • java.lang.Object
    • ilog.rules.studio.dvs.execution.IlrDVSRunner
  • Direct Known Subclasses:
    IlrDVSArchiveRunner, IlrExcelRunner


    public abstract class IlrDVSRunner
    extends java.lang.Object
    An abstract implementation used to execute scenarios. This class provides convenience methods for running scenarios.

    Subclass IlrDVSRunner when you implement a custom DVS launch configuration.

    Since:
    JRules 7.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrDVSRunner() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void closeOutput()
      Closes the output report file.
      protected void closeTable()
      Closes the table in the report opened by calling openTable().
      protected void createOutput(java.lang.String destFilePath)
      Creates the HTML output report.
      protected void displayFooter(java.lang.String title, java.lang.String name)
      Displays the footer that corresponds to the header written in the HTML report.
      protected void displayHeader(java.lang.String title, java.lang.String name)
      Displays a header in the HTML report
      protected void displayLine(java.lang.String title, java.lang.String value)
      Displays a row in the table opened in openTable().
      protected void displayReport(IlrScenarioSuiteTestResult report)
      Stores the execution report in the output report.
      protected void displayTrace(IlrScenarioSuiteTestResult report)
      Called after the output report is generated in order to add the Decision Warehouse traces.
      protected java.lang.String[] extractCustomArgs(java.lang.String[] args)
      Extracts custom arguments from the argument list.
      protected IlrDWTrace getDWTrace(IlrScenarioTestResult result)
      Returns the Decision Warehouse trace extracted from the result of a scenario run.
      protected IlrRulesetVerbalizationProvider getRulesetVerbalizationProvider() 
      static boolean isHttpClient4() 
      protected void openTable()
      Starts to display a table in the report.
      void run(java.lang.String[] args, IlrScenarioSuiteDescriptor scenarioSuite)
      Runs scenarios either locally or remotely depending on the parameters set automatically in the program arguments.
      void storeExceptionInOutput(java.lang.Exception e)
      Stores an exception that should be generated during execution.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HTTPCLIENT3_FALLBACK_PROPERTY

        public static final java.lang.String HTTPCLIENT3_FALLBACK_PROPERTY
        See Also:
        Constant Field Values
      • out

        protected java.io.BufferedWriter out
      • writer

        protected java.io.PrintWriter writer
      • localExecution

        protected boolean localExecution
      • url

        protected java.lang.String url
    • Constructor Detail

      • IlrDVSRunner

        public IlrDVSRunner()
    • Method Detail

      • extractCustomArgs

        protected java.lang.String[] extractCustomArgs(java.lang.String[] args)
        Extracts custom arguments from the argument list.
        Parameters:
        args - The arguments provided to the main method.
        Returns:
        The custom argument list.
      • run

        public void run(java.lang.String[] args,
               IlrScenarioSuiteDescriptor scenarioSuite)
                 throws java.io.IOException
        Runs scenarios either locally or remotely depending on the parameters set automatically in the program arguments.
        Throws:
        java.io.IOException - if there is a problem opening the ruleset archive.
        Parameters:
        args - The arguments provided in the main method.
        scenarioSuite - The scenario suite descriptor.
      • isHttpClient4

        public static boolean isHttpClient4()
      • getDWTrace

        protected IlrDWTrace getDWTrace(IlrScenarioTestResult result)
                                 throws IlrTestingException
        Returns the Decision Warehouse trace extracted from the result of a scenario run.
        Throws:
        IlrTestingException - if the trace cannot be extracted.
        Parameters:
        result - The result of a scenario run. The trace is extracted from this parameter.
        Returns:
        The Decision Warehouse trace for result.
      • displayHeader

        protected void displayHeader(java.lang.String title,
                         java.lang.String name)
                              throws java.io.IOException
        Displays a header in the HTML report
        Throws:
        java.io.IOException - if the report cannot be written.
        Parameters:
        title - The report title.
        name - The referenced name to be used in the HTML. This parameter must not have any spaces.
      • openTable

        protected void openTable()
                          throws java.io.IOException
        Starts to display a table in the report.
        Throws:
        java.io.IOException - if the report cannot be written.
      • displayLine

        protected void displayLine(java.lang.String title,
                       java.lang.String value)
                            throws java.io.IOException
        Displays a row in the table opened in openTable().
        Throws:
        java.io.IOException - if the report cannot be written.
        Parameters:
        title - The label in the table.
        value - The value corresponding to the label.
        See Also:
        openTable()
      • closeTable

        protected void closeTable()
                           throws java.io.IOException
        Closes the table in the report opened by calling openTable().
        Throws:
        java.io.IOException - if the report cannot be written.
        See Also:
        openTable()
      • displayFooter

        protected void displayFooter(java.lang.String title,
                         java.lang.String name)
                              throws java.io.IOException
        Displays the footer that corresponds to the header written in the HTML report.
        Throws:
        java.io.IOException - if the report cannot be written.
        Parameters:
        title - The title to display in the report.
        name - The referenced name that will be used in the HTML. This parameter must not have any spaces.
      • displayTrace

        protected void displayTrace(IlrScenarioSuiteTestResult report)
                             throws IlrTestingException
        Called after the output report is generated in order to add the Decision Warehouse traces. Nothing is done in this default method.
        Throws:
        IlrTestingException - if there is a problem retrieving the trace for a scenario.
        Parameters:
        report - The execution report sent by the SSP after execution.

© Copyright IBM Corp. 1987, 2017