Skip to content

Aikau Setup (Linux)

Dave Draper edited this page Aug 4, 2016 · 17 revisions

Operating System

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

  • Linux Mint 18 Cinnamon (Ubuntu-based) - watch demo video

Initial setup

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

  • Open a new terminal window
  • Install Java
    • sudo apt-get install -y openjdk-8-jdk
    • echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64" >> ~/.bashrc
    • echo "export PATH=$JAVA_HOME/bin:$PATH" >> ~/.bashrc
  • Install Chrome
    • wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    • sudo gdebi google-chrome-stable_current_amd64.deb
    • Confirm installation when prompted
  • Install Git, Maven
    • sudo apt-get update
    • sudo apt-get install -y git maven
  • Install NVM (full instructions here)
    • git clone https://github.com/creationix/nvm.git ~/.nvm
    • cd ~/.nvm
    • ``git checkout `git describe --abbrev=0 --tags```
  • Add the NVM startup script to your profile (adjust profile shell-file as appropriate)
    • echo "source ~/.nvm/nvm.sh" >> ~/.bashrc
  • Close and reopen your terminal window
  • Install the latest stable node version and set it as default
    • nvm install v6.0.0
  • Install grunt and selenium server
    • npm install -g grunt-cli
    • npm install -g selenium-standalone
  • Initialise and startup selenium
    • selenium-standalone install
    • 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

Running the tests

  • Open a new terminal window
  • Edit the src/test/resources/config/Suites.js class:
    • Uncomment the line changing runAllTests to false
    • 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