Add test and sampleApp instructions and fix a test re-run bug