top of page

Getting Started With TestChimp

Quick Start


Step 1 - Sign Up


Sign up at https://prod.testchimp.io/signup and create a project. Once created, go to Profile (Top Right) -> Project Settings -> Select the project, and copy the project id and the session recording api key values (to use in next step).


Step 2 - Install SDK


Run:

npm install testchimp-js@latest

Step 3 - Configure SDK


Add the following to your index.js (or equivalent)


import { TestChimpSDK } from "testchimp-js";

document.addEventListener('DOMContentLoaded', function() {
    TestChimpSDK.startRecording({
        projectId: "[PROJECT ID]",
        sessionRecordingApiKey: "[SESSION RECORDING API KEY]",
        untracedUriRegexListToTrack: ".*\\.your-domain\\.com.*$",
        environment:"QA"
    });
});

For a more detailed configuration guide (such as sampling probability, enabling recording conditionally on different environments etc.), refer here.


Step 4 - SetCurrentUserId (Recommended)


Call TestChimpSDK.setCurrentUserId(“<user_id>”) anytime during the session to record a readable user identifier (such as email), which will enable finding sessions by those user ids in TestChimp platform.


Step 5 - EndTrackedSession (Recommended)


Call TestChimpSDK.endTrackedSession() when the user logs out.


By default, the tracked session is cleared when the browser is closed. If you want to end the session when the user logs out from your application, call TestChimpSDK.endTrackedSession() when the user logs out.


 

Enabling Full Stack Capture



The above steps enable capturing frontend API interactions in a session (along with the UI), which can be used to create automation tests covering the API layer.


To enable full stack recording (and tests that cover the entire stack), do the following:

  1. Enable OpenTelemetry in your stack. Guide

  2. Add the relevant TestChimp backend SDK (and configure) in your backend services

  3. Change the untracedUriRegexListToTrack config key to tracedUriRegexListToTrack


Refer here for comprehensive guide on enabling OpenTelemetry and exporting to TestChimp.


Currently the following technologies are supported:



Next: Create Full Stack Tests from the captured sessions via TestChimp Test Studio.

Contact

Quick Links

Follow

8A Sinfield Street, Ermington 2115.

NSW. Australia.

Sales:
sales@testchimp.io

General Inquiries:
+61 434 336 795

Customer Care:
contact@testchimp.io

Sign up to get the latest news on our product.

Thanks for subscribing!

© 2024 Aware Labs Pty Ltd.

bottom of page