Skip to content

Aikau Setup (OS X)

Dave Draper edited this page Aug 2, 2016 · 1 revision

Operating System

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

  • OS X 10.10 Yosemite

Initial setup

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

  • Download and install Java and setup bashrc and JAVA_HOME property
    • NOTE: The following commands are for a fresh OS X install only. If the files already exist, then append the contents instead of replacing them.
    • echo “source ~/.bashrc” > ~/.bash_profile
    • echo “export JAVA_HOME=\$(/usr/libexec/javahome)” > ~/.bashrc
  • Install homebrew and caskroom
    • ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      • Install command-line tools if prompted
    • brew doctor
    • brew install caskroom/cask/brew-cask
  • Install Chrome, Git, Node.js (and NPM), Maven
    • brew cask install google-chrome
    • brew install git nodejs maven
  • 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/tab
  • Create a working directory and go to it (choose 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:
    • 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/tab if necessary
  • Install vagrant and virtualbox
    • brew cask install vagrant
    • brew cask install virtualbox
  • Go to your aikau directory and create a vagrant server and try to run some tests on it
    • NOTE: Again, ensure you minimise the number of tests run at this stage
    • cd ~/develop/git/Aikau/aikau
    • grunt vcreate
    • grunt test

Caveats and recommendations