Class JenkinsConfiguration

java.lang.Object
com.piketec.jenkins.plugins.tpt.Configuration.JenkinsConfiguration
All Implemented Interfaces:
Describable<JenkinsConfiguration>

public class JenkinsConfiguration extends 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, Synopsys Inc.
  • Constructor Details

    • JenkinsConfiguration

      @DataBoundConstructor public JenkinsConfiguration(String tptFile, String configuration, 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 Details

    • readResolve

      protected 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 String getTptFile()
      Returns:
      The TPT file
    • getTestSet

      public 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(String testSet)
      Parameters:
      testSet - the testSet to set
    • getConfiguration

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

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

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

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

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

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

      public void setId(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.
    • getDescriptor

      public Descriptor<JenkinsConfiguration> getDescriptor()
      Specified by:
      getDescriptor in interface Describable<JenkinsConfiguration>
      Returns:
      the actual descriptor of this object