Commit 153ca29c by Ben Patterson

DO NOT MERGE. this runs one test for acceptance w a profile.

parent 2adb90b4
......@@ -73,7 +73,7 @@ test-js-debug: render-templates
test-sandbox: test-acceptance test-a11y
test-acceptance:
./scripts/test-acceptance.sh tests
./scripts/test-acceptance.sh tests FullWorkflowOverrideTest.test_staff_override_at_end
test-a11y:
./scripts/test-acceptance.sh accessibility
......@@ -32,6 +32,7 @@ mkdir -p test/logs
cd test/logs
test_name="${1:-acceptance}"
specific_test="${2}"
# The machines that these tests run on in jenkins have an old
......@@ -53,4 +54,4 @@ if [[ "${test_name}" = "accessibility" ]]; then
fi
echo "Running acceptance tests from ${test_name}.py against the sandbox..."
nosetests ../acceptance/${test_name}.py --with-xunit --xunit-file=../acceptance/xunit-${test_name}.xml
nosetests ../acceptance/${test_name}.py:${specific_test} --with-xunit --xunit-file=../acceptance/xunit-${test_name}.xml
......@@ -892,7 +892,22 @@ class FullWorkflowOverrideTest(OpenAssessmentTest, FullWorkflowMixin):
"""
def setUp(self):
super(FullWorkflowOverrideTest, self).setUp("full_workflow_staff_override", staff=True)
import cProfile, pstats, StringIO
pr = cProfile.Profile()
pr.enable()
self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)
self.addCleanup(pr.disable)
# self.addCleanup(self.break_fix, pr)
self.addCleanup(pr.dump_stats, 'ben.log')
def log_to_file(pr):
with open('w', 'profile.log') as f:
f.write(pr.print_stats())
# def break_fix(self, pr):
# from nose.tools import set_trace
# set_trace()
@retry()
@attr('acceptance')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment