From d7616accf53dc0f6171666b8b28922f017ad009c Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Thu, 1 Mar 2018 12:00:16 -0500 Subject: [PATCH] Improve documentation for AWX E2E (#1381) * Improve documentation for AWX E2E --- awx/ui/test/e2e/README.md | 56 ++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/awx/ui/test/e2e/README.md b/awx/ui/test/e2e/README.md index 3f31335edb..d56bdda0d1 100644 --- a/awx/ui/test/e2e/README.md +++ b/awx/ui/test/e2e/README.md @@ -1,31 +1,45 @@ ## AWX E2E -```shell -# setup -docker exec -i tools_awx_1 sh <<-EOSH - awx-manage createsuperuser --noinput --username=awx-e2e --email=null@ansible.com - awx-manage update_password --username=awx-e2e --password=password -EOSH +#### Introduction +This is an automated functional test suite for the front end. +#### Technology +The tests are written in Node.js and use the [Nightwatch](https://github.com/nightwatchjs/nightwatch) test runner. + +#### Requirements +- node.js 6.x LTS +- npm 3.x LTS + +#### Installation +A successful invocation of `make ui-devel` will prepare your environment with the software +dependencies required to run these tests. + +#### Configuration +Three inputs are required: + +*AWX_E2E_URL* + +> A valid url for a running AWX instance that is reachable by your machine. This can be your local +development instance or other awx instance. Defaults to *https://localhost:8043*. + +*AWX_E2E_USERNAME* + +> A valid admin username for the target awx instance. Defaults to *awx-e2e*. + +*AWX_E2E_PASSWORD* + +> A valid password for the admin. Defaults to *password*. + +These inputs can be provided as environment variables or defined as default values in [settings](settings.js). +The settings file also contains all other configurable input values to this test suite. + +#### Usage +```shell # run all of the tests with a live browser npm --prefix awx/ui run e2e # run a subset of the tests npm --prefix awx/ui run e2e -- --filter="test-credentials*" - -# setup a local webdriver cluster for test development -docker-compose \ - -f awx/ui/test/e2e/cluster/docker-compose.yml \ - -f awx/ui/test/e2e/cluster/docker-compose.devel-override.yml \ - up --scale chrome=2 hub chrome - -# run headlessly on the cluster -AWX_E2E_LAUNCH_URL='https://awx:8043' npm --prefix awx/ui run e2e -- --env=cluster - -# run with multiple workers -AWX_E2E_LAUNCH_URL='https://awx:8043' AWX_E2E_CLUSTER_WORKERS=2 \ - npm --prefix awx/ui run e2e -- --env=cluster --filter="test-*" ``` - **Note:** -- Unless overridden in [settings](settings.js), tests will run against `localhost:8043`. - Use `npm --prefix awx/ui run e2e -- --help` to see additional usage information for the test runner. +- All example commands in this document assume that you are working from the root directory of the awx project.