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`
Use an s3 url for files > 1g:
`mh_driver inbox put -H [admin ip] -f https://s3.amazonaws.com/my-bucket/presenter.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!
0.2.0 (2015-11-30)
------------------
Updated default inbox paths
0.3.0 (2015-11-30)
------------------
Allow "upload" from s3. disallow upload from local for files > 1g.
Metadata
Release files for dce-mh-selenium 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dce-mh-selenium-0.3.0.tar.gz | 9.6 kB | Without provenance | Details |
Release files / dce-mh-selenium-0.3.0.tar.gz
| Download URL | dce-mh-selenium-0.3.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c1fb3b74abf611000d8cb57dda3abca0cb3e7272d6125c1d5e3b4fe98436a23
|
|
BLAKE2b-256 checksum How to use checksums |
add1e4e3554be2ca5ca140e864a749edf34292a022aa84ab27a35a3a9eb74cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dce-mh-selenium 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.