Robo 스크립트 실행(iOS+)
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 문서에서는 모바일 앱의 수동 QA 작업을 자동화하고 지속적 통합(CI) 및 사전 출시 테스트 전략을 가능하게 하는 테스트인 Robo 스크립트를 사용하는 방법을 설명합니다. 예를 들어 Robo 스크립트를 사용하여 일반적인 사용자 경험을 테스트하거나 사용자 이름 및 비밀번호 같은 특정 사용자 인터페이스(UI) 입력을 제공할 수 있습니다. Robo 스크립트는 Robo 테스트의 기능입니다.
Robo 스크립트는 Robo 테스트를 테스트 엔진으로 사용합니다. 가장 기본적인 형태의 Robo 스크립트는 텍스트 '사용자 이름' 입력 후 확인 버튼 탭과 같은 UI 작업의 시퀀스로 구성됩니다. 또한 Robo 스크립트에는 요소가 표시될 때까지 기다린 후 요소 내의 특정 지점을 탭하고 Android 디버그 브리지(adb
) 셸 명령어를 실행하는 등의 작업도 포함될 수 있습니다.
Robo 스크립트는 기존 테스트 프레임워크에 비해 다음과 같은 장점이 있습니다.
기능
|
설명
|
매우 강력함
|
Robo 스크립트는 앱 버전과 앱 결함 간의 상당한 구조 및 동작 차이를 허용할 수 있습니다.
|
서술형
|
Robo 스크립트가 완료되면 기본 Robo 테스트가 인계되어 앱 테스트를 계속할 수 있습니다. 이 지속적인 테스트 접근 방식을 통해 몇 가지 주요 사용 사례가 가능합니다. 예를 들어 Robo 스크립트로 커스텀 로그인 과정을 진행하여 앱을 특정 상태로 전환할 수 있습니다.
|
녹화 가능
|
Robo 스크립트를 수동으로 코딩할 필요가 없습니다. Android 스튜디오에서 Robo 스크립트 레코더를 사용하여 기록할 수 있습니다. Robo 스크립트를 만들거나 수정할 때는 일반적으로 모바일 개발 지식이 필요하지 않습니다.
|
유연성
|
Robo 스크립트는 게임에서 일반적으로 사용되는 네이티브가 아닌 UI 요소와 상호작용할 수 있습니다.
|
Robo 스크립트는 Robo 테스트 중에 조건부로 트리거되므로 사용자가 Robo의 동작을 보완하여 일반적으로 더 넓은 범위 또는 특정 기능을 타겟팅할 수 있습니다. 기존 테스트 프레임워크와 달리 Robo 스크립트는 다음을 지원합니다.
- 특정 앱 패키지 이름이 활성 상태인지 여부 또는 특정 요소가 화면에 표시되는지 여부와 같은 다양한 트리거 조건을 지원합니다.
- 최대 실행 횟수, 우선순위 및 관련 크롤링 단계와 같은 실행을 제어합니다.
- 색다른 작업 유형(조건부, 요소 무시, 화면 닫기)
Robo 스크립트는 유지 관리가 간편하므로 가능하면 사용하는 것이 좋습니다. 예를 들어 Robo 스크립트를 사용하여 다음을 수행할 수 있습니다.
- 의미 있는 워크플로를 탐색하여 앱 기능의 핵심을 파악합니다.
예를 들어 로그인을 수행하고, 최초 실행 후 앱의 상태를 설정하고, 신규 사용자를 등록할 수 있습니다.
- Robo를 앱의 특정 부분에 집중하여 Robo 테스트 시간을 최대한 활용할 수 있습니다. Robo 스크립트가 Robo 테스트를 통해 앱의 관련 부분에 도달하도록 합니다. 여기서 Robo 테스트는 완전히 자동화된 크롤링을 다시 시작합니다.
- 예를 들어 인앱 메시지, 개인정보처리방침 또는 게임의 특정 수준을 분석하기 위해 앱을 특정 상태 또는 화면으로 가져옵니다.
- Robo 스크립트가 완료된 후 Robo 테스트와 관계없이 엔드 투 엔드 계측 테스트를 실행하여 완전히 자동화된 크롤링을 재개합니다.
고급 Robo 스크립트 기능을 사용하여 다음을 수행합니다.
- Robo에서 테스트 중인 앱 크롤링을 시작하기 전이나 크롤링이 완료된 후 작업을 실행합니다. 예를 들어 크롤링 전에 테스트 중인 앱 데이터를 정리하거나 기기 설정을 변경합니다.
- 크롤링 중 Robo 동작의 요소를 변경합니다.
- Robo에서 일부 UI 위젯 또는 앱 화면을 무시하도록 합니다.
- Robo가 특정 화면에서 되돌아갈 때 실행할 커스텀 작업을 제공합니다.
- Robo가 크롤링 중에 특정 앱 화면이 발생할 때마다 특정 작업을 실행하도록 합니다.
- Robo에서 크롤링을 수행하는 방법을 완전히 맞춤설정합니다. 예를 들어, 기기 조작을 수행하고 그 과정에서 표시되는 팝업 대화상자를 닫는 동안 조건부 작업과 비조건부 작업의 조합을 사용하여 크롤링 중에 테스트 중인 앱을 백그라운드 상태로 유지합니다.
Robo 스크립트가 모든 종류의 테스트를 대체하는 것은 아닙니다. 앱에서 하위 수준의 로직 버그를 포착하려면 여전히 단위 테스트가 필요합니다. 이러한 테스트에는 일반적으로 Android 또는 iOS 환경이 필요하지 않습니다. 코드에서 가장 정확하게 표현되는 비즈니스 로직에 관한 구체적인 상세 어설션을 포함할 수 있는 타겟팅된 계측 테스트로 Robo 스크립트 테스트를 보완하는 것이 좋습니다.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-16(UTC)
[null,null,["최종 업데이트: 2025-08-16(UTC)"],[],[],null,["\u003cbr /\u003e\n\nThis document describes how to use *Robo scripts* , which are tests that automate\nmanual QA tasks for mobile apps, and enable continuous integration (CI) and\npre-launch testing strategies. For example, you can use Robo scripts to test a\ncommon user journey or provide specific user interface (UI) input, like a\nusername and password. Robo scripts are a feature of [Robo\ntest](/docs/test-lab/ios/robo-ux-test).\n\nRobo scripts use [Robo test](/docs/test-lab/android/robo-ux-test)\nas the test engine. In its most basic form, a Robo script consists of a\nsequence of UI actions like *enter text 'username'* and\nthen *tap the OK button* . Robo scripts can also include actions like waiting\nfor an element to appear, tapping at a specific point within an element, and\nexecuting Android Debug Bridge (`adb`) shell commands.\n\nRobo scripts have the following advantages over traditional testing frameworks:\n\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Capability** | **Description** |\n| Highly robust | Robo scripts can tolerate significant structural and behavioral differences between app versions and app flakiness. |\n| Open-ended | After a Robo script completes, the base Robo test can take over and continue testing the app. This continued testing approach enables several key use cases. For example, you can use a Robo script to bring an app into a particular state by performing a custom sign-in flow. |\n| Recordable | You don't need to code Robo scripts manually. They can be recorded using the Robo script recorder in Android Studio. Creating or modifying Robo scripts typically doesn't require any knowledge of mobile development. |\n| Flexible | Robo scripts can interact with non-native UI elements that are common in games. |\n\nRobo scripts are conditionally triggered during a Robo test, which lets users\naugment Robo's behavior - typically to achieve greater coverage or target\nspecific functionality. In contrast to traditional testing frameworks,\nRobo scripts support the following:\n\n- Various triggering conditions, for example, a particular app package name being active (or not) or a specific element being displayed on the screen (or not).\n- Execution controls, for example, a maximum number of executions, priority, relevant crawl stage.\n- Unconventional action types (conditional, element-ignoring, screen-closing).\n\nWe recommend that you use Robo scripts whenever possible because they can be\nmaintained effortlessly. For example, you can use a Robo script to do the\nfollowing:\n\n- Navigate significant workflows to get to the core of an app's functionality. For example, you can perform a sign-in, set up an app's state after the first launch, and register a new user.\n- Focus Robo on a particular part of an app to get the most out of Robo test time. Robo script guides Robo test to reach the relevant part of an app, where Robo test resumes a fully automated crawl.\n- Bring an app into a specific state or screen to perform an analysis, for example, to analyze an in-app message, privacy policy, or specific level of a game.\n- Perform an end-to-end instrumentation test, with or without Robo test resuming a fully automated crawl after the Robo script is complete.\n\nUse more advanced Robo script features to do the following:\n\n- Perform actions before Robo starts crawling the app-under-test or after a crawl is finished, for example, clean the app-under-test data before a crawl, or change device settings.\n- Change aspects of Robo behavior during a crawl, in particular:\n - Make Robo ignore some UI widgets or app screens.\n - Provide a custom action for Robo to perform when backtracking from a particular screen.\n - Make Robo perform specific actions whenever a particular app screen is encountered during a crawl.\n- Completely customize how Robo performs a crawl. For example, use a combination of conditional and non-conditional actions to keep the app-under-test in the background throughout the crawl, while performing device manipulations and dismissing any popup dialogs that appear along the way.\n\nKeep in mind that Robo scripts don't replace all kinds of tests. You still\nneed unit tests to catch low-level logic bugs in your app; these tests\ntypically don't require an Android or iOS environment. We recommend that you\nsupplement Robo script tests with targeted instrumentation tests that can have\nspecific, detailed assertions about business logic, which are best expressed\nin code.\n\nNext steps\n\n- To learn about Robo scripts structure, capabilities, usage, and actions, see\n the [Robo scripts reference guide](/docs/test-lab/android/robo-scripts-reference#ios-support-for-robo-scripts).\n\n- [Run a Robo test](/docs/test-lab/ios/robo-ux-test)."]]