Fixed performance issue - get_next_test_run was called per test_name
rather than per test_run, and thus seriously degrading performance.
Test file edition information now considered.