ThousandEyes Recorder

The ThousandEyes Recorder provides an integrated development environment (IDE) for creating, validating, and enhancing transaction test scripts based on your browser actions. Simply start recording, and enter a target URL at the prompt. A pop-up Chromium browser loads and stays up until you click Stop in the Recorder. After recording, when you click Play, the pop-up Chromium browser reappears, replays the interaction shown in the Recorder script window, and then quits.

Use the ThousandEyes Recorder if you need to create ThousandEyes transaction tests. The Recorder includes ThousandEyes-specific scripting elements that you’d otherwise have to enter manually. For other types of tests, even other Browser Synthetics or web-based tests, you don’t need the Recorder. The output of this recording action is a .js file - a script that is the body of what will be executed in the resulting transaction test.

Recorder Integrations

The Recorder integrates with the ThousandEyes online platform as follows:

  • When you start the Recorder, it logs you into the ThousandEyes platform, either using your SSO credentials or using a standard ThousandEyes login prompt.

  • You can switch Account Groups within the Recorder in the upper right just as you can on the ThousandEyes platform.

  • You can click Export to ThousandEyes to upload new scripts from the Recorder to the ThousandEyes platform, and create a new test at the same time.

Installing the Recorder IDE

The ThousandEyes Recorder runs locally on your own laptop or workstation, and is downloaded directly from the ThousandEyes platform.

Downloading the Recorder

To download the ThousandEyes Recorder from the ThousandEyes platform:

  1. Log in to the Thousandeyes platform, and make sure you have permissions to create a new test. Switch account groups if needed.

  2. Go to Cloud & Enterprise Agents > Test Settings and click Add New Test.

  3. Choose Web as the layer with a test type of Transaction.

    After selecting the test type, you’ll see a link to download the ThousandEyes Recorder.

  4. Click Download Recorder and then choose Windows, macOS, or Linux.

  5. Follow the normal installation process for your computer's operating system. For example, the macOS version of the ThousandEyes Recorder downloads as a disk image (.dmg) file. Double-click the downloaded file. A macOS installation dialog opens. In that dialog, drag the application icon into your Applications folder.

  6. Once installed, the Recorder auto-updates every time you start it up.

Logging In to the Recorder

You must be logged in with your ThousandEyes user account before you can use the ThousandEyes Recorder.

  • Direct login: If your organization is not using Single Sign-On (SSO), the Recorder displays a standard ThousandEyes login page. Enter your ThousandEyes username and password to continue.

  • Using SSO: If your organization uses SSO, and you’re already signed in through your SSO portal, the Recorder should automatically log you in.

If you can’t log in to the Recorder:

  • Check that you can log in to the ThousandEyes platform first.

  • Verify that your SSO credentials are the same as your ThousandEyes user credentials.

Using the Recorder for the First Time

The first time you run the ThousandEyes Recorder, you’ll be prompted to log in to your ThousandEyes user account. After you log in, the ThousandEyes Recorder verifies that your ThousandEyes user has the necessary permissions in your login account group to work with transaction tests.

You’ll also need to generate an OAuth Bearer Token, which is under Account Settings > Users and Roles on the Profile tab. Scroll down to User API Tokens. For a newly created organization, a user with permission to modify users and roles must click Create in order to generate an OAuth Bearer Token. If you can’t see this screen, contact your organization administrator for assistance. See Profile Tab for more information.

The following permissions are required:

  • Create web transaction tests

  • Edit tests

If your ThousandEyes user does not have the required permissions in your login account group, you can switch to another account group using the dropdown selector in the top-right of the window.

For more information on roles and permissions, see the Roles and Permission Table.

Recorder IDE Interface

The Recorder window opens with some pre-created template code, apart from the browser actions that you record. Don’t delete this code. Your browser actions will appear in the window below the template script, but only after you Stop recording.

1. Main Menu: Open a saved script from a local file, start a new script (optionally from a template), or save a script locally.

2. Recording and Playback Menu: Start recording a new transaction in the browser, or play back the current transaction script.

3. Command Palette: Insert code for sleep, markers, screenshots, and credentials.

4. Test Settings Menu: Configure all Transaction Test settings straight from the Recorder the same way that you would on the ThousandEyes platform. The Recorder has the same tabs for both Basic and Advanced Settings as the platform. Basic transaction test settings include specifying the Test Name, Target URL, Test Timeout, Agent (s), Window Size. Advanced settings include Authentication (Basic and NTLM), Transaction Timeout, and more.

5. User Menu: Switch account groups or log out.

6. Export to ThousandEyes: Export the current test, including test settings, transaction script, and credentials, to the ThousandEyes platform.

7. Script Editor: Transaction tests execute custom scripts written in JavaScript, to emulate user interaction with web page elements. You can use the script editor to adjust the script directly. The IDE supports syntax highlighting and autosuggest/autocompletion.

8. Screenshots: This panel displays screenshots captured during playback. To enlarge a screenshot, click its thumbnail.

9. Console: Console output is shown here, including calls to console.log(...), and errors (if any) with stack traces.

Code Hints in the Recorder IDE

The ThousandEyes Recorder includes intelligent code completion. For example, type a method name like driver. or upload. to see additional information. You can also hover over a keyword like By. to see information about it.

Recording a Transaction

To record a transaction, click the Record button in the Recording and Playback menu.

The ThousandEyes Recorder prompts you for the initial target URL, and allows you to select the browser's window size. (Note that this URL won’t appear explicitly within the script itself.)

When you click Start Recording, a Chromium browser window opens. As you interact with the pages in the browser, such as clicking links or typing text into input fields, the IDE records your actions to automatically generate the JavaScript code for the transaction script.

After you have completed the user journey in the Chromium browser, switch back to the Recorder IDE and click Stop.

The script in the script editor updates to reflect the recorded transaction.

If the Chromium browser stops in the middle of recording, try restarting the Recorder and record a simple one-page transaction such as loading the Google home page. Then Stop recording. After that, try your transaction again.

Saving a Transaction Script

To save a transaction script recorded using the ThousandEyes Recorder, click the ellipsis button in the upper left of the ThousandEyes Recorder window, and choose Save Script.

Playing Back a Transaction

To replay a script in the Recorder window, click the Play button. A Chromium browser appears and replays the steps in the script as they would be performed by a user. When the script is finished, the browser quits automatically.

Any captured screenshots are shown in the Screenshots panel, and any errors are shown in the Console. While the transaction is playing, you can Pause, Resume, or Stop the playback.

Creating a Test from the Recorder

The ThousandEyes Recorder generates the scripting portion of a transaction test. After generating a script, you can use the Export to ThousandEyes button in the upper right corner of the Recorder window to create a transaction test on the ThousandEyes Platform directly from the Recorder.

Debugging Your Transaction Script

What if your transaction test script doesn’t do what you intended? Or, it fails to complete?

  • Use console.log or error capture in your script

  • Use your browser’s Developer Tools to run the script

If the script runs in the Recorder, but the transaction test itself is failing on the ThousandEyes platform, look at the transaction test View window and see if there are any error messages displayed in the Table tab.

See Upgrading to BrowserBot 2.6+ (Chromium 97) for more information on recent BrowserBot upgrades that might impact your existing transaction scripts.

Test Settings and Exporting

To change the transaction test's basic and advanced settings, use the Cloud & Enterprise Agents > Test Settings menu.

While some settings do not apply within the ThousandEyes Recorder, you can still configure them on the Recorder, then export the test to the ThousandEyes platform. The following settings apply only when exported to the ThousandEyes platform:

  • Test Name

  • Interval

  • Agents

  • Alerts

For more information on test settings, see Working with Test Settings.

Basic ConfigurationAdvanced Settings

After you have recorded a transaction, played it back to validate it works, and configured your test settings, you can export the test to the ThousandEyes platform by clicking Export to ThousandEyes. After the test has been exported, you can click View Test to open the test in the ThousandEyes platform.

