[go: up one dir, main page]

CN113760684A - Automatic test method, system, storage medium and computer equipment for real machine of applet sdk - Google Patents

Automatic test method, system, storage medium and computer equipment for real machine of applet sdk Download PDF

Info

Publication number
CN113760684A
CN113760684A CN202010492048.4A CN202010492048A CN113760684A CN 113760684 A CN113760684 A CN 113760684A CN 202010492048 A CN202010492048 A CN 202010492048A CN 113760684 A CN113760684 A CN 113760684A
Authority
CN
China
Prior art keywords
test
tested
applet
small program
sdk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010492048.4A
Other languages
Chinese (zh)
Inventor
赵雪萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN202010492048.4A priority Critical patent/CN113760684A/en
Publication of CN113760684A publication Critical patent/CN113760684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明适用于小程序测试技术领域,提供了一种小程序sdk真机自动化测试方法,包括:将待测小程序以及自动运行所述待测小程序的测试框架安装于智能终端设备上;根据所述待测小程序的操作逻辑建立所述待测小程序的测试用例,并发送所述测试用例对应测试操作的http请求至所述测试框架;所述测试框架根据所述http请求以运行所述待测小程序,并生成所述待测小程序运行的上报数据;对所述上报数据进行数据验证以获得测试结果。还提供了一种小程序sdk真机自动化测试系统、用于存储执行所述方法的计算机程序的存储介质以及实现所述方法的计算机设备。借此,本发明实现了小程序在真机环境的自动化测试,具有流程标准性以及执行高效性。

Figure 202010492048

The invention is applicable to the technical field of applet testing, and provides an automatic testing method for an applet sdk real machine, comprising: installing an applet to be tested and a test framework for automatically running the applet to be tested on an intelligent terminal device; The operation logic of the applet to be tested establishes the test case of the applet to be tested, and sends the http request corresponding to the test operation of the test case to the test framework; the test framework executes the test according to the http request. The applet to be tested is generated, and report data of the operation of the applet to be tested is generated; data verification is performed on the reported data to obtain a test result. Also provided are a small program SDK real machine automated testing system, a storage medium for storing a computer program for executing the method, and a computer device for implementing the method. Thereby, the present invention realizes the automatic test of the applet in the real machine environment, and has process standardization and high execution efficiency.

Figure 202010492048

Description

