Skip to content

Fossology E2E Tests

Max Wittig edited this page Apr 19, 2017 · 4 revisions

Requirements

  1. Make sure you got at least nodejs version 6. The tests will not work otherwise! To check your nodejs version
 node --version 
  • if this command doesn't work you propably have to install the nodejs-legacy package from apt-get first
  •  sudo apt-get install nodejs-legacy 

  1. Make sure, you're in the selenium folder
 cd src/testing/selenium/ 

To run the tests inside the docker container

  1. Start the tests
npm start

  1. This is gonna take a while for the container to build and selenium to download

To run the tests locally

  1. Download the selenium chrome standalone npm package
npm install selenium-standalone@latest -g
selenium-standalone install
selenium-standalone start

  1. Start the tests
FOSSOLOGY_ENV=`yourfossip` SELENIUM_ENV=`yourseleniumip` FOSSOLOGY_TEST_FOLDER=/home/TestData/ npm test

To add new tests to the E2E browser tests

  1. Copy and rename the test template file empty.spec.js to the test case name you want.
  2. Insert the test case file into conf.js as a spec

More info on how to write tests

https://jasmine.github.io/

Clone this wiki locally