Skip to content

๐Ÿงช Testing VEP Polaris

This project includes test scripts to verify that each tool behaves as expected. Tests are written in portable Bash and use only standard Unix utilities.


๐Ÿ”ง Requirements

  • Bash (4.x or higher)
  • Core Unix utilities: grep, gzip, head, mkdir, rm, echo, etc.
  • Optional: Node.js (for npm run test command more easily)

๐Ÿš€ Run All Tests

If you've already installed the toolkit:

npm test

This runs the run-tests.sh script, which locates and executes all test scripts in test/.

Alternatively, run it manually:

chmod +x run-tests.sh # needs to be run initially
./run-tests.sh

This script will:

  • Find all test scripts in the test/ directory (with filenames like test-*.sh)
  • Run each one
  • Exit with an error if any test fails

๐Ÿงช Run an Individual Test

To run a single test directly:

bash test/test-plugin-inspect.sh

Useful when debugging or developing a specific tool.


๐Ÿ›  Adding a New Test

To add a new test script:

  1. Name it test/test-<tool>.sh
  2. Make it executable:

    bash chmod +x test/test-yourtool.sh

  3. It will automatically be picked up by ./run-tests.sh


โœ… Expected Output

If all tests pass, you'll see something like:

๐Ÿ”ฌ Running all VEP Polaris tests...
โžก๏ธ  Running: test/test-plugin-inspect.sh
โœ” PASS: Plain numeric chromosome format recognized
โœ” PASS: chrN format recognized
โœ” PASS: Warning for comment-only file shown

โœ… All tests passed!

If a test fails, it will print a clear failure message and exit:

โœ˜ FAIL: Expected output to contain: plain.tsv

๐Ÿค– Continuous Integration (Optional)

To include this in GitHub Actions or another CI tool, add a step to your workflow:

- name: Run VEP Polaris tests
  run: ./run-tests.sh

For more information about individual tools, see the documentation index.

vep-polaris <tool> --help