-
Notifications
You must be signed in to change notification settings - Fork 102
Test Task Customization
In the Runner page, you can upload attachments to a package set.
Name | Desc |
---|---|
Windows App | Will be installed by the command like Add-AppxPackage -ForceApplicationShutdown -forceupdatefromanyversion before testing. |
Common file | Will be loaded to the Load Dir by the chosen Load Type |
T2C Json | Just used for T2C test. |
Only work when the File Type is Common file.
Only work when the File Type is Common file and can't be empty. The format should be like firstLevelFolder/secondLevelFolder, and the **firstLevelFolder **will be generate under AgentInstallFolder.
Put the packages of app to AgentInstallFolder/storage/preApp. When the devices plugin in, the packages would be installed. If install failed, the agent main process will be shutdown.
When trigger a test task, you can set up the permissions needed to be grant before testing.
["android.permission.FOREGROUND_SERVICE", "android.permission.FOREGROUND_SERVICE"]
In the RESTful API, a test task is described thru the TestTaskSpec object, where you can specify the device actions for each test run in the following structure:
When triggering a test task, you can customize some actions to set up the devices at different lifecycle stages. For Example:
{
"setUp": [{
"method": "setProperty",
"args": ["log.tag.WelcomeScreen", "Verbose"]
}, {
"method": "setProperty",
"args": ["log.tag.ConsentDialog", "Verbose"]
}, {
"method": "backToHome",
"args": []
}
],
"tearDown": [{
"method": "setProperty",
"args": ["log.tag.WelcomeScreen", " "]
}, {
"method": "setProperty",
"args": ["log.tag.ConsentDialog", " "]
}
]
}
{
"method": "pushFileToDevice",
"args": ["filePathOnAgent","filePathOnDevice"]
}
- filePathOnAgent: It can be an absolute path like D:\file\Copy.ps1, also be a relative path under AgentInstallFolder like temp/111.txt
- filePathOnDevice: The file path on device. For example, /sdcard/Movies/testfile/
{
"method": "pullFileFromDevice",
"args": ["filePathOnDevice"]
}
- filePathOnDevice: It can be the path of folder like /sdcard/Movies/testfile/, also can be the path of file like /sdcard/Movies/testfile/aa.log
The commands can be configured in application.yml.
- type: command type. Only support ADB shell command now.
- when: setUp or tearDown. Used to specify the execute timing.
- suite-class-matcher: Regular expression. Used to match the suite class of test task.
- inline: Command script. Will be executed line-by-line on target device.
For example,
app:
device-script:
commands:
- type: ADBShell
when: setUp
suite-class-matcher: '.*'
inline: |
rm -rf /sdcard/Movies/testfile2
mkdir /sdcard/Movies/testfile2
cp /sdcard/Movies/testfile/* /sdcard/Movies/testfile2
- type: ADBShell
when: tearDown
suite-class-matcher: '.*'
inline: |
rm -rf /sdcard/Movies/testfile2
Introduction:
User manual:
- Deploy Center Docker Container
- Deploy Agent Docker Container
- Test agent setup
- One-Line-Installer Agent Setup
- [DEPRECATED]Deploy a test agent service
- Trigger a test task run in the Hydra Lab test service
- Create an Appium UI Test Automation Project
- Create test build and run XCTest
- Test Task Customization
- FAQ
Developer guideline:
- Start Services with Default Configuration
- Dev Environment Setup
- Technical Design
- Integrate Hydra Lab test center with Microsoft AAD authentication service
- Upgrade the test agent service from center service
News: