Skip to main content

Sharing Tests

Below are various ways to share, embed or link to a test or build on TestingBot.

To share, view or link to a test, it is important to know its sessionId.

Selenium and Appium will return a sessionId when a client starts a new session.

This sesssionId is a unique identifier and changes per test. It is stored as a member variable of the instantiated Driver object. Most of the time it is named sessionId or session_id, depending on the client you are using.

You can easily share a single test result with someone in a safe way, without the other person needing an account.

To share a test result, you'll need to create the following url:
https://testingbot.com/tests/sessionId?auth=authentication-hash

The authentication hash is created with md5 in the following format:

require 'digest'

session_id = "SESSION_ID"
puts Digest::MD5.hexdigest("TESTINGBOT_KEY:TESTINGBOT_SECRET:#{session_id}")
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

String sessionId = "SESSION_ID";
byte[] digest = MessageDigest.getInstance("MD5").digest(("TESTINGBOT_KEY:TESTINGBOT_SECRET:" + sessionId).getBytes(StandardCharsets.UTF_8));
// %032x keeps leading zeros: the hash must always be 32 hex characters
String hash = String.format("%032x", new BigInteger(1, digest));
System.out.println(hash);
$session_id = "SESSION_ID";
echo md5("TESTINGBOT_KEY:TESTINGBOT_SECRET:$session_id");
import hashlib

session_id = "SESSION_ID"
print(hashlib.md5(f"TESTINGBOT_KEY:TESTINGBOT_SECRET:{session_id}".encode("utf-8")).hexdigest())
const crypto = require('crypto');

const sessionId = 'SESSION_ID';
console.log(crypto.createHash('md5').update(`TESTINGBOT_KEY:TESTINGBOT_SECRET:${sessionId}`).digest('hex'));
using System.Security.Cryptography;
using System.Text;

var sessionId = "SESSION_ID";
var hash = Convert.ToHexString(MD5.HashData(Encoding.UTF8.GetBytes($"TESTINGBOT_KEY:TESTINGBOT_SECRET:{sessionId}"))).ToLowerInvariant();
Console.WriteLine(hash);

An example link would then be:
https://testingbot.com/tests/9jf392fj3j2f3ojid8?auth=230i439uf3fojf

Link to a Video

You can easily share a video of a specific test, please see the example below:

To build the URL with the correct authentication hash, the URL should be structured like this:
https://testingbot.com/tests/sessionId.mp4?auth=authentication-hash

The authentication hash is created with MD5 in the following format:

require 'digest'

session_id = "SESSION_ID"
puts Digest::MD5.hexdigest("TESTINGBOT_KEY:TESTINGBOT_SECRET:#{session_id}")
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

String sessionId = "SESSION_ID";
byte[] digest = MessageDigest.getInstance("MD5").digest(("TESTINGBOT_KEY:TESTINGBOT_SECRET:" + sessionId).getBytes(StandardCharsets.UTF_8));
// %032x keeps leading zeros: the hash must always be 32 hex characters
String hash = String.format("%032x", new BigInteger(1, digest));
System.out.println(hash);
$session_id = "SESSION_ID";
echo md5("TESTINGBOT_KEY:TESTINGBOT_SECRET:$session_id");
import hashlib

session_id = "SESSION_ID"
print(hashlib.md5(f"TESTINGBOT_KEY:TESTINGBOT_SECRET:{session_id}".encode("utf-8")).hexdigest())
const crypto = require('crypto');

const sessionId = 'SESSION_ID';
console.log(crypto.createHash('md5').update(`TESTINGBOT_KEY:TESTINGBOT_SECRET:${sessionId}`).digest('hex'));
using System.Security.Cryptography;
using System.Text;

var sessionId = "SESSION_ID";
var hash = Convert.ToHexString(MD5.HashData(Encoding.UTF8.GetBytes($"TESTINGBOT_KEY:TESTINGBOT_SECRET:{sessionId}"))).ToLowerInvariant();
Console.WriteLine(hash);

An example link would then be:
https://testingbot.com/tests/9jf392fj3j2f3ojid8.mp4?auth=230i439uf3fojf

Link to a Build

With TestingBot, it is possible to group several tests under one build identifier.
In our member area, you can then see all the tests grouped by builds.

The build overview at https://testingbot.com/builds/YOUR_TESTINGBOT_KEY is only available for accounts whose test results are public. For a private account, share a link to a single build instead.

To link directly to a build, please see this example:
https://testingbot.com/builds/YOUR_TESTINGBOT_KEY/build-identifier?auth=authentication-hash

To generate the authentication-hash, you must concatenate user key, user secret and build-identifier, then generate the MD5 hash:

require 'digest'

build_identifier = "BUILD_IDENTIFIER"
puts Digest::MD5.hexdigest("TESTINGBOT_KEY:TESTINGBOT_SECRET:#{build_identifier}")
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

String buildIdentifier = "BUILD_IDENTIFIER";
byte[] digest = MessageDigest.getInstance("MD5").digest(("TESTINGBOT_KEY:TESTINGBOT_SECRET:" + buildIdentifier).getBytes(StandardCharsets.UTF_8));
// %032x keeps leading zeros: the hash must always be 32 hex characters
String hash = String.format("%032x", new BigInteger(1, digest));
System.out.println(hash);
$build_identifier = "BUILD_IDENTIFIER";
echo md5("TESTINGBOT_KEY:TESTINGBOT_SECRET:$build_identifier");
import hashlib

build_identifier = "BUILD_IDENTIFIER"
print(hashlib.md5(f"TESTINGBOT_KEY:TESTINGBOT_SECRET:{build_identifier}".encode("utf-8")).hexdigest())
const crypto = require('crypto');

const buildIdentifier = 'BUILD_IDENTIFIER';
console.log(crypto.createHash('md5').update(`TESTINGBOT_KEY:TESTINGBOT_SECRET:${buildIdentifier}`).digest('hex'));
using System.Security.Cryptography;
using System.Text;

var buildIdentifier = "BUILD_IDENTIFIER";
var hash = Convert.ToHexString(MD5.HashData(Encoding.UTF8.GetBytes($"TESTINGBOT_KEY:TESTINGBOT_SECRET:{buildIdentifier}"))).ToLowerInvariant();
Console.WriteLine(hash);

The build-identifier is the custom string you can send as an option to group several tests.

Embed Test Info

You can embed a test page in any CI detail page, test report or custom website. Please see the example below.
You add a SCRIPT tag in your page which links to the test. Replace sessionId with the correct sessionId of the test.

<script src="https://testingbot.com/job-embed/sessionId.js?auth=AUTH-TOKEN"></script>

To generate the authentication-token, you must concatenate user key, user secret and sessionId, then generate the MD5 hash:

require 'digest'

session_id = "SESSION_ID"
puts Digest::MD5.hexdigest("TESTINGBOT_KEY:TESTINGBOT_SECRET:#{session_id}")
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

String sessionId = "SESSION_ID";
byte[] digest = MessageDigest.getInstance("MD5").digest(("TESTINGBOT_KEY:TESTINGBOT_SECRET:" + sessionId).getBytes(StandardCharsets.UTF_8));
// %032x keeps leading zeros: the hash must always be 32 hex characters
String hash = String.format("%032x", new BigInteger(1, digest));
System.out.println(hash);
$session_id = "SESSION_ID";
echo md5("TESTINGBOT_KEY:TESTINGBOT_SECRET:$session_id");
import hashlib

session_id = "SESSION_ID"
print(hashlib.md5(f"TESTINGBOT_KEY:TESTINGBOT_SECRET:{session_id}".encode("utf-8")).hexdigest())
const crypto = require('crypto');

const sessionId = 'SESSION_ID';
console.log(crypto.createHash('md5').update(`TESTINGBOT_KEY:TESTINGBOT_SECRET:${sessionId}`).digest('hex'));
using System.Security.Cryptography;
using System.Text;

var sessionId = "SESSION_ID";
var hash = Convert.ToHexString(MD5.HashData(Encoding.UTF8.GetBytes($"TESTINGBOT_KEY:TESTINGBOT_SECRET:{sessionId}"))).ToLowerInvariant();
Console.WriteLine(hash);

Embed Video Info

Next to embedding test info pages, you can also embed the video of the test.
This might be useful to include in test reports or on CI result pages.

<script src="https://testingbot.com/video-embed/sessionId.js?auth=AUTH-TOKEN"></script>

To generate the authentication-token, you must concatenate user key, user secret and sessionId, then generate the MD5 hash:

require 'digest'

session_id = "SESSION_ID"
puts Digest::MD5.hexdigest("TESTINGBOT_KEY:TESTINGBOT_SECRET:#{session_id}")
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

String sessionId = "SESSION_ID";
byte[] digest = MessageDigest.getInstance("MD5").digest(("TESTINGBOT_KEY:TESTINGBOT_SECRET:" + sessionId).getBytes(StandardCharsets.UTF_8));
// %032x keeps leading zeros: the hash must always be 32 hex characters
String hash = String.format("%032x", new BigInteger(1, digest));
System.out.println(hash);
$session_id = "SESSION_ID";
echo md5("TESTINGBOT_KEY:TESTINGBOT_SECRET:$session_id");
import hashlib

session_id = "SESSION_ID"
print(hashlib.md5(f"TESTINGBOT_KEY:TESTINGBOT_SECRET:{session_id}".encode("utf-8")).hexdigest())
const crypto = require('crypto');

const sessionId = 'SESSION_ID';
console.log(crypto.createHash('md5').update(`TESTINGBOT_KEY:TESTINGBOT_SECRET:${sessionId}`).digest('hex'));
using System.Security.Cryptography;
using System.Text;

var sessionId = "SESSION_ID";
var hash = Convert.ToHexString(MD5.HashData(Encoding.UTF8.GetBytes($"TESTINGBOT_KEY:TESTINGBOT_SECRET:{sessionId}"))).ToLowerInvariant();
Console.WriteLine(hash);

Share a Live Session

While a Live session is running, you can let other people watch it in real time, for example to show a colleague a bug while you reproduce it. Viewers do not need a TestingBot account. They can only watch: they cannot click, type or otherwise control the session.

  1. In the Live session toolbar, click Share.
  2. Copy the View-only link, or enter up to 5 email addresses (comma separated) and an optional message, then click Share. The link is added to the email automatically.

The link looks like https://testingbot.com/live/id?t=token. The token is random and is not derived from your account or your API key. Opening the Share panel again during the same session shows the same link, as long as that link is still active. After you revoke it, or after it expires, the panel creates a new link with a new token.

When the link stops working

  • When you click Revoke this link in the Share panel. New viewers can no longer open it.
  • When the Live session ends.
  • Four hours after the link was created, even if the session is still running.

An invalid, revoked or expired link shows a "not found" page.

Which sessions can be shared

The Share button only appears on sessions that support a view-only stream:

  • Desktop browsers, except on Windows 8.1 and older and on macOS Big Sur and older
  • Real iOS and Android devices
  • iOS simulators running iOS 18 or newer

Android emulators, older iOS simulators and smart TV sessions cannot be shared this way. To share a session after it has finished, use a link to the test or its video instead.

Was this page helpful?
Last updated