Technical Demo for Swapcard Application Process
First:
Make sure you have Python 3 and pip installed in your machine
- Have Google Chrome installed in your machine and an appropriate chromedriver for its version.
- Have Mozilla Firefox installed in your machine and an appropriate geckodriver for its version.
Make sure both chromedriver and geckodriver are in the PATH environment variable of the system
pip install -r requirements.txt
Selenium Wire requires OpenSSL for decrypting HTTPS requests. This is normally already installed on most systems, but if it's not you need to install it.
Linux
# For apt based Linux systems
sudo apt install openssl
# For RPM based Linux systems
sudo yum install openssl
# For Linux alpine
sudo apk add openssl
MacOS
brew install openssl
Windows
No installation is required.
Run python setup.py install
(make sure that python refers to Python 3)
To run the test, just call pytest
Edit the file data/users.json
with the appropriate user and password to log into the system.
By default, the test will run in Chrome, but it can also run in Firefox if wanted. Use the --browser="[option]"
with pytest
.
pytest --browser="Chrome"
pytest --browser="Firefox"
pytest --browser="Chrome" --browser="Firefox"
The tests will run in both browsers following the --browser
order.
To run tests in parallel, simply call using: pytest -n 2
or pytest --browser="Chrome" --browser="Firefox" -n 4