I completed the grading of the web development programming exercise (PEX) this afternoon.

While I feel that I was fairly generous with awarding points, some of you lost a large number due to failures of the automated tests. Because I feel that such a large deduction may not reflect your understanding of this material, I will consider awarding partial credit for these tests if 1) you would have passed additional tests if they were not skipped after the first failure or 2) the failures have a single root cause. If you wish to take advantage of this opportunity, you must email me a written explanation of why partial credit should be awarded based on the prior criteria—the deadline to request a regrade is retreat on Thursday, 25 April.


Instructions to prevent tests from being skipped

Replace the last two lines in tests/web/conftest.py with pass. The patch of this change is as follows:

diff --git a/tests/web/conftest.py b/tests/web/conftest.py
index 035cacc..af477c3 100644
--- a/tests/web/conftest.py
+++ b/tests/web/conftest.py
@@ -22,5 +22,4 @@ def pytest_runtest_setup(item):
     if "incremental" in item.keywords:
         previousfailed = getattr(item.parent, "_previousfailed", None)
         if previousfailed is not None:
-            pytest.xfail("previous test failed ({})".format(
-                previousfailed.name))
+            pass

Identifying the root cause for test failures

This challenge is up to you. Basically you need to determine the smallest set of changes required to pass all the tests (or at least a large subset of those that failed). In the ideal case, all the failures can be corrected by changing a single line of code. For example, if all the JavaScript validation tests failed because the correct form could not be identified (i.e., one where the action was demo.php) and correcting the form’s attributes allows all the tests to pass, then that change would be the root cause.

I will help you to interpret error messages from the test cases, but everything else related to identifying the root cause will be up to you. I will not award partial credit for fixing multiple issues—e.g., if you failed 10 test cases and 10 separate changes are required to pass them, then there is no common root cause, but I will consider partial credit if 5 of the failed test cases can be passed with a single change.