org.apache.jmeter.util

## Class ScriptingTestElement

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.util.ScriptingTestElement

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Searchable, TestElement
  Direct Known Subclasses:
    BSFTestElement, JSR223TestElement

      public abstract class ScriptingTestElement
      extends AbstractTestElement

  Common parent class for the `BSFTestElement` and `JSR223TestElement` scripting test elements. These also share the `ScriptingBeanInfoSupport` class for configuration.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_SCRIPT_LANGUAGE`
    `protected java.lang.String` | `scriptLanguage`

    - ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptingTestElement()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getFilename()`
    `java.lang.String` | `getParameters()`
    `java.lang.String` | `getScript()` Return the script (TestBean version).
    `protected boolean` | `isStopCondition(java.lang.Throwable rootCause)`
    `void` | `setFilename(java.lang.String s)`
    `void` | `setParameters(java.lang.String s)`
    `void` | `setScript(java.lang.String s)` Set the script (TestBean version).

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

      `removed`

- - ### Field Detail

    - #### scriptLanguage

          protected java.lang.String scriptLanguage

    - #### DEFAULT_SCRIPT_LANGUAGE

          public static final java.lang.String DEFAULT_SCRIPT_LANGUAGE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ScriptingTestElement

          public ScriptingTestElement()

  - ### Method Detail

    - #### getScript

          public java.lang.String getScript()

      Return the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.
      Returns:
        the script to execute

    - #### setScript

          public void setScript(java.lang.String s)

      Set the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.
      Parameters:
        `s` - the script to execute (may be blank)

    - #### getParameters

          public java.lang.String getParameters()

    - #### setParameters

          public void setParameters(java.lang.String s)

    - #### getFilename

          public java.lang.String getFilename()

    - #### setFilename

          public void setFilename(java.lang.String s)

    - #### isStopCondition

          protected boolean isStopCondition(java.lang.Throwable rootCause)

      Parameters:
        `rootCause` - Throwable
      Returns:
        true if Throwable is an Exception that impacts test state

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.