Automatic test method, system, storage medium and computer equipment for real machine of applet sdk
Technical Field
The invention relates to the technical field of small program testing, in particular to a real-machine automatic testing method, a real-machine automatic testing system, a real-machine automatic testing storage medium and computer equipment of a small program sdk.
Background
The development framework of the small program mainly comprises four frameworks, namely a native framework, a copy (small program componentization development framework), an mpvue (Vue-based WeChat small program front-end framework) and a Taro (multi-end unified development framework). The testing applet sdk (Software Development Kit) needs to integrate sdk in 4 applets with the same functions developed with these four frameworks, and then test their functions in the applets, respectively. Namely, the same function needs to be tested once on the small programs of the four frames respectively, and a large amount of repeated operation and verification exist; it is inefficient.
As can be seen, the conventional method has many problems in practical use, and therefore, needs to be improved.
Disclosure of Invention
In view of the above-mentioned drawbacks, the present invention provides a method, a system, a storage medium, and a computer device for automatically testing an applet sdk in a real machine environment, which have process standardization and execution efficiency.
In order to achieve the above object, the present invention provides a method for automatically testing a small program sdk in real time, comprising:
installing, namely installing the small program to be tested and a test frame for automatically operating the small program to be tested on intelligent terminal equipment;
a test Request step, namely establishing a test case of the applet to be tested according to the operation logic of the applet to be tested, and sending an HTTP Request (HTTP Request, which refers to a Request message from a client to a server) of the test operation corresponding to the test case to the test framework;
a test operation step, wherein the test framework operates the small program to be tested according to the http request and generates reported data of the small program to be tested;
and a test result step, namely performing data verification on the reported data to obtain a test result.
Optionally, the mounting step includes:
and installing a WebDriverAgent (a new ios mobile test framework promoted by Facebook) test framework for automatically operating the applet to be tested on ios (a mobile operating system developed by apple Inc.) equipment.
Optionally, the mounting step includes:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
Optionally, the step of requesting a test includes:
a test case step, namely establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and a request generation step, namely generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal equipment.
Also provided is an applet sdk real machine automated testing system, comprising:
the installation unit is used for installing the small program to be tested and the test framework which automatically runs the small program to be tested on the intelligent terminal equipment;
the test request unit is used for establishing a test case of the small program to be tested according to the operation logic of the small program to be tested and sending an http request of the test operation corresponding to the test case to the test frame;
the test operation unit is used for the test framework to operate the small program to be tested according to the http request and generate the reported data of the small program to be tested;
and the test result unit is used for carrying out data verification on the reported data to obtain a test result.
Optionally, the mounting unit is configured to:
and installing a WebDriverAgent test framework for automatically operating the applet to be tested on the ios equipment.
Optionally, the mounting unit is further configured to:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
Optionally, the test request unit includes:
the test case unit is used for establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and the request generation subunit is used for generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal device.
In addition, a storage medium and a computer device are provided, the storage medium storing a computer program for executing the above-described applet sdk real-machine automated testing method.
The computer device comprises a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the applet sdk real machine automated testing method described above when executing the computer program.
The invention relates to an automatic test method and a system for an applet sdk real machine.A to-be-tested applet and a test framework for automatically operating the to-be-tested applet are installed on intelligent terminal equipment; establishing a test case of the small program to be tested according to the operation logic of the small program to be tested, and sending an http request of the test operation corresponding to the test case to the test framework; the test framework operates the small program to be tested according to the http request and generates reported data of the small program to be tested; and performing data verification on the reported data to obtain a test result. The automatic test of the small program in the real machine environment is realized; the identification and operation of control pieces in the small program are supported; the WeChat H5 page is supported, and a common H5 control can be identified; the small programs for testing different frames can be installed by using a WeChat developer tool respectively, and the test script and the verification part are completely reused, so that the test efficiency is greatly improved.
Drawings
FIG. 1 is a flow chart illustrating the steps of a method for automated testing of a small program sdk on a real machine, in accordance with a preferred embodiment of the present invention;
fig. 2 is a flowchart illustrating specific steps selectable in the test request step of the applet sdk real machine automation test method according to the preferred embodiment of the present invention;
FIG. 3 is a flowchart illustrating the steps of the test operation of the applet sdk method for automated testing of a real machine;
FIG. 4 is a flowchart illustrating steps of the test result of the method for automatically testing the applet sdk in a real machine manner according to the preferred embodiment of the invention;
FIG. 5 is a block diagram of an automated test system for a real machine of the applet sdk in accordance with the preferred embodiment of the present invention;
fig. 6 is a block diagram illustrating an optional specific structure of the test request unit of the applet sdk real-machine automated test system according to a preferred embodiment of the present invention;
fig. 7 is a block diagram illustrating an optional specific structure of the test operation unit of the applet sdk real-machine automated test system according to the preferred embodiment of the present invention;
fig. 8 is a schematic diagram of a test connection structure of an applet sdk real-machine automated test system according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that references in the specification to "one embodiment," "an example embodiment," etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not intended to refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
Moreover, where certain terms are used throughout the description and following claims to refer to particular components or features, those skilled in the art will understand that manufacturers may refer to a component or feature by different names or terms. This specification and the claims that follow do not intend to distinguish between components or features that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. In addition, the term "connected" as used herein includes any direct and indirect electrical connection. Indirect electrical connection means include connection by other means.
Fig. 5 shows an applet sdk real-machine automated testing system 100 according to a preferred embodiment of the present invention, which includes an installation unit 10, a test request unit 20, a test operation unit 30, and a test result unit 40; wherein:
the installation unit 10 is used for installing the applet to be tested and the test framework for automatically operating the applet to be tested on the intelligent terminal equipment; the test request unit 20 is configured to establish a test case of the applet to be tested according to the operation logic of the applet to be tested, and send an http request of a test operation corresponding to the test case to the test framework; the test operation unit 30 is configured to operate the applet to be tested according to the http request by the test framework, and generate report data of the applet to be tested; the test result unit 40 is configured to perform data verification on the reported data to obtain a test result. The method comprises the steps of installing an applet to be tested and a test frame at a real machine end, receiving an http request by using the test frame to control the applet to be tested to automatically run, and verifying a test result according to reported data of the applet to be tested, so that the applet is automatically tested in a real machine environment, and the method has flow standardization and high execution efficiency.
Optionally, the installation unit 10 installs a WebDriverAgent test framework for automatically running the applet to be tested on the ios device; that is, the embodiment is only applicable to ios devices, and may be a mobile phone terminal or a tablet terminal, etc. Further, the installation unit 10 is further configured to install the applet to be tested on the microcode of the ios device through an automatic real machine debugging function of a microcode developer tool. The method comprises the steps that the small program to be tested can be automatically installed on the WeChat of the real machine equipment through the automatic real machine debugging function of the WeChat developer tool, one or more small programs to be tested which need to be tested can be automatically installed on the WeChat of the real machine equipment, and the WebDriverAgent testing framework is universally adapted to all the small programs to be tested.
Referring to fig. 6, optionally, the test request unit 20 includes a test example unit 21 and a request generation subunit 22; wherein:
the test case unit 21 is configured to establish a test case of the applet to be tested in the facebook-wda library according to the operation logic of the applet to be tested; the request generating subunit 22 is configured to generate a corresponding http request according to the test operation of the test case, and send the http request to the test framework on the intelligent terminal device. Because the embodiment is based on the ios automatic testing tool facebook-wda and the WebDriverAgent testing framework, the method is only suitable for carrying out automatic testing on the applet at the ios real machine end; introducing a facebook-wda library into a test project, and establishing a test case (set) according to the operation logic of the applet; the operation logic specifically refers to a mode of the applet function operation, such as forwarding or button clicking of a function control in the applet; according to the test case established in the facebook-wda library, generating a corresponding http request and sending the http request to a WebDriverAgen test framework on the ios real machine equipment, wherein the WebDriverAgen test framework automatically runs the applet to be tested according to the received http request to perform functional operation, such as forwarding or button clicking of a functional control in the applet, and then the test result of the applet to be tested is verified by reported data generated in the running process of the applet to be tested, so that automatic test operation is realized, manual execution is not needed, and the test efficiency and stability are improved.
Referring to fig. 7, optionally, the test running unit 30 includes a start debugging subunit 31, a functional operation subunit 32, and a report data subunit 33; wherein:
the start-up debugging subunit 31 is configured to receive the http request by the test framework to cold start the applet to be tested, and start a debugging mode of the applet to be tested; the functional operation subunit 32 is configured to control, by the test framework, the applet to be tested to perform a logical functional operation; the reported data subunit 33 is configured to obtain reported data of the functional operation corresponding to the applet to be tested.
The undistributed small program is tested on the real machine, the debugging state is required to be kept open, so that sdk integrated in the small program can report data, and logs, network flow and the like can be checked in real time through a debugging window of the real machine. The debug mode needs to be turned back on after each cold boot applet. After the operation for realizing the start debugging subunit 31, i.e. the cold start WeChat, the screen is pulled down, the tested small program is opened by clicking, the small program menu at the upper right corner is clicked, and the debugging key is opened by clicking in the middle point of the menu.
Forwarding is one of the conventional important operations of an applet, and the steps of operating the subunit 32 through a function to make the test framework implement the forwarding operation are as follows: clicking a small program right upper menu button, selecting a 'forwarding' button in an appearing menu, and then clicking a 'sending' button to realize forwarding, thereby realizing the manual operation process automatically; the functional operation subunit 32 also implements common basic operations in the process of testing the applet, and a complex test scenario can be completed through the combination of the basic operations.
Optionally, the system further comprises a storage unit and an extraction and analysis unit, wherein the storage unit is used for storing the report data into a Redis database; the extraction and analysis unit is used for extracting the reported data in the Redis database, and the reported data is analyzed to be in a json format. The main function of the applet sdk is to report data, and the correctness of the reported data needs to be checked in the test; the reported data are stored in a Redis database, and the test case can be subjected to a series of automatic operations on the small program during running, then the data are extracted from the database and are analyzed into a data set in a json format; the json format is a lightweight data exchange format. Further, the test result unit 40 includes an event data subunit and a result judgment subunit, where:
the event data subunit is used for extracting event data in the reported data according to the name of the event needing to be verified; and the result judging subunit is used for judging whether the event data comprises the use case execution content, and if so, judging that the execution is successful. After the execution of a test case is finished, all reported data generated in the execution process of the test case are taken out of a database, data needing to be verified are extracted, and event data are extracted according to the event name (eventName) of the reported data in the scheme; after the event data needing to be verified is extracted, whether specific fields exist in the event data and the correctness of the values can be verified, and whether the case is executed successfully is judged. If all data reported by the use case are taken out from the database, then the data of the required page event are extracted from the result of the previous step, and finally an interface is called to check the specific content in the page event data; the check is successful, i.e. the case execution is successful, otherwise, the check fails.
Optionally, the test result unit further includes a prompt feedback subunit, configured to locate the reported data of the event data and send a prompt message if the test result unit does not include the case execution content. Namely, if the execution fails, the problem is located and a reminding message is sent to prompt.
Fig. 1 shows a real-machine automated testing method of the applet sdk according to the preferred embodiment of the present invention, which includes the following steps:
s101: installing an applet to be tested and a test framework for automatically operating the applet to be tested on intelligent terminal equipment;
s102: establishing a test case of the small program to be tested according to the operation logic of the small program to be tested, and sending an http request of the test operation corresponding to the test case to the test framework;
s103: the test framework operates the small program to be tested according to the http request and generates reported data of the small program to be tested;
s104: and performing data verification on the reported data to obtain a test result.
The method comprises the steps of installing an applet to be tested and a test frame at a real machine end, receiving an http request by using the test frame to control the applet to be tested to automatically run, and verifying a test result according to reported data of the applet to be tested, so that the applet is automatically tested in a real machine environment, and the method has flow standardization and high execution efficiency.
Optionally, step S101 includes:
and installing a WebDriverAgent (a new ios mobile test framework is promoted by Facebook) test framework for automatically operating the applet to be tested on ios equipment.
Optionally, step S101 further includes:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
Referring to fig. 2, optionally, step S102 includes:
s1021: establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
s1022: and generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal equipment.
Because the embodiment is based on the ios automatic testing tool facebook-wda and the WebDriverAgent testing framework, the method is only suitable for carrying out automatic testing on the applet at the ios real machine end; introducing a facebook-wda library into a test project, and establishing a test case (set) according to the operation logic of the applet; the operation logic specifically refers to a mode of the applet function operation, such as forwarding or button clicking of a function control in the applet; according to the test case established in the facebook-wda library, generating a corresponding http request and sending the http request to a WebDriverAgen test framework on the ios real machine equipment, wherein the WebDriverAgen test framework automatically runs the applet to be tested according to the received http request to perform functional operation, such as forwarding or button clicking of a functional control in the applet, and then the test result of the applet to be tested is verified by reported data generated in the running process of the applet to be tested, so that automatic test operation is realized, manual execution is not needed, and the test efficiency and stability are improved.
Referring to fig. 3, optionally, step S103 includes:
s1031: the test framework receives the http request to cold start the small program to be tested and starts a debugging mode of the small program to be tested;
s1032: the test framework controls the small program to be tested to perform logic function operation;
s1033: and acquiring reported data of the functional operation corresponding to the small program to be tested.
The undistributed small program is tested on the real machine, the debugging state is required to be kept open, so that sdk integrated in the small program can report data, and logs, network flow and the like can be checked in real time through a debugging window of the real machine. The debug mode needs to be turned back on after each cold boot applet.
Forwarding is one of the conventional important operations of the applet, and the steps of realizing the forwarding operation through the test framework are as follows: clicking a small program right upper menu button, selecting a 'forwarding' button in an appearing menu, and then clicking a 'sending' button to realize forwarding, thereby realizing the manual operation process automatically; the functional operation subunit 32 also implements common basic operations in the process of testing the applet, and a complex test scenario can be completed through the combination of the basic operations.
Referring to fig. 4, optionally, after the step S103, the method includes:
s105: storing the reported data into a Redis database;
the step S104 comprises:
s106: and extracting the reported data in the Redis database, and analyzing the reported data into a json format.
The main function of the applet sdk is to report data, and the correctness of the reported data needs to be checked in the test; the reported data are stored in a Redis database, and the test case can be subjected to a series of automatic operations on the small program during running, then the data are extracted from the database and are analyzed into a data set in a json format; the json format is a lightweight data exchange format.
Optionally, step S104 includes:
s1041: according to the name of the event needing to be verified, extracting the event data in the reported data;
s1042: and judging whether the event data comprises the use case execution content or not, and if so, judging that the execution is successful. After the execution of a test case is finished, all reported data generated in the execution process of the test case are taken out of a database, data needing to be verified are extracted, and event data are extracted according to the event name (eventName) of the reported data in the scheme; after the event data needing to be verified is extracted, whether specific fields exist in the event data and the correctness of the values can be verified, and whether the case is executed successfully is judged. If all data reported by the use case are taken out from the database, then the data of the required page event are extracted from the result of the previous step, and finally an interface is called to check the specific content in the page event data; the check is successful, i.e. the case execution is successful, otherwise, the check fails.
Optionally, step S104 further includes:
a reminding feedback step, namely positioning the reported data of the event data and sending reminding information if the use case execution content is not included; namely, if the execution fails, the problem is located and a reminding message is sent to prompt.
Referring to fig. 8, the method is applied with the following specific operations:
running a WebDriverAgen testing framework on an iPhone mobile phone (Facebook promotes a new iOS mobile testing framework-WebDriverAgen);
installing an applet on the WeChat of an iPhone device (a mobile phone device introduced by apple Inc.) by one key using a real machine automatic debugging function of a WeChat developer tool;
running a test case script at the mac end (a computer device introduced by apple Inc.); after the script operation is finished, extracting reported data from the database for data verification, and checking a test result;
and if the test case fails in the result, positioning the problem, and if the regression test is needed after the small program is modified, repeating the steps.
The present invention also provides a storage medium for storing a computer program of the small program sdk real-machine automated testing method described in fig. 1-4. Such as computer program instructions, which when executed by a computer, may invoke or otherwise provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on fixed or removable storage media and/or transmitted via a data stream over a broadcast or other signal-bearing medium and/or stored on a storage medium of a computer device operating in accordance with the program instructions. Here, according to an embodiment of the present application, a computer device comprising a small program sdk real-machine automated testing system as shown in fig. 5, the computer device preferably comprises a storage medium for storing the computer program and a processor for executing the computer program, wherein when the computer program is executed by the processor, the computer device is triggered to execute a method and/or a technical solution according to the foregoing embodiments.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
The method according to the invention can be implemented on a computer as a computer-implemented method, or in dedicated hardware, or in a combination of both. Executable code for the method according to the invention or parts thereof may be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, and so forth. Preferably, the computer program product comprises non-transitory program code means stored on a computer readable medium for performing the method according to the invention when said program product is executed on a computer.
In a preferred embodiment, the computer program comprises computer program code means adapted to perform all the steps of the method according to the invention when the computer program is run on a computer. Preferably, the computer program is embodied on a computer readable medium.
In conclusion, the invention uses the automatic real machine debugging function of the WeChat developer tool to automatically install the tested small program on the WeChat of the iOS device; introducing a facebook-wda library into a test project, and establishing a test case (set) according to test logic; installing and operating a WebDriverAgent test framework on the iOS device, receiving an http request by a resident background, and automatically operating the applet; and (4) storing the reported data generated after the small program is operated into a database, and automatically fetching the data from the database by using the case script and checking the correctness. The automatic test of the small program in the real machine environment is realized; the identification and operation of control pieces in the small program are supported; the WeChat H5 page is supported, and a common H5 control can be identified; the small programs for testing different frames can be installed by using a WeChat developer tool respectively, and the test script and the verification part are completely reused, so that the test efficiency is greatly improved.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
The invention also discloses A1 and an automatic test method for the small program sdk real machine, which comprises the following steps:
installing, namely installing the small program to be tested and a test frame for automatically operating the small program to be tested on intelligent terminal equipment;
a test request step, namely establishing a test case of the applet to be tested according to the operation logic of the applet to be tested, and sending an http request of the test operation corresponding to the test case to the test frame;
a test operation step, wherein the test framework operates the small program to be tested according to the http request and generates reported data of the small program to be tested;
and a test result step, namely performing data verification on the reported data to obtain a test result.
A2, the applet sdk real machine automation test method according to A1, the installing step comprising:
and installing a WebDriverAgent test framework for automatically operating the applet to be tested on the ios equipment.
A3, the applet sdk real machine automation test method according to A1, the installing step comprising:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
A4, the applet sdk true machine automation test method according to A2, the test request step including:
a test case step, namely establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and a request generation step, namely generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal equipment.
A5, the applet sdk real machine automated testing method according to A1, the test running steps comprising:
starting a debugging step, wherein the testing frame receives the http request to cold start the small program to be tested and starts a debugging mode of the small program to be tested;
a functional operation step, wherein the test framework controls the small program to be tested to perform logic functional operation;
and reporting data, namely acquiring reported data of the functional operation corresponding to the small program to be tested.
A6, the applet sdk real machine automated test method according to A1, the test run step being followed by:
a storage step, storing the reported data into a Redis database;
the test result step comprises the following steps:
and an extraction and analysis step, wherein the reported data in the Redis database is extracted and analyzed into a json format.
A7, the applet sdk real machine automated testing method according to A6, the testing result step comprising:
event data step, according to the name of the event needing to be verified, extracting the event data in the reported data;
and a result judgment step, namely judging whether the event data comprises the use case execution content, and if so, judging that the execution is successful.
A8, the applet sdk real machine automated testing method according to A7, the test result step further comprising:
and a reminding feedback step, namely positioning the reported data of the event data and sending reminding information if the use case execution content is not included.
Also disclosed is B9, a small program sdk real machine automated testing system, comprising:
the installation unit is used for installing the small program to be tested and the test framework which automatically runs the small program to be tested on the intelligent terminal equipment;
the test request unit is used for establishing a test case of the small program to be tested according to the operation logic of the small program to be tested and sending an http request of the test operation corresponding to the test case to the test frame;
the test operation unit is used for the test framework to operate the small program to be tested according to the http request and generate the reported data of the small program to be tested;
and the test result unit is used for carrying out data verification on the reported data to obtain a test result.
B10, the applet sdk real machine automated test system according to B9, the mounting unit for:
and installing a WebDriverAgent test framework for automatically operating the applet to be tested on the ios equipment.
B11, the applet sdk real machine automated test system according to B9, the mounting unit further for:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
B12, the applet sdk true machine automation test system according to B10, the test request unit comprising:
the test case unit is used for establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and the request generation subunit is used for generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal device.
B13, the applet sdk true machine automated test system according to B9, the test run unit comprising:
the starting debugging subunit is used for receiving the http request by the test framework to cold start the small program to be tested and starting a debugging mode of the small program to be tested;
the functional operation subunit is used for controlling the small program to be tested to perform logic functional operation by the test framework;
and the reported data subunit is used for acquiring the reported data of the functional operation corresponding to the small program to be tested.
B14, the applet sdk simulation automation test system according to B9, further comprising:
the storage unit is used for storing the reported data into a Redis database;
and the extraction and analysis unit is used for extracting the reported data in the Redis database, and analyzing the reported data into a json format.
B15, the applet sdk true machine automated test system according to B14, the test result unit comprising:
the event data subunit is used for extracting event data in the reported data according to the name of the event needing to be verified;
and the result judging subunit is used for judging whether the event data comprises the use case execution content, and if so, judging that the execution is successful.
B16, the applet sdk true machine automated test system according to B15, the test result unit further comprising:
and the reminding feedback subunit is used for positioning the reported data of the event data and sending reminding information if the use case execution content is not included.
C17 a storage medium storing a computer program for performing the mini-program sdk method for automated testing of authenticity according to any one of claims a 1-a 8.
D18, a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the applet sdk real machine automation test method of any one of claims a 1-a 8 when executing the computer program.

