Model-based Automated Testing of Mobile Applications: An Industrial Case Study

📝 Abstract
Automatic testing of mobile applications has been a well-researched area in recent years. However, testing in industry is still a very manual practice, as research results have not been fully transferred and adopted. Considering mobile applications, manual testing has the additional burden of adequate testing posed by a large number of available devices and different configurations, as well as the maintenance and setup of such devices. In this paper, we propose and evaluate the use of a model-based test generation approach, where generated tests are executed on a set of cloud-hosted real mobile devices. By using a model-based approach we generate dynamic, less brittle, and implementation simple test cases. The test execution on multiple real devices with different configurations increase the confidence in the implementation of the system under test. Our evaluation shows that the used approach produces a high coverage of the parts of the application related to user interactions. Nevertheless, the inclusion of external services in test generation is required in order to additionally increase the coverage of the complete application. Furthermore, we present the lessons learned while transferring and implementing this approach in an industrial context and applying it to the real product.
💡 Analysis
Automatic testing of mobile applications has been a well-researched area in recent years. However, testing in industry is still a very manual practice, as research results have not been fully transferred and adopted. Considering mobile applications, manual testing has the additional burden of adequate testing posed by a large number of available devices and different configurations, as well as the maintenance and setup of such devices. In this paper, we propose and evaluate the use of a model-based test generation approach, where generated tests are executed on a set of cloud-hosted real mobile devices. By using a model-based approach we generate dynamic, less brittle, and implementation simple test cases. The test execution on multiple real devices with different configurations increase the confidence in the implementation of the system under test. Our evaluation shows that the used approach produces a high coverage of the parts of the application related to user interactions. Nevertheless, the inclusion of external services in test generation is required in order to additionally increase the coverage of the complete application. Furthermore, we present the lessons learned while transferring and implementing this approach in an industrial context and applying it to the real product.
📄 Content
최근 몇 년간 모바일 애플리케이션에 대한 자동 테스트는 활발히 연구된 분야이며, 학계와 산업계 모두에서 많은 관심을 받아 왔습니다. 그럼에도 불구하고 실제 산업 현장에서는 자동화된 테스트 기법이 충분히 도입되지 못하고 여전히 수동적인 테스트가 주된 방식으로 활용되고 있습니다. 이는 연구 결과가 현장에 완전히 이전(transfer)되고 채택(adopt)되지 못했기 때문이라고 볼 수 있습니다. 특히 모바일 애플리케이션을 대상으로 할 경우, 수동 테스트는 단순히 기능을 검증하는 수준을 넘어서는 추가적인 부담을 안게 됩니다. 구체적으로는 현재 시장에 존재하는 수많은 실제 디바이스와 각 디바이스마다 다양한 OS 버전, 화면 해상도, 메모리 용량, 네트워크 환경 등 서로 다른 구성(configuration)들이 존재하기 때문에, 이러한 다양한 조합을 모두 고려하여 테스트를 수행해야 하는 어려움이 있습니다. 또한 테스트에 사용되는 디바이스를 유지보수하고 초기 설정을 진행하는 데에도 상당한 인적·시간적 비용이 소요됩니다.
본 논문에서는 이러한 문제점을 해결하고자 모델 기반(test generation) 접근법을 활용한 자동 테스트 방식을 제안하고, 실제 클라우드 환경에 배포된 물리적 모바일 디바이스 집합에서 생성된 테스트를 실행함으로써 그 효용성을 평가했습니다. 모델 기반 접근법을 채택함으로써 우리는 동적인(dynamic) 테스트 케이스를 자동으로 생성할 수 있었으며, 이러한 테스트 케이스는 기존에 스크립트 기반으로 작성된 정적인 테스트에 비해 파손(brittle) 가능성이 낮고 구현(implementation) 또한 비교적 단순하다는 장점을 갖습니다. 생성된 테스트는 여러 대의 실제 디바이스에서 동시에 실행되며, 각 디바이스는 서로 다른 하드웨어 사양과 소프트웨어 설정을 가지고 있기 때문에, 테스트 결과는 시스템이 다양한 환경에서도 일관되게 동작한다는 신뢰성을 크게 향상시킵니다.
우리의 실험 결과에 따르면, 제안된 모델 기반 테스트 생성 및 클라우드 디바이스 실행 방식은 사용자와의 상호작용(user interaction)과 직접적으로 연결된 애플리케이션의 주요 부분에 대해 높은 커버리지(coverage)를 달성했습니다. 즉, 화면 전환, 버튼 클릭, 입력 필드에 대한 텍스트 입력 등 UI 레이어에서 발생하는 대부분의 시나리오를 자동으로 탐색하고 검증할 수 있었습니다. 그러나 실험 과정에서 발견된 한계점도 존재합니다. 현재 모델은 애플리케이션 내부 로직에 국한된 테스트만을 생성했으며, 외부 서비스(예: 백엔드 API, 서드파티 SDK, 클라우드 스토리지 등)와의 연동을 충분히 고려하지 못했습니다. 따라서 전체 애플리케이션의 완전한 커버리지를 확보하기 위해서는 외부 서비스 호출을 포함한 테스트 케이스를 생성하도록 모델을 확장하는 것이 필수적입니다. 이러한 확장은 테스트가 실제 운영 환경에서 발생할 수 있는 다양한 오류 상황까지 포괄하도록 만들며, 궁극적으로는 제품 품질을 한층 더 높이는 데 기여할 것입니다.
또한 본 연구에서는 이 모델 기반 테스트 접근법을 산업 현장에 실제 적용하면서 얻은 교훈(lessons learned)도 상세히 기술했습니다. 첫 번째로, 기존에 사용되던 수동 테스트 프로세스와 자동화된 모델 기반 프로세스를 통합하는 데에는 조직 문화와 개발·테스트 팀 간의 협업 방식에 대한 변화가 필요했습니다. 초기 단계에서는 자동 생성된 테스트 스크립트가 기존 테스트 케이스와 충돌하거나 중복되는 경우가 발생했으며, 이를 해결하기 위해 테스트 관리 도구와 CI/CD 파이프라인을 재구성하고, 테스트 결과를 시각화하여 이해관계자에게 명확히 전달하는 절차를 마련했습니다. 두 번째로, 클라우드 기반 물리 디바이스 풀을 활용하는 과정에서 디바이스 할당 및 회수 정책, 네트워크 대역폭 관리, 보안 인증 절차 등 운영상의 세부 사항을 사전에 정의하고 자동화 스크립트를 통해 관리함으로써 비용 효율성을 확보할 수 있었습니다. 마지막으로, 모델을 설계할 때는 도메인 전문가와 개발자가 공동으로 참여하여 실제 사용자 흐름을 정확히 모델링하는 것이 중요했습니다. 모델링 단계에서 발생한 모호한 요구사항이나 누락된 시나리오는 테스트 커버리지를 저하시킬 위험이 있기 때문에, 정기적인 리뷰와 피드백 루프를 운영하여 모델의 완성도를 지속적으로 향상시켰습니다.
요약하면, 본 논문은 (1) 모델 기반 테스트 생성 기법을 통해 동적이고 유지보수가 용이한 테스트 케이스를 자동으로 생산하고, (2) 클라우드에 배치된 실제 모바일 디바이스 다수에서 테스트를 병렬 실행함으로써 다양한 환경에 대한 신뢰성을 확보했으며, (3) 실험을 통해 사용자 인터페이스 중심의 높은 커버리지를 입증했지만, (4) 외부 서비스와의 연동을 포함한 테스트 확대가 필요함을 확인했습니다. 또한 산업 현장에 적용하면서 겪은 조직적·기술적 도전 과제와 그 해결 방안을 상세히 기록함으로써, 향후 다른 기업이나 팀이 동일한 접근법을 도입할 때 참고할 수 있는 실용적인 가이드라인을 제공하고자 합니다. 이러한 연구 결과는 모바일 애플리케이션 개발 및 테스트 프로세스의 자동화 수준을 한 단계 끌어올리는 데 기여할 것이며, 궁극적으로는 제품 출시 주기를 단축하고 품질을 향상시키는 데 중요한 역할을 할 것으로 기대됩니다.