enable auto-capturing of hars in bok-choy tests
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
"""
|
||||
Single page performance tests for Studio.
|
||||
"""
|
||||
from bok_choy.performance import WebAppPerfReport, with_cache
|
||||
from bok_choy.web_app_test import WebAppTest, with_cache
|
||||
from ..pages.studio.auto_auth import AutoAuthPage
|
||||
from ..pages.studio.overview import CourseOutlinePage
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
|
||||
class StudioPagePerformanceTest(WebAppPerfReport):
|
||||
@attr(har_mode='explicit')
|
||||
class StudioPagePerformanceTest(WebAppTest):
|
||||
"""
|
||||
Base class to capture studio performance with HTTP Archives.
|
||||
|
||||
@@ -33,9 +34,9 @@ class StudioPagePerformanceTest(WebAppPerfReport):
|
||||
org=self.course_org,
|
||||
course=self.course_num
|
||||
)
|
||||
self.new_page(har_name)
|
||||
self.har_capturer.add_page(self.browser, har_name)
|
||||
course_outline_page.visit()
|
||||
self.save_har(har_name)
|
||||
self.har_capturer.save_har(self.browser, har_name)
|
||||
|
||||
def record_visit_unit(self, section_title, subsection_title, unit_title):
|
||||
"""
|
||||
@@ -47,9 +48,9 @@ class StudioPagePerformanceTest(WebAppPerfReport):
|
||||
org=self.course_org,
|
||||
course=self.course_num
|
||||
)
|
||||
self.new_page(har_name)
|
||||
self.har_capturer.add_page(self.browser, har_name)
|
||||
course_outline_unit.go_to()
|
||||
self.save_har(har_name)
|
||||
self.har_capturer.save_har(self.browser, har_name)
|
||||
|
||||
|
||||
class StudioJusticePerformanceTest(StudioPagePerformanceTest):
|
||||
|
||||
@@ -40,10 +40,7 @@ class BokChoyTestSuite(TestSuite):
|
||||
|
||||
# Ensure that we have a directory to put logs and reports
|
||||
self.log_dir.makedirs_p()
|
||||
|
||||
if self.ptests:
|
||||
self.har_dir.makedirs_p()
|
||||
|
||||
self.har_dir.makedirs_p()
|
||||
self.report_dir.makedirs_p()
|
||||
test_utils.clean_reports_dir()
|
||||
|
||||
@@ -113,7 +110,7 @@ class BokChoyTestSuite(TestSuite):
|
||||
cmd = [
|
||||
"DEFAULT_STORE={}".format(self.default_store),
|
||||
"SCREENSHOT_DIR='{}'".format(self.log_dir),
|
||||
"HAR_DIR='{}'".format(self.har_dir),
|
||||
"BOK_CHOY_HAR_DIR='{}'".format(self.har_dir),
|
||||
"SELENIUM_DRIVER_LOG_DIR='{}'".format(self.log_dir),
|
||||
"nosetests",
|
||||
test_spec,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
-e git+https://github.com/edx/js-test-tool.git@v0.1.5#egg=js_test_tool
|
||||
-e git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking
|
||||
-e git+https://github.com/edx/edx-analytics-data-api-client.git@0.1.0#egg=edx-analytics-data-api-client
|
||||
-e git+https://github.com/edx/bok-choy.git@2e6eab960a97fe41778292fe8e1b2f0b69a1be2d#egg=bok_choy
|
||||
-e git+https://github.com/edx/bok-choy.git@4a259e3548a19e41cc39433caf68ea58d10a27ba#egg=bok_choy
|
||||
-e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash
|
||||
-e git+https://github.com/edx/acid-block.git@459aff7b63db8f2c5decd1755706c1a64fb4ebb1#egg=acid-xblock
|
||||
-e git+https://github.com/edx/edx-ora2.git@release-2014-09-12T14.26#egg=edx-ora2
|
||||
|
||||
Reference in New Issue
Block a user