Class JenkinsConfiguration

  • All Implemented Interfaces:
    Describable<JenkinsConfiguration>

    public class JenkinsConfiguration
    extends java.lang.Object
    implements Describable<JenkinsConfiguration>
    Repeatable subelement for the TPT configuration. Mainly a pair of TPT file and execution configuration enriched with some additional information.
    Author:
    jkuhnert, PikeTec GmbH
    • Constructor Detail

      • JenkinsConfiguration

        @DataBoundConstructor
        public JenkinsConfiguration​(java.lang.String tptFile,
                                    java.lang.String configuration,
                                    java.lang.String id)
        the execution configuration is used by tpt to determine which file and which arguments is used. later on, the back 2 back test determine the reference files with this.
        Parameters:
        tptFile - path to an executable tpt file
        configuration - arguments and configuration (configuration in double quotes)
        id - The unique ID of the configuration to create unique paths
    • Method Detail

      • readResolve

        protected java.lang.Object readResolve()
      • isEnableTest

        public boolean isEnableTest()
        Returns:
        if this JenkinsConfiguration should run at all
      • setEnableTest

        @DataBoundSetter
        public void setEnableTest​(boolean enableTest)
        Parameters:
        enableTest - the enableTest to set
      • getTimeout

        public long getTimeout()
        Returns:
        how long the execution of this test run is allwoed to take at max
      • setTimeout

        @DataBoundSetter
        public void setTimeout​(long timeout)
        Parameters:
        timeout - the timeout to set
      • getTptFile

        public java.lang.String getTptFile()
        Returns:
        The TPT file
      • getTestSet

        public java.lang.String getTestSet()
        Returns:
        the name of test set that should be used, null or empty if the test set defined in the file should be used.
      • setTestSet

        @DataBoundSetter
        public void setTestSet​(java.lang.String testSet)
        Parameters:
        testSet - the testSet to set
      • getConfiguration

        public java.lang.String getConfiguration()
        Returns:
        the whole configuration string defined in the jenkins conf
      • getReportDir

        public java.lang.String getReportDir()
        Returns:
        the directory where the TPT report shall be written to.
      • setReportDir

        @DataBoundSetter
        public void setReportDir​(java.lang.String reportDir)
        Parameters:
        reportDir - the reportDir to set
      • getTestdataDir

        public java.lang.String getTestdataDir()
        Returns:
        The directory where the execution result data shall be written to
      • setTestdataDir

        @DataBoundSetter
        public void setTestdataDir​(java.lang.String testdataDir)
        Parameters:
        testdataDir - the testdataDir to set
      • getId

        public java.lang.String getId()
        Returns:
        the unique id of this configuration
      • setId

        public void setId​(java.lang.String id)
        Parameters:
        id - set the unique id of this configuration.
      • replaceAndNormalize

        public JenkinsConfiguration replaceAndNormalize​(EnvVars environment)
        This method resolves all variables that are used for the definition of the test set and the execution configuration, but not for the directories. These are resolved on the respective agent machine with the respective environment variables.
        Parameters:
        environment - The map of environment variables and their values
        Returns:
        A JenkinsConfiguration where all "${}"-Variables are replaced by their value if available in environment.