<commit_before>Selenium Tests
==============

These are UI-level acceptance tests designed to be executed on an edx-platform sandbox instance.

The tests use the ``bok-choy`` library.  For a tutorial, see `here`__.

__ http://bok-choy.readthedocs.org/en/latest/tutorial.html


To use the tests:

1. Install the test requirements:

.. code:: bash

    cd edx-ora2
    pip install -r requirements/test-acceptance.txt


2. Run the tests

.. code:: bash

    cd edx-ora2/test/acceptance
    export BASE_URL=https://{USER}:{PASSWORD}@example.com
    python tests.py<commit_msg>Update test/acceptance/README.rst<commit_after>Selenium Tests
==============

These are UI-level acceptance and accessibility tests designed to be run against an edx-platform sandbox instance.

The tests use the ``bok-choy`` library.  For a tutorial, see `here`__.

__ http://bok-choy.readthedocs.org/en/latest/tutorial.html


To use the tests:

1. Install the test requirements:

.. code:: bash

    cd edx-ora2
    pip install -r requirements/test-acceptance.txt


2. Prepare for tests

.. code:: bash

    cd edx-ora2/test/acceptance
    export BASE_URL=https://{USER}:{PASSWORD}@example.com

3. Run the tests

To run the acceptance tests:
    
.. code:: bash

    python tests.py

To run the accessibility tests, which must be run with phantomjs as the browser:
    
.. code:: bash

    SELENIUM_BROWSER=phantomjs python accessibility.py
{'fraction_non_alphanumeric': 0.11394196744515216, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 3.4746835443037973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1523267', 'n_tokens_mistral': 479, 'n_tokens_neox': 447, 'n_words': 146}