Custom Components
To install a custom component, click Download. This will download a zip-file. Extract the content of the zip-file to the script-components subfolder of your loadUI installation folder (e.g. c:\Program Files (x86)\SmartBear\loadUI 2.0\script-components). LoadUI will then find the component automatically, without any need to restart the application.
Custom HTTP Runner

Developer
Daniel James, Casting Networks, Inc.
Description
Derivative of Web Runner, Custom HTTP Runner allows you to execute an HTTP request using any method desired. (e.g., GET, HEAD, POST, PUT, any other arbitrary verb) The Custom HTTP Runner also allows you to specify a pre-encoded HTTP entity body, which is especially useful for POST or PUT requests.
If
FTP Runner
Playback Controller

Description
This component is the Swiss army knife of playback control. All incoming messages will either trigger an Action or, if Action is set to None, output an On/Off message. The following actions are supported:
- Stop.
- Restart.
- Reset (counters, schedulers, etc.).
The actions can be performed on either of the following two scopes:
- Parent Scenario.
- The whole Project.
Example Usage

Process Runner
{ArticleIndex}

Description
This Runner Component runs a Operating System Process (command) and output the exit value, any output (stdout) and any errors (errout).
- Parameters in the trigger message are made available to the script, unless configured not to.
Example usage

JIRA

Developer
Description
Creates a JIRA issue for all Web Page Runner failures after a completed test.
Updates
2011-12-01 Fixed the problems with the missing connection point and also the missing smack depencency.
Usage
- The JIRA component must be connected to the leftmost output terminal (resultTerminal) of the Web Page Runner component. The status message will change to Ready when you are connected.
- Next, specify the maximum number of captured failures you want in your JIRA issue by turning the knob.
- Then click on the Settings button and fill out the settings. Observe! The password is sent unencrypted over XML-RPC to the specified JIRA server. Use SSL if possible.
- Now we are ready to capture some failures. Keep an eye on the Failures captured counter to know how many failures has been captured.
- When the running test has been completed, an issue with all captured failures is created including the time, URL and generator properties used when the failure was captured.
Troubleshooting
If you get the status Issue failed when trying to create the JIRA issue, please check you settings. You could also try to run the loadUItest.bat script to a more specified error message.
Rate Adapter

Developer
Ole Lensmar, eviware
Description
This component will gradually increase and continously adapt generated load to the optimal TPS value, allowing you to
- run "self-adapting" tests over longer periods
- automatically find the optimal load vs TPS values for a target service
Read more about the component and its implementation at the Smartbear blog.
HTTP StatusCode Splitter

Developer
Ole Lensmar, eviware
Description
This Flow component dispatches incoming messages based on their "HttpStatus" property to a corresponding output. Connect it to the output of a WebRunner if you want to handle different status-codes separately, for example for:
- Creating separate statistics for different status codes; connect the corresponding outputs to a dedicated statistics component
- Asserting different status codes separately; connect the corresponding outputs to a dedicated assertion component
- etc
The configuration is a comma-separated string containing one item for each desired output and its corresponding status code ('?' is allows for wildcards). For example the configuration "200,3??,4??,404,500" would create five outputs, the first outputting all messages with 200, the second outputting all 3XX messages, the third outputing all 4XX message, the fourth just outputing 404 messages, and the last outputing 500 (Server Error) messages.
midiKontrol

Developer
Ole Lensmar, eviware
Description
This component lets you control your components and test execution from a MIDI Device. It listens to MIDI control change messages and lets you select which loadUI Component property (which physical button, slider or knob) that should be controlled. The end result is that you will be able to turn a button on your controller and loadUI will follow. You are also able to start or stop tests from your midi controller.
Read more about the component and its implementation at the Smartbear blog.
Script Runner
{ArticleIndex} 
Description
This Runner Component runs a Groovy script and output the result of the script. When running a distributed test, the script content is automatically distributed to all assigned Agents.
- Parameters in the trigger message are made available to the script, unless configured not to.
- If the result of the script is a Map, then each entry will be set in the output message. Otherwise, the result will be in the Result column.
Example scripts
FTP
The example script below downloads a file from an FTP server and outputs the size and hash of the downloaded file.
// ftp.groovy
@Grab(group='commons-net', module='commons-net', version='2.0')
import org.apache.commons.net.ftp.FTPClient
new FTPClient().with {
connect("download.acme-enterprises.com")
enterLocalPassiveMode()
login("anonymous", "anonymous")
changeWorkingDirectory("pub/foobar")
fileType = FTPClient.BINARY_FILE_TYPE
inFile = new File("c:/temp/install.exe")
inFile.withOutputStream { ostream -> retrieveFile "install.exe", ostream }
disconnect()
}
return [ "size":inFile.length(), "hash":Integer.toHexString( inFile.hashCode() ) ]
HTTP POST
The following example script sends a HTTP POST request:
@Grab(group='org.apache.httpcomponents', module='httpclient', version='4.1.1')
import org.apache.http.client.methods.HttpPost
import org.apache.http.message.BasicNameValuePair
import org.apache.http.impl.client.DefaultHttpClient
import org.apache.http.client.entity.UrlEncodedFormEntity
import org.apache.http.protocol.HTTP
post = new HttpPost("http://search.yahoo.com/search")
parameters = new ArrayList()
parameters.add(new BasicNameValuePair("p", "loadui"))
sendentity = new UrlEncodedFormEntity(parameters, HTTP.UTF_8)
post.setEntity(sendentity)
client = new DefaultHttpClient()
response = client.execute(post)
return ["responseBody":response.entity.content.text]
Geb (WebDriver)
@Grab(group='org.codehaus.geb', module='geb-core', version='latest.release')
@Grab(group='org.seleniumhq.selenium', module='selenium-htmlunit-driver', version='latest.release')
import geb.Browser
Browser.drive {
go "http://google.com/ncr"
}
Twitter Component

Developer
Henrik Olsson, eviware
Description
This Output component will tweet selected parts of received messages. It got a configurable rate limiter to prevent a flood of tweets and is useful for notifying testers if something abnormal occurs during a long-running test, preferably connected to the Output for failed messages of an Assertion component.
To just tweet certain messages, connect this component to the output of an If component.


