Skip to content

raeeschachar/edx-e2e-mirror

Repository files navigation

edx-e2e-tests

End-to-end tests for edX applications.

Overview

UI-level tests for edX applications:

  • pages: PageObjects for interacting with pages under test.
  • e2e_test: Bokchoy tests for the Learning Management System (LMS) and Studio.

Installation

We recommend using the provided Vagrant environment to develop and run tests.

  1. Install Vagrant
  2. In the edx-e2e-tests directory, execute this command:
vagrant up
  1. This will create and provision a new Vagrant environment.
  2. Enter a terminal session in the virtual environment with:
vagrant ssh

You will also need a deployed installation of edX lms and studio to run the tests against. See edx/configuration for instructions on provisioning an edX instance.

Configuration

  1. Before running the commands change your working directory to edx-e2e-tests. Note that the 'e2e' python virtual environment will automatically be activated.
cd edx-e2e-tests/
  1. Update the base python requirements in case they have changed since you created the vagrant environment:
pip install -r requirements/base.txt
  1. OPTIONAL: Cloning the edx-platform repo into a mounted directory in a vagrant environment can take a long time (several minutes). An alternative is to navigate to the lib directory back on your host system and clone the edx-platform repo there before proceeding.
  2. Install the page objects for the application from the edx platform repo. This will clone the entire repo into lib/edx-platform so that it can use the page objects and helper methods from common/test/acceptance. We also install capa and xmodule into the virtual environment from common/lib.
paver install_pages

Running Tests Locally

Make sure you are in the correct folder.

cd $HOME/edx-e2e-tests

To run the tests locally, following environmental variables needs to be changed before running tests.

==> BASIC_AUTH_USER
==> BASIC_AUTH_PASSWORD
==> USER_LOGIN_EMAIL
==> USER_LOGIN_PASSWORD

To run all the tests:

paver e2e_test

The commands also accept nose-style specifiers for test case or module:

To run all the tests in the file:

paver e2e_test lms/test_dashboard.py

To run all the tests in a particular class:

paver e2e_test lms/test_dashboard.py:DashboardTest

To run a single test:

paver e2e_test lms/test_dashboard.py:DashboardTest.test_resume_course

To update page objects installed from external repos:

paver install_pages

License

The code in this repository is licensed under version 3 of the AGPL unless otherwise noted.

Please see LICENSE.txt for details.

How to Contribute

Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement.

Reporting Security Issues

Please do not report security issues in public. Please email security@edx.org

Mailing List and IRC Channel

You can discuss this code on the edx-code Google Group or in the edx-code IRC channel on Freenode.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published