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

jest-spiratest

v1.1.0

Published

This reporter will integrate JestJS with Inflectra's ALM suite. It will create a test run in Spira for each test executed in Jest. ### Don't have Spira? If you haven't tried out one of our products, you can get a 30 day free trial for our flagship ALM pro

Downloads

3

Readme

Spira Integration with JestJS Testing Framework

Brief Overview

This reporter will integrate JestJS with Inflectra's ALM suite. It will create a test run in Spira for each test executed in Jest.

Don't have Spira?

If you haven't tried out one of our products, you can get a 30 day free trial for our flagship ALM product SpiraPlan with no credit card needed!

Guide Basics

Unfortunately, this integration will work with SpiraTest/SpiraTeam/SpiraPlan (hereafter refered to as SpiraTest) version 5.0 and above and at least Jest 24.x. If you have an older version, you will need to update to use this reporter.

This guide assumes a basic familiarity with both SpiraTest and the Jest testing framework.

Setting up the integration

Install the integration by running npm i jest-spiratest in the root directory of your tests. Inside your package.json file, add the jest field with the format as shown below. You can see a full sample package.json at the bottom of this README.

"reporters": [
            "default",
            [
                "jest-spiratest",
                {
                    "url": "https://doctor/SpiraPlan",
                    "username": "fredbloggs",
                    "token": "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}",
                    "projectId": 1,
                    "releaseId": 1,
                    "testSetId": 1,
                    "testCases": {
                        "default": 20,
                        "storesCorrectly": 21,
                        "javascriptWorks": 16
                    }
                }
            ]
        ]

Fields are required unless otherwise noted.

Field | Description --- | --- | url | The root URL of your SpiraTest instance without a '/' at the end username | The username you use to sign into SpiraTest token | Your RSS Token. Foundin your profile page as the RSS Token field. You must have RSS Feeds enabled for this to work projectId | The ID of the project you would like the Test Runs to be filed under releaseId | OPTIONAL - Use if you would like to associate created test runs with a release testSetId | OPTIONAL - Use if you would like to associated created test runs with a test set testCases | Must contain the default field within it and, optionally, specific test cases for a given test spec name default | Inside the testCases field, this is the ID of the default test case mapped to a created test run <test_name> | OPTIONAL - Use as many times as you would like to map a the created test run to a particular test case in SpiraTest. Note that capitalization, special characters and spaces are ignored both in testCases and the test declaration

Once you have added the SpiraReporter to jest as described above, you are all set!

Using the SpiraTest Reporter

Actually, you don't do anything different! Just run npm test or however you ran jest before and you should see test runs created in the project you specified!

Sample package.json with SpiraTest Integration

{
    "name": "sample",
    "scripts": {
        "test": "jest"
    },
    "jest": {
        "reporters": [
            "default",
            [
                "jest-spiratest",
                {
                    "url": "https://doctor/SpiraPlan",
                    "username": "fredbloggs",
                    "token": "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}",
                    "projectId": 1,
                    "releaseId": 1,
                    "testSetId": 1,
                    "testCases": {
                        "default": 20,
                        "storesCorrectly": 21,
                        "javascriptWorks": 16
                    }
                }
            ]
        ]
    }
}