Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents

...

There are a lot of great ORA resources:

...

Using ORA with docker devstack

...

Note - anytime I say "from inside the lms", that means you've run 'make lms-shell' from the devstack directory and are on a command prompt inside the lms container.

...

  1. The simplest option is to clone an existing configuration, e.g. the one you use for running LMS
  2. Rename the configuration as "ORA Tests"
  3. Make sure that the script path is relative (./manage.py)
  4. Change the "Script Parameters" to "test" (this will run all the tests)
  5. Click on "Environment Variables":
    1. Click on "+" to add a new environment variable
    2. Specify the name as "DJANGO_SETTINGS_MODULE"
    3. Specify the value as "settings.test"
  6. Change the "Python interpreter" to select your new ORA2 remote interpreter
  7. Change the working directory to /edx/src/edx-ora2
  8. Click on "Path Mappings":
    1. Verify that you have a mapping for edx-ora2 (you should have created one in the previous section above)
    2. If not, follow the steps above to add one

...

titleDeprecated - Vagrant Instructions

DEPRECATED - Using ORA with vagrant devstack

(Note that some of this is outdated, I'm working on updating it to match the 2.0.0 release)

Initial Setup 

 These are the steps to install ORA2 into your pre-existing devstack image:

Clone edx-ora2 into the src directory next to edx-platform folder 

No Format
cd src
git clone https://github.com/edx/edx-ora2
git clone https://github.com/edx/edx-submissions

Install the edx-submissions and ORA2 packages into edx-platform. From devstack do the following (note ORA2 goes first so that we can uninstall its copy of edx-submissions):

No Format
sudo su edxapp
pip uninstall ora2
pip install -e /edx/src/edx-ora2
pip uninstall edx-submissions
pip install -e /edx/src/edx-submissions

To run the ORA scripts for packaging, testing etc, you should do the following:

As edxapp user, run the following. 

No Format
sudo su edxapp
cd /edx/src/edx-ora2
# create a new virtualenv
virtualenv edx-ora2
# activate this new virtualenv
source edx-ora2/bin/activate
make install

You can run the ORA tests as the edxapp user: 

No Format
cd /edx/src/edx-ora2
# activate the ORA2 virtualenv
source edx-ora2/bin/activate
make test
# run just the Python tests
make test-python
# debug the Jasmine tests in a browser
make test-js-debug

When you run the lms do not use the full paver devstack lms or studio commands as they will cause pip to install ORA2 and submissions again.

Code Block
lms runserver --settings=devstack 0.0.0.0:8000

After you have run all the setup commands above, when you restart your devstack do the following to execute ORA scripts:

No Format
vagrant ssh
sudo su edxapp
cd /edx/src/edx-ora2
source edx-ora2/bin/activate	

# now you can use make commands, such as:
make sass

Debugging JavaScript tests

Before starting your devstack, add the following line to the Vagrantfile (next to the other port forwarding lines): 

No Format
config.vm.network :forwarded_port, guest: 9876, host: 9876  # ORA2 Karma tests

...

  • Open your browser of choice onto this URL:
http://localhost:9876/debug.html

...