Skip to content

Aikau Setup (Linux)

Martin Doyle edited this page Feb 19, 2015 · 17 revisions

Operating System

These instructions have been run successfully on the following operating systems:

  • Linux Mint 17.1 Cinnamon (Ubuntu-based)

Initial setup

After performing these instructions you will be able to run the automated tests locally:

  • Install NVM (full instructions here)
    • wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | PROFILE=~/.bash_profile bash
    • Close and reopen your terminal window
  • Install Node
    • nvm install 0.12
  • Install Chrome, Git, Maven
    • sudo apt-get update
    • sudo apt-get install -y google-chrome-stable git maven
  • If Node.js executable is not “node” then will need to symlink for other dependencies to work
    • sudo ln -s /usr/bin/nodejs /usr/bin/node
  • Install grunt and selenium server
    • sudo npm install -g grunt-cli
    • sudo npm install -g selenium-standalone
  • Initialise and startup selenium
    • sudo selenium-standalone install
    • sudo selenium-standalone start
  • Open a new terminal window
  • Create a working directory and go to it (choose your own directory as appropriate)
    • mkdir -p ~/develop/git
    • cd ~/develop/git
  • Clone the Aikau project and checkout the develop branch
    • git clone https://github.com/Alfresco/Aikau.git
    • cd Aikau
    • git checkout develop
  • Within the aikau sub-project, install dependencies and start the test server
    • cd aikau
    • npm install
    • mvn clean install jetty:run

Running the tests

  • Open a new terminal window
  • Edit the src/test/resources/config/Suites.js class:
    • Change the name of the variable xbaseFunctionalSuites to baseFunctionalSuites and vice versa (i.e. move the “x”)
    • NOTE: Doing this will limit the number of tests run, so that you can test the setup without waiting for all of the tests to execute
  • Go to your aikau directory and try to run the local tests
    • cd ~/develop/git/Aikau/aikau
    • grunt test_local (Sets up required files)
    • grunt test_local (Performs the tests)
  • NOTE: You will only need to run the test command twice on the very first time you run it

Running the tests on a vagrant VM

  • Open a new terminal window if necessary
  • Install vagrant and virtualbox
    • sudo apt-get update
    • sudo apt-get install -y vagrant virtualbox-4.3
  • Go to your aikau directory and create a vagrant server and try to run some tests on it (make sure you are still using the reduced test-run)
    • cd ~/develop/git/Aikau/aikau
    • grunt vcreate
    • grunt test

Caveats and recommendations