Acceptance Tests As Monitors
- A simple library that allows you to run junit tests as monitoring checks.
- Runs tests on a schedule and exposes results via a restful api that can called from your monitoring (e.g. nagios, zabbix, icinga, pingdom etc etc)
<dependency>
<groupId>me.atam</groupId>
<artifactId>atam4j</artifactId>
<version>0.2.0</version>
</dependency>
-
Include the atam4j maven dependency.
-
Write Junit based tests in the usual manner, with the exception of including them in the main application classpath instead of the tests classpath. This can be done by including them in the
src/main/java directory
instead of thesrc/test/java
directory. -
Instantiate the
AcceptanceTestHealthCheckManager
in therun
method of your dropwizard application class.
new AcceptanceTestHealthCheckManager(environment, TEN_MINUTES_IN_SECONDS, HelloWorldTest.class).initialise();
- Run the dropwizard app and observe the status of the acceptnace tests reported under the health-check endpoint.
Refer to atam4j-sample-app for a complete working example.
https://oss.sonatype.org/content/repositories/snapshots/me/atam/atam4j/
Look for non-snapshot version https://oss.sonatype.org/content/groups/public/me/atam/atam4j/
mvn clean install
mvn clean test
Only core committers can release atam4j to maven central. You need Sonatype Nexus OSS account info for atam.me.
- Set version of the release
mvn versions:set -DnewVersion=${versionNumber}
- Commit the version back to git and push to remote
git commit -a -m "Preparing release v${versionNumber}"
git push
- Tag code
git tag -a v${versionNumber} -m 'version
${versionNumber}โ git push origin v$ {versionNumber}
-
Create release in Github - https://github.com/atam4j/atam4j/releases
-
Deploy to maven central
mvn clean deploy