Claims (10)

1. An automatic test method for a small program sdk real machine is characterized by comprising the following steps:
installing, namely installing the small program to be tested and a test frame for automatically operating the small program to be tested on intelligent terminal equipment;
a test request step, namely establishing a test case of the applet to be tested according to the operation logic of the applet to be tested, and sending an http request of the test operation corresponding to the test case to the test frame;
a test operation step, wherein the test framework operates the small program to be tested according to the http request and generates reported data of the small program to be tested;
and a test result step, namely performing data verification on the reported data to obtain a test result.
2. The applet sdk real machine automated test method according to claim 1, wherein the installing step comprises:
and installing a WebDriverAgent test framework for automatically operating the applet to be tested on the ios equipment.
3. The applet sdk real machine automated test method according to claim 1, wherein the installing step comprises:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
4. The applet sdk real machine automation test method according to claim 2, characterized in that the test request step comprises:
a test case step, namely establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and a request generation step, namely generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal equipment.
5. An automated test system for an applet sdk, comprising:
the installation unit is used for installing the small program to be tested and the test framework which automatically runs the small program to be tested on the intelligent terminal equipment;
the test request unit is used for establishing a test case of the small program to be tested according to the operation logic of the small program to be tested and sending an http request of the test operation corresponding to the test case to the test frame;
the test operation unit is used for the test framework to operate the small program to be tested according to the http request and generate the reported data of the small program to be tested;
and the test result unit is used for carrying out data verification on the reported data to obtain a test result.
6. The applet sdk real machine automated test system according to claim 5, wherein the mounting unit is adapted to:
and installing a WebDriverAgent test framework for automatically operating the applet to be tested on the ios equipment.
7. The applet sdk real machine automated test system according to claim 5, wherein the mounting unit is further adapted to:
and installing the small program to be tested on the WeChat of the ios equipment through an automatic real machine debugging function of the WeChat developer tool.
8. The applet sdk real machine automation test system according to claim 6, wherein the test request unit comprises:
the test case unit is used for establishing a test case of the small program to be tested in a facebook-wda library according to the operation logic of the small program to be tested;
and the request generation subunit is used for generating a corresponding http request according to the test operation of the test case, and sending the http request to the test framework on the intelligent terminal device.
9. A storage medium storing a computer program for executing the method for real-machine automated testing of the applet sdk in any one of claims 1-4.
10. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the applet sdk real machine automation test method of any one of claims 1-4 when executing the computer program.
CN202010492048.4A 2020-06-02 2020-06-02 Automatic test method, system, storage medium and computer equipment for real machine of applet sdk Pending CN113760684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010492048.4A CN113760684A (en) 2020-06-02 2020-06-02 Automatic test method, system, storage medium and computer equipment for real machine of applet sdk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010492048.4A CN113760684A (en) 2020-06-02 2020-06-02 Automatic test method, system, storage medium and computer equipment for real machine of applet sdk

