Table of Contents
...
- Read the documentation: https://github.com/edx/edx-ora2/blob/master/test/acceptance/README.rst/
On your devstack, do the following:
No Format nopanel true (as edxapp user) cd /edx/src/edx-ora2 source edx-ora2/bin/activate export ORA_SANDBOX_URL=https://staff:edx@andy-armstrong.sandbox.edx.org (replace with name of your sandbox)
Debugging Python with PyCharm
The first step is to be able to debug into ORA2 source code when running Studio or LMS:
- Click on Run > "Edit Configurations..." (or choose it from the toolbar)
- For each configuration that might need ORA 2
- Select the configuration in question
- Click the "..." icon for the "Path Mappings" property
- In the modal that appears, click "+" to add a new mapping
- In the new row that appears, specify the local path to your ORA2 source code
- Then specify the remote path as:
/edx/src/edx-ora2
- Hit OK
- Hit OK to save all the changes
The next step is to add a new remote interpreter which uses the ORA2 virtual env:
- Follow the steps to create a remote interpreter here:
- Before saving the new interpreter, change the "Python interpreter path" to point to the ORA2 virtual env:
/edx/src/edx-ora2/edx-ora2/bin/python
- Note that this will have changed the default project interpreter to be your new one, so switch it back to your original
The final step is to add a debug configuration for running ORA2 tests:
- The simplest option is to clone an existing configuration, e.g. the one you use for running LMS
- Rename the configuration as "ORA Tests"
- Make sure that the script path is relative (./manage.py)
- Change the "Script Parameters" to "test" (this will run all the tests)
- Click on "Environment Variables":
- Click on "+" to add a new environment variable
- Specify the name as "DJANGO_SETTINGS_MODULE"
- Specify the value as "settings.test"
- Change the "Python interpreter" to select your new ORA2 remote interpreter
- Change the working directory to
/edx/src/edx-ora2
- Click on "Path Mappings":
- Verify that you have a mapping for edx-ora2 (you should have created one in the previous section above)
- If not, follow the steps above to add one
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
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 SetupThese are the steps to install ORA2 into your pre-existing devstack image:
To run the ORA scripts for packaging, testing etc, you should do the following:
After you have run all the setup commands above, when you restart your devstack do the following to execute ORA scripts:
Debugging JavaScript tests
http://localhost:9876/debug.html
|
...
Debugging Python with PyCharm
The first step is to be able to debug into ORA2 source code when running Studio or LMS:
- Click on Run > "Edit Configurations..." (or choose it from the toolbar)
- For each configuration that might need ORA 2
- Select the configuration in question
- Click the "..." icon for the "Path Mappings" property
- In the modal that appears, click "+" to add a new mapping
- In the new row that appears, specify the local path to your ORA2 source code
- Then specify the remote path as:
/edx/src/edx-ora2
- Hit OK
- Hit OK to save all the changes
The next step is to add a new remote interpreter which uses the ORA2 virtual env:
- Follow the steps to create a remote interpreter here:
- Before saving the new interpreter, change the "Python interpreter path" to point to the ORA2 virtual env:
/edx/src/edx-ora2/edx-ora2/bin/python
- Note that this will have changed the default project interpreter to be your new one, so switch it back to your original
The final step is to add a debug configuration for running ORA2 tests:
...
|
...