Skip to content

Aikau Setup (Windows)

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

Operating System

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

  • Windows 10

Initial setup

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

  • Install Chrome
  • Download a git client (e.g. SourceTree) (or just Git for Windows)
  • Install Node v6.0.0
  • Install Cygwin if necessary (make sure you include the openssh package when installing)
    • You will not need this if you downloaded Git for Windows, as you can use Git Bash instead
    • Other linux emulators may also work, but the vagrant testing will not succeed if only using the command prompt
  • Install Java SDK
  • Set JAVA_HOME environment variable (e.g. C:\Program Files\Java\jdk1.8.0_31)
  • Download and install Maven
  • Set MVN_HOME environment variable (e.g. C:\Maven\apache-maven-3.2.5)
  • Append Java and Maven to your PATH
    • %JAVA_HOME%\bin;%MVN_HOME%\bin;
  • Open new linux terminal
  • Install grunt
    • npm install -g grunt-cli
  • Install and start selenium
    • npm install -g selenium-standalone
    • selenium-standalone install
    • selenium-standalone start
  • Open new linux terminal
  • Create working directory (e.g. /devel in Cygwin, which is actually C:\cygwin64\devel) and go to it
    • mkdir /devel && cd /devel
  • Clone Alfresco/aikau and checkout the develop branch
    • git clone https://github.com/Alfresco/Aikau.git
    • cd Aikau
    • git checkout develop
  • Move to the aikau project within the repository
    • cd aikau
  • Edit the /aikau/src/test/resources/testApp/WEB-INF/config/web-application-config.xml file
    • Update the configuration for the css.theme.handler so that the cmd property has the value C:\\cygwin64\\devel\\Aikau\\aikau\\node_modules\\.bin\\lessc.cmd -
  • Install dependencies and start the test server
    • npm install
    • mvn clean install jetty:run

Running the tests

  • Open new linux terminal
  • 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
    • 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

  • Install Vagrant, including restarting your machine if necessary
  • Install VirtualBox or any other VM software supported by vagrant
  • Open new linux terminal
  • Go to your aikau directory and create a vagrant server and try to run some tests on it
    • cd /devel/Aikau/aikau
    • grunt vcreate
    • grunt test

Caveats and recommendations