-
Notifications
You must be signed in to change notification settings - Fork 1
Testing
The program has been tested using both unit tests and integration tests. The integration tests use a test server created with Python. The test server's code can also be found in the project's repository in /api/mock_server/. The general rule during the project is to keep the test coverage percentage above 80 % and to make sure all main aspects of the program's features have integration tests.
If you clone the project from its repository with $ git clone https://github.com/csesfi/cses-cli *directory*
, where *directory*
is the name of the directory you want to clone the project to, you can run the tests with the following commands:
-
$ cargo test
: Runs all the tests. -
$ cargo test *name*
: Runs a specific test. -
$ cargo test integration
: Runs the integration tests. -
$ cargo test --bins
: Runs the tests excluding the integration tests. -
$ cargo test integration -- --nocapture
: Runs the integration tests and shows output from the test server.
More info about the integration tests can be found here.