3.1.0 • Published 4 years ago

reportizer v3.1.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
4 years ago

Reportizer

Reportizer is a TS/JS library for interacting with the Report Portal API. Works best with cucumber-js.

Contents

Installation

Use the package manager npm to install reportizer.

npm install --save-dev reportizer

Usage

Please note, before using this package, you should set up an instance of Report Portal for yourself. A public instance is offered by the Report Portal team for demonstration purposes on their site.

Create item

const reportPortalClient = new ReportPortalClient(baseUrl, launchId, authToken);

const itemId = await reportPortalClient.createItem(
    'The one where employees get paid.',
    'Tests the payment process for employees works.',
    'SCENARIO'
);

Valid item types can be seen in the ItemType type in this repo.

Finish item

Finishing an item automatically maps a cucumber status to a Report Portal status. Inspect the ReportPortalClient class in this repo if you want to know how the statuses are mapped.

await reportPortalClient.finishItem(
    itemId,
    Status.PASSED
);

Alternatively, as part of a cucumber After hook:

After(async function({ result }) {
    await reportPortalClient.finishItem(
        itemId,
        result.status
    );
});

Add logs to item

await reportPortalClient.addLogToItem(
    itemId,
    'info',
    'This is a log message!'
);

Valid log levels can be seen in the LogLevel type in this repo.

Contributing

See the contributing guidelines.

License

Apache-2.0

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago