Handle optional duration in TestResult