Mini Program Quality Inspection combines the startup performance and automated testing capabilities of the Cloud Testing Service to provide a comprehensive quality inspection for the integrated Mini Program.
As seen in the Quality Inspection Report Example, the quality inspection primarily checks the Mini Program from the following four aspects:
- Startup performance
- Runtime performance
- Compatibility
- Network performance
Quick Start for Quality Inspection Tasks
Users can navigate to the quality inspection task page by selecting "Automated Task Management" => " Mini Program Quality Inspection" in the left navigation bar. Click the "Create New Quality Inspection Task" button in the top-right corner of the page to create a quality inspection task.
Special Notice:
For each platform or device model selected in a quality inspection task, 2 identical device models will be used to run Automated Testing and Startup Performance tasks respectively.
Therefore, for each selected platform or device model, an automated testing task (defaulting to a 20-minute intelligent Monkey task) and a 20-minute startup performance test will be executed, resulting in a total deduction of 40 minutes of test duration.
Troubleshooting Guide for Execution Failures
As mentioned above, the quality inspection task launches automated testing and startup performance tasks on the same device model. The quality inspection report also relies on the test results from these two tasks.
If a task fails to execute, it is generally due to physical device issues. Users can refer to more detailed prompts on the test report page.
Special Note:
The evaluation of startup performance references Mini Program data from WeAnalysis, using the cold start results of the same device model as the benchmark.
If there are few online visitors for Mini Program, and no comparable values for the same device model are found, evaluation results cannot be obtained (displayed as N/A in the report).
Quality Inspection Report Scoring Details
Overview
Cloud Testing integrates evaluation results from various aspects to obtain the Mini Program Quality Inspection Assessment Results. The weight distribution for each item is as follows:
- Launch Performance: 30%
- Runtime Performance: 30%
- Compatibility: 20%
- Network Performance: 20%
For the weights listed above, users can adjust them based on their specific project requirements by navigating to "Project Management" => "Runtime Performance Settings".
Startup Performance
From the two most common scenarios for launching a Mini Program from a cold start (requiring code package download and having code package already downloaded), analyze the time spent in three phases of the startup process: code package download, code injection, and initial rendering, as well as the overall startup time.
Furthermore, WeTest compares the data from these three phases and the overall timing with the WeData Mini Program production version aggregate data to facilitate comparison for developers.
Please note: The final overall test result is based on Mini Program the cold start result requiring code package download.
Runtime Performance
Runtime performance analysis mainly consists of two parts: page switching duration and runtime experience score
1. Page Switch Latency
The start time is marked when the page transition begins. For Android, the end time is the last LCP within 4 seconds; for iOS, it is the FCP/FR. Note that this definition differs from the Page Switch Latency metric in We Analytics, and theoretically, the values here will be slightly higher than those in We Analytics.
Page Switch Latency intuitively reflects the "jank" or stuttering performance of Mini Program. It is recommended to keep the switch latency within 2500ms.
The report provides a detailed breakdown, including the average Page Switch Latency, the specific pages and frequency with which slow switches occurred, and detailed latency data.
To help developers diagnose the causes of slow page transitions, the Page Details section consolidates all relevant information for the page, including page screenshots, anomaly indicators (such as JSError, white/black screens), network request status, and experience scores.
2. Runtime Experience Score
The Runtime Experience Score content primarily leverages the experience scoring capabilities in Runtime Performance Analysis to perform real-time checks during the execution of Mini Program. It analyzes potential issues that may negatively impact the experience, identifies the specific problem areas, and provides optimization suggestions.
The runtime experience is evaluated based on three aspects: performance checks, best practices, and recommendations, assessing the execution status of Mini Program.
- [Important] Performance Checks: Checks are performed on aspects such as the number of WXML nodes, the usage of
setData, and script execution time. Performance checks directly affect the evaluation result of the runtime experience. - [Minor] Best Practices: Checks are performed on aspects such as HTTPS requests, CSS usage, and deprecated APIs. Best practices have a minor impact on the evaluation result of the runtime experience.
- [Recommended] Suggestions: Checks are performed on aspects such as image display and element click areas. Note that suggestions are for reference only and are not included in the evaluation result of the runtime experience score.
Compatibility
Mini Program must avoid JSErrors or UI anomalies such as black/white screens and overlapping text when running on any device.
Compatibility helps developers analyze whether JSErrors and UI anomalies occurred during the Monkey run from these dimensions:
- JSError: Detects whether any page has a JSError during the run.
- UI Anomaly: Inspects screenshots taken during the run to identify UI anomalies such as
black/white screens,black/white screens, etc.
Network Performance
The network performance of Mini Program significantly impacts the user experience. For instance, network errors can cause Mini Program pages to display abnormally.
Network congestion can also lead to lag on Mini Program pages, resulting in a poor user experience.
The quality inspection report focuses on evaluating the network performance of Mini Program from two dimensions: request results and request duration.
Request Result Analysis
Request result analysis primarily checks two aspects: request failures and request frequency:
- Request failures: Check whether there are any failed network requests. Developers should pay close attention to failed requests, as they are highly likely to cause anomalies in Mini Program functionality.
- Request frequency: Analyze the number of requests sent by each page. For pages with a high number of requests, developers can consider merging some requests or caching request content to improve page performance.
Request Latency Analysis
Request Latency Analysis primarily identifies cases with excessive request duration. It is recommended that all network requests return results within 1 second.
Additionally, Cloud Testing provides detailed information for all request records.
Need Help
If you have any suggestions or requirements, please visit the Need Help page, scan the QR code to join the official WeCom group for cloud testing, and contact the group owner to provide feedback.