The goal of this repository is to provide automated end-to-end (E2E) tests for production and stage environment of OpenShift.io.
To see the latest tests results in the CI visit our Wiki page: https://github.com/fabric8io/fabric8-test/wiki
The default test suite is called smoketest
which serves as a monitoring of the product.
It is expected to run relatively fast therefore this suite will NOT test multiple boosters,
multiple pipeline types, advanced interactions with Che etc., this should be done
by unit, functional or integration tests of particular components.
The smoketest
suite tests basic functionality of all OpenShift.io components
- logs into the platform
- creates a new space
- creates a new project
- opens Che workspace
- verifies that pipeline behaves correctly
- verifies deployed application in stage and run environments
- verifies data on the dashboard page and analytics report
- if beta feature level is enabled, a new workitem is created and verified that it appears on the dashboard
The che
suite tests more advanced scenario where the user opens Che, updates codebase and the Openshift.io
picks up the changes and runs the build number 2.
The logintest
is the simplest test where user only logs in and logs out. It runs pretty frequently on Jenkins on all clusters.
Before running the tests, you have to install Node.js and NPM and define environment variables. These are stored in file config/local_osio.conf.sh
. You need to create the file by yourself by copying its template and filling in the values.
cp config/local_osio.conf.sh.template config/local_osio.conf.sh
NOTE: To run the booster tests, in local_osio.conf.sh, define the TEST_SUITE as "boostersuite"
npm install
npm start
You can find a lot of screenshots and useful logs in target/screenshots
directory. Screenshots are
numbered according to order they have been taken so that you can follow all important test steps. Except
for screenshots also browser logs, network logs and page source are stored.
Setup environmental variables in the same way as when running tests locally (without Docker)
npm run image:build
npm run image:start
All artifacts are copied from docker container to target/screenshots
direcotry. See detailed description
of artifacts in Running the Tests Locally/Review the test results section.
During the test development, it is sometimes convenient to run some subset of test against locally stored static html page. This is especially useful during debugging of css selectors.
Copy template src/local/local.template.ts
to the same directory src/local
and
implement the test.
npm start local