test-development-environment.sh 1.97 KB
Newer Older
1
#!/usr/bin/env bash
2
set -e
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
################################################################################
# This executes a small subset of the edx-platform tests.  It is intended as
# a means of testing newly provisioned AMIs for our jenkins workers.
#
# The two main things that happen here:
#   1. The setup from edx-platform/scripts/all-tests.sh, the script that is
#      run by the jenkins workers to kick off tests.
#   2. The paver command for tests, coverage and quality reports are run.
#      For the tests, it runs only a small number of test cases for each
#      test suite.
###############################################################################

# Doing this rather than copying the file into the scripts folder so that
# this file doesn't get cleaned out by the 'git clean' in all-tests.sh.
cd edx-platform-clone

# This will run all of the setup it usually runs, but none of the
# tests because TEST_SUITE isn't defined.
21
source scripts/jenkins-common.sh
22

23
# Now we can run a subset of the tests via paver.
24
# Run some of the common/lib unit tests
25
paver test_lib -t common/lib/xmodule/xmodule/tests/test_stringify.py
26 27 28 29

# Generate some coverage reports
paver coverage

30
# Run some of the djangoapp unit tests
31 32 33 34 35 36 37
paver test_system -t lms/djangoapps/courseware/tests/tests.py
paver test_system -t cms/djangoapps/course_creators/tests/test_views.py

# Run some of the javascript unit tests
paver test_js_run -s xmodule

# Run some of the bok-choy tests
38
paver test_bokchoy -t discussion/test_discussion.py:DiscussionTabSingleThreadTest
39
paver test_bokchoy -t studio/test_studio_with_ora_component.py:ORAComponentTest --fasttest
40
paver test_bokchoy -t lms/test_lms_matlab_problem.py:MatlabProblemTest --fasttest
41 42

# Run some of the lettuce acceptance tests
43 44
paver test_acceptance -s lms --extra_args="lms/djangoapps/courseware/features/problems.feature -s 1"
paver test_acceptance -s cms --extra_args="cms/djangoapps/contentstore/features/html-editor.feature -s 1"
45 46 47

# Generate quality reports
paver run_quality