views:

23

answers:

1

I am building something similar to BBC Zeitgeist. Basically it's a series of workers passing jobs to each other.

If I'm doing this by hand, here's what I'll do:

  1. Setup some parameters
  2. Run the workers
  3. Start the initial worker
  4. Wait for the workers to do their jobs
  5. Test the outcome

For the background job workers, I'm using Resque.

I'm lost on how I should write integration tests for it. What I have in mind right now is something like this.

Any ideas and pointers?

+1  A: 

How about a black box approach to the whole thing. Presumably the point of the whole thing is that certain external state is changed? Databases are updated, files created, messages sent.

So ignore the idividual workers. Put the external stuff into a known state. Run. Examine the external stuff to see if it reflects the correct behaviours.

djna