Testvectors for dedicated hardware miner
The block headers in the blockchain are your test vectors, they already contain the appropriate nonce. Midstate can be computed from these headers, mining software does such a midstate computation (so crib this bit from their source code).