There is not really any way to test the IAC, unless you have a scanner like the dealerships have.
You could try the basic stuff first, remove the IAC and clean off the tip (pintle), look into the bore and see if it is full of carbon deposits.
I have seen it mentioned that when the issue occurs, you could remove the IAC, and have a friend put their finger in the hole and see if anything changes, I have never tried that personally though.
That would not work for you while driving down the road of course..
I have heard that usually when they fail, they fail all the way down lowering idle, or up raising the idle.
You could start the car up, as soon as it reaches normal idle speed, unplug the IAC and drive for a little while, the ECM will not be able to adjust anything to compensate for added, or reduced loads on the motor, so it won't run perfectly, but it should run without stalling on you. Just don't try to give it too much gas, drive it normally..