Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
74ef9dd0
Commit
74ef9dd0
authored
9 years ago
by
Ben Patterson
Browse files
Options
Downloads
Plain Diff
Merge pull request #10480 from edx/benp/update-bokchoy-docs
Improve documentation for bok-choy.
parents
a85cc9e1
343d2856
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/en_us/internal/testing.rst
+46
-0
46 additions, 0 deletions
docs/en_us/internal/testing.rst
with
46 additions
and
0 deletions
docs/en_us/internal/testing.rst
+
46
−
0
View file @
74ef9dd0
...
...
@@ -465,6 +465,52 @@ relative to the ``common/test/acceptance/tests`` directory. This is an example f
paver test_bokchoy --extra_args="-a 'a11y'" -t test_lms_dashboard.py:LmsDashboardA11yTest.test_dashboard_course_listings_a11y
Options for Faster Development Cycles in Bok-Choy Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following are ways in which a developer could shorten the development
cycle for faster feedback. The options below can often be used together.
**Multiprocessing Mode**
Bok-choy tests can be threaded using the `-n` switch. Using 2 threads generally
reduces test cycles by 33%. The recommendation is to make sure the
number of threads is no more than the number of processors available. For
example, the Cypress release of devstack is provisioned by default with 2
processors. In that case, to run tests in multiprocess mode::
paver test_bokchoy -n 2
*Caveat*: Not all tests have been designed with multiprocessing in mind; some
testcases (approx 10%) will fail in multiprocess mode for various reasons
(e.g., shared fixtures, unexpected state, etc). If you have tests that fail
in multiprocessing mode, it may be worthwhile to run them in single-stream mode
to understand if you are encountering such a failure. With that noted, this
can speed development for most test classes.
**Leave Your servers Running**
There are two additional switches available in the `paver test_bokchoy` task.
Used together, they can shorten the cycle between test runs. Similar to above,
there are a handful of tests that won't work with this approach, due to insufficient
teardown and other unmanaged state.
1. Start your servers in one terminal/ssh session::
paver test_bokchoy --serversonly
Note if setup has already been done, you can run::
paver test_bokcyoy --serversonly --fasttest
2. Run your tests only in another terminal/ssh session::
paver test_bokchoy --testsonly --fasttest
You must run BOTH `--testsonly` and `--fasttest`.
3. When done, you can kill your servers in the first terminal/ssh session with
Control-C. *Warning*: Only hit Control-C one time so the nose test framework can
properly clean up.
Running Lettuce Acceptance Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment