# @scm-manager/integration-test-runner

> Cli application for running integration tests

Latest version **3.5.0** (published 2025-02-21) · AGPL-3.0-only license · 0 weekly downloads

## Install

```sh
npm install @scm-manager/integration-test-runner
pnpm add @scm-manager/integration-test-runner
yarn add @scm-manager/integration-test-runner
bun add @scm-manager/integration-test-runner
```

Provides the command `integration-test-runner`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.5.0 |
| Published | 2025-02-21 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | AGPL-3.0-only |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 93.2 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | SCM Team |
| Maintainers | sdorra, pfeuffer, eheimbuch, cesmarvin, kschaper-cloudogu |

## Links

- npm: https://www.npmjs.com/package/@scm-manager/integration-test-runner
- Repository: https://github.com/scm-manager/integration-test-runner
- npm.io page: https://npm.io/package/@scm-manager/integration-test-runner

## Dependencies (16)

- [pino](https://npm.io/package/pino.md) ^6.7.0
- [axios](https://npm.io/package/axios.md) ^0.21.0
- [yargs](https://npm.io/package/yargs.md) ^16.1.0
- [semver](https://npm.io/package/semver.md) ^7.3.2
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [cypress](https://npm.io/package/cypress.md) ^9.5.1
- [resolve](https://npm.io/package/resolve.md) ^1.19.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.1.0
- [typescript](https://npm.io/package/typescript.md) ^4.0.5
- [pino-pretty](https://npm.io/package/pino-pretty.md) ^4.3.0
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.0.9
- [fluent-ffmpeg](https://npm.io/package/fluent-ffmpeg.md) ^2.1.2
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^3.0.0
- [human-readable-ids](https://npm.io/package/human-readable-ids.md) ^1.0.4
- [cypress-file-upload](https://npm.io/package/cypress-file-upload.md) ^5.0.0
- [@ffmpeg-installer/ffmpeg](https://npm.io/package/@ffmpeg-installer/ffmpeg.md) ^1.0.20

## Recent versions

- 3.5.0 (latest) — 2025-02-21
- 3.4.4 — 2023-10-09
- 3.4.3 — 2023-01-02
- 3.4.2 — 2023-01-02
- 3.4.1 — 2022-05-03
- 3.4.0 — 2022-05-03
- 3.4.0-1651583541 — 2022-05-03
- 3.4.0-1651582710 — 2022-05-03
- 3.4.0-1651518847 — 2022-05-03
- 3.4.0-1651486701 — 2022-05-02
- 3.4.0-1651486568 — 2022-05-02
- 3.4.0-1651486193 — 2022-05-02
- 3.4.0-1651485758 — 2022-05-02
- 3.4.0-1651485242 — 2022-05-02
- 3.4.0-1651484557 — 2022-05-02
- … 41 more at https://npm.io/package/@scm-manager/integration-test-runner/versions

## README

<p align="center">
  <a href="https://scm-manager.org/">
    <img alt="SCM-Manager" src="https://download.scm-manager.org/images/logo/scm-manager_logo.png" width="500" />
  </a>
</p>
<h1 align="center">
  @scm-manager/integration-test-runner
</h1>

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:

```bash
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:

```bash
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:

```bash
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](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Folder-structure) 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](https://docs.cypress.io/api/commands/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](https://www.npmjs.com/package/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)

## Need help?

Looking for more guidance? Full documentation lives on our [homepage](https://scm-manager.org/docs/) or the dedicated pages for our [plugins](https://scm-manager.org/plugins/). Do you have further ideas or need support?

- **Community Support** - Contact the SCM-Manager support team for questions about SCM-Manager, to report bugs or to request features through the official channels. [Find more about this here](https://scm-manager.org/support/).

- **Enterprise Support** - Do you require support with the integration of SCM-Manager into your processes, with the customization of the tool or simply a service level agreement (SLA)? **Contact our development partner Cloudogu! Their team is looking forward to discussing your individual requirements with you and will be more than happy to give you a quote.** [Request Enterprise Support](https://cloudogu.com/en/scm-manager-enterprise/).

---
_Source: https://npm.io/package/@scm-manager/integration-test-runner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
