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

@actualwave/traceability-matrices

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actualwave/traceability-matrices

# Work in progress

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
535
decreased by-37.57%
Maintainers
1
Weekly downloads
 
Created
Source

@actualwave/traceability-matrices

Work in progress

Integrate requirements into e2e/integration test code and generate traceability matrices for your project. Currently it has an adapter to work with Cypress. One file project Multi-file project

Installation

NPM npm install -D @actualwave/traceability-matrices Yarn yarn add -D @actualwave/traceability-matrices

Usage

Add a script to your package.json traceability-matrices serve --target-dir=<folder with coverage reports>

Cypress integration

Add TRACE_RECORDS_DATA_DIR environment variable to cypress config that will tell where to store coverage reports

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    env: {
      TRACE_RECORDS_DATA_DIR: "cypress/coverage",
    },
  },
});

This project has a part that integrates into Cypress test files and adds traces of covered requirements. To start import it

import { createProject } from "@actualwave/traceability-matrices/cypress";

Then use imported function to create a project

const Project = createProject("My Project");

And create traces for requirements within the test specs

it("should display entry point path", () => {
  Project.trace("Path to App.js should be visible");
  cy.get(".App-header p > code").should("contain", "src/App.js");
});

When test run is finished, coverage report for it will be stored in specified folder. Coverage is generated into a JSON file, to have a human-readable format, run serve command.

Using only traces will generate flat requirements structure, if you want to add categories, priorities or groups to it, sefine a structure to the project.

import { createProject } from "@actualwave/traceability-matrices/cypress";

const Project = createProject("My Project");

Project.structure({
  Statics: {
    "Add header text": {},
    "Path to App.js should be visible": {},
    "Add welcome text": {},
  }
});

When using a trace, it will be matched to a leaf node of the structure with same name.

Keywords

FAQs

Package last updated on 20 Aug 2023

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