Selenium tasks and page objects for DCE Matterhorn
Project description
## mh-selenium
Selenium stuff for DCE Matterhorn
## Getting started
1. Create & activate a virtualenv: `virtualenv venv && source venv/bin/activate`
2. `pip install dce-mh-selenium`
3. `mh_driver --help` for commands and `mh_driver [cmd] --help` for command options
## Example process
The following sequence of commands shows an example of how to upload some media
to the Matterhorn inbox, create symlinks to populate the inbox selection menu
in the **Upload Recording** UI, execute a number of uploads
**Note**: The initial inbox upload/symlink commands will prompt for the ssh
login password. Obvs in an automated testing scenario you will need have either
a passphraseless ssh key or AWS instance profiles set up.
#### 1. Upload the initial media to the inbox
`mh_driver inbox put -H [admin ip] -f path/to/presenter.mp4`
`mh_driver inbox put -H [admin ip] -f path/to/presentation.mp4`
#### 2. Create symlinks
This will create 10 inbox symlinks to each of the previously uploaded files,
i.e., 10 identical presenter/presentation copies. Each copy will be named using
the sequence integer: `presenter_1.mp4`, `presenter_2.mp4`, etc.
`mh_driver inbox symlink -H [admin ip] -f presenter.mp4 -c 10`
`mh_driver inbox symlink -H [admin ip] -f presentation.mp4 -c 10`
#### 3. Check inbox contents (optional)
`mh_driver inbox list -H [admin ip]`
#### 4. Run the selenium upload tasks
The `uname` and `passwd` values here correspond to the Matthorn admin interface
login.
```
for i in `seq 1 10`; do mh_driver upload -u [uname] -p [passwd] --inbox --presenter presenter_${i}.mp4 --presentation presentation_${i}.mp4 [admin base_url] ; done
```
This *should* result in 10 processing workflows. The flakiness of Selenium + MH
makes this not guaranteed.
#### 5. (later) execute the trim tasks
In a happy world you'll have a set of 10 of workflows that process their
respective copies of the uploaded media and then pause/hold at the `editor`
operation waiting for a human to intervene. We don't need stinking humans; we
have Selenium!
`mh_driver trim -u [uname] -p [passwd] [admin base_url]`
## Troubleshooting
### Known issues
#### UnexpectedAlertPresentException: Alert Text: Could not resume Workflow: error
Check that Matterhron nodes, particularly admin, are not in maintenance state.
## Resources
* python selenium docs: https://selenium-python.readthedocs.org/index.html
dce-mh-selenium change log
==========================
0.1.0 (2015-09-14)
------------------
Initial release!
Selenium stuff for DCE Matterhorn
## Getting started
1. Create & activate a virtualenv: `virtualenv venv && source venv/bin/activate`
2. `pip install dce-mh-selenium`
3. `mh_driver --help` for commands and `mh_driver [cmd] --help` for command options
## Example process
The following sequence of commands shows an example of how to upload some media
to the Matterhorn inbox, create symlinks to populate the inbox selection menu
in the **Upload Recording** UI, execute a number of uploads
**Note**: The initial inbox upload/symlink commands will prompt for the ssh
login password. Obvs in an automated testing scenario you will need have either
a passphraseless ssh key or AWS instance profiles set up.
#### 1. Upload the initial media to the inbox
`mh_driver inbox put -H [admin ip] -f path/to/presenter.mp4`
`mh_driver inbox put -H [admin ip] -f path/to/presentation.mp4`
#### 2. Create symlinks
This will create 10 inbox symlinks to each of the previously uploaded files,
i.e., 10 identical presenter/presentation copies. Each copy will be named using
the sequence integer: `presenter_1.mp4`, `presenter_2.mp4`, etc.
`mh_driver inbox symlink -H [admin ip] -f presenter.mp4 -c 10`
`mh_driver inbox symlink -H [admin ip] -f presentation.mp4 -c 10`
#### 3. Check inbox contents (optional)
`mh_driver inbox list -H [admin ip]`
#### 4. Run the selenium upload tasks
The `uname` and `passwd` values here correspond to the Matthorn admin interface
login.
```
for i in `seq 1 10`; do mh_driver upload -u [uname] -p [passwd] --inbox --presenter presenter_${i}.mp4 --presentation presentation_${i}.mp4 [admin base_url] ; done
```
This *should* result in 10 processing workflows. The flakiness of Selenium + MH
makes this not guaranteed.
#### 5. (later) execute the trim tasks
In a happy world you'll have a set of 10 of workflows that process their
respective copies of the uploaded media and then pause/hold at the `editor`
operation waiting for a human to intervene. We don't need stinking humans; we
have Selenium!
`mh_driver trim -u [uname] -p [passwd] [admin base_url]`
## Troubleshooting
### Known issues
#### UnexpectedAlertPresentException: Alert Text: Could not resume Workflow: error
Check that Matterhron nodes, particularly admin, are not in maintenance state.
## Resources
* python selenium docs: https://selenium-python.readthedocs.org/index.html
dce-mh-selenium change log
==========================
0.1.0 (2015-09-14)
------------------
Initial release!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dce-mh-selenium-0.2.0.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file dce-mh-selenium-0.2.0.tar.gz
.
File metadata
- Download URL: dce-mh-selenium-0.2.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 832704d56d6a6fafd347b032d2d10a5ec603afe92d479dd4f2470c785a05588b |
|
MD5 | d512cc1d544501bc093dba5008db4d44 |
|
BLAKE2b-256 | c8a596e644337f51fd322c32328a94ec0b220266d2c7d3de28c79863c36edf58 |
File details
Details for the file dce_mh_selenium-0.2.0-py2-none-any.whl
.
File metadata
- Download URL: dce_mh_selenium-0.2.0-py2-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 128341005e6bfe039c87c01ff5b8cc3fc845750cc9f4416574ffcc367e2c758a |
|
MD5 | 3f8082bef94466661a4902212418df2d |
|
BLAKE2b-256 | fab3584c7d4b19ffd4c772b4967fde1490ed2101b9969bf39fc80786e3828d75 |