Determine test duration