Publications (1)

Publication Number Publication Date
CN113760684A true CN113760684A (en) 2021-12-07

Family

ID=78783075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010492048.4A Pending CN113760684A (en) 2020-06-02 2020-06-02 Automatic test method, system, storage medium and computer equipment for real machine of applet sdk

Country Status (1)

Country Link
CN (1) CN113760684A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546843A (en) * 2022-02-11 2022-05-27 支付宝(杭州)信息技术有限公司 Program debugging processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9325740B2 (en) * 1998-03-18 2016-04-26 Implicit, Llc Application server for delivering applets to client computing devices in a distributed environment
CN109739754A (en) * 2018-12-25 2019-05-10 北京仁科互动网络技术有限公司 Application automatic testing method and system based on WeChat development
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9325740B2 (en) * 1998-03-18 2016-04-26 Implicit, Llc Application server for delivering applets to client computing devices in a distributed environment
CN109739754A (en) * 2018-12-25 2019-05-10 北京仁科互动网络技术有限公司 Application automatic testing method and system based on WeChat development
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SKOGT: "基于WebDriverAgent的自动化测试(demo)", pages 1 - 6, Retrieved from the Internet <URL:《https://www.jianshu.com/p/14d6771adfb6》> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546843A (en) * 2022-02-11 2022-05-27 支付宝(杭州)信息技术有限公司 Program debugging processing method and device

