Closed jamiejackson closed 6 years ago
Invoking on gradle is similar to Maven. You need to build app first, then run tests. Build script is not wired to run both tasks together. Kept the build script simple for now.
1) ./gradlew clean build 2) ./gradlew test
Output should is best viewed in Test Report produced by gradle plugin which is built in the build directory.
eagle/build/reports/tests/test/index.html
I am lacking documentation, which is on my list to bolster. But, frameworking and architecture components gave way to that so far.
Got it. (I'd thought I'd be seeing something in the console.) ATM, it seems to be outputting XML results (in a slightly different output dir), but we should be able to consume those in Jenkins.
$ tree build/test-results/
build/test-results/
└── test
├── TEST-eagle.ApplicationTest.xml
├── TEST-eagle.tests.RESTControllerTest.xml
└── binary
├── output.bin
├── output.bin.idx
└── results.bin
Here we go:
$ tree build/reports/
build/reports/
└── tests
└── test
├── classes
│ ├── eagle.ApplicationTest.html
│ └── eagle.tests.RESTControllerTest.html
├── css
│ ├── base-style.css
│ └── style.css
├── index.html
├── js
│ └── report.js
└── packages
├── eagle.html
└── eagle.tests.html
I see some unit tests, but I'm not sure how to invoke them (either from an IDE or from the CLI).
In Maven projects, I'm used to running unit tests, but I'm brand new to gradle.