Setting up the development environment

1. Introduction

This document describes the steps for seting up the development environment for the Aktoro project. The information contained here is targeted at developers of the Aktoro project itself.

The instructions in this document assume a Linux environment, or Windows with Cygwin installed.

2. Requirements

The following packages are required for developing in the Aktoro project:

You will need to have the above packages installed in your workstation.

In addition to the above, some other tools are also required. Those tools are available from specific platform packages. Depending on platform, you will need to install the packages mentioned on the table below.

Platform Packages

CentOS

gnupg2

Ubuntu

gnupg

Cygwin

3. Fetch source tree

To fetch the project source tree do the following:

git clone git@github.com:jorgefranconunes/aktoro.git

After executing the above (and after a few moments) a directory named aktoro will have been created in your current working directory. That aktoro directory contains the project tree, and will be your working area.

4. Edit/compile/run cycle

To perform a full build, just run the Gradle wrapper in the modules directory:

./modules/gradlew build

By default integration tests are no run. When you want to run the integration tests with the build do the following:

./modules/gradlew integrationTest build

In this section, and in the following sections, the examples with the command for executing the Gradle wrapper (./modules/gradlew) assume the current working directory is the project top directory. In fact, you can run the gradlew command from any directory, and it will work as intended.

5. Running unit tests

To run all unit tests:

./modules/gradlew test

To force the unit tests to be run again:

./modules/gradlew cleanTest test

To run a single unit test suite execute the following from the command line:

./modules/gradlew cleanTest test --tests \*.ActorRefImplTest

Of course, you can change the ActorRefImplTest above with the test suite you actually want to run. By convention classes containing unit tests suites have names ending in Test.

And to run one single unit test:

./modules/gradlew cleanTest test \
    --tests \*.ActorRefImplTest.whenVoidMethodInvoked_thenCoreMethodIsExecuted

6. Running integration tests

To run all integration tests:

./modules/gradlew integrationTest

To force the integration tests to be run again:

./modules/gradlew cleanIntegrationTest integrationTest

Running just one single integration test suite, or one single integraton test is the exact same procedure as for unit tests. By convention classes containing integration tests suites have names ending in IT.

7. Installing project JARs into local Maven repository

Sometimes it is usefull to install SNAPSHOT versions of the project JARs into the local Maven repository. This allows for local testing of a modified Aktoro build within another project.

To install the project JARs into the local Maven repository (typically ~/.m2/repository) do the following:

./modules/gradlew mavenInstall

8. Code quality reports

To generate static analysis and test code coverage reports do the following:

./modules/gradlew buildReports

THE INFORMATION IN THE REMAINDER OF THIS SECTION IS NOT YET VALID.

To generate static analysis and test code coverage reports do the following:

./devtools/bin/build-bundle --with-reports

This will create under directory ./target/CodeQualityReports a set of HTML pages with the results of static analysis (Checkstyle, Findbugs, PMD) and test code coverage (Jacoco). The entry page will be at ./target/CodeQualityReports/index.html.

9. Creating a new release

THE INFORMATION IN THIS SECTION IS NOT YET VALID.

To generate the tarball for an engineering build do the following:

./devtools/bin/build-bundle

The above will perform a full build and create a tarball named aktoro-0.0.2-SNAPSHOT-yyyyMMddhhmm.tar.bz2 at the top of the working area.

To generate an official release see the instructions at Creating a release of the Aktoro software.