Class LDAPSampler

All Implemented Interfaces:
Serializable, Cloneable, ConfigMergabilityIndicator, Searchable, Sampler, org.apache.jmeter.testelement.TestElement

public class LDAPSampler extends AbstractSampler
Ldap Sampler class is main class for the LDAP test. This will control all the test available in the LDAP Test.
See Also:
  • Field Details

  • Constructor Details

    • LDAPSampler

      public LDAPSampler()
  • Method Details

    • getUsername

      public String getUsername()
      Gets the username attribute of the LDAP object.
      Returns:
      the username
    • getPassword

      public String getPassword()
      Gets the password attribute of the LDAP object.
      Returns:
      the password
    • setServername

      public void setServername(String servername)
      Sets the Servername attribute of the ServerConfig object.
      Parameters:
      servername - the new servername value
    • setPort

      public void setPort(String port)
      Sets the Port attribute of the ServerConfig object.
      Parameters:
      port - the new Port value
    • getServername

      public String getServername()
      Gets the servername attribute of the LDAPSampler object.
      Returns:
      the Servername value
    • getPort

      public String getPort()
      Gets the Port attribute of the LDAPSampler object.
      Returns:
      the Port value
    • setRootdn

      public void setRootdn(String newRootdn)
      Sets the Rootdn attribute of the LDAPSampler object.
      Parameters:
      newRootdn - the new rootdn value
    • getRootdn

      public String getRootdn()
      Gets the Rootdn attribute of the LDAPSampler object.
      Returns:
      the Rootdn value
    • setTest

      public void setTest(String newTest)
      Sets the Test attribute of the LdapConfig object.
      Parameters:
      newTest - the new test value(Add,Modify,Delete and search)
    • getTest

      public String getTest()
      Gets the test attribute of the LDAPSampler object.
      Returns:
      the test value (Add, Modify, Delete and search)
    • setUserDefinedTest

      public void setUserDefinedTest(boolean value)
      Sets the UserDefinedTest attribute of the LDAPSampler object.
      Parameters:
      value - the new UserDefinedTest value
    • getUserDefinedTest

      public boolean getUserDefinedTest()
      Gets the UserDefinedTest attribute of the LDAPSampler object.
      Returns:
      the test value true or false. If true it will do the UserDefinedTest else our own inbuild test case.
    • setBaseEntryDN

      public void setBaseEntryDN(String newbaseentry)
      Sets the Base Entry DN attribute of the LDAPSampler object.
      Parameters:
      newbaseentry - the new Base entry DN value
    • getBaseEntryDN

      public String getBaseEntryDN()
      Gets the BaseEntryDN attribute of the LDAPSampler object.
      Returns:
      the Base entry DN value
    • setArguments

      public void setArguments(Arguments value)
      Sets the Arguments attribute of the LdapConfig object. This will collect values from the table for user defined test case.
      Parameters:
      value - the arguments
    • getArguments

      public Arguments getArguments()
      Gets the Arguments attribute of the LdapConfig object.
      Returns:
      the arguments. User defined test case.
    • getLabel

      public String getLabel()
      Returns a formatted string label describing this sampler
      Returns:
      a formatted string label describing this sampler
    • sample

      public SampleResult sample(Entry e)
      Description copied from interface: Sampler
      Obtains statistics about the given Entry, and packages the information into a SampleResult.
      Parameters:
      e - the Entry (TODO seems to be unused)
      Returns:
      information about the sample
    • applies

      public boolean applies(ConfigTestElement configElement)
      Description copied from class: AbstractSampler
      Does configElement apply to Sampler
      Specified by:
      applies in interface ConfigMergabilityIndicator
      Overrides:
      applies in class AbstractSampler
      Parameters:
      configElement - ConfigTestElement
      Returns:
      boolean
      See Also: