Table of contents
- Introduction
- Prepare the environment?
- Combination with Selenium IDE
- Run the tests
- Collaborate
- Compatibility with Formy
- Documentation
- Contact us!!
This is a framework for Selenium tests written in Python. It is based on Selenium and pytest.
chmod +x express-install && ./express-install
You should see:
...
Done!
Please restart your shell or run:
source <YOUR_HOME>/<SHELL_RC_FILE>
To get familiar with express execute:
express-run -h
Export the Python pytest from Selenium IDE and copy inside test folder.
cp exported/test_login.py express/test/
express-run -n|--number <tests_in_parallel> --headless --browser <browser1> --browser <browser2> <test_file.py>
- If you are not in a rush, you can run the tests sequentially on a single browser.
express-run --browser chrome test/test_example.py
- If you want to run the tests in parallel on a single browser, you can use the -n option.
express-run -n 2 --browser chrome test/test_example.py
- If you want to run the tests in parallel on multiple browsers, you can use the --browser option multiple times.
express-run -n 2 --browser chrome --browser firefox test/test_example.py
- If you want to run the tests in parallel on multiple browsers in headless mode, you can use the --headless option.
express-run -n 2 --browser chrome --browser firefox --headless test/test_example.py
For example if I execute test/test_login.py
with 2 browsers and two accounts.
express-run --headless --browser chrome --browser firefox test/test_dropdown.py
It will factually run 2 tests per browser, so 4 tests in total.
The time is 17.01s for these 4 tests.
Now if instead I use -n 4
to run 4 tests in parallel.
express-run --headless -n 4 --browser chrome --browser firefox test/test_login.py
The time is 8.42s for the same 4 tests.
It is good improvement if you have too many tests to run.
This is covering what tests are available and compatible with https://formy-project.herokuapp.com/.
- Autocomplete
- Buttons
- Checkbox
- Datepicker
- Drag and Drop
- Dropdown
- Enabled and Disabled elements
- File Upload
- Key and Mouse press
- Modal
- Page Scroll
- Radio Button
- Switch Window
- Complete Web Form
Please see the documentation.