Last Updated on : 2023-05-22 06:38:32download
Tuya IPC SDK automated test tool can easily run automated test tasks on the IPC SDK.
In the traditional tests, main process regression and other test tasks were repeatedly performed for IP cameras (IPC). For example, video images might be previewed consecutively 100 times in a single test. This was quite time-consuming.
To accelerate the test, you can integrate Tuya IPC SDK automated test tool. This allows users to run a series of test tasks within a few simple steps. During each test, integral execution logs are generated, and at the end of the test, test results are shown, including the total time consumption, success rate, error messages, and other helpful information.
Before the IPC SDK automated test tool is used, prepare an IPC that works properly and add the device to the target home.
The IPC SDK automated test tool serves the development as an extension of Tuya IPC SDK. Follow the instructions in Fast Integration with IPC SDK for iOS to integrate Tuya IPC SDK.
Add the following code block to the Podfile:
source 'https://github.com/tuya/TuyaPublicSpecs.git'
Add the dependency TuyaCameraAutomation
to the Podfile.
pod 'TuyaCameraAutomation'
The following code block helps to navigate to the IPC SDK automated test tool:
// Imports the header file
#import <TuyaCameraAutomation/TuyaCameraAutomationPublicViewController.h>
// Navigates to the viewer controller for the use of the test tool.
TuyaCameraAutomationPublicViewController *vc = [TuyaCameraAutomationPublicViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
Term | Description |
---|---|
Task | The minimum running unit. It is an API call in most cases. For example, close a peer-to-peer (P2P) connection. |
Task chain | Multiple tasks are combined to create a task chain. Two types of task chains are available: cyclic and non-cyclic. |
Use case | Multiple task chains are combined to create a use case. The number of cycles can be set for each use case. This value will be passed to all cyclic task chains in a use case to specify the number of cycles in the cyclic task chains. |
Program | Multiple use cases are combined to create a program. The number of cycles can be set for each program. This value will be passed to all use cases in a program, and finally to all cyclic task chains in the use cases to specify the number of cycles in the cyclic task chains. |
Page | Description | Example |
---|---|---|
Test programs | Displays all available automated test programs. Users can select a program to run it, or tap Case in the top-right corner of the page to view all available use cases. | |
Test program details |
|
|
Use cases | Displays all available use cases. Users can tap a use case to view its details. | |
Use case details |
|
|
View execution logs | Dynamically displays execution logs of all tasks, running status of use cases, current execution progress, and more test data. | |
Test report |
|
The following flowchart shows the process of the preceding use case.
If one of the tasks of a non-cyclic chain failed, the system will end the current use case, and run the next use case or exit the non-cyclic chain.
If one of the tasks of a cyclic chain failed, the system will end the current cycle and start the next cycle without affecting subsequent task chains.
A use case is regarded as a failure as long as any of its tasks failed.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback