Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3f5b829d
Commit
3f5b829d
authored
Sep 17, 2014
by
clytwynec
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5147 from edx/clytwynec/auto_capture_har_on_error
enable auto-capturing of hars in bok-choy tests
parents
1a7009ec
4b5b72a3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
15 deletions
+22
-15
common/test/acceptance/pages/lms/discussion.py
+11
-2
common/test/acceptance/performance/test_studio_performance.py
+8
-7
pavelib/utils/test/suites/bokchoy_suite.py
+2
-5
requirements/edx/github.txt
+1
-1
No files found.
common/test/acceptance/pages/lms/discussion.py
View file @
3f5b829d
from
contextlib
import
contextmanager
from
bok_choy.page_object
import
PageObject
from
bok_choy.promise
import
EmptyPromise
from
bok_choy.promise
import
EmptyPromise
,
Promise
from
.course_page
import
CoursePage
...
...
@@ -348,7 +348,16 @@ class DiscussionUserProfilePage(CoursePage):
return
[
elem
.
get_attribute
(
"id"
)[
7
:]
for
elem
in
elems
]
def
get_current_page
(
self
):
return
int
(
self
.
q
(
css
=
"nav.discussion-paginator li.current-page"
)
.
text
[
0
])
def
check_func
():
try
:
current_page
=
int
(
self
.
q
(
css
=
"nav.discussion-paginator li.current-page"
)
.
text
[
0
])
except
:
return
False
,
None
return
True
,
current_page
return
Promise
(
check_func
,
'discussion-paginator current page has text'
,
timeout
=
5
,
)
.
fulfill
()
def
_check_pager
(
self
,
text
,
page_number
=
None
):
"""
...
...
common/test/acceptance/performance/test_studio_performance.py
View file @
3f5b829d
"""
Single page performance tests for Studio.
"""
from
bok_choy.
performance
import
WebAppPerfRepor
t
,
with_cache
from
bok_choy.
web_app_test
import
WebAppTes
t
,
with_cache
from
..pages.studio.auto_auth
import
AutoAuthPage
from
..pages.studio.overview
import
CourseOutlinePage
from
nose.plugins.attrib
import
attr
class
StudioPagePerformanceTest
(
WebApp
PerfRepor
t
):
@attr
(
har_mode
=
'explicit'
)
class
StudioPagePerformanceTest
(
WebApp
Tes
t
):
"""
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
):
...
...
pavelib/utils/test/suites/bokchoy_suite.py
View file @
3f5b829d
...
...
@@ -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
,
...
...
requirements/edx/github.txt
View file @
3f5b829d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment