Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reportportal-client

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reportportal-client

ReportPortal client for node.js

  • 2.6.0-alpha.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#ReportPortal js client

Library used only for implementors of custom listeners for ReportPortal

Allready implemented listeners:

  • EMPTY

Installation

The latest stable version is available on npm:

npm install reportportal-client

Usage

Main classes are:

  • RPClient

Basic usage example:

var Service = require("reportportal-client");

function now() {
    return new Date().getTime();
}

var rpConfig = {
    endpoint: "http://your_reportportal_url",
    project: "project",
    token: "your_reportportal_token"
};

var rp = new Service(rpConfig);

var startLaunchRQ = {
    name: "JSLaunchName",
    description: "Some LaunchDescription",
    tags: ["tag1", "tag2"],
    start_time: now(),
    mode: null
};

var startLaunchResponse = rp.startLaunch(startLaunchRQ);

var launchId;

startLaunchResponse.then(function (response) {
    var startTestItemRQ = {
        name: "Suite1",
        description: "SuiteDescription",
        tags: ["suite_tag1", "suite_tag2"],
        start_time: now(),
        launch_id: response.id,
        type: "SUITE"
    };
    var startSuiteResponse = rp.startTestItem(null, startTestItemRQ);
    startSuiteResponse.then(function (data) {
        var finishTestItemRQ = {
            end_time: now(),
            status: status.PASSED
        };
        rp.finishTestItem(data.id, finishTestItemRQ).then(function (data) {
            var finishExecutionRQ = {
                end_time: now(),
                status: status.PASSED
            };

            startLaunchResponse.then(function (response) {
                console.log(response.id);
                rp.finishLaunch(response.id, finishExecutionRQ)
                    .then(function (data) {
                        console.log(data);
                    })
            }, function (err) {
                console.log(err);
            });
        });
    })
});

Licensed under the GPLv3 license (see the LICENSE.txt file).

FAQs

Package last updated on 03 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc