This project contains basic structure to work with Java testing libraries JUnit, AssertJ and Hamcrest. As you can see, folder structure is empty. Only contains preconfiguration and folders structure to allows extends with your own developments.
This is a Gradle Project with Java standard structure. You can see longer explanation of this topic or how organize your Gradle projects in Official Gradle Documentation.
Main configuration are located in build.gradle, but each module contains its own file build.gradle that imports its own dependencies to compile, build or test developments.
So, for example, you can see at build.gradle of Junit module:
dependencies {
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.19.0'
testCompile group: 'junit', name: 'junit', version: '4.13.1'
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
}
All necessary dependencies are included in the respective modules.
You can run all modules executing Gradle run task, or test with test task, by command line or using your IDE. By command-line, you have to execute:
- Linux / macOS
./gradlew test
- Windows
gradlew.bat test
You can run each module separately invocating:
- Linux / macOS
./gradlew :[moduleName]:test
- Windows
gradlew.bat :[moduleName]:test
- Junit v.4.13. See Official Docs.
- AssertJ v. 3.19. See Official Docs.
- Hamcrest v. 1.3. See Official Docs.
Follow next steps: