npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

testcollab-sdk

v2.1.1-SNAPSHOT.202412041305

Published

OpenAPI client for testcollab-sdk

Downloads

106

Readme

testcollab-sdk

This SDK allows Test Collab clients to call API easily, build custom workflows, reports, and integrations with CI/CD pipelines and more.

Installation

To install the library, use npm:

npm install testcollab-sdk

Usage Example

You'll need to authenticate the client before you can use any methods.

There are 2 possible authentication methods:

a) API key: To generate API key: login to your TestCollab account and go to 'My Profile Settings' and switch to API Token tab. Click on "Generate new API token".

b) Access token: This requires logging into API programmatically with this SDK using login method which will provide a auth token.

For the purpose of this documentation, we'll stick to the API key based authorization.

Authentication

API Key method:

import { Configuration, TestPlansApi, TestPlanTestCasesApi, TestPlansAssignmentApi } from 'testcollab-sdk';

let apiKey = '123456-abc';

let config = new Configuration({
        fetchApi: (url, options) => {
            // append the token to the url if no query string is present
            if (!url.includes('?')) {
                url = url + '?token=' + apiKey;
            }
            else {
                url = url + '&token=' + apiKey;
            }
            return fetch(url, options)
        },
    
    })
const testPlansApi = new TestPlansApi(config);

Test Plan Add

        const response = await testPlansApi.addTestPlan({
            testPlanPayload: {
                project: 1234,
                title: 'From SDK',
                description: 'This is a test plan is created using the Node.js SDK',
                status: 1,
                priority: 1,
                testPlanFolder: null,
                customFields: []

            }
        });

        // get the test plan id
        const testPlanId = response.id;
        console.log('Test Plan ID: ' + testPlanId)

Add New Test Cases to Test Plan

        const testPlanCases = new TestPlanTestCasesApi(config);

        const res2 = await testPlanCases.bulkAddTestPlanTestCases({
            testPlanTestCaseBulkAddPayload:
            {
                testplan: testPlanId,
                "testCaseCollection": {
                    testCases: [1, 2, 3],
                    selector: []
                }
            }
        });
        //console.log(res2)

Assign test cases to a tester in test plan

        const testPlanAssignment = new TestPlansAssignmentApi(config);
        const res3 = await testPlanAssignment.assignTestPlan({
            project: 1234,
            testplan: testPlanId,
            testPlanAssignmentPayload: {
                "executor": "me",
                "assignmentCriteria": "testCase",
                "assignmentMethod": "automatic",
                "assignment": {
                    "user": [2],
                    "testCases": {
                        "testCases": [],
                        "selector": []
                    },
                    "configuration": null
                },
                "project": 1234,
                "testplan": testPlanId
            }
        })
        console.log(res3)

API Documentation

Detailed API documentation is available at Test Collab OpenAPI specs.

Author

Test Collab Software LLC

Contact Information

For support, please contact us at [email protected].