File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
gadgets/standard_revisions-tests Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ How to run tests
2+ ----------------
3+
4+ Tests depend on non-standard software being installed. The instructions below
5+ apply to Linux. Tests should work on other operating systems, but the
6+ prerequisites might be sligtly differents.
7+
8+ Tests are written in python and depend on non-standard python packages. It's
9+ best to install these in virtual python environment so that packages installed
10+ to the system are not affected.
11+
12+ cd path/to/cppreference
13+ virtualenv --no-site-packages --python=/usr/bin/python3 venv
14+ . venv/bin/activate
15+
16+ Now install Selenium python bindings:
17+
18+ pip install selenium
19+
20+ The tests use Selenium Firefox Webdriver which depends on geckodriver being
21+ installed. Download applicable release from
22+ [here](https://github.com/mozilla/geckodriver/releases/), extract the executable
23+ and put it somewhere in PATH.
24+
25+ Now just run tests:
26+
27+ cd gadgets/standard_revisions-tests
28+ ./test.sh
29+
30+ Note that the tests at the moment hardcode official cppreference.com MediaWiki
31+ instance. The test pages there are not always updated - if that's the case,
32+ please sync them to the sources stored at gadgets/standard_revisions-tests-pages
33+ in this repository.
Original file line number Diff line number Diff line change 1+ python3 -m unittest discover
You can’t perform that action at this time.
0 commit comments