What is Megaphone?

What is Megaphone?
The Megaphone project is about enhancing open source chat software. Specifically, the goal is to allow ejabberd to support 1,000,000 simultaneous users. See The Plan page for more details on how I plan to solve this problem. See the About this Blog page for more details on why I created this blog.

Tuesday, January 31, 2012

Testing

Previously...
  • I coded up the put_data function...again
  • I fixed some problems with remove_waiter and wrote the notify_wait function.
  • I finished coding up the megaphone module.

Now that everything is more or less coded up, it's time to create some tests for what I have.  My goal is to save some time by not having to spend lots of time debugging things - it is faster to either inspect or test code then it is to debug it.  

Looking at the megaphone module since it is the most recent I can see the following cases:
  • socket_type
  • start
  • main_loop
  • recv
  • send
  • get_data
  • put_data
  • update_table
  • remove_waiter
  • notify_waiter
  • parse_packet
  • parse_headers
  • receive_packet
  • shut_down
  • send_data
There is a point of diminishing returns for testing, so I am going to eliminate testing for the most trivial functions. This includes the following:
  • socket_type
  • start_module
  • send
  • receive_packet
I suppose I shouldn't find it odd that testing requires an amount of effort that is proportional to the amount of time that it takes to develop the software in the first place, but it wont stop me from complaining about it.

So the final list is:
  • start
  • main_loop
  • recv
  • get_data
  • put_data
  • update_table
  • remove_waiter
  • notify_waiter
  • parse_packet
  • parse_headers
  • shut_down
  • send_data
And in the spirit of procrastination I'll call it quits.  Next time, the first of the tests.

No comments:

Post a Comment