Testing Guide for PlanNUS
Table of content
Running Tests
There are 2 ways to run tests on the code base of PlanNUS.
- 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 single test and choose
Run <TEST NAME>
- To run all tests, right-click on the
- Method 2: Using Gradle
- Open a console and run the command
gradlew clean test
for Windows./gradlew clean test
for Mac and Linux
- For more information about using Gradle, take a look at this tutorial.
- Open a console and run the command
Types of test
This project contains three types of tests:
- Unit tests target the lowest level of methods or classes
- e.g.
src.test.java.seedu.duke.apps.academicplanner.commons.AddUtilsTest
- e.g.
- Integration tests that are check the integration of multiple code units
- e.g.
src.test.java.seedu.duke.apps.academicplanner.AcademicPlannerParserTest
- e.g.
- Hybrids of unit and integration tests that check multiple code units as well as how they are connected together