Versions Compared

Key

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

Table of Contents

Table of Contents

Testing

General Testing configurations: https://github.com/edx/edx-platform/blob/master/docs/en_us/internal/testing.rst

...

  • Make sure that IntegrateXQuartzintoPyCharm is working and to remember the DISPLAY variable. (in the terminal you can do echo $DISPLAY and make sure that is non-null
  • Configure and start Bokchoy cms server
    • Go to Run -> Edit Configurations.
    • Clone the earlier Studio or LMS server configuration.
    • Change the name to something more memorable, e.g. "CMS Bokchoy server".
    • Script: ./manage.py.
    • Script parameters: cms --settings bok_choy runserver 0.0.0.0:8031 --traceback --noreload (if you have already compiled the assets).
  • Configure and start Bokchoy lms server
    • Clone the previous setting
    • Change the name to something more memorable, e.g. "LMS Bokchoy server".
    • Script: ./manage.py.
    • Script parameters: lms --settings bok_choy runserver 0.0.0.0:8003 --traceback --noreload (if you have already compiled the assets).
  • Configure and debug Bokchoy test run
    • Clone the previous setting
    • Change the name to something more memorable, e.g. "Bokchoy test".
    • Script: /edx/app/edxapp/venvs/edxapp/bin/nosetests.
    • Script parameters: /edx/app/edxapp/edx-platform/common/test/acceptance/tests/discussion/test_cohort_management.py:CohortConfigurationTest --with-xunit --xunit-file=/edx/app/edxapp/edx-platform/reports/bok_choy/xunit.xml --verbosity=2
    • Click to edit the "Environment variables" property
    • Set the DISPLAY variable to whatever value you obtained when setting up XQuartz (see instructions) i.e. DISPLAY=localhost:11.0
  • You might have to log out/ log in to the terminal you opened in the first step if Pycharm can't find your display

Troubleshooting


Error: The browser appears to have exited before we could connect.

If you see this error, either you have not successfully set up XQuartz or you haven't used the correct DISPLAY in your Run Configuration in PyCharm.  See Integrating XQuartz into PyCharm instructions.

No Format
BrokenPromise: Promise not satisfied: Browser is instantiated successfully.
-------------------- >> begin captured logging << --------------------
bok_choy.browser: INFO: Using local browser: firefox [Default is firefox]
bok_choy.browser: INFO: Using default firefox profile
bok_choy.browser: DEBUG: Failed to instantiate browser: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

Error: You must link this course to an organization in order to continue.

If you see the following error, you may need to set FEATURES['MILESTONES_APP'] and FEATURES['ORGANIZATIONS_APP'] to False in cms/envs/bok_choy.py and lms/envs/bok_choy.py.

No Format
Response content was: {
  "error": "You must link this course to an organization in order to continue. Organization you selected does not exist in the system, you will need to add it to the system"
}