Testing the production order processor
Now that we've completed our worker role, we need to test whether it is behaving as expected, as a single instance to start with, and then multiple instances once we're happy with its behavior.
If the worker role cannot run in a scaled out configuration with multiple instances, it won't be able to cope with a large volume of work and will not run in a resilient configuration.
Testing a single instance
We can start testing locally, and once we're happy, publish and test on Azure. Running as a single instance, we need to check the following:
The worker role starts and runs
It doesn't recycle on its own
There are no exceptions being logged
Orders and order items are being inserted by the order processor tasks
Batches are created and assigned to order items
Order items have stock allocated
Batches are not fragmented (there must never be more than one incomplete batch per product)
The following T-SQL script can be used to help you do the fragmentation checks on our...