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

@scm-manager/integration-test-runner

v3.4.4

Published

Cli application for running integration tests

Downloads

561

Readme

The integration test runner is a command line tool for developing and running integrated end-to-end tests for the scm-manager. It also serves as a library for common functionality required in testing.

Installation

Install the @scm-manager/integration-test-runner as dev dependency:

yarn add --dev @scm-manager/integration-test-runner
# or 
npm install --save-dev @scm-manager/integration-test-runner

Initialize a plugin for the development of e2e tests:

node_modules/.bin/integration-test-runner init

Usage

In addition to setting up the folder structure under src/test/e2e and creating a test example, the init command creates a new e2e script entry in the plugin's package.json.

You can execute it directly for local testing, but the build pipeline will also run this for verification:

yarn run e2e

Hint: The collect and provision commands are only used internally and not relevant to plugin development.

Structure

The testing closely follows Cypress original structure. All tests are written in Typescript.

Most of what you need is generated for you by the init command.

Common commands are already integrated for you and are freely available for usage within your tests.

Currently, no custom or third-party Cypress plugins are allowed to be installed by SCM-Manager plugins and a default plugins file is generated that must not be changed.

Writing Tests

All you need to add is the tests and any commands specific to your plugin.

The test files go in the integration directory and follow the file name pattern <testname>_spec.ts. The organization of the tests and which folders you create is up to you.

If you need to create files with test data, put them into the fixtures directory. The default fixture file name convention is <plugin_name>_<fixture_name>.<file_extension>. If you need to import the data, please use the fixture command. All of this is to ensure uniqueness when combining tests of different plugins in one cypress folder.

Custom commands go in the support/commands/index.ts file. Please put all these commands directly in that file. Also, please do not put any other files in the commands directory as only the index file is copied by our testing pipeline.

The testrunner automatically resets the SCM-Manager configuration before and logs out the user after each test

The testrunner uses human-readable-ids to generate semi-randomized identifiers and texts. You can use the library for the same purpose as well. It is already included in the dependencies, you don't have to install it yourself.

Development

To release a new version of the integration-test-runner:

  • First update the version in package.json
  • Then add an entry to the CHANGELOG.md
  • Only then run yarn publish (This will automatically run the build step)