60 likes | 168 Views
CS675 Software Reverse Engineering Sadia Afroz, Omar Badran, Dan Moyer. Lab1 Presentation Feature Rich Java App. Java Email Server. Basic SMTP and POP3 email server written in Java JES User Features POP3 and SMTP services Other Features Supports basic user account configuration
E N D
CS675 Software Reverse EngineeringSadia Afroz,Omar Badran, Dan Moyer Lab1 Presentation Feature Rich Java App
Java Email Server • Basic SMTP and POP3 email server written in Java • JES User Features • POP3 and SMTP services • Other Features • Supports basic user account configuration • User name • Password • Mail forwarding • Supports basic activity logging • Logs user activity • Logs system errors/exceptions
Java Email Server • JES Architecture • SMTP Processor • Mail client connects to send messages • SMTP Sender • Monitors for messages to send. If local, puts msg’s in local users in-box. If remote, passes msg to SMTP Remote Sender • SMTP Remote Sender • Sends non-local msg’s by connecting to other SMTP Processor’s of other mail servers • POP3 Processor • Mail client connects to retrieve messages.
Java Email Server • JUnit testing overview • 21 classes • 1 class where main() is defined • 15 functional classes • 1 interface definition • 1 constants definition • 3 exception definitions • Unit test architecture is organized as • Test suite launches the email server • Each test case acts as a client to the email server
Java Email Server • JUnit testing overview cont… • Test cases are organized in to two basic categories • Invalid user commands • Normal e-mail operation • Invalid user commands includes • Invalid commands • Invalid command order • Invalid command arguments • Normal e-mail operation includes • Sending local and remote messages • Retrieving the local messages
Java Email Server • JUnit testing code coverage • Used Emma for code coverage • JUnit testing results • Achieved 74% code coverage • Achieving near 100% is challenging because • Some defined methods can never be invoked because no other methods calls them • From a user’s point of view, can’t induce the type of exceptions needed to execute exception path