Uploaded image for project: 'National Data Service'
  1. National Data Service
  2. NDS-704

Dockerize integration tests

XMLWordPrintableJSON

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None
    • NDS Sprint 17

      We were able to successfully run the integration tests headlessly in a Docker container using Xvfb. This task formalizes the Dockerization of the integration test environment so that it can be run on a VM.

      My install notes are below, but it's likely that https://hub.docker.com/r/caltha/protractor/ will be a better example to build off of.

      docker run -it --name=nodejs -v `pwd`:/data -w /data bodom0015/nodejs-bower-grunt bash
       
      npm install -g protractor
      npm install
      bower install
       
      apt-get update -y
       
      # Install dependencies
      apt-get install -y xvfb  x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-core dbus-x11  libfontconfig1-dev vim default-jre
       
      # Install chrome
      wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub |  apt-key add -
      sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
      apt-get update
      apt-get install google-chrome-stable
       
      webdriver-manager update
      webdriver-manager start
       
      Xvfb :1 -screen 0 1280x1024x24+32 &
       
      # In one tab start webdriver-manager
      export DISPLAY=:1
      webdriver-manager start
       
      # In the other, start your test
      protractor e2e.conf.js

              lambert8 Sara Lambert
              willis8 Craig Willis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Time Spent - 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  2h 30m
                  Logged:
                  Time Spent - 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  30m