What is XLT?

XLT is a tool that lets you easily develop and run both automated regression and load tests for web applications. Nearly every software providing access via HTTP/HTML can be tested. Besides pure web testing, XLT offers SQL tests, RCP-based application tests, or any other test meant to run on platforms supporting Java.

Web test automation with XLT can be done using the UI based record and replay tool Script Developer or you can use the extensive XLT framework to code your tests and run them as part of your build process.

XLT Script Developer

Script Developer Script Developer UI

Firefox 57 and higher no longer support XUL/XPCOM-based browser extensions (aka legacy extensions); these have been replaced with extensions built upon the WebExtension API. As a consequence, Script Developer cannot be installed and won’t work in Firefox 57 and above. Therefore Script Developer is discontinued. Exporting the XML script test cases to Java-based script test cases is the designated migration path. Please see the how-to section for a migration guide.

Script Developer is a Firefox Add-on

It’s convenient graphical user interface for scripting and running test cases and test suites.

Script Developer is a record and replay tool

You simply use the application you want to test while your actions are being recorded. During recording, you can add commands to perform validations on the page. Any recorded value can later be extracted out of the script into a test data file to separate test data from script code.

Script Developer creates script test cases

XLT Script Developer creates script test cases. These are based on a simple syntax and a reduced set of operations, which makes them a perfect fit for non-programmers. Besides Script Developer, no other tool is necessary to create, edit, and manage basic script test cases.

For the programming of more complex test scenarios or validations serving your individual purposes, test cases can be exported to Java code and extended in an IDE like Eclipse.

Installation

After downloading the XLT archive unzip it to a file system location of your choice. The root directory is part of the archive, so you don’t need to create it separately. In all examples below this directory is referred to as <xlt>

Make sure the executable directory of your Java installation is listed in your PATH environment variable so that the XLT start scripts can find the JVM runtime.

To install the XLT Script Developer Firefox extension, you need to:

  • Start Firefox.
  • Click File > Open File….
  • Navigate to the <xlt>/tools directory and select the .xpi file. The Add-on installation dialog appears.
  • Click Install to finish.

If the File Menu is not visible, you can also install the XLT Script Developer like this:

  • Start Firefox.
  • Open the Menu (The three horizontal bars on the upper right-hand side).
  • Click on Add-Ons.
  • Choose Extensions.
  • Click the gear symbol next to the Search bar.
  • click on Install Add-On from File.
  • Navigate to the <XLT>/tools directory and select the .xpi file. The Add-on installation dialog appears.
  • Click Install to finish.

Alternatively, you can drag the .xpi file onto the Firefox window.

Run the Demo Application

XLT ships with a real-world demo web application (Posters) as the system under test. It can be found in the directory <XLT>/samples.

Posters is a shop software written in Java. Being small and easy to deploy, it is well suited to demonstrate testing with XLT.

To start the demo application open a terminal (or command prompt window) and type the following command sequence:

Unix-based systems:

cd <XLT>/samples/app-server/bin
./start.sh

Windows:

cd <XLT>/samples/app-server/bin
start.cmd

Windows users have to use the appropriate .cmd file located in the same directory by entering start.cmd into the command prompt.

This starts an application server containing the Posters application. To access it, open a browser with this URL: http://localhost:8080/posters/.

Getting Started with Script Developer

Follow the steps below to create a script test suite for the Posters shop, record a first test case and get it running in your browser.

  1. Start Script Developer
    • Click ‘Tools | XLT Script Developer’ from Firefox menu

Start Script Developer

  1. Create Script Test Suite
    • Confirm notice ‘There is currently no test suite directory configured.’ with OK
    • Select an existing folder or create a new folder where the newly created test suite will be located and confirm with ‘Open’

Create Test Suite

  1. Create New Test Case
    • Right-click to the project view section on the left hand side of the Script Developer window
    • Select ‘New… | Test Case’ from context menu. ‘XLT – Edit Test Case Details’ dialog appears

Create New Test Case

  1. Provide Test Case Details
    • Enter a name and a base URL (http://localhost:8080/posters/) for the test case, optionally provide a description
    • Confirm with OK

Test Case Details

  1. Start Recording
    • Open a new tab in Firefox and load the first page you want to record on
    • Click ‘Record’ button in the XLT Script Devloper or press Alt+F9 to start recording user interactions and validations on the page
    • To record user interactions just perform them in the open browser tab, e.g. click links, open dropdown boxes, fill and submit forms etc.

Start Recording

  1. Add Validation Steps
    • Because XLT Script Developer is all about testing you should definitly add checks to validate that the expected page elements are present at the correct positions, headlines and page titles are correct and so on. We call them validation steps or assertions
    • You can add validation steps at any time during recording a test case script by using the browsers context menu
    • Right-click on a page element and select one of the available assert… or waitFor… commands from the context menu ‘XLT Script Developer’

Add Validation

  1. Stop Recording
    • When you finished recording the desired click stream and validation steps stop recording by clicking ‘Stop’ button or press Alt+F8

Stop Recording

  1. Replay Test Case
    • Save your recorded script by clicking ‘Save’ button or press Ctrl+S
    • Optionally adjust the replay speed (Slow to Fast) by moving the slider in the recorder section
    • You can now play back your recorded script by clicking the ‘Replay’ button or pressing Alt+F5
    • See the magic happen in your browser!

Replay Test Case

  1. Edit Command
    • To edit a command in the test case script double-click on it. The ‘XLT – Edit Command’ window appears
    • Edit the desired fields, e.g. adjust the target locator or add a comment
    • If the related page is still open in the browser you can click ‘Evaluate’ to see if the command works as expected
    • Click OK to confirm the changes and close the dialog

Edit Command

  1. Complete Your Test Suite
    • Add more test cases as described above to complete your test suite
    • See User Manual for more information on settings and features like reusable modules, test data management, batch test execution, and much more.

Do More With XLT Framework

A script test suite created with XLT Script Developer is a perfect starting point for all the other great things you can do with the XLT Framework.

After importing the test suite into a Java IDE like Eclipse it’s a waltz to do cross-browser testing or integrate the tests into a continuous integration process. Running the same test suite as a load and performance test or data-driven test is also possible. You can even export the test cases to Java code to add more advanced functionality like handling conditions, execution branches and random factors. For this you can choose from multiple APIs like WebDriver or HtmlUnit – which is great if you’re already familiar with one of those.

Do the next step and get started with the XLT Framework after importing the test suite into Eclipse.