next up previous
Next: 4 Grading Criteria Up: 3 Your Assignment Previous: 3.1 The Server


3.2 Test Cases

A large part of network programming (and programming in general) is knowing how to test and debug your programs. There are many ways to do this; be creative. We would like to know how you tested and your server and how you convinced yourself it actually works. To this end, you should document what you did to test that your server works. If it fails on some tests and you do not have time to fix it, this should also be documented (we would rather you know and acknowledge the pitfalls of your server, than miss them). Several paragraphs (or even a bulleted list of things done and why) should suffice. This will be submitted as a text file named tests.txt.

We strongly encourage you to write and share test-case scripts/programs. Of course, you should acknowledge such sharing in your tests.txt file.

Halfway through the project, you will be provided with several test files (do not wait for these to begin testing!!!) as well as additional instructions. By this time, your server should be mainly functional. These will allow you to ensure that you are on the right track with your server.

In developing your test cases, you may find the following tools to be useful:

irc,xchat,chatzilla
Various IRC clients. irc is a text mode client, while xchat and chatzilla have graphical interfaces. Since you are writing a genuine IRC server, you should be able to test it with actual IRC clients.

expect
Quoting from the expect man page,

Expect is a program that ``talks'' to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue.

A possible strategy for developing your test cases, then, is to use a command line IRC client, driven by an expect script.

Net::IRC
A Perl module that simplifies writing an IRC client. Net::IRC is not installed on the Andrew Linux machines, but you can download Net::IRC from the Comprehensive Perl Archive Network (CPAN).

Note that Net::IRC and a command line IRC client both implement the client-side IRC protocol for you. Presumably, they interact with the server in a standards-compliant manner. Thus, to test how your server behaves when given input that is not compliant with the IRC specification, you will need to use lower level tools. We describe how you might build such a tool in Section 6.


next up previous
Next: 4 Grading Criteria Up: 3 Your Assignment Previous: 3.1 The Server
mukesh agrawal 2003-01-28