I run some junit4 tests in intellij (i have an and...
# intellij
c
I run some junit4 tests in intellij (i have an android/gradle project, but the tests are from a java only module). Is it possible in intellij to package these tests up into a command line app so that I could run it on a server (i want to pipe the results into a slack bot for example). I'm still new to the world of unit testing and so the results in the IDE are great, but I really want to run them from cmd line (esp through a pre-built jar)
😶 1
j
your server can run the tests via Gradle tasks which will generate report files that you can upload to whatever web/slack
try running
./gradlew check
and check the
reports
directory in the
build
directory of each module
c
Thanks. That's definitely better, but would love to just have that artifact available instead of compiling again. But this might work for now. For anyone following along, if you have other ideas about how to run it as a jar. please let me know. 😄
j
Not sure what you want to get but is it not easier to setup a CI like github actions so every time you create a PR you can comment the result of that PR in slack passing tests result, coverage, lints, etc?
💯 1