Testing improvements
Merge pull request #4477 from GrahamCampbell/4.2-testing

[4.2] Testing Improvements
Fix conflicts and merge.