NodeJS SDK Integration
Deepcrawl Automate SDK NodeJS Client can be used to start builds on Lumar Protect, by adding it as a dependency into your NodeJS project.
Prerequisites
Configure npm for use with GitHub Packages by adding the following line to your ~/.npmrc
file:
@deepcrawl:registry=https://npm.pkg.github.com/
Installation
Add @deepcrawl/test-nodejs-sdk
as a dependency:
Using NPM:
npm install @deepcrawl/test-nodejs-sdk
Using Yarn:
yarn add @deepcrawl/test-nodejs-sdk
Usage
Creating the client
const testSDKClient = TestSDKClient.create();
Running a build
await testSDKClient.runBuild({
userKeyId: "Your API User Key ID", // Required
userKeySecret: "Your API User Key Secret", // Required
testSuiteId: "Your Test Suite ID", // Required
ciBuildId: "Your CI Build Id", // Optional (Default: undefined), used for filtering, should reflect the build ID in your CI/CD pipeline
isStartOnly: false, // Optional (Defaut: false), used for flagging if a build should only be started, without waiting for finalisation
});
tip
For more informations, please see: https://github.com/deepcrawl/deepcrawl-test/blob/develop/packages/test-nodejs-sdk/README.md.