Testing guide
Running tests
You can run tests in two ways.
-
Method 1: Using IntelliJ JUnit test runner
- To run all tests, right-click on the
src/test/javafolder and chooseRun 'All Tests' - To run a subset of tests, you can right-click on a test package,
test class, or a test and choose
Run 'ABC'
- To run all tests, right-click on the
-
Method 2: Using Gradle
- Open a console and run the command
gradlew clean test(Mac/Linux:./gradlew clean test)
- Open a console and run the command
Types of tests
This project has three types of tests:
-
Unit tests target the lowest-level methods and classes.
For example:seedu.address.commons.StringUtilTest -
Integration tests check how multiple code units work together; the individual units are assumed to work.
For example:seedu.address.storage.StorageManagerTest -
Hybrid tests combine unit and integration testing. These tests check both the individual units and how they work together.
For example:seedu.address.logic.LogicManagerTest