moved functions around for test-summary.html generation