# Smart Monkey Test Common Questions

# How to tell if the test passes

The monkey test uses random clicks to test the stability of Weixin Mini Program.When the system runs at the end of the test, there is no black and white screen, JsError, Crash these abnormal conditions, that is, judge the test passed.

# What is Page Coverage for Monkey Tests

Page coverage refers to the proportion of Weixin Mini Program of the number of pages covered by the test after the end of the Monkey test task, , among all the pages of the **Mini Program.

For example, a Weixin Mini Program has 70 pages, and the Monkey task ends with 35 pages covered, which is 50% coverage.

The back office of the cloud testing service adopts a self-developed intelligent click strategy, utilizing deep learning algorithms to intelligently identify the current clickable elements, and improve the efficiency of smoke testing.

Monkey coverage may be low when the user runs the test for the first time, and as the user runs the test number increases, the background will intelligently learn historical experience and improve coverage.

# How to Increase Monkey Coverage

You can increase Smart Monkey test coverage by:

  1. Try Monkey Extended Mode .In the test plan, configure to specify the page and select the free explore mode.This will pull up all the configuration pages before the Monkey test starts, and then start the follow-up test, greatly improving the coverage
  2. Increase the length of the Monkey test. In general, as the Monkey test time increases, the coverage increases. The default Monkey runs for 20 minutes, and users can manually adjust for a larger time.
  3. Increase the number of running tests. The intelligent Monkey background records the historical experience of each test, and then uses it to optimize the strategy choice for the next run test. Generally, as the number of runs increases, the coverage rate gradually increases.

# How to detect black and white screen problems

As a rule of thumb, most black and white screens are caused by slow network loading or JSError pages. You can check the page details again to see if there are any problems with the page.

  1. In the tab below the Monkey report overview, select "Device List" = > "View Details" to enter the device details page
  2. In the device details page, if there is a black and white screen, there will be a "black and white screen details" tab, click to enter the black and white screen details. At the bottom of each black and white screen, click on the corresponding page link to get to the page details.

3. In the page details, all screenshots of the page, the experience rating of the page, network information, JSError information, etc., can be integrated to determine the cause of the black and white screen.For example, in the following diagram, page requests are prompted as being too long . In network requests, the requests are reversed in order to find the requests that are long and optimize.

# How to locate the JSError problem

First of all, because the cloud test can only get the Weixin Mini Program compiler confused js, to decode, you need this version of the sourcemap information

Users can upload the sourcemap file solution, the detailed process can refer to: [official tutorial] Use SourceMap to parse JSError error message

In addition, developers can locate problems by looking at the console logs, as shown below

  • Recreate in developer tools . Recreate according to the steps taken in the test report. Focus on the developer tool panelconsolefor JsError error information. Solve according to that error

  • Replicated in real , supporting only experience and development Weixin Mini Program Open debugging in the Mini Program and reproduce the process taken screenshots in the test report. View the JsError error message invConsloeand resolve the error message based on the error message. Note: there is no vConsole debugging feature in the online Mini Program



View cloud testing related questions and answers >

To WeChat Open Community Questions >