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\SmartBear\LoadUI 2.6.0\script-components). LoadUI will then find the component automatically, without any need to restart the application.

Ramp Load Generator

RampLoad

Developer

Mikael Östberg, SmartBear Software - Sweden

Description

The Ramp Load generator simulates the behaviour of thread-based performance testing tools. It will trigger requests until a certain number of requests are running continously. Previously there has been no means to ramp this behaviour like the Ramp Sequence generator. This generator provides that additional support.

RampLoadData

The above figure shows the value of currently running requests of a simple web-runner which is the consequence of this generator. Make sure you have a firm understanding of what this means for your performance test by reading about the Fixed Load Generator and Essential Statistics. Important note: This generator must be connected in the same way as the Fixed Load Generator.

Download

 

Pick Random Link

pickRandom_mini

Developer

Henrik Olsson

Description

Picks a random link from a web page, which is passes on to subsequent components. This can be used to simulate users clicking on random links.

Example

The example below simulates the following:

  1. Users arrive randomly and start by visiting mysite.com.
  2. There's always 60% chance that a user will click a random link (otherwise, the user leaves the site).
  3. Users continue clicking a random link (based on at which page they are on the website) until they leave.

pickRandom_example

alt

 

Twitter Component

Twitter_large

Developer

Henrik Olsson, SmartBear Software

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 Condition component.

alt

 

Stepped Rate Generator

User Rating: / 2  |  Rate this article: PoorBest 

SteppedRate

Developer

Paulo Renato de Athaydes, SmartBear Software - Sweden

Description

A simple Generator which can create a step-increasing load as shown below:

SteppedRateChart

The following settings can be configured:

  • Start Rate: Initial load. The load is reset every time a test run is started.
  • Increment: By how much the load should increase at each interval.
  • Interval: How long the load should remain stable for.

alt

 

Geb Runner

User Rating: / 6  |  Rate this article: PoorBest 

gebRunner_large2

Developer

SmartBear Software

Description

Runs Geb scripts. Geb is a browser automation solution for Groovy that can be used for functional/web/acceptance testing.

Example Usage

gebRunner_large_smaller

alt

 

HTML Runner

User Rating: / 7  |  Rate this article: PoorBest 

htmlRunner_big

Developer

inkless

Description

Fetches a webpage (including images) and runs JavaScript. Derivative of Web Page Runner.

alt

 

If

User Rating: / 5  |  Rate this article: PoorBest 

if_big

Developer

Henrik Olsson, eviware

Description

This Flow component conditionally redirects messages based on their values. It will redirect messages to:

  • Its left output if the message conforms to the min and max restrictions set on a certain value.
  • Its right output if the above is not true.
alt

 

FTP Runner

FTPRunner_big

Developer

Henrik Olsson, eviware software

Description

This Runner downloads a file from an FTP server. User credentials can specified in the component's settings.

alt

 

Playback Controller

User Rating: / 4  |  Rate this article: PoorBest 

playbackController_fullSize

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

playbackController_example

alt

 

JIRA

User Rating: / 5  |  Rate this article: PoorBest 

jira

Developer

Erik R. Yverling

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

  1. 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.
  2. Next, specify the maximum number of captured failures you want in your JIRA issue by turning the knob.
  3. 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.
  4. Now we are ready to capture some failures. Keep an eye on the Failures captured counter to know how many failures has been captured.
  5. 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.

alt

 

Rate Adapter

User Rating: / 5  |  Rate this article: PoorBest 

RateAdapter

Developer
Ole Lensmar, eviware

Description

LoadUI 2.1.2 and earlier only!

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.

alt

 

HTTP StatusCode Splitter

httpstatuscodesplitter

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.

alt

 

midiKontrol

User Rating: / 2  |  Rate this article: PoorBest 

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.

alt

 

Script Runner

User Rating: / 11  |  Rate this article: PoorBest 

{ArticleIndex} GroovyRunnerScreenshot

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

User Rating: / 4  |  Rate this article: PoorBest 

Twitter_large

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.

alt