Similar Documents

Publication Publication Date Title
US8515876B2 (en) Dry-run design time environment
US8875102B1 (en) Multiple browser architecture and method
CN107102947B (en) ATM transaction flow testing device and method
US8731896B2 (en) Virtual testbed for system verification test
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN105389263B (en) Application software authority monitoring method, system and equipment
CN103984626B (en) A kind of method and device for generating test case script
CN103744784A (en) Method and system for automatically testing mobile phone applications
CN106547687A (en) Application testing method, device and system
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
CN107729238A (en) A kind of plug-in unit adjustment method, system, device and computer-readable recording medium
CN110609785A (en) Software interface testing method and device
CN110543429B (en) Test case debugging method, device and storage medium
CN112395184A (en) Information acquisition method, equipment and computer storage medium
CN112367220B (en) Interface testing method and device, storage medium and electronic equipment
KR101792864B1 (en) System and Method for verifying application
US20050203717A1 (en) Automated testing system, method and program product using testing map
CN113760684A (en) Automatic test method, system, storage medium and computer equipment for real machine of applet sdk
CN113986263A (en) Code automation testing method, device, electronic device, storage medium
CN112911283A (en) Smart television testing method and device
CN108737559A (en) Remote entry method, system, equipment and the readable storage medium storing program for executing of goal systems
CN118606211A (en) Test script generation method, device, electronic equipment and vehicle
CN111966589A (en) Bug processing method, device and equipment based on function test
CN117971655A (en) Automatic test frame assembly, method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination