2013-02-21 5 views
0

나는 완전히 내 단위 테스트에서 생성 된 최종 콘솔 출력을 이해하려합니다 :이해 SenTestingKit 로그 출력

Test Suite 'Multiple Selected Tests' finished at 2013-02-21 22:54:57 +0000. 
Executed 6 tests, with 0 failures (0 unexpected) in 0.034 (0.052) seconds 

그것의 대부분 자기 설명을하지만, 마지막 나는에 대한 확신입니다. 특히 in 0.034 (0.052) seconds.

Test Suite 'MMProductLogicTests' started at 2013-02-21 22:54:57 +0000 Test Case 
-[MMProductLogicTests testProductMissingFormURL]' started. 
Test Case '-[MMProductLogicTests testProductMissingFormURL]' passed (0.005 seconds). 
Test Suite 'MMProductLogicTests' finished at 2013-02-21 22:54:57 +0000. 

모든 여섯 개 테스트 그래서 평균이 이해가되지 않습니다 passed (0.005 seconds)을 보여 각각의 테스트는 다음과 같은 출력을 보여줍니다 때문에 평균이 될 수 없습니다. 0.034은 총 실행 시간 인 것처럼 보입니다. 나는 (0.052)이 나타내는 것을 혼동합니다.

답변

1

0.034는 'testDuration'입니다. 0.052가 'totalDuration'입니다. 둘 사이의 차이를 공개하지 않는 코드의

+ (void) testSuiteDidStop:(NSNotification *) aNotification 
    { 
     SenTestRun *run = [aNotification run]; 
     testlog ([NSString stringWithFormat:@"Test Suite '%@' finished at %@.\nPassed %d test%s, with %d failure%s (%d unexpected) in %.3f (%.3f) seconds\n", 
      [run test], 
      [run stopDate], 
      [run testCaseCount], ([run testCaseCount] != 1 ? "s" : ""), 
      [run totalFailureCount], ([run totalFailureCount] != 1 ? "s" : ""), 
      [run unexpectedExceptionCount], 
      [run testDuration], 
      [run totalDuration]]); 
    } 

불행하게도 더 검사 : 여기

는 SenTestingKit 소스 코드 (이전 버전)입니다.