Testing
Table of Contents
1. Running tests
There are two ways to run tests.
- Method 1: Using IntelliJ JUnit test runner
- To run all tests, right-click on the
src/test/java
folder 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
Read this Gradle Tutorial from se-edu/guides to learn more about using Gradle.
2. Types of tests
This project uses JUnit testing in IntelliJ.
- We test each class and its methods.
e.g.seedu.modTrackerTest.ParserTest
Tests the methods in theParser
class