Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.36 KB

TESTING.md

File metadata and controls

45 lines (31 loc) · 1.36 KB

Testing

This document contains the code testing guidelines for the agave-cli. It should answer any questions you may have as an aspiring Agave contributor.

Test suites

The agave cli has two test suites:

  • Unit tests - use bats. They are located in tests. Unit tests should be fast and test only their own package.

  • API integration tests - use bats and depend on a mock server. They are located in tests.

Writing new tests

For more information about how to run tests see Bash Automated Testing System.

Some cli commands require user input. To write API integration tests for such tools we recommend expect.

For API integration tests you will have to write an REST API endpoint to mock the Agave API and register it with the Flask application in agave_mock_server/api.py.

For sample mocked enpoints see agave_mock_server.

Running tests

You are encourage to use the development container to run tests. To run the tests, first run the developmet container:

$ make shell

Once you are inside the development container run:

$ make tests