[Fuego] [PATCH 00/16] Fuego Release Test

Guilherme Campos Camargo guicc at profusion.mobi
Thu Mar 29 00:08:16 UTC 2018

Hello, everyone

This series of patches contains the initial implementation of the Fuego
Release Test (Functional.fuegotest). This test has been created to allow
Fuego to test any version of Fuego, given its git repository and branch.

The test clones the repositories of fuego and fuego-core that are
configured on the test specs.json, installs fuego and runs that version
of fuego as the docker container fuego-release-container.

The test uses Pexpect, to execute/verify commands in the
fuego-release-container shell, and uses SeleniumHQ to interact with the
Jenkins web interface, checking if the web interface responds as

A few wrappers have been implemented on top of Pexpect and SeleniumHQ in
order to facilitate the inclusion of new tests.

The default specs.json is currently configured to clone and test fuego
and fuego-core from the master branch of the official repository. What
can be changed through the specs.json file.

# Running

Currently this test requires a modified version of Fuego to be executed,
given that it needs to install some dependencies and needs to map the
dockerd socket from the host to the fuego container.

The modified version can be found in two different branches on
Profusion's fuego fork.

 1 - Branch fuego-test: Just a few commits that are necessary for making
 this test work, applied on top of fuego/next. We plan to try to
 integrate these commits into fuego/next in the next few days.

 2 - Branch fuego-base-image: A more complex change on fuego, that makes
 the necessary changes for allowing it to be shipped as a docker image
 through dockerhub.

The steps for each one of the versions above are given below:

## Building the image (from the branch fuego-test)

To run the test, execute the following commands:

git clone --branch fuego-test https://bitbucket.org/profusionmobi/fuego-core.git
git clone --branch fuego-test https://bitbucket.org/profusionmobi/fuego.git
cd fuego
./install fuego-to-test-fuego
./fuego-host-scripts/docker-create-container.sh fuego-to-test-fuego fuego-to-test-fuego-container
./fuego-host-scripts/docker-start-container.sh fuego-to-test-fuego-container

Then, add the fuego-test board and the Functional.fuegotest and start
the test through Jenkins (localhost:8080/fuego/)

ftc add-nodes fuego-test
ftc add-jobs -b fuego-test -t Functional.fuegotest

## Using the modified Fuego Base Image from Dockerhub

You can also use the fuego base image that's being developed in
Profusion's fuego-base-image branch in our fork:

The image is already available on dockerhub and can be
downloaded/executed with:

docker pull fuegotest/fuego
docker run -it \
  -p 8080:8080 \
  -v $(pwd)/host_fuego_home:/var/fuego_home \
  -e JENKINS_UID=$(id -u) \
  -e JENKINS_GID=$(id -g) \
  -v /var/run/docker.sock:/var/run/docker.sock \

Wait for the shell to be available and add fuego-test board and
Functional.fuegotest as explained in the last section.

ftc add-nodes fuego-test
ftc add-jobs -b fuego-test -t Functional.fuegotest


Guilherme Campos Camargo (16):
  Add fuego-release Functional test
  Mount fuego-rw/ro/core into the fuego-under-test container
  Increase wait_for_jenkins timeout from 10 to 60s
  Print fuego repo/branch information during test build
  Properly check install return code and abort in case of failure
  Allow the user to keep the container running after the test
  Add Back() Selenium Command
  Add ClickLink selenium command
  Include add-jobs, add-views and build-jobs tests
  Write ok/fail on test report
  Properly quit Selenium driver when SeleniumSession is deleted
  Minor style/PEP8 fixes
  Move Selenium implicitly_wait() to SeleniumSession start
  Use a fixed language for Selenium Chrome-WebDriver
  Improve Click and Check methods to allow multiple locators
  Add test that starts a job through the UI

 engine/tests/Functional.fuegotest/fuego_test.sh |  36 ++
 engine/tests/Functional.fuegotest/spec.json     |  11 +
 engine/tests/Functional.fuegotest/test_run.py   | 591 ++++++++++++++++++++++++
 3 files changed, 638 insertions(+)
 create mode 100755 engine/tests/Functional.fuegotest/fuego_test.sh
 create mode 100644 engine/tests/Functional.fuegotest/spec.json
 create mode 100755 engine/tests/Functional.fuegotest/test_run.py


More information about the Fuego mailing list