Build up testing cases for Moat including:
- Basic Ad searching;
- Checking the Search Try These list: a. randomly click one of the three Ads in Try These list; b. check the three Ads in Try These list are generating randomly;
- Checking the Recent Seen Ads are no more than half an hour old;
- Checking Ad search result count: a. check Ad count if results are in a single page (not greater than 100); b. check Ad count even results are more than 100;
- Check the "Share this Ad" feature.
Structure:
- Base test action + UiMap + Constants dictionary for common use in other modules;
- Page objects for each page, and page common configuration;
- Test directory including modules for each test scenarios.
pip install -U selenium
pip install nose
Setting up python - Selenium environment: http://selenium-python.readthedocs.org/installation.html
After downloading the codes, please setup PATHONPATH as the path to the folder when running locally. Example:
export PYTHONPATH=/Users/RonnyWang/Workspace/Moativation_python
- nosetests -- for running all test cases;
- nosetests moat_*****_test.py -- for running a specific test module;
- nosetests --nocapture -- for running along with logging information displayed on console
- Logging system;
- Generating reports.
Ronny Wang