Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.42 KB

Testing.md

File metadata and controls

36 lines (26 loc) · 1.42 KB
layout title
page
Testing guide
  • Table of Contents {:toc}

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 choose Run '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'
  • Method 2: Using Gradle
    • Open a console and run the command gradlew clean test (Mac/Linux: ./gradlew clean test)
🔗 **Link**: Read [this Gradle Tutorial from the se-edu/guides](https://se-education.org/guides/tutorials/gradle.html) to learn more about using Gradle.

Types of tests

This project has three types of tests:

  1. Unit tests targeting the lowest level methods/classes.
    e.g. jarvis.commons.StringUtilTest
  2. Integration tests that check the integration of multiple code units (those code units are assumed to be working).
    e.g. jarvis.storage.StorageManagerTest
  3. Hybrids of unit and integration tests. These tests check multiple code units as well as how they are connected together.
    e.g. jarvis.logic.LogicManagerTest