Test Suite for Lab #4
Student Web pages were tested in Firefox in the following manner
for each student's Lab 4 submission:
-
The Submit button was clicked with the page showing all
default settings (Hamburger, no Extras,
Water, Fries). The result should have been: $1.58total + $0.10tax = $1.68you pay.
Problems with pricing were often revealed here.
-
View-Page Source was clicked to examine the HTML returned by the script.
Problems in the HTML with malformed tags or indentation were revealed here.
Anything Firefox flagged in RED was marked
as a Python Typo. This tab was then closed.
-
Back was clicked in the browser to return to the order page.
-
Turkeyburger was selected (if present), all Extras were selected, Coffee and Salad
were selected. The result after Submit should have been: $5.42total + $0.34tax =
$5.76you pay.
Problems with pricing were often revealed here.
Often, too, this was the point that revealed problems in the Python script;
that is, the script might not have crashed on the default settings, but might
do so here. This is still assessed as a CRASH error (-5), even if the default
settings worked fine.
-
View-Page Source was clicked again to examine the HTML returned by the script,
to see if anything changed since the last time.
Problems in the HTML with malformed tags or indentation were revealed here.
Anything Firefox flagged in RED was marked
as a Python Typo. This tab was then closed.
-
Back was clicked in the browser to return to the order page.
-
The Reset button was clicked. This should reset everything to Hamburger, no Extras,
Water, and Fries. Problems with the radio buttons in the HTML main page are
revealed here.
-
View-Page Source was clicked to examine the HTML of the main page.
Problems in the HTML with malformed tags or indentation were revealed here.
Anything Firefox flagged in RED was marked
as a HTML Typo. This tab was then closed.
While this is not a complete test suite, it is complete enough to
identify most problems in the HTML and Python code.
Grading Rubric for Lab #4
-
A: Typo in the main Web page HTML (-1)
This can be a major structural error, such as putting code after
the </BODY> tag, or a simple error such as omitting
the / on a </H1> tag. As mentioned earlier, anything
flagged in RED by Firefox generated
this error.
-
B: Typo in the Python (-1)
This penalty was assessed for minor typos in the Python code that
caused the appearance of the Web page returned by the script to
be incorrect, such as omitting a </B> or
</LI> tag (or spelling </LI> as
</L1> instead), or for major indentation
errors in the HTML code that was returned. In these cases the returned
Web page was complete, but contained cosmetic problems.
-
C: Error in one or more Price items (-1)
This was seen in cases where at least one of the prices for a
restaurant item was wrong (most often the Turkeyburger price
was $0.00, but there were others), causing the final total to
be incorrect.
-
D: No Turkeyburger (-1)
Students incurring this error simply forgot or overlooked the
instructions to include Turkeyburger (and Relish) in the main
Web page, and correspondingly in the Python to respond to a
request for Turkeyburger.
-
E: CRASH in Server-Side Python (-5)
This is a major error in the Python code that caused the script
to crash before completing. This often manifested as no response
from the server, "Internal Server Error", or an incomplete Web
page returned by the server script. Note that this did not always occur
on the default settings for the restaurant, but did occur at least
once during the testing phase. This reveals that the student did
not completely test their script on all possibilities.
-
F: ERROR in HTML that prevented the script from running (-5)
There was an error in the HTML code of the main page that prevented
the Python script from being activated at all. Often this was a minor
typo in an earlier chunk of code that caused the
<FORM ACTION="…"> tag
to be hidden or deactivated. Because of this, the script could not
be tested at all.