Note that you can export a script plus a full test configuration from the Recorder to the ThousandEyes platform, which creates a new transaction test all in one operation. From the platform, you can create a test configuration, but you must paste or import a previously saved transaction script file before saving the test.

if you’re using a client-side certificate, you’ll have to add that to the test configuration on the ThousandEyes platform after you export the test. For more information, see the documentation on TLS settings.

Credentials

Your transaction scripts might need to include secure user credentials, for example with a transaction test that connects to an organization’s SharePoint directory to download a test file. You can do either of the following:

  • Create a new credential as you record an interaction and upload it along with the test configuration.

  • Use an existing credential from your ThousandEyes credentials repository. See Working With Secure Credentials for more information on managing credentials.

The ThousandEyes Recorder syncs with credentials in the credentials repository, allowing you to reference stored credentials in your script without knowing their secret value. To use a credential from the credentials repository in a transaction script, first click the Credentials button (the key icon) in the Command palette and then click the credential you would like to use.

When you record a transaction locally using the ThousandEyes Recorder, any inputs into password-type fields are automatically converted to a local credential.

Syncing Local Credentials with Credentials Repository

To sync local credentials with your online credentials repository: click the key icon, click + Add Local Credential. Give it a name, supply a password, and click Create Local Credential. Then, in the same dialog, click the Synchronize icon next to the credential you just created, in order to copy it to the repository.

Refresh the browser page for the ThousandEyes platform to see the new credential displayed in the credentials repository.

Running Recorder-Generated Scripts on ThousandEyes Agents

Under some conditions, a transaction script that is created using the ThousandEyes Recorder might not work correctly when run from ThousandEyes cloud or enterprise agents. Reasons include the following:

  1. Some websites act differently when accessed from different locations, for example:

    • Internal organization traffic is handled differently than external traffic.

    • The site may have location-dependent code, such that the page presented is slightly different for different regions.

  2. Some websites use dynamic page element names that change each time the page is loaded. This can prevent the page element references used by the ThousandEyes Recorder IDE from working reliably. The only reliable way to detect this behavior is to reload the site multiple times, preferably from multiple locations, and use browser developer tools to compare the element IDs. By itself, the Recorder is unlikely to detect this issue.

  3. Some websites use client-side scripts to make it easier for you to interact with the active pages, and also easier for the site's maintainers to maintain. Client-side scripts run in your browser rather than on the website server side. Client-side scripts can make it challenging to detect the correct page element to interact with. Sometimes the transaction script must execute custom JavaScript code in order to work with these web pages.

So, while the ThousandEyes Recorder IDE makes a great starting place, it may not result in a script that works without hand-tweaking.

For example, a common alteration is having to change how a given page element is referenced. When available, the Recorder uses element IDs and CSS references, as these are often the simplest to understand when looking at a script. However, there are several other ways to reference most page elements, including JS Path and XPath references. This 40-minute tutorial video How to Become Genius in XPath in Selenium is a good way to learn more about XPath.

If a website behaves differently for the cloud and enterprise agents, it may be necessary to find the location where the script is failing, correct what has failed, rerun the script to find the next failure point, and repeat until the script is working as expected.

Dual Chromium Option in Recorder IDE

For users working with dual Chromium version, you can toggle between Default and Newer options using a drop-down in the Recorder IDE. These are the same options that appear in the test settings on the ThousandEyes platform. See Dual Chromium Option for more information.

Chromium Option in Recorder Test Settings

You can choose a Chromium version in the Recorder IDE test configuration, as shown below.

Chromium Option in Recorder Playback

The Playback option in the Recorder IDE allows you to test your script playback using each version, as shown below.

Recorder IDE Support Policy

ThousandEyes provides technical support and software updates for issues found in versions of the Recorder IDE issued within the last six months. To obtain fixes for the Recorder IDE, customers must upgrade to the most recent version of the Recorder IDE software. The Recorder IDE normally performs software updates automatically when ThousandEyes makes an update available.

Last updated