
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
@scm-manager/integration-test-runner
Advanced tools
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.
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
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
andprovision
commands are only used internally and not relevant to plugin development.
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.
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.
To release a new version of the integration-test-runner
:
package.json
CHANGELOG.md
yarn publish
(This will automatically run the build
step)Looking for more guidance? Full documentation lives on our homepage or the dedicated pages for our 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.
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.
FAQs
Cli application for running integration tests
The npm package @scm-manager/integration-test-runner receives a total of 522 weekly downloads. As such, @scm-manager/integration-test-runner popularity was classified as not popular.
We found that @scm-manager/integration-test-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.