mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
Improve documentation for AWX E2E (#1381)
* Improve documentation for AWX E2E
This commit is contained in:
parent
8d57b84251
commit
d7616accf5
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user