# Testing instructions for the whole network

When the third-party platform is successfully created and the final development test is completed, and the application for the whole network release is submitted, the WeChat server will test whether the basic logic of the service is available through automated testing, and only if the basic logic is available will the third-party platform be allowed to submit the whole network release.

WeChat backstage will automatically Official Account message template And the Mini Program is configured as an additional test number for the third-party platform party, and through that account, performs the test steps as described below, The third party platform needs to implement the relevant logic according to the automatic test rules described in each step, so as to achieve the prerequisite of the whole network release through the access detection.

Please note

1, must be in accordance with the requirements of the test steps in advance, the code to achieve the relevant logic, to click on the "whole network release" button, it is possible to successfully publish the whole network

  1. Automated testing Case Process, still need to be followedMessage Encryption and Decryption Access GuidelinesOf the requirements.

# The information for the dedicated test number for automated testing is as follows:

Account type Group 1 account Second group account Third group account Group IV Account Group V Account
Official Account message template appid:wx570bc396a51b8ff8
Username:gh_3c884a361561
appid:wx9252c5e0bb1836fc
Username:gh_26128078e9ab
appid:wx8e1097c5bc82cde9
Username:gh_3f222ed8d140
appid:wx14550af28c71a144
Username:gh_26128078e9ab
appid:wxa35b9c23cfe664eb
Username:gh_2b3713f184a6
Mini Program AppID:WXD101A85AA106F53E
Username:gh_8dad206e9538
appid:wxc39235c15087f6f3
Username:gh_905ae9d01059
appid:wx7720d01d4b2a4500
Username:gh_393666f1fdf4
apps:wx05d483572dcd5d8b
Username:gh_39abb5d4e1b7
appid:wx5910277cae6fd970
Username:gh_7818dcb60240
  • The second group to the fifth group of test accounts will be opened on January 18, 2021. Developers are requested to configure test cases for the new special test numbers in time.
  • In order to improve the efficiency of the third-party platform, it is recommended that developers configure all five test numbers, otherwise they may encounter the problem of "no test resources temporarily."

# 1. The content of automated testing is as follows:

1, test and verify that the bill push process is normal

  1. Validation Official Account message template Message management and Mini Program customer service message management function is normal
  • When the third party did not check the Mini Program's customer service message management permission set, nor did it check the Official Account message template Of the message management permission set, the corresponding automated detection step is omitted
  • When the third party checks the Official Account message template The message management permission set is performed Official Account message template Message management function test, test steps, please see [Test Official Account message template Processing User Messages] and [Testing Official Account message template Handling user messages using the Customer Service Message Interface]
  • When the third party ticks the Mini Program customer service message management permission set, the Mini Program customer service message management function test will be carried out, test steps please see [Test Mini Program uses customer service message interface to handle user messages]

# II. Details of Automated Testing Steps

# 1, test and verify the bill push process

  • The specific test steps are: WeChat background simulation push component_verify_ticket To the developer, the developer is required to respond to the receipt must be directly returned to the character string success)。

# 2. Testing Official Account message template Handling User Messages

  • Emulated fans send text messages to dedicated test Official Account message template, Third-party platforms are required to respond accordingly based on the content of the text message:
  1. WeChat mode push to the third party platform: text message, where Content The content of the field is fixed to:TESTCOMPONENT_MSG_TYPE_TEXT

  2. Third-party platforms immediately respond to text messages and ultimately reach fans: Content Must be fixed as:TESTCOMPONENT_MSG_TYPE_TEXT_callback

# 3. Testing Official Account message template Handling user messages using the Customer Service Message Interface

  • The specific test steps are: WeChat background will automatically test in advance Official Account message template Licensed to third party platforms and will be tested in a dedicated Official Account message template Automatically authorized to a third-party platform, the push query_auth_code To the Service)

1, simulation fans send text messages to the special test Official Account message template, Third-party platforms are required. 5 Return empty string within seconds indicates that there is no reply, and then immediately use the customer service message interface to send a message to reply to fans

  1. WeChat mode push to the third party platform: text message, where Content The content of the field is fixed to: QUERY_AUTH_CODE:$query_auth_code$(query_auth_code Will be tested in a dedicated Official Account message template Automatically authorized to the third party platform, by the WeChat background push to the developer)

  2. After the third-party platform gets the value of $query_auth_code$, it can use the [Use authorization code to obtain authorization information interface](https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms /2.0/api/ThirdParty/token/authorization_info.html), assign the value of $query_auth_code$ to the parameter authorization_code required by the interface. Then, call and send customer service message interface to reply a text message to fans, where the content field of the text message is set to: $query_auth_code$ _from_api (where $query_auth_code$ needs to be replaced with the pushed $query_auth_code$ value)

# 4, the test Mini Program using the customer service message interface to handle user messages

  • The specific test steps are: WeChat background will automatically authorize the special test Mini Program to the third-party platform in advance, and will push the special test Mini Program when it is automatically authorized to the third-party platform. query_auth_code To the Service)

1, simulation fans send a text message to the special test Mini Program, the third party platform needs to immediately use the customer service message interface to send a message to reply to fans

  1. WeChat mode push to the third party platform: text message, where Content The content of the field is fixed to:QUERY_AUTH_CODE:$query_auth_code$(query_auth_code When the special test Mini Program is automatically authorized to the third-party platform, it will be pushed to the developer by the WeChat background)

  2. Third-party platforms. $query_auth_code$ In the interface document page after the value of theAccess to Authorization Information Interface using License Code, Will $query_auth_code$ To the required parameters of the interface. authorization_code. Then, the call to send the customer service message api Reply to a text message to a fan, wherein the text message's content Field is set to:$query_auth_code$_from_api(where $query_auth_code$ Need to be replaced by the push over query_auth_code)