Class AbstractTestHelper

    • Constructor Detail

      • AbstractTestHelper

        public AbstractTestHelper()
    • Method Detail

      • getDefaultPackagesDir

        public String getDefaultPackagesDir()
      • getDefaultConfigDir

        public String getDefaultConfigDir()
      • checkETInstance

        protected boolean checkETInstance​(Launcher launcher,
                                          TaskListener listener,
                                          boolean kill)
                                   throws IOException,
                                          InterruptedException
        Checks already opened ecu.test instances.
        Parameters:
        launcher - the launcher
        listener - the listener
        kill - specifies whether to task-kill the running processes
        Returns:
        true if processes found, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • closeETInstance

        protected boolean closeETInstance​(Launcher launcher,
                                          TaskListener listener)
                                   throws IOException,
                                          InterruptedException
        Tries to close already opened ecu.test instances via COM first. If this is not successful tries to task-kill the running process.
        Parameters:
        launcher - the launcher
        listener - the listener
        Returns:
        true if processes found, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • checkTSInstance

        protected boolean checkTSInstance​(Launcher launcher,
                                          boolean kill)
                                   throws IOException,
                                          InterruptedException
        Checks already opened Tool-Server instances.
        Parameters:
        launcher - the launcher
        kill - specifies whether to task-kill the running processes
        Returns:
        true if processes found, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • getTestId

        protected int getTestId​(Run<?,​?> run)
        Gets the test identifier by the size of TestEnvInvisibleActions already added to the build.
        Parameters:
        run - the build
        Returns:
        the test id
      • getTestFilePath

        protected String getTestFilePath​(String testFile,
                                         String pkgDir,
                                         Launcher launcher,
                                         TaskListener listener)
                                  throws IOException,
                                         InterruptedException
        Gets the absolute test file path.
        Parameters:
        testFile - the expanded test file
        pkgDir - the packages directory containing the test file
        launcher - the launcher
        listener - the listener
        Returns:
        the absolute test file path
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the build gets interrupted
      • getConfigFilePath

        protected String getConfigFilePath​(String configFile,
                                           String configDir,
                                           Launcher launcher,
                                           TaskListener listener)
                                    throws IOException,
                                           InterruptedException
        Gets the absolute configuration file path.
        Parameters:
        configFile - the expanded configuration file
        configDir - the expanded configuration directory containing the configuration file
        launcher - the launcher
        listener - the listener
        Returns:
        the absolute configuration file path
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the build gets interrupted
      • getConfigDir

        protected String getConfigDir​(Launcher launcher,
                                      TaskListener listener)
                               throws InterruptedException
        Gets the configuration directory of the current ecu.test workspace by querying the settings file via COM.
        Parameters:
        launcher - the launcher
        listener - the listener
        Returns:
        the configuration directory
        Throws:
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • getPackagesDir

        protected String getPackagesDir​(Launcher launcher,
                                        TaskListener listener)
                                 throws InterruptedException
        Gets the packages directory of the current ecu.test workspace by querying the settings file via COM.
        Parameters:
        launcher - the launcher
        listener - the listener
        Returns:
        the package directory
        Throws:
        InterruptedException - if the current thread is interrupted while waiting for the completion