CUTIG: 정적 분석을 이용한 C언어 단위 테스트 데이타 추출 자동화 도구

CUTIG: An Automated C Unit Test Data Generator Using Static Analysis

  • 김택수 (서울대학교 전기컴퓨터공학부) ;
  • 박복남 (HandyPMG(핸디피엠지) 컨설팅) ;
  • 이춘우 (서울대학교 전기컴퓨터공학부) ;
  • 김기문 (서울대학교 전기컴퓨터공학부) ;
  • 서윤주 (서울대학교 전기컴퓨터공학부) ;
  • 우치수 (서울대학교 전기컴퓨터공학부)
  • 발행 : 2009.01.15

초록

단위 시험은 지속적이고 반복적으로 수행되어야 하기 때문에 높은 비용을 필요로 하는 작업이다. 단위 시험의 자동화에 대한 많은 연구가 있었으나 테스트 데이타의 자동 추출에 대한 연구는 큰 성과를 이루지 못하고 있다. 본 연구에서는 소프트웨어의 소스 코드로부터 테스트 데이타를 자동으로 추출하는 방안에 대해 논의하고 각 단계의 알고리즘을 제시하였다. 또한 테스트 데이타 추출 자동화에 관한 이슈를 소개하고 테스트 데이타 추출 자동화 도구 CUTIG를 소개한다. CUTIG는 실제 소스코드를 이용하여 테스트 데이타를 추출하므로 소프트웨어의 요구사항 명세가 잘 작성되어 있지 않거나 실제 구현과 차이가 있는 경우에도 테스트 데이타를 생성할 수 있다. 또한 이 도구를 통해 개발자가 직접 테스트 데이타를 작성하는 데 소요되는 비용을 절감할 수 있기를 기대한다.

As unit testing should be performed repeatedly and continuously, it is a high-cost software development activity. Although there are many studies on unit test automation, there are less studies on automated test case generation which are worthy of note. In this paper, we discuss a study on automated test data generation from source codes and indicate algorithms for each stage. We also show some issues of test data generation and introduce an automated test data generating tool: CUTIG. As CUTIG generates test data not from require specifications but from source codes, software developers could generate test data when specifications are insufficient or discord with real implementation. Moreover we hope that the tool could help software developers to reduce cost for test data preparation.

키워드

참고문헌

  1. I. Sommerville, 'Software Engineering,' 8th Edition, Addison-Wesley, 2007
  2. B. Blanc, et. al., 'Automated functional test case generation from data flow specifications using structural coverage criteria,' European Congress ERTS 2006, 2006
  3. V. Rusu, L. du Bousquet, and T. Jeron, 'An approach to symbolic test generation,' Proceedings of the Second International Conference on Integrated Formal Methods, pp. 338—357, 2000
  4. C. Bigot, et. al., 'Automatic Test Generation with AGATHA,' Lecture Notes in Computer Science, Vol. 2619, pp. 591-596, 2003 https://doi.org/10.1007/3-540-36577-X_43
  5. K. Sen, D. Marinov, and G. Agha, 'CUTE A concolic unit testing engine for C,' Joint meeting of the European Soft. Eng. Conf. and ACM SIGSOFT Intl. Symp. on Foundations of Soft. Eng. (ESEC/FSE'05), pp. 263-272, 2005 https://doi.org/10.1145/1081706.1081750
  6. C. Pacheco, S. K. Lahiri, M. D. Ernst, and T. Ball, 'Feedback-directed random test generation,' Technical Report MSR-TR-2006-125, Microsoft Research, Redmond, 2006
  7. E. F. Moore, 'Gedanken-experiments on sequential machines,' Automata Studies, pp. 129-153, 1956
  8. J. C. King, 'Symbolic execution and program testing,' Communications of the ACM, Vol.19, pp. 385-394, 1976 https://doi.org/10.1145/360248.360252
  9. W. Visser, C. S. pasareanu, and S. Huurshid, 'Test Input Generation with Java PathFinder,' ACM SIGSOFT Intl. Symp. on Software Testing and Analysis(ISSTA 2004), pp. 97-107, 2004 https://doi.org/10.1145/1007512.1007526
  10. OCAML, Objective Caml, http://caml.inria.fr/
  11. CIL, C Intermediate Language, http://www.cs.berkeley. edu/~necula/cil/