Papers/Others

A Hybrid Approach for Model-based Random Testing

tomato13 2011. 2. 4. 11:38

Stefan Mohasci, Johannes Wallner, "A Hybrid Approach for Model-based Random Testing", IEEE, 2010

http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5617162


이 논문에서는 기존의 IDATG Tool 방식에서 보다 자동화 기법을 적용한 사례를 설명한다.

IDATG는 무엇일까? 논문에서는 아래와 같이 소개한다.

The tool IDATG (Integrating Design and Test-Case Generation) has been developed since 1997 by the Siemens Support Center Test in the scope of a research project in cooperation with universities and the Softnet Austria Competence Network.

(즉, Modeling을 기반으로 TC를 자동생성해서 수행해주는 도구인 듯 하다.)


이 도구에는 Block이라는 작은 Test 수행 단위를 정의하게 되는데 이것들이 모여서 Use Case Task라는 단위를 구성하게 된다. 


논문의 핵심 컨셉은 다음과 같다. 기존의 방법은 이 Block이라는 단위의 조합을 사람이 수행하여 Use Case Task를 만들었는데 이러한 조합을 Tool이 자동적으로 할 수 있다는 것이다. 어떻게 할 수 있을까?

방법은 간단하다. Block의 조합을 random하게 하겠다는 것이다. (물론 User에 의해서 여러 parameter를 설정하여 조합의 방향을 조정할 수는 있을 것이다.)


조금 더 구체적으로 설명하면 다음과 같다. 조합은 크게 두가지 단계로 나뉘게 된다. (논문에서는 세단계로 나뉘지만 두단계로 정리해보련다.)


첫째는 지정된 Block의 개수를 증가시키지 않고 조합을 진행하는 것이다. 즉, B1, B2, B3가 있다면 이들 3개만으로 B1-B2-B3, B1-B2-B1-B2, B1-B3-B2 와 같이 하는 것이다.

둘째는 첫째 방법으로 진행을 하다가 B4, B5와 같은 Block을 덧붙이는 것이다. (논문에서는 필요한 추가 Block을 찾는 별도의 로직이 있음을 설명하는데 이 부분은 자세하게 설명되지 않은 듯 하다.)


주요 관심있게 본 부분은 아래와 같았다.

A disadvantage of such simple methods is that most clicks will have no effect because they concern unused or disabled areas of a window.

......

IDATG consists of a set of visual editors for model-based test specification and a powerful test case generator that produces complete test scripts for various tools

.....

In addition, the model may contain data dependencies, which are the source for the generation of input data. once all details have been defined, test cases are generated automatically.

.......

The goal for the test case generator is now to put the building blocks randomly together and to form a valid test case.

.......

The three phases are:

1. Search for initial blocks

2. Random phase

3. Local search phase

.......

After that the random phase begins, which tries to expand the test case by appending random building blocs.

.......

While the generation of pure random test cases is very fast, it usually covers only small parts of the functionality. The reason for this is that many functions depend on complex constraints that are unlikely to be fulfilled by a pure random search.

........

However, in comparison to pure random testing, additional effort is required for creating a detailed enough model of the system under test.