블로그 이미지
평범하게 살고 싶은 월급쟁이 기술적인 토론 환영합니다.같이 이야기 하고 싶으시면 부담 말고 연락주세요:이메일-bwcho75골뱅이지메일 닷컴. 조대협


Archive»


 

'Test Coverage'에 해당되는 글 2

  1. 2008.02.11 Test Coverage Rate
  2. 2008.02.01 Code Coverage Tools
 

Test Coverage Rate

ALM/Test Automation | 2008.02.11 10:30 | Posted by 조대협
테스트 Coverage rate에 대해 고민하던중 재미있는 글 하나 발견
사실 Coverage rate를 올리는것도 중요하지만, Coverage rate는 value있는 test 로 cover가 되어야 한다. 코드 Coverage rate를 올리는것 자체는 중요하지 않다.
얼마만큼 꼼꼼한 테스트가 도느냐가 문제이지...

여러 문서들을 찾아보니까는 보통 80%의 Coverage를 이야기 하는데, 이정도의 Coverage라면, 적어도 개발 과정 전에 Test 에 대한 방법이 고려된 상태에서 개발을 해야지 않는다면 개발 중간에 일정에 미칠 IMPACT가 어마어마할것이다.
지금 프로젝트는 60~70% 정도를 고민중인데..
어떻게 될려나?

==
http://www.artima.com/weblogs/viewpost.jsp?thread=204677

Agitating Thoughts & Ideas
How Much Unit Test Coverage Do You Need? - The Testivus Answer
by Alberto Savoia
May 4, 2007
Summary
Answer to the question: "What is Testivus' wisdom concerning the proper percentage of test coverage?"

Advertisement
 

Referring to "The Way of Testivus" entry:

http://www.artima.com/weblogs/viewpost.jsp?thread=203994

Morgan Conrad asked: "What is Testivus' wisdom concerning the proper percentage of test coverage?"

Here you go Morgan.

Testivus On Test Coverage

Early one morning, a programmer asked the great master:

“I am ready to write some unit tests. What code coverage should I aim for?”

The great master replied:

“Don’t worry about coverage, just write some good tests.”

The programmer smiled, bowed, and left.

...

Later that day, a second programmer asked the same question.

The great master pointed at a pot of boiling water and said:

“How many grains of rice should put in that pot?”

The programmer, looking puzzled, replied:

“How can I possibly tell you? It depends on how many people you need to feed, how hungry they are, what other food you are serving, how much rice you have available, and so on.”

“Exactly,” said the great master.

The second programmer smiled, bowed, and left.

...

Toward the end of the day, a third programmer came and asked the same question about code coverage.

“Eighty percent and no less!” Replied the master in a stern voice, pounding his fist on the table.

The third programmer smiled, bowed, and left.

...

After this last reply, a young apprentice approached the great master:

“Great master, today I overheard you answer the same question about code coverage with three different answers. Why?”

The great master stood up from his chair:

“Come get some fresh tea with me and let’s talk about it.”

After they filled their cups with smoking hot green tea, the great master began to answer:

“The first programmer is new and just getting started with testing. Right now he has a lot of code and no tests. He has a long way to go; focusing on code coverage at this time would be depressing and quite useless. He’s better off just getting used to writing and running some tests. He can worry about coverage later.”

“The second programmer, on the other hand, is quite experience both at programming and testing. When I replied by asking her how many grains of rice I should put in a pot, I helped her realize that the amount of testing necessary depends on a number of factors, and she knows those factors better than I do – it’s her code after all. There is no single, simple, answer, and she’s smart enough to handle the truth and work with that.”

“I see,” said the young apprentice, “but if there is no single simple answer, then why did you answer the third programmer ‘Eighty percent and no less’?”

The great master laughed so hard and loud that his belly, evidence that he drank more than just green tea, flopped up and down.

“The third programmer wants only simple answers – even when there are no simple answers … and then does not follow them anyway.”

The young apprentice and the grizzled great master finished drinking their tea in contemplative silence

Code Coverage Tools

ALM/Build Automation (빌드 자동화) | 2008.02.01 18:03 | Posted by 조대협

상용 도구

Code Pro Anlytix Pro
: 기능이 풍부한것 같고, 정적 코드 분석을 통해서 Complexity 분석도 되고 기능은 풍부한편으로 보인다.
http://www.instantiations.com/codepro/analytix/server/index.html

Clover
: 다들 잘 아는 툴 이미들 많이 사용하고 있고, 널리 알려진 만큼 다른 시스템 (CI툴이나 Issue Tracking Tool, 소스 관리툴)들과의 통합도 쉽다.

오픈소스

Cobertura - 요즘 가장 유행하는 툴이 아닐까도 싶고.. 사용이 쉽고 직관적이다. 추천할만한 툴
EMMA-꽤 오래된듯한 툴 같은데... 여기저기 사례도 충분한거 같고 이클립스 플러그인도 지원한다. 마음에 드는것중 하나가 컴파일이 이미 다된 jar 파일을 emma 위에서 실행 시키면 바로 Coverage 분석도 가능하다는 말씀.. 리포트가 직관적이지 않긴 하지만 이클립스 지원하니까는 커버되지 않을까?
http://emma.sourceforge.net/intro.html

NUinit - 나온지 얼마 안된거 같기도 하고... 오픈 소스 툴 중에서는 가장 허접한듯..

Cobertura는 실컷 써봤고... EMMA를 한번 써볼까나?

'ALM > Build Automation (빌드 자동화)' 카테고리의 다른 글

Hudson에서 SMTP PORT 지정하기 (Assign SMTP server port in Hudson)  (0) 2008.02.11
통합 빌드 환경 설정 완료  (0) 2008.02.05
Code Coverage Tools  (0) 2008.02.01
이제는 Trac  (1) 2008.01.24
Hudson  (0) 2008.01.22
Atlassian Bamboo  (0) 2007.11.08