Chapter 7 Application Testing
1. wukong Stability Tool
https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/application-test/wukong-guidelines.md/
Introduction -- OpenHarmony stability testing tool wukong, as an important part of the OpenHarmony toolset, implements basic capabilities for application stability testing such as random event injection, control injection, exception capture, report generation, and data traversal and screenshot of Abilities.
Command usage instructions: https://gitee.com/openharmony/ostest_wukong/blob/master/README_zh.md
wukong exec Random Test Usage Example
Enter shell and execute random test command:
wukong exec -s 10 -i 1000 -a 0.28 -t 0.72 -c 100Random test example analysis:

wukong special Special Test Usage Example
Enter shell and execute special sequential traversal test command:
wukong special -C [bundlename] -pSpecial test example analysis:

When the test instruction is executed, the test results will be automatically generated.
Test Result Output Root Path is as follows:
Report storage path before 2022/9/22: /data/local/wukong/report/xxxxxxxx_xxxxxx/
Report storage path after 2022/9/22: /data/local/tmp/wukong/report/xxxxxxxx_xxxxxx/Note: The test report file directory will be automatically generated.
This directory contains the following types of results:

wukong Execution Log
reports / xxxxxxxx_xxxxxx / wukong.log2. SmartPerf Performance Tool
Introduction -- SmartPerf-end is a performance and power consumption testing tool developed based on the OpenHarmony system. It is simple and easy to use, and can provide key KPI indicators including performance and power consumption, giving specific test values for indicators. It includes collecting device FPS, CPU, GPU, Ftrace and other indicator data.
Currently, SmartPerf tool provides two usage methods: hap application visual operation method (SmartPerf-Device) and shell command line method (SmartPerf-Daemon). SmartPerf-Device supports visual operation, floating window control pause, and real-time data display in floating window. SmartPerf-Daemon is mainly suitable for devices without screens or with poor performance, and also supports devices like 3568.
