A Study of Mock Objects Generator for Applying XPwith Special Attention to C

C환경에서의 XP적용을 위한 모크객체생성기에 관한 연구

  • 정영목 (숭실대학교 대학원 컴퓨터학과 소프웨어공학전공) ;
  • 박제원 (숭실대학교 대학원 컴퓨터학과 소프웨어공학전공) ;
  • 이남용 (숭실대학교 컴퓨터학부)
  • Published : 2005.03.01

Abstract

As one of the lightweight software development methodology, the XP (Extreme Programming) is the practical means to improve the productivity and qualify of software through the pursuit of 4 values - communication, simplicity, feedback, and courage. It appears, however, the TDD (Test Driven Development). one of the practices of in. has a problem. which is the unavailability of the test driven development in case of the prolonged period of testing or the failure of securing the independency of the test cases. This results in the emphasis on the importance of the Mock Objects recently. The Mock Objects, the one imitating the faulty real code, has the fundamentals of simplicity allowing even manual script but. due to the inefficiency of manual script of the Mock Objects in a real life, it is implemented the Mock Objects Generator such as Mockotjects, EasyMock in Java. It Is found difficult, however to apply the Mock Objects in C language due to its object -oriented Premise as well as the absence of mock objects generators for C language. Therefore, in this Paper it is presented the CMock, a Mock Objects generator fer C language which allows the easy creation of the Mock Objects, and the study is performed to verify the efficiency accordingly.

XP(Extreme Programming)는 경량소프트웨어개발방법론 중의 하나로서 의사소통, 단순함, 피드백, 용기의 네 가지 가치추구를 통해 소프트웨어의 생산성과 품질을 향상시키는 실질적인 소프트웨어개발방법론이다. 그러나 XP의 핵심실천사항 중 하나인 테스트주도개발(Test Driven Development)은 한 가지 문제점을 가지고 있다. 테스트수행시간이 오래 걸리거나 테스트케이스(Test Cases)의 독립성을 확보하지 못할 경우 테스트주도개발이 불가능하다는 문제로서 최근 이를 해결하기 위해 모크객체(Mock Objects)의 중요성이 강조되고 있다. 모크객체는 문제가 되는 실제코드를 흥내내는 객체로서 수동으로 작성할 수있을 만큼 간단함을 원칙으로 하지만, 모크객체를 수동으로 작성하는 것은 실제로는 비효율적인 작업이기때문에 자바에서는 Mockobjects, EasyMock와 같은 모크객체생성기를 사용하고 있다. 그러나 모크객체는 객체지향을 전제로 하고, C언어용 모크객체생성기도 없기 때문에 C언어에서는 모크객체를 적용하기가 곤란하다. 본 논문에서는 객체지향개념이 취약한 C언어에서 모크객체를 손쉽게 생성하기 위한 C언어용모크객체생성기 CMock를 제시하고 이의 효용성을 검증하는 연구를 수행하였다.

Keywords