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

cypress-awskinesis-reporter

v2.0.0

Published

a Cypress / Mocha test reporter for uploading results to an AWS Kinesis Firehose endpoint

Downloads

4

Readme

cypress-awskinesis-reporter

a Mocha / Cypress test reporter module for uploading results to AWS Kinesis Firehose

Install

from your Cypress project, run the following command

$ npm install cypress-awskinesis-reporter --save-dev

Usage

Configuration

Add the reporter to your cypress.json

Ex: using config file based, AWS temporary IAM credentials

"reporter": "cypress-awskinesis-reporter",
"reporterOptions": {
    "kinesisfirehose_deliverystream": "your-stream-name",
    "kinesisfirehose_regionendpoint": "eu-west-1",
    "aws_auth_type": "config",
    "aws_access_key_id": "yourAccessKeyId",
    "aws_secret_access_key": "yourSecretAccessKey",
    "aws_session_token": "yourTemporarySessionToken"
}

Ex: using EC2 instance based AWS Credentials

"reporter": "cypress-awskinesis-reporter",
"reporterOptions": {
    "kinesisfirehose_deliverystream": "your-stream-name",
    "kinesisfirehose_regionendpoint": "eu-west-1",
    "aws_auth_type": "instance"
}

Ex: using environment variable Access Key ID and Secret Access Key

"reporter": "cypress-awskinesis-reporter",
"reporterOptions": {
    "kinesisfirehose_deliverystream": "your-stream-name",
    "kinesisfirehose_regionendpoint": "eu-west-1",
    "aws_auth_type": "environment"
}

Tests

Your Cypress tests results can optionally include a Test ID that uses TestRail's Case ID formatting. To include this, add the Case ID's to your test titles as follows:

// Good:
it('C123 C234 Can authenticate as a valid user', () => {...});
it('Can authenticate C123 as a valid user C234', () => {...});

// Bad:
it('C123Can authenticate as a valid user', () => {...});
it('Can authenticate as a valid user (C123)', () => {...});
it('Can authenticate as a valid userC123', () => {...});
it('Can authenticate C123C234 as a valid user', () => {...});

Reporter Options

  • kinesisfirehose_deliverystream - REQUIRED - the AWS Kinesis Firehose Delivery Stream name where messages will be sent
  • kinesisfirehose_regionendpoint - REQUIRED - the location where your AWS Kinesis Firehose endpoint is deployed in AWS. Valid values will look similar to eu-west-1, us-west-2, etc.
  • aws_auth_type - REQUIRED - the location from where the AWS Credentials should be retrieved. Valid values are instance (EC2 Instance Profile credentials), config (Cypress' reporterOptions in the cypress.json file), and environment (read the values from the environment variables)
    • aws_access_key_id - if using a value of config for aws_auth_type you must also include this with a valid IAM Access Key ID
    • aws_secret_access_key - if using a value of config for aws_auth_type you must also include this with a valid IAM Secret Access Key
    • aws_session_token - if using a value of config for aws_auth_type and using Temporary IAM Credentials, you must also include a value for this

Kinesis Record Data Format

The results uploaded to AWS Kinesis Firehose will have the following format

{
    Created: "YYYY-MM-DD:HH:mm:ss.mmmZ",
    TestId: 123, // or undefined if none exists
    TestStatus: 0, // 0=passed, 4=failed, 5=skipped
    DurationMs: 12334, // milliseconds
    TestStatusStr: "passed", // or "failed" or "skipped"
    TestName: "C123 C234 Can authenticate as a valid user",
    TestFullName: "Authentication Standard User C123 C234 Can authenticate as a valid user",
    BuildName: "Some Project name - Some plan name - Some job name", // or undefined if none exists
    BuildNumber: 987, // or undefined if none exists
    Source: "cypress-awskinesis-reporter", // name of this reporter
    Version: "2.0.0", // version of this reporter
    ErrorMessage: "some error string" // or undefined if none exists
}

NOTE: Tests referencing multiple Case ID's will upload 1 record for each Case ID

Author

Jason Holt Smith - github

License

This project is licensed under the MIT license