Node.js SDK with CJS
How to add nodejs sdk into your application
1. Installing node-SDK package
2. Initializing sdk
2.1 Adding SDK in code and Initialize
Initalize hypertest node sdk.
This needs to happen as early in your app as possible. Make sure no require/import call is made before these lines
2.2 Mark app as ready
Call the markAppAsReady method when the app is ready to receive traffic, it indicates that tests can be started (This is important ONLY FOR REPLAY mode).
2.3 Enable Test Creation
To enable hypertest, set the HT_MODE
env variable to RECORD
and start your app
OR while booting
2.4 Set env if opentelemetry is already being used.
3. Verifying traffic is captured
Start sending http requests on your app running with hypertest sdk.
You should start seeing requests under All requests section on the dashboard
Last updated