------------------------- Week 10 Notes for CST8165 ------------------------- -Ian! D. Allen - idallen@idallen.ca Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Keep up on your readings (Course Outline: average 4 hours/week homework) [************************************************************] [************************************************************] [*** Most students should be taking their own notes in ***] [*** class and updating them with my published summaries. ***] [************************************************************] [************************************************************] http://tools.ietf.org/html/rfc2821 http://teaching.idallen.com/cst8165/07w/notes/smtp_session.txt http://teaching.idallen.com/cst8165/07w/notes/perl_net_telnet.txt http://teaching.idallen.com/cst8165/07w/notes/smtpclient_v1.pl.txt http://teaching.idallen.com/cst8165/07w/notes/read_stdin.pl.txt http://teaching.idallen.com/cst8165/07w/notes/lab06.txt http://teaching.idallen.com/cst8165/07w/notes/autotest_smtp.sh.txt http://teaching.idallen.com/cst8165/07w/notes/sample_smtp_test_out.txt http://teaching.idallen.com/cst8165/07w/notes/sample_smtp_README.txt In the labs this week (Week 10) your task was to demonstrate that you could run the automated test script to test the smtpclient.pl script. (The script had to have its argument parsing implemented, which was your task last week.) Automated Testing - use it right from the start ----------------- I've provided a script that will do automated testing of your SMTP client, and I've written a few simple automated tests. You must use this script to test your SMTP client, and you must add your own tests to the script to test things that I haven't. Don't be limited by the categories or tests I've coded in the script - my list of tests is very incomplete. Rewrite the test suite to suit yourself. Add more tests to the suite and organize the tests that are there into logical categories. You must understand, by reading RFC2821, the responses (or categories of responses) that an SMTP server might issue when you write your test cases. Test that your client can handle the valid types of responses that an SMTP server might issue. A minimally functioning client must examine the SMTP server response code as documented in RFC 2821 Section 4.2, 4.2.1, 4.3.2: Q: T/F SMTP clients can figure out how to proceed based on just the first digit of an SMTP reply code; they can usually ignore the rest. (RFC 2821 Section 4.2, 4.2.1, 4.3.2) If you start immediately using the automated testing script to test your client, you'll save time over doing manual testing and then having to repeat all your tests for the test suite README.txt file. Some forms of programming have you write the test suite first, then write the code to pass all the tests.