3.1.2 • Published 1 month ago

@apexdevtools/test-runner v3.1.2

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
1 month ago

test-runner

Salesforce unit test runner, built over @salesforce/apex-node and jsforce. The runner provides a number of reliability features aimed at ensuring the greatest chance of obtaining a good test run.

Usage

The main abstraction is a Testall command. You can use this to configure and execute a test run. The runner is assisted by three plugins:

  • TestMethodCollector - Locates all test methods that should be executed, this is used to validate there are no missing methods in a run and if necessary arrange for additional test to be executed to fill the gaps.
  • TestRunner - This manages the initial test run and subsequent runs that may be needed due to missing tests. It monitors the test runs for progress and can abort/restart runs when progress is not being made.
  • OutputGenerator - This manages the generation of test reports, by default JUnit XML and json style outputs are created.

The Testall command also handles re-running tests that failed due to locking after the main run(s) have completed.

You can start a Testall run by providing a set of test classes. If you don't provide any the run will execute against all the "local" (non-packaged) tests in the org.

Development

Building

This project uses the pnpm package manager.

  pnpm install
  pnpm build

To run unit tests:

  pnpm test

To test bundling using webpack:

  pnpm test:pack
  node test-bundle/bundle.js

This should execute without error.

See ./script for some basic scripts to aid org testing. Execute them with ts-node using the run script:

  # Run Testall with default settings
  pnpm run:script -- ./src/scripts/Testall.ts <username> <namespace | unmanaged>

Git Hooks

If you encounter difficulties with the installed git hooks, they can be bypassed with --no-verify/-n flag on commit. To disable them completely (after install) use npx husky uninstall or the direct command git config --unset core.hooksPath.

License

All the source code included uses a 3-clause BSD license, see LICENSE for details.

3.1.2

1 month ago

3.1.1

1 month ago

3.1.0

6 months ago

3.0.0

7 months ago

2.1.0

7 months ago

1.9.1

11 months ago

1.9.2

11 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.9.0

12 months ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago