@@ -474,28 +474,44 @@ As always, it's best to try to
474474make smaller changes, test them, and once they work
475475check them in. That way you won't need to debug a long complicated
476476set of changes.
477+ See the next section on [ testing] ( #testing ) .
478+
479+ ### Testing
480+
481+ Every time you reload the lab HTML, the program will reload and
482+ all self-tests will be run. If you see no errors, and the text entry
483+ areas are showing in yellow, a * lot* of things are working well.
477484
478485Please create tests! You can create test cases for attempts
479486(` successes ` should pass, ` failures ` should fail), and test cases
480487to ensure the hints work correctly.
481- Remember, hints are checked in order - it's possible to create a hint
488+ Hints are checked in order - it's possible to create a hint
482489that won't trigger because something earlier would always match.
483490These tests are automatically checked every time the page is (re)loaded.
484491
492+ The script ` mass-test ` for Linux or MacOS will automatically open
493+ every lab in your default browser's current window.
494+ This will rerun all our lab automated tests.
495+ If every lab has a yellow text entry area, and doesn't show test failure
496+ alerts, then all the labs pass the test.
497+
485498### Debugging
486499
487500Sadly, sometimes things don't work; here are some debugging tips for labs.
488501
489- Every time you reload the lab HTML, the program will reload and
490- all self-tests will be run. If you see no errors, and the text entry
491- areas are showing in yellow, a * lot* of things are working well.
492-
493502If you load a page and the text entries don't have color, there
494503was a serious problem loading things.
495504Use your browser's * Developer Tools* to show details.
496505In Chrome, this is More Tools -> Developer Tools -> (Console Tab).
497506In Firefox, this is More Tools -> Web Developer Tools -> (Console Tab).
498507You may need to further open specifics to see them.
508+ Often the problem is that (1) a line just before added material needs a
509+ trailing comma, or (2) a string was not properly closed (e.g.,
510+ it is double-quoted but includes double-quote that was not properly escaped).
511+
512+ If the JavaScript loads successfully, but then a self-test fails,
513+ you'll see alert box(es) telling you which tests failed.
514+ See [ testing] ( #testing ) .
499515
500516Note:
501517
0 commit comments