One of the really nice things about using DynamoDB to back an application is the ability to write integration tests that have a good test server without trying to mimic DynamoDB yourself.
The general steps for adding this to your build are:
- Download the DynamoDB Local artifact.
- Reserve a local port for Dynamo to start on.
- Start DynamoDB_Local just before integration tests are run.
- Use the failsafe plugin to run integration tests.
The steps are covered in more technical detail in the pom.xml file below. Adding this to the build is the only thing necessary as this performs all the steps above and tears down the process afterwards.