CN113778843B - Application program testing method and device, electronic equipment and readable storage medium - Google Patents
Application program testing method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN113778843B CN113778843B CN202010891787.0A CN202010891787A CN113778843B CN 113778843 B CN113778843 B CN 113778843B CN 202010891787 A CN202010891787 A CN 202010891787A CN 113778843 B CN113778843 B CN 113778843B
- Authority
- CN
- China
- Prior art keywords
- bottom layer
- application program
- jsf
- hypertext transfer
- transfer protocol
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 claims abstract description 95
- 238000012546 transfer Methods 0.000 claims abstract description 53
- 238000010998 test method Methods 0.000 claims abstract description 14
- 238000000034 method Methods 0.000 claims description 20
- 241000208306 Apium Species 0.000 claims description 12
- 230000005540 biological transmission Effects 0.000 claims description 9
- 238000004806 packaging method and process Methods 0.000 claims description 8
- 230000009471 action Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000010979 ruby Substances 0.000 description 2
- 229910001750 ruby Inorganic materials 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
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
The disclosure provides a test method and device of an application program, electronic equipment and a readable storage medium, and relates to the technical field of automatic driving. The test method of the application program comprises the following steps: the JSF controller receives a hypertext transfer protocol request sent by the Applium client, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data of the server side; the JSF controller acquires and encapsulates the JSON format underlying service data according to the hypertext transfer protocol request; the JSF controller sends the JSON format bottom layer business data to the application program to be tested; and the JSF controller determines the test result of the application program to be tested according to the running result of the application program to be tested on the underlying service data in the JSON format. By the technical scheme, the testing efficiency and compatibility of the application program of the client are improved.
Description
Technical Field
The disclosure relates to the technical field of testing, and in particular relates to a testing method and device for an application program, electronic equipment and a readable storage medium.
Background
The application is an automatic test framework, which is formed by expanding an automation API (Application Programming Interface ) of the mobile device based on webdriver (network driver) protocol addition, and the webdriver interacts with the server based on http protocol.
In the prior art, in order to improve the development efficiency of application programs, more and more mobile devices support JSF (javaserver faces, which is a user interface framework based on server side components), and the JSF framework is composed of rich API components and tag libraries.
However, the app ium client cannot perform data interaction based on the JSF interface protocol, so that an API component and corresponding service data under the JSF framework cannot be called through the JSF interface, and the efficiency of online testing, debugging and developing of the application program can be seriously affected.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a method, a device, an electronic device and a readable storage medium for testing an application program, which at least overcome the problem that in the related art, an application client cannot call an API component and service data of the application client through a JSF interface, so that the testing efficiency is low to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a test method of an application program, including: the JSF controller receives a hypertext transfer protocol request sent by the Applium client, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data of the server side; the JSF controller acquires and encapsulates the JSON format underlying service data according to the hypertext transfer protocol request; the JSF controller sends the JSON format bottom layer business data to the application program to be tested; and the JSF controller determines the test result of the application program to be tested according to the running result of the application program to be tested on the underlying service data in the JSON format.
In one disclosed embodiment, the obtaining and packaging the JSF controller to generate the JSON-format underlying service data according to the hypertext transfer protocol request includes: the JSF controller determines the bottom layer service data according to the hypertext transfer protocol request; the JSF controller determines the confidence coefficient of the calling logic of the bottom layer business data of the server side according to the matching degree between the requested bottom layer business data and the called bottom layer business data; and packaging the bottom layer business data with the confidence coefficient higher than the preset confidence coefficient into the JSON format.
In one disclosed embodiment, before the JSF controller receives the hypertext transfer protocol request sent by the app ium client, the method further includes: the JSF controller sends a connection instruction to a guidance application program of the Aptium client; the JSF controller establishes a transmission control protocol with the Aptium client according to the connection instruction, and receives parameter configuration information sent by the Aptium client based on the transmission control protocol, wherein the parameter configuration information comprises at least one of the running environment, the terminal type, the test action and the operating system of the application program to be tested; and the JSF controller creates a test session according to the parameter configuration information and feeds back the identification of the test session to the Aptium client.
In one disclosed embodiment, the method for testing an application program further comprises: the JSF controller receives a test request which is sent by the Aptium client and contains the identifier of the test session; and the JSF controller feeds back a test operation instruction to the Apium client according to the test request, wherein the test operation instruction is used for triggering the Apium client to test the application program to be tested.
According to still another aspect of the present disclosure, there is provided a test apparatus for an application program, including: the receiving module is used for receiving a hypertext transfer protocol request sent by the application client, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data of the server side; the control module is used for acquiring and packaging the JSF controller to generate the JSON format bottom layer service data according to the hypertext transfer protocol request; the transmitting module is used for transmitting the JSON format bottom layer business data to the application program to be tested; and the determining module is used for determining the test result of the application program to be tested according to the running result of the application program to be tested on the JSON format bottom layer business data.
According to still another aspect of the present disclosure, there is provided a test method of an application program, including: controlling the Appium client to send a hypertext transfer protocol request to a JSF controller at a server side, wherein the hypertext transfer protocol request comprises a request for calling bottom layer business data at the server side; acquiring the bottom layer service data fed back by the JSF controller, wherein the bottom layer service data is acquired and packaged into a JSON format by the JSF controller according to the hypertext transfer protocol request; and testing the application program to be tested according to the JSON format bottom layer service data.
In one disclosed embodiment, the JSF controller is configured to determine the underlying service data according to the hypertext transfer protocol request, and the JSF controller is configured to determine a confidence level of call logic of the underlying service data on the server side according to a degree of matching between the requested underlying service data and the invoked underlying service data.
According to still another aspect of the present disclosure, there is provided a test apparatus for an application program, including: the control module is used for controlling the Applium client to send a hypertext transfer protocol request to the JSF controller at the server side, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data at the server side; the control module is used for acquiring the bottom layer service data fed back by the JSF controller, and the bottom layer service data is acquired and packaged into a JSON format by the JSF controller according to the hypertext transfer protocol request; the control module is further used for testing the application program to be tested according to the bottom business data in the JSON format.
According to still another aspect of the present disclosure, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the test device of the application of any of the above via execution of the executable instructions.
According to yet another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the test apparatus of any one of the above-mentioned application programs.
According to the test scheme of the application program, which is provided by the embodiment of the disclosure, the JSF controller packages the bottom business data in json format according to the http request sent by the Apium client and feeds back the bottom business data to the application program to be tested, so that the Apium client can call the API component and the business data under the JSF frame, and further the test efficiency of the application program is improved.
In addition, the application client simulates the touch behavior of the user on the mobile device, and the application program development function is combined with the powerful application program development function of the JSF framework, so that the debugging and development efficiency of the application program is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 illustrates a schematic diagram of an application client performing testing of an application in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating interaction of a JSF interface with a mobile terminal in an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for testing an application in an embodiment of the disclosure;
FIG. 4 is a flow chart of another method of testing an application in an embodiment of the present disclosure;
FIG. 5 is a flow chart of another method of testing an application in an embodiment of the present disclosure;
FIG. 6 is a flow chart of another method of testing an application in an embodiment of the present disclosure;
FIG. 7 is a flow chart of a testing apparatus for another application in an embodiment of the present disclosure;
FIG. 8 is a flow chart of another method of testing an application in an embodiment of the present disclosure;
FIG. 9 is a flow chart of a testing apparatus for another application in an embodiment of the present disclosure;
FIG. 10 shows a block diagram of an electronic device in an embodiment of the disclosure; and
fig. 11 shows a schematic diagram of a computer-readable storage medium in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities, not necessarily corresponding to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
According to the scheme provided by the disclosure, the JSF controller encapsulates the http request sent by the Apium client into the json-format bottom layer service data and feeds the json-format bottom layer service data back to the application program to be tested, so that the test scheme of the application program compatible with the JSF interface protocol by the Apium client is provided.
The scheme provided by the embodiment of the disclosure relates to the technical field, and is specifically described by the following embodiment.
The inventor has found through research that: the test components and test procedures of the application program under the app ium framework are as follows:
(1) Appium (top) server: the app ium server is a node. Js-based HTTP (HyperText Transfer Protocol ) server. The main function of the Aptium server is to accept the link initiated from the Aptium client, monitor the command sent by the client, send the command to boottrap. Jar (IOS is boottrap. Js) for execution, and feed back the result of the command to the Aptium client through HTTP response.
(2) Bootstrap. Jar (boot): bootstrap. Jar is an application program running on an Android mobile phone, and plays a role of a TCP (Transmission Control Protocol transmission control protocol) server on the mobile phone, when an Apium server needs to run a command, the Apium server establishes TCP communication with Bootstrap. Jar, and sends the command to Bootstrap. Jar; bootstrap. Jar is responsible for running test commands.
(3) Appium client: the method mainly refers to a client Library (application program Library) of webdriver protocol realizing an Apium function, and the client Library is used for establishing connection with an Apium server and sending an instruction of a test script to a server. The test script may support speech including: python, java, ruby, etc.
(4) Session (Session): communication between the client and the server of the app must take place in the context of a session. When a client initiates a communication, it will first send a JSON object called "Desired Capabilities" to the server. After receiving the data, the server creates a session and returns the ID (identification) of the session to the client, and then the client sends a subsequent command with the ID of the session.
(5) Desired Capalities (expected performance): desired Capalities includes a set of key-value pairs for informing the Appium server to set up the required session, some of which may change the behavior of Appium operation, and some of the parameter settings Desired Capalities may be as shown in table 1 below.
TABLE 1
Name of platform | iOS、Android、FirefoxOS |
System version number of mobile device | 7.1、4.4 |
Web browser for testing | Hundred degree Google |
Whether or not to automatically install and start | Default "yes" |
Language setting for simulators | python、Java、Ruby |
Regional setting of simulators | China, america |
Device number | |
Horizontal and vertical screen arrangement of simulator | Vertical screen and horizontal screen |
As shown in fig. 1, the test steps between the server side 102 and the mobile device 104 based on the above-mentioned Appium framework corresponding to the program are as follows:
(1) And calling android.abd to complete the setting of the basic operating system.
(2) And deploying bootstrap.
(3) bootstrap.
(4) And monitoring interface requests on the PC, and monitoring by using a webdrive protocol.
(5) The commands are parsed and sent to boottrap.
(6) boottrap. Jar receives the request and issues a command to uiautomator.
(7) The uiautomator performs naming, i.e. commands sent by boottrap.
After deploying an app ium client on JSF-enabled mobile device 104 (shown in fig. 1) as shown in fig. 1, the test method of the application of the present disclosure may be summarized as follows:
(1) In the process of executing the test script, the app ium client 202 generates a request for calling the underlying service data of the server side 102 (shown in fig. 1), and sends the request to the server side 102 in the form of an http request.
(2) The server side 102 is deployed with a JSF container 204, the JSF container 204 determines the bottom layer service data in the database server 206 by analyzing the http request, and the JSF container 204 requests the bottom layer service data and encapsulates the bottom layer service data into a json format data packet, and the JSF data packet is fed back to the application program through a JSF interface.
As shown in connection with FIG. 2 and Table 2, the JSF container 204 includes two core parts, facesServ, which is the front-end controller of the entire application, and JSF Pages, all requests are handled by FacesServ, which finds the corresponding JSF Pages, which request the corresponding underlying business data from the database server 206.
Table 2JSF container 204
As shown in fig. 3, the test method of the application program includes:
in step S302, the JSF controller receives a hypertext transfer protocol request sent by the Appium client, where the hypertext transfer protocol request includes a request for calling the underlying service data on the server side.
And step S304, the JSF controller acquires and encapsulates the JSON format underlying service data according to the hypertext transfer protocol request.
And step S306, the JSF controller sends the JSON format underlying service data to the application program to be tested.
Step 308, the JSF controller determines a test result of the application to be tested according to the running result of the application to be tested on the JSON-format underlying service data.
In the above embodiment, the JSF controller encapsulates the http request sent by the app ium client into the json format bottom layer service data and feeds the json format bottom layer service data back to the application program to be tested, so as to provide a test scheme of the app ium client for application programs compatible with the JSF interface protocol, and by combining the app ium client and the JSF interface protocol, the test efficiency of the application programs can be improved, and the application programs include apps local to the mobile terminal or apps local to the cloud.
Further, in combination with the table 1, the JSF controller triggers the JSP page to generate a corresponding API component tree according to the http request sent by the Appium client. Meanwhile, the server is requested of the bottom layer business data, the JSF controller calls the application program to be tested to process the event of the application program level, and the test result is generated according to the running of the application program. Through the embodiment, the running result of the response test request of the API component tree under the JSF frame can be obtained, and the information of error reporting information, whether calling service data are correct, whether calling logic is reliable and the like of any API component can be presented, so that automatic and efficient application program testing, development and debugging are realized.
The testing of the application program mainly comprises three tests of a unit, an interface and an interactive interface, and the elements of the interactive interface layer are changed frequently, so that the investment of automatic testing is high, and the maintenance cost is high. Therefore, based on the technical scheme of the disclosure, the reliability of the application program and the calling logic is verified through testing the JSF interface, and a more efficient and lower-cost testing mode is provided.
Based on the detection step of the application program shown in fig. 3, as shown in fig. 4, the obtaining and packaging, by the JSF controller, the bottom layer service data in JSON format according to the hypertext transfer protocol request includes:
and step S4042, the JSF controller determines the bottom layer service data according to the hypertext transfer protocol request.
And step S4044, the JSF controller determines the confidence of the calling logic of the bottom layer service data of the server side according to the matching degree between the requested bottom layer service data and the called bottom layer service data.
And step S4046, packaging the bottom business data with the confidence coefficient higher than the preset confidence coefficient into the JSON format.
In the above embodiment, the JSF controller determines the confidence level of the calling logic of the bottom service data on the server side according to the matching degree between the requested bottom service data and the called bottom service data, so that not only is the accuracy of the content of the calling bottom service data verified, but also the reliability and accuracy of the calling logic are verified, and the test result of the application program is enriched.
Based on the testing step of the application program shown in fig. 3, before the JSF controller receives the hypertext transfer protocol request sent by the Appium client, as shown in fig. 5, the method further includes:
in step S502, the JSF controller sends a connection instruction to the bootstrap application program of the Appium client.
And step S504, the JSF controller creates a transmission control protocol with the Applium client according to the connection instruction.
In step S506, the JSF controller receives, based on the transmission control protocol, parameter configuration information sent by the Appium client, where the parameter configuration information includes at least one of an operating environment, a terminal type, a test action, and an operating system of the application to be tested.
And step S508, the JSF controller creates a test session according to the parameter configuration information and feeds back the identification of the test session to the Applium client.
In the above embodiment, a connection is created between the JSF controller and the Appium client based on a transmission control protocol, and according to parameter configuration information reported by the Appium client, the configuration of the test environment on the server side is completed based on the parameter configuration information.
Based on the testing steps of the application program shown in fig. 3 and 5, as shown in fig. 6, the testing method of the application program further includes:
in step S602, the JSF controller receives a test request including an identifier of a test session sent by the Appium client.
In step S604, the JSF controller feeds back a test operation instruction to the app ium client according to the test request, where the test operation instruction is used to trigger the app ium client to test the application to be tested.
In the above embodiment, the JSF controller and the app ium client perform test interaction based on the identifier, and complete the test of the application program in one session, so as to realize efficient and automatic test of the application program.
As shown in fig. 7, there is provided a test apparatus 700 for an application program, including: a receiving module 702, a control module 704, a sending module 706, and a determining module 708.
The receiving module 702 is configured to receive a hypertext transfer protocol request sent by the Appium client, where the hypertext transfer protocol request includes a request for calling the underlying service data on the server side.
The control module 704 is configured to obtain and encapsulate, by the JSF controller, the underlying service data in JSON format according to the hypertext transfer protocol request.
The sending module 706 is configured to send the JSON format underlying service data to the application to be tested.
The determining module 708 is configured to determine a test result of the application to be tested according to a running result of the application to be tested on the JSON format underlying service data.
In the above embodiment, the JSF controller encapsulates the http request sent by the app ium client into the json format bottom layer service data and feeds the json format bottom layer service data back to the application program to be tested, so as to provide a test scheme of the app ium client for application programs compatible with the JSF interface protocol, and by combining the app ium client and the JSF interface protocol, the test efficiency of the application programs can be improved, and the application programs include apps local to the mobile terminal or apps local to the cloud.
As shown in fig. 8, there is provided a test method of an application program, including:
step S802, controlling the application client to send a hypertext transfer protocol request to the JSF controller at the server side, where the hypertext transfer protocol request includes a request for calling the underlying service data at the server side.
Step S804, the bottom layer service data fed back by the JSF controller is obtained, and the bottom layer service data is obtained and packaged into a JSON format by the JSF controller according to the hypertext transfer protocol request.
And step S806, testing the application program to be tested according to the JSON format bottom layer service data.
In the above embodiment, the JSF controller encapsulates the http request sent by the app ium client into the json format bottom layer service data and feeds the json format bottom layer service data back to the application program to be tested, so as to provide a test scheme of the app ium client for application programs compatible with the JSF interface protocol, and by combining the app ium client and the JSF interface protocol, the test efficiency of the application programs can be improved, and the application programs include apps local to the mobile terminal or apps local to the cloud.
In one disclosed embodiment, the JSF controller is configured to determine the underlying service data according to the hypertext transfer protocol request, and the JSF controller is configured to determine a confidence level of call logic of the underlying service data on the server side according to a degree of matching between the requested underlying service data and the invoked underlying service data.
In the above embodiment, the JSF controller determines the confidence level of the calling logic of the bottom service data on the server side according to the matching degree between the requested bottom service data and the called bottom service data, so that not only is the accuracy of the content of the calling bottom service data verified, but also the reliability and accuracy of the calling logic are verified, and the test result of the application program is enriched.
As shown in fig. 9, a test apparatus 900 for an application program is provided, which includes a control module 902.
The control module 902 is configured to control the application client to send a hypertext transfer protocol request to the JSF controller on the server side, where the hypertext transfer protocol request includes a request for calling the underlying service data on the server side.
The control module 902 is configured to obtain the bottom layer service data fed back by the JSF controller, where the bottom layer service data is obtained and encapsulated into a JSON format by the JSF controller according to the hypertext transfer protocol request.
The control module 902 is further configured to test the application to be tested according to the JSON format underlying service data.
An electronic device 1000 according to such an embodiment of the present disclosure is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. Components of electronic device 1000 may include, but are not limited to: the processing unit 1010, the memory unit 1020, and a bus 1030 that connects the various system components, including the memory unit 1020 and the processing unit 1010.
Wherein the storage unit stores program code that is executable by the processing unit 1010 such that the processing unit 1010 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the present specification. For example, the processing unit 1010 may perform all the steps as shown in fig. 3 to 6, as well as other steps defined in the test method of the application of the present disclosure.
The memory unit 1020 may include readable media in the form of volatile memory units such as Random Access Memory (RAM) 10201 and/or cache memory unit 10202, and may further include Read Only Memory (ROM) 10203.
The storage unit 1020 may also include a program/utility 10204 having a set of program modules 10205, such program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1030 may be representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1000 can also communicate with one or more external devices 1040 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1050.
Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 11, a program product 1100 for implementing the above-described method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the various steps of the methods in the present disclosure are depicted in a particular order, this does not require or imply that the steps be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (8)
1. A method for testing an application program, comprising:
the JSF controller receives a hypertext transfer protocol request sent by an Applium client, wherein the hypertext transfer protocol request comprises a request for calling bottom layer business data of a server side;
the JSF controller acquires and encapsulates the JSON format underlying service data according to the hypertext transfer protocol request, and the JSF controller comprises the following steps: the JSF controller determines the bottom layer service data according to the hypertext transfer protocol request; the JSF controller determines the confidence coefficient of the calling logic of the bottom layer business data of the server side according to the matching degree between the requested bottom layer business data and the called bottom layer business data; packaging the bottom layer business data with the confidence coefficient higher than the preset confidence coefficient into the JSON format;
the JSF controller sends the JSON format underlying service data to an application program to be tested;
and the JSF controller determines the test result of the application program to be tested according to the running result of the application program to be tested on the underlying service data in the JSON format.
2. The method for testing an application program according to claim 1, further comprising, before the JSF controller receives the hypertext transfer protocol request sent by the app ium client:
the JSF controller sends a connection instruction to a guidance application program of the Aptium client;
the JSF controller creates a transmission control protocol with the Appium client according to the connection instruction;
the JSF controller receives parameter configuration information sent by the Applium client based on the transmission control protocol, wherein the parameter configuration information comprises at least one of the running environment, the terminal type, the test action and the operating system of the application program to be tested;
and the JSF controller creates a test session according to the parameter configuration information and feeds back the identification of the test session to the Aptium client.
3. The method for testing an application program according to claim 1, further comprising:
the JSF controller receives a test request which is sent by the Aptium client and contains the identifier of the test session;
and the JSF controller feeds back a test operation instruction to the Apium client according to the test request, wherein the test operation instruction is used for triggering the Apium client to test the application program to be tested.
4. An application program testing apparatus, comprising:
the receiving module is used for receiving a hypertext transfer protocol request sent by the application client, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data of the server side;
the control module is used for acquiring and packaging the JSF controller to generate the bottom layer service data in a JSON format according to the hypertext transfer protocol request, and determining the bottom layer service data according to the hypertext transfer protocol request through the JSF controller; the JSF controller determines the confidence coefficient of the calling logic of the bottom layer business data of the server side according to the matching degree between the requested bottom layer business data and the called bottom layer business data; packaging the bottom layer business data with the confidence coefficient higher than the preset confidence coefficient into the JSON format;
the transmitting module is used for transmitting the JSON format bottom layer service data to an application program to be tested;
and the determining module is used for determining the test result of the application program to be tested according to the running result of the application program to be tested on the JSON format bottom layer business data.
5. A method for testing an application program, comprising:
the method comprises the steps that an Appium client side is controlled to send a hypertext transfer protocol request to a JSF controller at a server side, wherein the hypertext transfer protocol request comprises a request for calling bottom layer business data at the server side;
acquiring the bottom layer service data fed back by the JSF controller, wherein the bottom layer service data is acquired and packaged into a JSON format by the JSF controller according to the hypertext transfer protocol request;
testing the application program to be tested according to the JSON format bottom layer service data;
the JSF controller is configured to determine the underlying service data based on the hypertext transfer protocol request,
the JSF controller is used for determining the confidence coefficient of the calling logic of the bottom layer business data of the server side according to the matching degree between the requested bottom layer business data and the called bottom layer business data.
6. An application program testing apparatus, comprising:
the control module is used for controlling the Applium client to send a hypertext transfer protocol request to the JSF controller at the server side, wherein the hypertext transfer protocol request comprises a request for calling the bottom layer business data at the server side;
the control module is used for acquiring the bottom layer service data fed back by the JSF controller, and the bottom layer service data is acquired and packaged into a JSON format by the JSF controller according to the hypertext transfer protocol request;
the control module is also used for testing the application program to be tested according to the JSON format bottom layer service data;
the JSF controller is configured to determine the underlying service data based on the hypertext transfer protocol request,
the JSF controller is used for determining the confidence coefficient of the calling logic of the bottom layer business data of the server side according to the matching degree between the requested bottom layer business data and the called bottom layer business data.
7. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the method of testing the application of any one of claims 1-3, 5 via execution of the executable instructions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that,
the computer program, when executed by a processor, implements the method for testing an application program according to any one of claims 1 to 3 and 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010891787.0A CN113778843B (en) | 2020-08-28 | 2020-08-28 | Application program testing method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010891787.0A CN113778843B (en) | 2020-08-28 | 2020-08-28 | Application program testing method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113778843A CN113778843A (en) | 2021-12-10 |
CN113778843B true CN113778843B (en) | 2024-04-16 |
Family
ID=78835200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010891787.0A Active CN113778843B (en) | 2020-08-28 | 2020-08-28 | Application program testing method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113778843B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104035869A (en) * | 2014-06-19 | 2014-09-10 | 科大讯飞股份有限公司 | Application evaluation method, terminal, and server |
CN107704398A (en) * | 2017-11-01 | 2018-02-16 | 网易(杭州)网络有限公司 | Automated testing method and device, storage medium, electronic equipment |
CN108564506A (en) * | 2018-04-25 | 2018-09-21 | 西南大学 | A kind of online testing for supporting the mobile terminals Android and self-measuring system and its method of examination |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
CN109376083A (en) * | 2018-09-28 | 2019-02-22 | 北京京东金融科技控股有限公司 | Test processing method and device |
CN109582517A (en) * | 2018-12-04 | 2019-04-05 | 郑州云海信息技术有限公司 | System application automated testing method, device, system and tool storage end |
CN110795336A (en) * | 2019-09-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Application program control method, device, equipment and readable storage medium |
CN111045940A (en) * | 2019-12-09 | 2020-04-21 | 广东南方海岸科技服务有限公司 | Software automation test method, device, architecture, server and storage medium |
CN111382084A (en) * | 2020-05-08 | 2020-07-07 | 北京金山云网络技术有限公司 | Test method and device and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8739126B2 (en) * | 2010-09-03 | 2014-05-27 | Salesforce.Com, Inc. | Web services environment testing framework |
-
2020
- 2020-08-28 CN CN202010891787.0A patent/CN113778843B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104035869A (en) * | 2014-06-19 | 2014-09-10 | 科大讯飞股份有限公司 | Application evaluation method, terminal, and server |
CN107704398A (en) * | 2017-11-01 | 2018-02-16 | 网易(杭州)网络有限公司 | Automated testing method and device, storage medium, electronic equipment |
CN108564506A (en) * | 2018-04-25 | 2018-09-21 | 西南大学 | A kind of online testing for supporting the mobile terminals Android and self-measuring system and its method of examination |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
CN109376083A (en) * | 2018-09-28 | 2019-02-22 | 北京京东金融科技控股有限公司 | Test processing method and device |
CN109582517A (en) * | 2018-12-04 | 2019-04-05 | 郑州云海信息技术有限公司 | System application automated testing method, device, system and tool storage end |
CN110795336A (en) * | 2019-09-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Application program control method, device, equipment and readable storage medium |
CN111045940A (en) * | 2019-12-09 | 2020-04-21 | 广东南方海岸科技服务有限公司 | Software automation test method, device, architecture, server and storage medium |
CN111382084A (en) * | 2020-05-08 | 2020-07-07 | 北京金山云网络技术有限公司 | Test method and device and electronic equipment |
Non-Patent Citations (3)
Title |
---|
Server interface descriptions for automated testing of JavaScript web applications;Casper S. Jensen等;Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering;第510-520页 * |
基于Selenium的一种Web自动化测试系统的设计与实现;张竞帆;中国优秀硕士学位论文全文数据库信息科技辑(第1期);第I138-655页 * |
软件自动化测试方法研究及应用;李善庆;中国优秀硕士学位论文全文数据库信息科技辑(第7期);第I138-448页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113778843A (en) | 2021-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111083225B (en) | Data processing method and device in Internet of things platform and Internet of things platform | |
CN107277153B (en) | Method, device and server for providing voice service | |
CN111176626B (en) | Cross-programming-language code calling method and device, medium and equipment | |
CN107133180B (en) | Dynamic page testing method, testing device and storage medium | |
US20110289484A1 (en) | Method and System for Script Processing for Web-Based Applications | |
US9645910B1 (en) | Cross platform mobile HTML debugging | |
CN111740948B (en) | Data packet issuing method, dynamic updating method, device, equipment and medium | |
EP4119207A1 (en) | Vibration control method and apparatus, and electronic device and computer-readable storage medium | |
CN112463618B (en) | Automatic test method, device, medium and equipment | |
CN112395098B (en) | Application program interface calling method and device, storage medium and electronic equipment | |
CN111694620A (en) | Interaction method, device and equipment of third-party service and computer storage medium | |
CN109597952B (en) | Webpage information processing method, system, electronic equipment and storage medium | |
JP5039946B2 (en) | Technology for relaying communication between client devices and server devices | |
CN113608997B (en) | Remote debugging method and device for embedded webpage of application program and electronic equipment | |
CN112154417A (en) | Sharing a code base between a stand-alone version and a Web-based version of an application via an emulated network communication channel | |
CN113778843B (en) | Application program testing method and device, electronic equipment and readable storage medium | |
CN115514677B (en) | Method and system for server dial testing | |
CN111782420A (en) | Information processing method, device, equipment and medium based on Java Web framework | |
CN116781586A (en) | gRPC flow analysis method, device, equipment and medium | |
CN117112393A (en) | Application program debugging method and device, electronic equipment and storage medium | |
CN109669715A (en) | application program dynamic updating method, device and storage medium | |
CN114285774A (en) | Flow recording method and device, electronic equipment and storage medium | |
CN114090435A (en) | Test method, test device, electronic equipment and storage medium | |
CN115705284A (en) | Automatic test system, method, equipment and medium | |
CN112182083A (en) | File generation method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |