diff --git a/src/components/classic/documentation/developer-guide.md b/src/components/classic/documentation/developer-guide.md index eb66551f89..cca100e1da 100644 --- a/src/components/classic/documentation/developer-guide.md +++ b/src/components/classic/documentation/developer-guide.md @@ -11,6 +11,7 @@ type: classic The following documents might be interesting * [Building](building) +* [Testing changes locally](testing-changes-locally) * [Release Plans](release-plans) * [Release Guide](release-guide) * [Design Documents](design-documents) diff --git a/src/components/classic/documentation/developers.md b/src/components/classic/documentation/developers.md index 0f0847096a..57feb4438f 100644 --- a/src/components/classic/documentation/developers.md +++ b/src/components/classic/documentation/developers.md @@ -11,6 +11,7 @@ type: classic * [Becoming a committer](https://infra.apache.org/new-committers-guide.html) * [Benchmark Tests](benchmark-tests) * [Building](building) +* [Testing your changes locally](testing-changes-locally) * [Code Overview](code-overview) * [Developer Guide](developer-guide) * [Design Documents](design-documents) diff --git a/src/components/classic/documentation/testing-changes-locally.md b/src/components/classic/documentation/testing-changes-locally.md new file mode 100644 index 0000000000..da6bab198d --- /dev/null +++ b/src/components/classic/documentation/testing-changes-locally.md @@ -0,0 +1,39 @@ +--- +layout: default_md +title: Testing changes locally +title-class: page-title-classic +type: classic +--- + +[Developers](developers) > [Testing changes locally](testing-changes-locally) + +Testing changes locally +----------------------------- + +### Broker +After running existing or newly added unit tests, if you want to do integration testing on your change, you can [build](building) the repo locally to generate the release bundle and then unzip the bundle to test broker behaviour. +``` +# At root directory +$ mvn -Dtest=false -DfailIfNoTests=false clean install +``` +If the build was successful. You will see a message similar to the one below +``` +[INFO] Installing /Users/xxx/amzn/personal_workspace/activemq/assembly/target/apache-activemq-6.2.0-SNAPSHOT-bin.zip to /Users/xxx/.m2/repository/org/apache/activemq/apache-activemq/6.2.0-SNAPSHOT/apache-activemq-6.2.0-SNAPSHOT-bin.zip +``` +Unzip that target and start the ActiveMQ broker which contains your change +``` +$ cd /Users/xxx/.m2/repository/org/apache/activemq/apache-activemq/6.2.0-SNAPSHOT +$ unzip apache-activemq-6.2.0-SNAPSHOT-bin.zip +$ cd apache-activemq-6.2.0-SNAPSHOT +$ ./bin/activemq console +``` + +### ActiveMQ client + +Testing the client library is a bit trickier because you will need a test client (that imports your newly built client library). There are many ways to do it, overall the idea is: + +- Build the activemq-client pakcage +- Copy the output jar into your test client or local mvn repository +- Run your test client + +You can take a look at this [sample test client](https://github.com/kenliao94/activemq-client-test) and follow its README. \ No newline at end of file