[go: up one dir, main page]

CN113094281B - Test method and device for hybrid App - Google Patents

Test method and device for hybrid App Download PDF

Info

Publication number
CN113094281B
CN113094281B CN202110467333.5A CN202110467333A CN113094281B CN 113094281 B CN113094281 B CN 113094281B CN 202110467333 A CN202110467333 A CN 202110467333A CN 113094281 B CN113094281 B CN 113094281B
Authority
CN
China
Prior art keywords
protocol
test
result data
app
interface
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
Application number
CN202110467333.5A
Other languages
Chinese (zh)
Other versions
CN113094281A (en
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.)
Hangzhou Netease Cloud Music Technology Co Ltd
Original Assignee
Hangzhou Netease Cloud Music 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 Hangzhou Netease Cloud Music Technology Co Ltd filed Critical Hangzhou Netease Cloud Music Technology Co Ltd
Priority to CN202110467333.5A priority Critical patent/CN113094281B/en
Publication of CN113094281A publication Critical patent/CN113094281A/en
Application granted granted Critical
Publication of CN113094281B publication Critical patent/CN113094281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 application relates to the technical field of application program testing, in particular to a method and a device for testing a hybrid App, which are used for generating an automatic test protocol interface of a hybrid App client, wherein the entering parameters of the automatic test protocol interface comprise protocol information of at least one protocol to be tested and corresponding preset interface entering parameter information, the hybrid App client accesses a web test script page to trigger execution of a test script, each protocol of the hybrid App is automatically traversed through the automatic test protocol interface of the hybrid App to obtain each execution result data of the hybrid App, and each execution result data is sent to a cross-end working platform to enable the cross-end working platform to determine a function test result according to each execution result data, so that the efficiency of the automatic test of the hybrid App can be improved, and the stability of a server is ensured.

Description

Test method and device for hybrid App
Technical Field
The application relates to the technical field of application program testing, in particular to a testing method and device of a hybrid App.
Background
The hybrid App is developed by using the webpage language and the program language simultaneously, has the advantages of the traditional App and the advantages of low cost of web development, and is a quick iteration mode which is relatively hot at present.
In the related art, when the hybrid App is automatically tested, a UI automation test tool is generally used to write a test script, and user behavior is simulated by using interface operation elements of the UI automation tool, so that the automatic test of the hybrid development App is realized.
In the related art, the method needs to simulate the actual behavior of the user, so that a test script needs to be written for each service function to test, and the efficiency is low. And, if the test script is integrated and deployed on the server, the problems of machine loss, machine connection stability and the like caused by long-time connection of a true machine are faced.
Disclosure of Invention
The embodiment of the application provides a testing method and device for a hybrid App, which are used for improving the efficiency of testing the hybrid App and improving the stability of machine connection.
The specific technical scheme provided by the embodiment of the application is as follows:
A method of testing a hybrid App comprising:
Determining a function test result of the mixed App;
Generating an automatic test protocol interface of the hybrid App client, wherein the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data;
wherein, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information;
Wherein each protocol to be tested represents each protocol required to be invoked for running the hybrid App, and each protocol supports a service function;
The mixed type App client accesses a web test script page, triggers execution of a test script, and automatically traverses each protocol of the mixed type App through an automatic test protocol interface of the mixed type App to obtain each execution result data of the mixed type App;
The web test script page is generated according to the protocol information to be tested of the hybrid App and an automatic test protocol interface;
transmitting the execution result data to the cross-end working platform;
the functional test result of the mixed App is determined according to each execution result data of each protocol.
Optionally, the web test script page is generated according to the protocol information to be tested and the automated test protocol interface of the hybrid App, and specifically includes:
Determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code;
And generating the web test script page according to the protocol information and an automatic test protocol interface, wherein the protocol information comprises protocol information to be tested of the mixed App client.
Optionally, the generating the web test script page according to the protocol information and the test protocol interface specifically includes:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, the hybrid App client accesses a web test script page, triggers execution of a test script, and automatically traverses each protocol of the hybrid App through an automated test protocol interface of the hybrid App to obtain each execution result data of the hybrid App, and specifically includes:
Calling a protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script;
If the protocol execution is monitored to be completed, execution result data are obtained, and the execution result data are packaged and then sent to the cross-end working platform;
And returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
Optionally, if it is monitored that the protocol is executed, execution result data is obtained, and the execution result data is packaged and then sent to the cross-end working platform, which further includes:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, capturing a current page where the protocol is executed, obtaining an interface capturing image, packaging the interface capturing image into the execution result data, and sending the interface capturing image to the cross-end working platform.
Optionally, if it is monitored that the protocol is executed, execution result data is obtained, and the execution result data is packaged and sent to the cross-end working platform, further including:
If the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the page at the previous stage of the current page.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol, and further includes:
The functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, which specifically includes:
The test result is that the verification passes, the verification fails or a new protocol is added;
checking that the passed test result is that the execution result data accords with the expected result data;
the test result of the verification failure is that the execution result data does not accord with the expected result data;
and the test result of the newly added protocol is expected result data which is not matched with the execution result data.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, and further includes:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the method further comprises:
Determining a web end protocol use test result of the hybrid App;
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
acquiring protocol information sent by the client from the cross-end working platform;
sequentially judging whether each protocol in the web end code is contained in protocol information sent by the client acquired from the cross-end working platform;
if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the method further includes:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
A method of testing a hybrid App comprising:
acquiring protocol information and an automatic test protocol interface of a hybrid App by a cross-end working platform;
The protocol information comprises protocol information to be tested of a hybrid App client, the protocols to be tested represent protocols required to be called for running the hybrid App, each protocol supports to realize a service function, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information, and the automated test protocol interface is used for automatically calling the protocols to be tested of the hybrid App client and returning test result data;
generating a web test script page according to the protocol information and an automatic test protocol interface;
The web test script page is used for the hybrid App client to access and trigger test script execution to obtain execution result data of each protocol of the hybrid App client;
and receiving the execution result data sent by the mixed App client, and determining the function test result of the mixed App according to the execution result data.
Optionally, the cross-end working platform acquires protocol information of the hybrid App and an automated test protocol interface, and specifically includes:
And determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code.
Optionally, generating a web test script page according to the protocol information and the automated test protocol interface specifically includes:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, the receiving the execution result data sent by the hybrid App client includes:
And the execution result data is obtained by calling a protocol to be tested of the hybrid App through the automatic test protocol interface by the hybrid App client so as to execute the test script.
Optionally, the pre-configured interface parameter entering information corresponding to the called protocol to be tested includes an auxiliary verification parameter, the auxiliary verification parameter is used for capturing a current page where the protocol is executed after completion, and the execution result data also includes the interface capturing image.
Optionally, the preconfigured interface parameter information corresponding to the called protocol to be tested includes an interface logout parameter, where the interface logout parameter is used for logging out the current page and returning to a previous page of the current page after the hybrid App client obtains execution result data.
Optionally, determining a functional test result of the hybrid App according to the execution result data specifically includes:
And determining a function test result of the mixed type App according to the execution result data of each protocol and the expected result data of each protocol of the mixed type App.
Optionally, determining the functional test result of the hybrid App according to the execution result data of each protocol and the expected result data of each protocol of the hybrid App, which specifically includes:
If the execution result data is consistent with the expected result data, the test result is verified;
if the execution result data does not accord with the expected result data, the test result is verification failure;
And if the execution result data does not have matched expected result data, the test result is a new protocol.
Optionally, the method further comprises:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the method further comprises:
Determining a web-side protocol usage test result of the hybrid App:
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
Determining protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code;
sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code;
If the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the method further includes:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
A test device of a hybrid App, wherein the test device of the hybrid App is used for determining a functional test result of the hybrid App; comprising the following steps:
The generation module is used for generating an automatic test protocol interface of the hybrid App client, and the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data;
wherein, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information;
Wherein each protocol to be tested represents each protocol required to be invoked for running the hybrid App, and each protocol supports a service function;
The processing module is used for the mixed type App client to access a web test script page, trigger execution of a test script and automatically traverse each protocol of the mixed type App through an automatic test protocol interface of the mixed type App to obtain each execution result data of the mixed type App;
The web test script page is generated according to the protocol information to be tested of the hybrid App and an automatic test protocol interface;
The sending module is used for sending the execution result data to the cross-end working platform;
the functional test result of the mixed App is determined according to each execution result data of each protocol.
Optionally, the web test script page is generated according to the protocol information to be tested and the automated test protocol interface of the hybrid App, and the processing module is further configured to:
Determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code;
And generating the web test script page according to the protocol information and an automatic test protocol interface, wherein the protocol information comprises protocol information to be tested of the mixed App client.
Optionally, when the web test script page is generated according to the protocol information and the test protocol interface, the processing module is specifically configured to:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, the processing module is specifically configured to:
Calling a protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script;
If the protocol execution is monitored to be completed, execution result data are obtained, and the execution result data are packaged and then sent to the cross-end working platform;
And returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
Optionally, if it is monitored that the protocol is executed, execution result data is obtained, the execution result data is packaged and then sent to the cross-end working platform, and the processing module is further configured to:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, capturing a current page where the protocol is executed, obtaining an interface capturing image, packaging the interface capturing image into the execution result data, and sending the interface capturing image to the cross-end working platform.
Optionally, if it is monitored that the protocol is executed, execution result data is obtained, the execution result data is packaged and then sent to the cross-end working platform, and the processing module is further configured to:
If the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the page at the previous stage of the current page.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol, and further includes:
The functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, which specifically includes:
The test result is that the verification passes, the verification fails or a new protocol is added;
checking that the passed test result is that the execution result data accords with the expected result data;
the test result of the verification failure is that the execution result data does not accord with the expected result data;
and the test result of the newly added protocol is expected result data which is not matched with the execution result data.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, and the sending module is further configured to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the method further comprises a determining module, wherein the determining module is used for:
Determining a web-side protocol usage test result of the hybrid App:
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
acquiring protocol information sent by the client from the cross-end working platform;
sequentially judging whether each protocol in the web end code is contained in protocol information sent by the client acquired from the cross-end working platform;
if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the determining module is further configured to:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
A testing device of a hybrid App is applied to a cross-end working platform, and comprises:
the acquisition module is used for acquiring protocol information of the hybrid App and an automatic test protocol interface;
The protocol information comprises protocol information to be tested of a hybrid App client, the protocols to be tested represent protocols required to be called for running the hybrid App, each protocol supports to realize a service function, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information, and the automated test protocol interface is used for automatically calling the protocols to be tested of the hybrid App client and returning test result data;
the generation module is used for generating a web test script page according to the protocol information and the automatic test protocol interface;
The web test script page is used for the hybrid App client to access and trigger test script execution to obtain execution result data of each protocol of the hybrid App client;
The first determining module is used for receiving the execution result data sent by the mixed type App client and determining the function test result of the mixed type App according to the execution result data.
Optionally, the acquiring module is specifically configured to:
And determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code.
Optionally, the generating module is specifically configured to:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, when receiving the execution result data sent by the hybrid App client, the first determining module is specifically configured to:
And the execution result data is obtained by calling a protocol to be tested of the hybrid App through the automatic test protocol interface by the hybrid App client so as to execute the test script.
Optionally, the pre-configured interface parameter entering information corresponding to the called protocol to be tested includes an auxiliary verification parameter, the auxiliary verification parameter is used for capturing a current page where the protocol is executed after completion, and the execution result data also includes the interface capturing image.
Optionally, the preconfigured interface parameter information corresponding to the called protocol to be tested includes an interface logout parameter, where the interface logout parameter is used for logging out the current page and returning to a previous page of the current page after the hybrid App client obtains execution result data.
Optionally, when determining the functional test result of the hybrid App according to the execution result data, the first determining module is specifically configured to:
And determining a function test result of the mixed type App according to the execution result data of each protocol and the expected result data of each protocol of the mixed type App.
Optionally, when determining the functional test result of the hybrid App according to the execution result data of each protocol and the expected result data of each protocol of the hybrid App, the first determining module is specifically configured to:
If the execution result data is consistent with the expected result data, the test result is verified;
if the execution result data does not accord with the expected result data, the test result is verification failure;
And if the execution result data does not have matched expected result data, the test result is a new protocol.
Optionally, the system further comprises a first verification module, where the first verification module is specifically configured to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the system further comprises a second checking module, wherein the second checking module is specifically used for:
Determining a web-side protocol usage test result of the hybrid App:
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
Determining protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code;
sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code;
If the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the method further includes:
And the second determining module is used for determining an availability test result of the hybrid App according to the hybrid App function test result and the web end protocol use test result.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the steps of the test method of the hybrid App described above when said program is executed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the test method of a hybrid App as described above.
In the embodiment of the application, an automatic test protocol interface of a hybrid App client is generated, the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data, the entering parameters of the automatic test protocol interface comprise protocol information of at least one protocol to be tested and corresponding preset interface entering parameter information, the hybrid App client accesses a web test script page, triggers execution of a test script, automatically traverses each protocol of the hybrid App through the automatic test protocol interface of the hybrid App, obtains each execution result data of the hybrid App, and sends the execution result data to a cross-end working platform so that the cross-end working platform determines the functional test data of the hybrid App according to each test result data. Therefore, when testing the hybrid App, one test script is not required to be written for each service, all service functions of the hybrid App can be tested at the same time only by accessing the web test script page, the test efficiency of the hybrid App is improved, and each service can be tested only by the web test script page, so that the machine loss can be reduced, and the machine connection stability is improved.
Drawings
FIG. 1 is a flow chart of a test method of a hybrid App in the related art;
FIG. 2 is a flow chart of a testing method of a hybrid App in an embodiment of the application;
FIG. 3 is another flow chart of a testing method of a hybrid App in an embodiment of the application;
FIG. 4 is a flow chart of a method for calling an automatic test protocol interface according to an embodiment of the present application;
FIG. 5 is a flow chart of a method of generating a web test script page in an embodiment of the present application;
FIG. 6 is a flow chart of web test script page execution in an embodiment of the present application;
FIG. 7 is a flow chart of a method of verification of a hybrid App in an embodiment of the application;
FIG. 8 is a flow chart of a method of web side authentication in an embodiment of the application;
FIG. 9 is a schematic structural diagram of a testing device of a hybrid App in an embodiment of the present application;
FIG. 10 is a schematic diagram of another configuration of a testing device of a hybrid App in an embodiment of the present application;
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Some of the terms involved in the embodiments of the present application will be described first to facilitate understanding by those skilled in the art.
Hybrid Application (App): developers still use web languages, such as the act framework or other domain specific languages (Domain Specified Language, DSL), but rendering is basically handed to the native platform App for processing. Therefore, the constraint of the native platform App can be eliminated in the view level, and the native platform App provides a protocol to the Web development to call so as to realize a specific visual experience function from the Web page.
User Interface (UI) automation tool: the UI automation tool may operate elements in the browser or App page directly through various drivers, even on its own, such as screen shots, window sizes, startup, shutdown, install plug-ins, configure certificates, etc. For example, appium Webdriver is a UI automation tool engine that includes CISCO network configuration system (Internetworking Operating System-CISCO, iOS) version and Android (Android) version, iOS version contains UIAutomation and UITest, and Android version contains UiAutomator and Instrumentation.
Functional test results: the functional test result is a test result generated by testing the protocol of the hybrid App client.
Automated test protocol interface: and the system is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data. The automated test protocol interface comprises protocol information of a protocol to be tested and corresponding pre-configured interface parameter entering information.
Protocol to be tested: representing the protocols that need to be invoked to run the hybrid App.
Web test script page: the web test script page is generated according to the protocol information to be tested of the hybrid App and the automatic test protocol interface.
Execution result data: and the execution result data characterizes the data generated after the automatic test protocol interface is called.
The web-side protocol uses the test results: the web-side protocol uses the test results to characterize whether the web-side is properly invoking the protocol.
The mixed type App is developed through a network language at a web end and a program language at the App end, so that the mixed type App has the advantages of low cost of web development and the advantages of a traditional App, and is a relatively hot rapid iteration mode at present.
In the related art, for the automatic test of the hybrid App, the conventional automatic test method of the App is still adopted, for example, refer to fig. 1, which is a flowchart of a test method of the hybrid App in the related art, and in the development process, development is performed on the web end and the App end respectively to obtain the hybrid App. In the test process of the hybrid App, UI automatic test tools such as Appium, selendroid, robotium and Airtest are adopted first, android test scripts are written in an Android client, and iPhone test scripts are written in the iPhone client, then interface operation elements of webdriver types of the UI automatic test tools are utilized to simulate user behaviors, and therefore specific businesses are automatically tested in the mode.
In the related art, the method needs to simulate the real behavior of the user when operating each service, so that a test script needs to be written for each service function to test. In addition, because the Android client and the iPhone client have different operation interfaces, different UI operation element identification tools are needed for different clients, so in Android, iPhone and other apps, even if the same function is automatically tested, different environments need to be built, and different automatic test scripts are provided for testing. That is, for a service function, two sets of test scripts are required to be written in the Android client and the iPhone client respectively, so that automatic verification of the service function can be realized. This approach in the related art thus reduces the efficiency of testing of the hybrid App and the complexity of test script writing.
Moreover, if the test scripts of each service are all deployed in a centralized manner in the server, the computer can be used for testing the non-true machine long-time connection of the hybrid App, so that the problems of machine loss and unstable machine connection are caused.
In order to solve the above problems, in the embodiment of the present application, an automatic test protocol interface of a hybrid App is generated, so that a cross-end working platform can generate a web test script page according to protocol information to be tested and the automatic test protocol interface of the hybrid App, the hybrid App client accesses the web test script page, triggers execution of a test script, automatically traverses each protocol of the hybrid App through the automatic test protocol interface of the hybrid App to obtain each execution result data of the hybrid App, and sends each execution result data to the cross-end working platform, so that the cross-end working platform can determine a function test result of the hybrid App according to the execution result data of each protocol. Therefore, the web test script page contains protocol information required to be called when the mixed type App executes all service functions, and therefore, in the embodiment of the application, all the service functions of the mixed type App can be tested only by accessing the web test script page, so that the test efficiency of the mixed type App can be improved, the machine loss can be reduced, and the machine connection stability can be improved.
Based on the above embodiments, referring to fig. 2, a flowchart of a testing method of a hybrid App in an embodiment of the present application specifically includes:
Step 200: and generating an automatic test protocol interface of the mixed App client.
The automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data. The entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information. The protocols to be tested represent the protocols required to be invoked to run the hybrid App, each supporting the implementation of a service function.
In the embodiment of the application, in the process of testing the hybrid App, in order to enable the hybrid App client to be independent of the existing UI automatic testing tool, the hybrid App client can support automatic testing, so that the hybrid App client needs to provide an automatic testing protocol interface capable of calling all protocols of the hybrid App. When an automatic test protocol interface is generated, protocol information of at least one protocol to be tested and corresponding pre-configuration interface parameter entering information are obtained, and then parameter entering of the automatic test protocol interface is obtained according to the protocol information of the at least one protocol to be tested and the corresponding pre-configuration interface parameter entering information, so that the automatic test protocol interface capable of automatically calling each protocol to be tested of the hybrid App client and returning test result data is generated.
The method comprises the steps that a developer directly pre-configures interface parameter entering information in a mixed App client code; in another possible implementation manner, the pre-configured interface parameter entering information is configured by the tester in the cross-end working platform, and the client is obtained from the cross-end working platform, and the method for obtaining the pre-configured interface parameter entering information is not limited in the embodiment of the present application.
The parameter information of the automatic test protocol interface is characterized by the pre-configured interface parameter information, the pre-configured interface parameter information at least comprises an auxiliary check parameter and an interface logout parameter, and the pre-configured interface parameter information also comprises protocol information corresponding to a protocol needing specific service call.
The auxiliary verification parameter represents whether parameter information corresponding to screenshot of the current page is needed, and the interface cancellation parameter represents whether parameter information corresponding to cancellation of the current interface is needed.
It should be noted that, each protocol to be tested in the embodiment of the present application represents a protocol required to be invoked for running the hybrid App, and each protocol to be tested supports to implement a service function. Therefore, by calling the automatic test protocol interface, each protocol to be tested of the hybrid App client can be automatically called, so that the automatic test of the hybrid App is realized.
In addition, it should be noted that, because the automatic test protocol interface after encapsulation in the embodiment of the application is only used for automatic test call of the hybrid App, the automatic test protocol interface is independent of the protocol of service call, and cannot influence service functions. And when the automatic test protocol interface is generated, the automatic test protocol interface capable of automatically calling each protocol to be tested of the hybrid App client can be generated only by uniformly packaging each protocol of the original hybrid App client, and compared with the prior art that a plurality of test scripts are required to be prepared, the automatic test protocol interface has the advantages that the specific service code change amount is small, the labor cost and the time cost can be reduced, and the maintenance quantity of the scripts is reduced.
In addition, the automated test protocol interface is only available in the hybrid App version of the development test, and the formal external hybrid App version used by the online user cannot be invoked, due to the security problem of the hybrid App client.
Step 210: the method comprises the steps that a mixed type App client accesses a web test script page, triggers execution of a test script, and automatically traverses protocols of the mixed type App through an automatic test protocol interface of the mixed type App to obtain execution result data of the mixed type App.
The web test script page is generated according to protocol information to be tested of the hybrid App and an automatic test protocol interface.
In the embodiment of the present application, when executing step 210, the method specifically includes:
S1: the mixed App client obtains a web test script page.
In the embodiment of the application, when the mixed type App client obtains the web test script page, one possible implementation manner is to directly obtain the web test script page from the cross-end working platform according to the App identifier of the mixed type App.
Wherein, because each mixed type App corresponds to a web test script page, a plurality of web test script pages of the mixed type apps are pre-stored in the cross-end working platform.
Further, in the embodiment of the application, when the web test script page is acquired from the cross-end working platform, a test request can be sent to the cross-end working platform, wherein the test request comprises an App identifier of the hybrid App, and the test request is used for acquiring the web test script page corresponding to the App identifier from the cross-end working platform. Therefore, after receiving the test request, the cross-end working platform determines the mixed type App corresponding to the App identifier and the web test script page corresponding to the mixed type App according to the App identifier in the test request, and sends the determined web test script page to the mixed type App client, so that the mixed type App client can acquire the web test script page. The method for acquiring the web test script page is not limited in the embodiment of the application.
It should be noted that, the web test script page in the embodiment of the present application is generated according to the protocol information to be tested and the automated test protocol interface of the hybrid App, and the following details the generation process of the web test script page in the embodiment of the present application specifically include:
a1: based on the detection and identification of the hybrid App client code, protocol information of the hybrid App and an automated test protocol interface are determined from the client code.
In the embodiment of the application, the mixed App client code is acquired through the code management tool, the acquired client code is detected and identified in a preset code identification mode, and the protocol information and the automatic test protocol interface of the mixed App are determined from the client code.
A2: and generating a web test script page according to the protocol information and the automatic test protocol interface.
The protocol information comprises protocol information to be tested of the hybrid App client.
In the embodiment of the application, after the protocol information and the automatic test protocol interface of the hybrid App are determined, a web test script page is generated according to the protocol information and the automatic test protocol interface, that is, the web test script page contains the protocol information and the automatic test protocol interface of the hybrid App.
Further, in the embodiment of the application, when the web test script page is generated according to the protocol information and the automated test protocol interface, each protocol information of the hybrid App can be combined with the automated test protocol interface, and the test protocol list which can be automatically identified and executed by the generating client is spliced in the web test script page.
That is, for each protocol information, any one protocol information is combined with the corresponding automated test protocol interface to generate a test protocol, a test protocol list containing each test protocol is generated according to a preset arrangement sequence, and finally, the generated test protocol list is spliced in the web test script page.
S2: the mixed App client accesses the web test script page to trigger the execution of the test script.
In the embodiment of the application, after the hybrid App client determines that the web test script page is acquired from the cross-end working platform, the acquired web test script page is accessed, so that the execution of the test script prestored in the hybrid App client is triggered.
It should be noted that, the test script is used to trigger the hybrid App client to call each protocol to be tested in turn.
S3: and automatically traversing each protocol of the hybrid App through an automatic test protocol interface of the hybrid App to obtain each execution result data of the hybrid App.
In the embodiment of the present application, when executing step S3, the method specifically includes:
A1: and calling one protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script.
In the embodiment of the application, one protocol to be tested of the web test script page is called through an automatic test protocol interface in the web test script page, so that the test script is executed.
A2: and if the protocol is monitored to be executed, obtaining execution result data, and packaging the execution result data and then sending the packaged execution result data to the cross-end working platform.
In the embodiment of the application, whether the execution of the protocol is completed is monitored in real time, if yes, the execution result data returned after the execution of the protocol is completed is obtained, and the execution result data is packaged and then sent to the cross-end working platform.
It should be noted that, in the embodiment of the present application, after the protocol completes the call, the call completion information is generated. Therefore, if the hybrid App client monitors that the call completion information is generated at this time, the protocol execution is determined to be completed, and the automatic test interface can call the next protocol to be tested.
Further, in order to ensure accuracy of the cross-end working platform in checking execution result data, in the embodiment of the present application, an auxiliary verification parameter may be set in the pre-configured interface parameter information, and by setting the auxiliary verification parameter, a current page after the protocol execution is completed is subjected to screenshot, and in the embodiment of the present application, the step of performing screenshot on the current page is described in detail, and specifically includes:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, the current page where the protocol is located after the protocol is executed is subjected to screenshot, an interface screenshot image is obtained, and the interface screenshot image is packaged into execution result data and is sent to the cross-end working platform.
In the embodiment of the application, after the protocol execution is determined to be completed, the interface screenshot can be carried out on the current page currently displayed by the hybrid App client after the current protocol execution is completed, so that the current page after the protocol execution is completed can be screenshot to obtain an interface screenshot image, the obtained interface screenshot image is packaged into execution result data, and finally, the packaged execution result data is sent to the cross-end working platform. At this time, the execution result data includes the screenshot image.
For example, assume that the business function corresponding to the protocol is a "jump to my page" function, so, in order to improve accuracy, the jump to my page may be taken, and the interface screenshot image corresponding to my page may be encapsulated into execution result data, and the execution result data may be sent to the cross-end work platform.
It should be noted that, according to whether the pre-configured interface parameter information includes the auxiliary verification parameter, the execution result data in the embodiment of the present application may be divided into the following three cases, but is not limited to the following three cases. Three cases of execution result data in the embodiment of the present application are described in detail below.
First case: the execution result data only contains protocol return data.
In the embodiment of the application, if the pre-configured interface parameter entering information does not contain the auxiliary verification parameter, after the protocol execution is completed, protocol return data can be directly generated due to the calling of the protocol, the protocol return data is packaged to generate execution result data, and the execution result data is sent to the cross-end working platform. Therefore, the execution result data only includes the protocol return data.
For example, assuming that a service function corresponding to a certain protocol is a login function, after executing a protocol corresponding to the login function, protocol return data, that is, a user name and a password used in a test process, is generated, and at this time, the execution result data only includes the user name and the password.
Second case: the execution result data only contains the interface screenshot image.
In the embodiment of the application, for some protocols which can not generate protocol return data after execution is completed, auxiliary verification parameters are required to be pre-configured in the pre-configured interface parameter entering information of the automatic test protocol interface corresponding to the protocol. Therefore, after the protocol execution is completed, although the protocol return data is not generated, the current page where the protocol execution is completed can be subjected to screenshot, after the screenshot is determined to be completed, the obtained interface screenshot image is packaged into the execution result data, and the packaged execution result data is sent to the cross-end working platform. Therefore, the execution result data only contains the screenshot image.
For example, assuming that the business function corresponding to the protocol is clicking "my", after the protocol is completed, the user will jump from the home page of the hybrid App client to the "my" interface. Because only interface jump is triggered at this time, protocol return data is not generated, therefore, screenshot is needed to be carried out on the 'My' interface, the 'My' interface image after the interface screenshot is packaged into execution result data, and the packaged execution result data is sent to a cross-end working platform.
Third case: the execution result data comprises protocol return data and an interface screenshot image.
In the embodiment of the application, for some protocols which can generate protocol return data after execution is completed, in order to further improve the accuracy of the test result of the protocol, auxiliary verification parameters can be configured in the pre-configuration interface parameter entering information of the automatic test protocol interface. Under the condition, after the protocol execution is completed, protocol return data are generated, the protocol return data are packaged to generate execution result data, then the current page where the protocol execution is completed is subjected to screenshot, after the screenshot is determined to be completed, an interface screenshot image is obtained, the interface screenshot image is packaged into the execution result data, and the packaged execution result data are sent to the cross-end working platform. Therefore, the execution result data contains protocol return data and an interface screenshot image.
Thus, when the cross-end working platform verifies the execution result data, the protocol return data is verified, and the interface screenshot image is verified. The accuracy of the protocol can be further ensured by double checking of the protocol.
It should be noted that, although the auxiliary verification parameter is included in the pre-configured interface parameter information, when the value of the auxiliary verification parameter is 0, the auxiliary verification parameter may be regarded as not including the auxiliary verification parameter, and the current page does not need to be captured. The auxiliary verification parameter can be set to have a value of 0, which indicates that no screenshot is performed on the current page, and a value of 1 indicates that the screenshot is required on the current page.
In addition, it should be noted that, in order to improve the efficiency of testing the hybrid App, a tester can judge whether the current page needs to be subjected to screenshot through an interface screenshot image in the cross-end working platform, so that the tester can manually correct the value of the auxiliary verification parameter.
Further, in the embodiment of the present application, due to the characteristics of the App application, after one of the automation test protocol interfaces in the web test script page is invoked, another interface level is evoked by the protocol corresponding to the automation test protocol interface, and at this time, the current web test script page is not in the main thread but in the other interface level. When the automatic test protocol interface in the web test script page is subsequently called, the web test script page is not responded by the mixed App. Therefore, the current interface needs to be logged off, so that the web test script page returns to the main thread, and the following details of the step of logging off the current page are described in the embodiment of the present application, which specifically includes:
if the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the previous page of the current page.
In the embodiment of the application, if the protocol execution is determined to be completed, a new interface level action is evoked, so that the automatic execution of one protocol can not be entered. For this case, the preconfigured interface entry information for the automated test protocol interface also includes interface logoff parameters. Therefore, after the protocol execution is monitored to be completed, whether the interface logout parameter is contained in the preconfigured interface parameter entering information of the automatic test protocol interface is further judged. If the preset interface parameter information is determined to contain the interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the previous interface of the current page, for example, an interface for accessing the web test script page. Thus, when the protocol has the action of calling a new interface, the hybrid App client can also automatically return to the calling source side of the upper interface, namely return to the execution interface of the web test script page, so that the automatic test protocol interface can automatically call the protocol to be tested.
For example, assume that after the protocol execution is completed, the web test script page jumps to the my interface, and when the preconfigured interface parameter information includes the interface logout parameter, the current page needs to be logged out, and the web test script page is returned to the first page.
It should be noted that, although the preconfigured interface parameter information includes the interface logout parameter, when the value of the interface logout parameter is 0, the interface logout parameter may be regarded as not including the interface logout parameter, and the current page does not need to be logged out. The value of the interface logout parameter can be set, the condition that the current page does not need to be logged out is represented when the value is 0, and the condition that the current page needs to be logged out is represented when the value is 1.
In addition, it should be noted that, in order to improve the efficiency of testing the hybrid App, a tester may judge whether a certain protocol calls a new interface level through the screenshot image of the interface in the cross-end working platform, so as to judge whether the current page needs to be logged out, so that the tester may manually correct the value of the interface logging-out parameter.
A3: and returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
In the embodiment of the application, after the execution result data is packaged and sent to the cross-end working platform, the data is returned to the main thread, namely the web test script page, and the next protocol to be tested is automatically called through the automatic test protocol interface to execute the test script until all the protocols to be tested in the test protocol list in the web test script page are called, and the calling is ended, so that the execution result data is obtained.
It should be noted that, in the embodiment of the present application, each execution result data of the hybrid App is obtained by calling each protocol to be tested of the hybrid App through the automated test protocol interface. That is, in the embodiment of the present application, the first protocol to be tested is called through the automated test protocol interface to obtain the execution result data generated after the execution of the protocol is completed, and then the second protocol to be tested is called through the automated test protocol interface to obtain the execution result data generated after the execution of the protocol is completed. And calling all protocols to be tested in the mode to obtain the execution result data of the mixed App.
For example, assuming that there are three protocols to be tested, namely A1, A2 and A3 respectively, firstly, by accessing a web test script page, triggering test script execution, calling the protocol to be tested A1 through an automatic test protocol interface, when the call of the protocol to be tested A1 is completed, obtaining the execution result data of the protocol to be tested A1, returning to the web test script page, continuing to execute the test script, calling the protocol to be tested A2 through the automatic test protocol interface, when the call of the protocol to be tested A2 is completed, obtaining the execution result data of the protocol to be tested A2, and finally, calling the protocol to be tested A3 through the automatic test protocol interface, obtaining the execution result data of the protocol to be tested A3. Thus, a total of 3 execution result data are finally obtained.
Step 220: and sending the execution result data to the cross-end working platform.
The functional test result of the hybrid App is determined according to each execution result data of each protocol.
In the embodiment of the application, after the execution result data of each protocol is obtained, each execution result data is sent to the cross-end working platform, so that the cross-end working platform can determine the function test result of the hybrid App according to the execution result data of each protocol.
It should be noted that, when the cross-end working platform determines the functional test result of the hybrid App, the functional test result may be determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App. That is, in the embodiment of the present application, for each protocol, the test result of the protocol is determined according to the execution result data of any one protocol and the expected result data of the hybrid App, and after the test result of each protocol is determined, the functional test result of the hybrid App is determined according to the test result of each protocol.
The test result in the embodiment of the application can be verification passing, verification failure or newly added protocol.
And verifying that the passed test result is that the execution result data accords with the expected result data.
The test result of the verification failure is that the execution result data does not accord with the expected result data.
The test result of the newly added protocol is expected result data of which the execution result data does not match.
In addition, if the test result is that the verification fails or a new protocol is added, whether the test result is executed correctly is further determined according to the execution result data of the protocol, and if the test result is determined to be executed correctly, the expected result of the corresponding protocol and the protocol of the hybrid App client are updated.
The above embodiments are described in detail in the embodiments of the cross-end working platform side, and are not repeated here.
Because Web pages are tightly integrated with business in the agile development process, the Web pages are changed from time to time. On the premise that the App end guarantees the stability and triggerability of the protocol, the Web developer uses an incorrect protocol calling mode, which is one of important problem sources influencing the use of users. In order to confirm the correctness of the protocol use of the service implementation party of the hybrid App, that is, the developer of the Web terminal, the embodiment of the application can further determine the Web terminal protocol use test result of the hybrid App, and determine the usability test result of the hybrid App according to the function test result of the hybrid App and the Web terminal protocol use test result. Therefore, when determining the web-side protocol usage test result of the hybrid App, specifically includes:
s1: and acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code.
S2: and acquiring protocol information sent by the client from the cross-end working platform.
S3: and sequentially judging whether each protocol in the web end code is contained in the protocol information sent by the client acquired from the cross-end working platform.
S4: if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes the verification, otherwise, recording as a use error.
S5: after the fact that all the protocols are detected to be matched is determined, a web end protocol use test result is generated according to all the test records.
The step of determining the web-side protocol usage test result of the hybrid App in the embodiment of the present application is described in detail in the following embodiment, and is not repeated here.
In the related art, a plurality of test scripts are required to be prepared for the UI automatic test method for simulating the user behavior to perform service operation, the problem that the service is continuously changed is also faced in the process of script preparation, and the maintenance labor and time cost of the plurality of scripts for the service are definitely high. In addition, the common UI automation tool cannot guarantee the execution stability of the test script in the face of the abnormal situation caused by serious network delay and slow page response.
And, in addition to time cost and stability, UI automation relies on the execution cost of the test script to be also high. In general, the execution of test scripts falls into two cases: local execution or integrated execution. On the one hand, the local execution of test scripts requires preparation of script execution environments, installation of UI automation tools of different versions, preparation of multiple real machines or virtual simulators for executing the scripts, which preparation and machine start-up can cause a lot of time consumption. On the other hand, the integrated deployment of the test script in the server can face the problems of machine loss, machine connection stability and the like caused by long-time connection of a real machine, and the starting of a simulator of a non-real machine can bring greater pressure, cost and instability to the server.
In order to solve the above problems, in the embodiment of the present application, an automatic test protocol interface is first generated by a hybrid App client, and a web test script page is generated according to the generated automatic test protocol interface and protocol information to be tested of the hybrid App, and then the web test script page is accessed, so that the execution of a test script can be triggered by accessing the web test script page, and each protocol of the hybrid App is automatically traversed through the automatic test protocol interface to obtain each execution result data, thereby enabling the test of the hybrid App to be implemented. Therefore, each service function of the hybrid App can be tested only through the web test script page, and the test efficiency of the hybrid App is improved.
Based on the above embodiments, referring to fig. 3, another flowchart of a testing method of a hybrid App in an embodiment of the present application specifically includes:
step 300: and acquiring protocol information and an automatic test protocol interface of the hybrid App by the cross-end working platform.
The protocol information comprises protocol information to be tested of the hybrid App client, each protocol to be tested represents each protocol required to be called when the hybrid App is operated, each protocol support realizes a service function, the entering of the automatic test protocol interface comprises protocol information of at least one protocol to be tested and corresponding preset interface entering information, and the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data.
It should be noted that, in the embodiment of the present application, the protocol information includes protocol information to be tested of each protocol to be tested of the hybrid App client, each protocol to be tested corresponds to one protocol information to be tested, and the protocol information to be tested may be, for example, a protocol name, etc., which is not limited in the embodiment of the present application.
The protocol to be tested in the embodiment of the application is a protocol required to be called for running the hybrid App, and each protocol supports to realize a service function.
The automatic test protocol interface in the embodiment of the application is an interface which is generated by the mixed App client and comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface parameter entering information. The protocol information of the protocol to be tested includes, for example, a protocol name, and the preconfigured interface parameter information includes, for example, an auxiliary verification parameter, an interface logout parameter, etc., which is not limited in the embodiment of the present application.
It should be noted that, each protocol in the embodiment of the present application supports implementing a service function.
The automatic test protocol interface in the embodiment of the application is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data.
In the embodiment of the present application, when executing step 300, the method specifically includes:
based on the detection and identification of the hybrid App client code, protocol information of the hybrid App and an automated test protocol interface are determined from the client code.
In the embodiment of the application, the client code of the hybrid App client can be stored in the server, and the cross-terminal working platform can directly access the server, so that the client code of the hybrid App is obtained, and then the protocol information and the automatic test protocol interface of the hybrid App are determined from the client code based on a preset code identification mode.
The preset recognition mode can be, for example, a regular expression, and the client code specification can be recognized through the regular expression, so that protocol information and an automatic test interface of the hybrid App can be recognized from the client code.
Step 310: and generating a web test script page according to the protocol information and the automatic test protocol interface.
In the embodiment of the present application, when executing step 310, the method specifically includes:
And combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by the client and splicing the test protocol list in a web test script page.
In the embodiment of the application, each protocol information of the hybrid App is combined with the test protocol interface in a preset combination mode to generate a test protocol list which can be automatically identified and executed by the client, and the test protocol list is spliced in the web test script page. Therefore, the generated web test script page contains a test protocol list.
The web test script page is used for accessing the hybrid App client and triggering the test script to execute so as to obtain execution result data of each protocol of the hybrid App client. That is, in the embodiment of the application, the hybrid App client can acquire the web test script page from the cross-end working platform, access the web test script page, trigger the execution of the test script, and automatically call each protocol to be tested in sequence, thereby acquiring the execution result data of each protocol of the hybrid App client.
Therefore, the automatic test flow of the protocol of the hybrid App can be triggered only by accessing the web test script page at different clients. If problems exist in the automatically generated we test script page, correction can be assisted by manual operation of the cross-end working platform.
Step 320: and receiving the execution result data sent by the mixed App client, and determining the function test result of the mixed App according to the execution result data.
The execution result data is obtained by calling a protocol to be tested of the hybrid App through an automatic test protocol interface by the hybrid App client to execute the test script.
In the embodiment of the application, after the mixed type App client accesses the web test script page and triggers the execution of the test script, the execution result data of each protocol of the mixed type App client can be obtained and sent to the cross-end working platform for verification, so that the cross-end working platform can receive each execution result data sent by the cross-end working platform and determine the function test result of the mixed type App according to each execution result data.
And the mixed type App client calls one protocol to be tested through an automatic test protocol interface, triggers the execution of a test script, acquires execution result data after monitoring that the protocol is executed, packages the execution result data, sends the execution result data to a cross-end working platform, returns to a web test script page, and triggers the call of the next protocol to be tested through the automatic test protocol interface until all the protocols to be tested are acquired after the call is completed.
It should be noted that, in the embodiment of the present application, the pre-configured interface parameter information corresponding to the called protocol to be tested includes an auxiliary verification parameter, where the auxiliary verification parameter is used to perform screenshot on the current page where the protocol is executed after the execution is completed, and the execution result data also includes an interface screenshot image.
The called pre-configuration interface parameter entering information corresponding to the protocol to be tested comprises an interface cancellation parameter, wherein the interface cancellation parameter is used for canceling the current page after the mixed App client obtains execution result data, and returning to the previous page of the current page.
In executing step 320, a possible implementation manner in the embodiment of the present application may verify the functional test result of the hybrid App according to each execution result data and each corresponding expected result data, where the following detailed description of the implementation manner is provided, and specifically includes:
and determining the functional test result of the hybrid App according to the execution result data of each protocol and the expected result data of each protocol of the hybrid App.
In the embodiment of the application, the expected result data of each protocol of each mixed type App is prestored in the cross-end working platform, so that when the functional test result of the mixed type App is determined, the test result of each protocol is determined according to the execution result data of any one protocol and the expected result data of the protocol. Based on the above mode, after determining the test result of each protocol, determining the function test result of the hybrid App according to each function test result.
The test results of the protocol in the embodiment of the application can be specifically classified into the following three types, namely, pass verification, fail verification and newly added protocol. The above three types of test results in the embodiments of the present application are described in detail below.
First type: the test result is that the verification passes.
When determining the test result of the protocol, the method specifically comprises the following steps:
and if the execution result data is consistent with the expected result data, the test result is verified.
In the embodiment of the application, firstly, according to the protocol name of a protocol, expected result data of the protocol is matched from a cross-end working platform, if the expected result data corresponding to the protocol can be matched, whether the execution result data of the protocol is consistent with the expected result data is judged, and if the execution result data of the protocol is consistent with the expected result data, the test result of the protocol is confirmed to be passed.
Second type: and the test result is that the verification fails.
When determining the test result of the protocol, the method specifically comprises the following steps:
If the execution result data does not accord with the expected result data, the test result is verification failure.
In the embodiment of the application, firstly, according to the protocol name of a protocol, expected result data of the protocol is matched from a cross-end working platform, if the expected result data corresponding to the protocol can be matched, whether the execution result data of the protocol is consistent with the expected result data is judged, and if the execution result data of the protocol is inconsistent with the expected result data, the test result of the protocol is determined to be verification failure.
Third type: the test result is the newly added protocol.
When determining the test result of the protocol, the method specifically comprises the following steps:
If the execution result data does not have matched expected result data, the test result is a new protocol.
In the embodiment of the application, firstly, according to the protocol name of a protocol, expected result data of the protocol is matched from a cross-end working platform, if the expected result data of the protocol cannot be matched, the protocol is used as a newly added protocol, and a test result of the protocol is determined to be the newly added protocol.
Further, when the test result is a verification failure and the test result is a new protocol, it is required to determine whether the test result is executed correctly according to the execution result data of the protocol, so as to determine whether the expected result data of the protocol needs to be updated, and the following details of the step of determining whether the expected result data of the protocol needs to be updated in the embodiment of the present application specifically include:
s1: if the test result is that the verification fails or a new protocol is added, whether the test result is executed correctly is further determined according to the execution result data of the protocol.
In the embodiment of the application, if the test result is determined to be failed in verification, the tester can further determine whether the test result is actually executed correctly according to the execution result data of the protocol.
For example, the test protocol is used for calling mobile phone information, but the test result is inconsistent with the stored mobile phone information (expected result data), because the test personnel replaces the mobile phone, and the test result is verified to be failed, but the test result is actually executed correctly through manual confirmation, so that the test personnel can further determine whether the test result is correct according to the execution result data of the protocol.
In the embodiment of the application, if the test result is determined to be the newly added protocol, the tester can directly input the expected data into the cross-end working platform, and the test result is determined to be executed correctly by manually confirming whether the execution result data is correct or not because the protocol is the newly added protocol at the moment.
Further, in the embodiment of the application, when the tester manually determines that the execution result data is actually executed correctly, the cross-end working platform can be triggered to generate the execution correct information by clicking the option of 'confirm to meet expectations' in the cross-end working platform, so that the cross-end working platform determines that the execution result data meets expectations, and the test result is executed correctly.
S2: and if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
In the embodiment of the application, if the test result is determined to be executed correctly, the expected result data of the protocol is updated.
When the test result is the newly added protocol, the protocol of the hybrid App client is updated, and the protocol corresponding to the test result is added into the protocol of the hybrid App client.
In the embodiment of the application, when the protocol of the hybrid App client is tested for the first time, the test result is recorded as a new protocol, and the execution result data after manual confirmation is synchronously updated to the cross-end working platform as expected result data, thereby providing assistance for the automatic test of the subsequent specific business. In addition, the execution result data of the first test on the protocol of the hybrid App client can be directly used as expected result data to be synchronously updated to the cross-end working platform and used as expected result data of subsequent tests.
Therefore, the cross-end working platform in the embodiment of the application obtains the protocol provided by the hybrid App client and the pre-configuration parameter-entering information and parameter-exiting information of the automated test protocol interface on one hand, and also provides and records the verification results of the specific protocol on different clients as the server of the automated test scheme on the other hand. The cross-end working platform designed and developed in this way has the functions of automatic correction of the latest protocol, automatic acceptance of the protocol, acceptance record and the like in multiple aspects, and provides great convenience for subsequent development and users.
Further, because web test script pages are tightly integrated with business in the agile development process, the web test script pages are changed from time to time. On the premise that the mixed App client side guarantees the stability and triggerability of the protocol, a web developer uses an incorrect protocol calling mode, which is one of important problem sources influencing the use of users. For this situation, code submission detection for web developers can become a key guarantee of their stability in the web hybrid development process. Therefore, in order to ensure that the protocol used by the web end developer is the correct protocol when developing the hybrid App, the use condition of the protocol of the web end can be analyzed, so that the used protocols are both the correct protocols, and the test accuracy of the hybrid App is improved. The following details the steps for determining the protocol usage test result of the web end in the embodiment of the present application, which specifically includes:
s1: and acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code.
In the embodiment of the application, after a web terminal developer submits a web terminal code to a web terminal through a code submitting tool, the web terminal code of the hybrid App is obtained from the web terminal, and each protocol of the hybrid App is identified from the web terminal code according to a pre-configured code identification rule.
The code submitting tool may be, for example, git, etc., which is not limited in the embodiment of the present application.
S2: based on the detection and identification of the hybrid App client code, protocol information of the hybrid App is determined from the client code.
In the embodiment of the application, the client code of the hybrid App client submitted by a client developer through a code submitting tool is obtained from the hybrid App client, the hybrid App client code is detected and identified according to a preset code detection rule, and the protocol information of the hybrid App is determined from the client code.
It should be noted that, the protocol information of the hybrid App includes each protocol information to be tested of the hybrid App client.
S3: and sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code.
In the embodiment of the application, aiming at each protocol in the web end code, whether the protocol is contained in the protocol information of the hybrid App is judged according to the protocol name of any one protocol.
S4: if the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error.
In the embodiment of the application, for each protocol in the web end code, whether the protocol is contained in the protocol information of the hybrid App is judged according to any protocol name, if the protocol is determined to be contained in the protocol information of the hybrid App, the test record corresponding to the protocol is determined to pass verification, and if the protocol is determined not to be contained in the protocol information of the hybrid App, the test record corresponding to the protocol is determined to be a use error.
In determining the test records of each protocol in the web end code, the test records of each protocol need to be determined sequentially. For example, a first protocol in each protocol in the web end code is tested, a test record of the first protocol is determined, then a second protocol is tested, a test record of the second protocol is determined, and the test is stopped until each protocol in the web end code is tested, and a test record corresponding to each protocol is obtained.
S5: after the fact that all the protocols are detected to be matched is determined, a web end protocol use test result is generated according to all the test records.
In the embodiment of the application, after the detection and matching of each protocol are determined to be finished, each test record is obtained, the test records are summarized, and each test record is submitted to a developer through sending a detection mail to a corresponding code, so that the correctness of the use of the protocol is ensured. When the web terminal protocol using result is determined, if at least one test record in the test records is determined to be the using error, the web terminal protocol using test result is determined to be the error, and if the test records are determined to pass the verification, the web terminal protocol using test result is determined to be correct.
In addition, steps S1-S5 in the embodiment of the present application may also be implemented by a web end, that is, the web end obtains a web end code submitted by a developer, identifies each protocol for obtaining a hybrid App from the web end code, obtains a hybrid App client code from a cross-end working platform, determines protocol information of the hybrid App from the client code, sequentially determines whether each protocol in the web end code is included in the protocol information of the hybrid App, if the protocol information of the hybrid App determined from the client code includes the protocol, determines that a test record of the protocol passes verification, otherwise, records a use error, generates a web end protocol use test result according to each test record after the test record is determined to be complete, and sends the web end protocol use test result to the cross-end working platform, so that the cross-end working platform determines an availability test result of the hybrid App according to the web end protocol use test result and the hybrid App function test result.
The test method of the mixed type App can be used for researching the protocol to be tested and the automatic test protocol interface provided by the mixed type App client from the realization source of the service. On one hand, the stability and callability of each protocol of the hybrid App can be guaranteed by determining the function test result of the hybrid App, and on the other hand, the correctness of each protocol for calling the hybrid App can be guaranteed by determining the web end protocol use test of the hybrid App. The stability of the service function of the hybrid App can be further ensured through the guarantee of the two protocols. By the method in the embodiment of the application, the maintenance cost of the automatic test script caused by service variation is reduced, and the automatic test is performed by utilizing the automatic test protocol interface packaged by the hybrid App client, so that the automatic test is not dependent on a UI (user interface) automatic tool, and the intelligent degree and the convenience of the automatic test are improved.
Based on the above embodiments, referring to fig. 4, a flowchart of a method for calling an automated test protocol interface in an embodiment of the present application specifically includes:
Step 400: starting.
Step 401: the hybrid App client provides protocol information of each protocol to be tested.
Step 402: and generating an automatic test protocol interface of the mixed App client, and accessing a web test script page containing the automatic test protocol interface.
Step 403: one protocol to be tested of the hybrid App is invoked to execute the test script.
The entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information.
In the embodiment of the application, the mixed type App client uniformly encapsulates each protocol to be tested to generate an automatic test protocol interface.
In the embodiment of the application, one protocol to be tested is automatically called through the automatic test protocol interface of the mixed App so as to execute the test script.
Step 404: and after the protocol to be tested is called, monitoring the execution result data after the protocol is executed.
Step 405: and capturing the current page where the protocol is executed, and obtaining an interface captured image.
Step 406: and packaging the interface screenshot image into the execution result data.
Step 407: and logging off the current page, and returning to the page at the upper stage of the current page.
In the embodiment of the application, if the preconfigured interface parameter entering information also comprises an interface cancellation parameter, after the execution result data is obtained, the newly-called interface is cancelled, and the initial interface is restored.
Step 408: and returning the execution result data to the cross-end working platform.
Step 409: whether each protocol to be tested is called is judged, if yes, step 410 is executed, and if not, step 403 is executed.
Step 410: and (5) ending.
Because one test script is required to be written for each service in the related technology, and the test scripts are also required to be written for the Android client and the iPhone client respectively, the traditional automatic test scheme of the hybrid App has the defects of high script maintenance cost and high execution cost. In the embodiment of the application, the original protocol of the hybrid App is simply modified to generate the web test script page containing the automatic test protocol interface, the test of the hybrid App can be realized by accessing the web test script page, and the test script is changed from multiple platforms and multiple test scripts to one test script with multiple platforms, so that the maintenance quantity of the test scripts is reduced, and the labor cost and the time cost for maintaining the test scripts are reduced.
Based on the above embodiments, referring to fig. 5, a flowchart of a method for generating a web test script page in an embodiment of the present application specifically includes:
Step 500: starting.
Step 510: the hybrid App client determines protocol information and an automated test protocol interface of the hybrid App from the client code based on the detection and identification of the client code.
The entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information.
Step 520: and sending the protocol information to be tested of the mixed App and the automatic test protocol interface to a cross-end working platform.
Step 530: and acquiring protocol information to be tested and an automatic test protocol interface of the hybrid App by the cross-end working platform.
Step 540: and the cross-end working platform generates a web test script page according to the protocol information to be tested and the automatic test protocol interface.
Step 550: the mixed type App client accesses the web test script page, triggers the execution of the test script, and automatically traverses each protocol of the mixed type App through an automatic test protocol interface of the mixed type App.
Step 560: and (5) ending.
In the embodiment of the application, the cross-end working platform can generate the web test script page, so that the characteristic that the mixed App can acquire the return of the interface is utilized, the stability of the use case in the script execution process is enhanced, and the abnormal influence caused by environmental reasons, network delay and slow page response is reduced. Moreover, as the mixed App can be tested only by accessing the web test script pages in different clients, the execution cost of the test script can be reduced, the rapid iterative regression test is supported, the complex environment preparation and construction are not needed, and the automatic test flow can be rapidly started only by entering the web test script page through one mobile phone or simulator of a developer.
Based on the above embodiments, referring to fig. 6, a flowchart of web test script page execution in an embodiment of the present application specifically includes:
Step 600: starting.
Step 601: and accessing a web test script page, and triggering the execution of the test script.
In the embodiment of the application, the execution of the test script is triggered by accessing the web test script page in the hybrid App terminal.
Step 602: and calling one protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script.
In the embodiment of the application, in the process of executing the test script, the specific protocol execution is triggered through the automatic test protocol interface packaged by the hybrid App client.
Step 603: and determining that the protocol to be tested is completed.
In the embodiment of the application, after the mixed App client monitors that the specific protocol is executed, the operation of screen capturing and logging out the upper interface is selected according to whether the pre-configuration parameter information of the automatic test protocol interface contains the auxiliary verification parameter and the interface logging-out parameter.
Step 604: whether the screenshot is a screenshot is determined, if yes, step 605 is executed, and if not, step 606 is executed.
In the embodiment of the application, whether the parameter entering information of the preconfigured interface of the automatic test protocol interface contains auxiliary verification parameters is judged, if yes, the current page where the protocol is executed is subjected to screenshot, otherwise, the screenshot is not carried out.
Step 605: and capturing the current page where the protocol is executed, and obtaining an interface captured image.
Step 606: whether the current interface is logged off is judged, if yes, step 607 is executed, and if not, step 608 is executed.
In the embodiment of the application, whether the pre-configuration interface parameter entering information of the automatic test protocol interface contains an interface cancellation parameter is judged, if yes, the current page is cancelled, the previous page of the current page is returned, and if not, the current page is not cancelled.
Step 607: and logging off the current page, and returning to the page at the upper stage of the current page.
Step 608: and packaging the execution result data.
In the embodiment of the application, after the hybrid App client monitors that the protocol execution is completed, an interface screenshot image obtained by performing interface screenshot is packaged into execution result data and sent to a cross-end working platform on a server, and then the cross-end working platform automatically returns to a web test script page to perform the next protocol test until all protocols are executed.
Step 609: and sending the execution result data to the cross-end working platform.
Step 610: whether each protocol is called is judged, if yes, step 611 is executed, and if not, step 602 is executed again.
Step 611: and (5) ending.
In the embodiment of the application, the mixed type App client encapsulates a set of automatic test protocol interfaces only used by internal testers, and the automatic test protocol interfaces are used for calling, calling and returning monitoring, interface cancellation, automatic reporting of interface screenshot images and the like of the protocols, so that execution result data of each protocol is obtained, and the functional stability of the mixed type App during testing can be ensured.
Based on the above embodiments, referring to fig. 7, a flowchart of a method for verifying a hybrid App in an embodiment of the present application specifically includes:
Step 700: starting.
Step 701: and acquiring an execution result data list by the cross-end working platform.
The execution result data list contains execution result data.
Step 702: traversing the execution result data of all the protocols by the cross-end working platform in sequence.
In the embodiment of the application, after the cross-end working platform receives the execution result data sent by the hybrid App client, the cross-end working platform traverses the execution result data of all protocols in sequence.
Step 703: whether the execution result data has matched expected result data is determined, if yes, step 704 is executed, and if not, step 707 is executed.
In the embodiment of the application, whether the reserved expected result data exists in front of the protocol is judged, if so, the previous expected result data is obtained for verification, otherwise, the protocol is determined to be a bathing energy protocol, and manual confirmation is needed.
Step 704: if the comparison is the same, step 705 is executed, and if not, step 706 is executed.
In the embodiment of the application, whether the interface screenshot image in the execution result data is the same as the interface screenshot image in the expected result data or not is judged, if yes, whether the protocol return data in the execution result data is the same as the protocol return data in the expected result data is compared.
Step 705: whether the data comparison is the same is determined, if so, step 708 is performed, and if not, step 706 is performed.
In the embodiment of the application, whether the protocol return data in the execution result data is the same as the protocol return data in the expected result data is judged.
Step 706: and determining the test result as verification failure.
In the embodiment of the application, the verification failure is recorded, and the manual confirmation is prompted.
Step 707: and determining the test result as a new protocol.
Step 708: and recording the test result of the current protocol.
Step 709: and collecting test results of all protocols.
Step 710: and generating a protocol report according to the test result of each protocol, and displaying the generated protocol report.
Step 711: and the test result with failed verification is manually confirmed to pass.
Step 712: and the test result of the newly added protocol is manually confirmed to pass.
In the embodiment of the application, after all execution checks are manually received, whether the check failure and the returned result data of the newly added protocol meet expectations or not is required to be confirmed, the expectations meet expectations, the expected result data in the cross-end working platform can be corrected, and meanwhile, the version of the mixed App client which is passed by the latest check of the current protocol is updated.
Step 713: and updating expected result data in the cross-end working platform.
Step 714: and (5) ending.
According to the embodiment of the application, the detection of the mixed type App can be realized, and the efficiency and accuracy of the detection of the mixed type App are improved.
Based on the above embodiments, referring to fig. 8, a flowchart of a method for web side verification in an embodiment of the present application specifically includes:
Step 800: starting.
Step 801: and acquiring the web end code submitted by the web developer through a code submitting tool.
Step 802: and identifying and obtaining each protocol of the mixed App according to the web end code.
Step 803: the specific protocol of the hybrid App is determined.
Step 804: the cross-end working platform determines protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code.
Step 805: determining whether the protocol is contained in the protocol information by a regular matching mode.
Step 806: whether the protocol in the web side code is contained in the protocol information is determined, if yes, step 807 is executed, and if not, step 808 is executed.
Step 807: the test record is recorded as a usage error.
Step 808: the test record is recorded as validated.
Step 809: the test records are fed back to the web-side developer through mail.
Step 810: and (5) ending.
In the embodiment of the application, on the premise that the stability and triggerability of the protocol are ensured by the mixed App client, the web developer uses an incorrect protocol calling mode, which is one of important problem sources influencing the use of users. Therefore, aiming at the situation, in the web hybrid development process, submitted codes of web developers are detected, so that the web end protocol use test result of the hybrid App is determined, and the correctness of the calling protocol can be ensured.
Based on the same inventive concept, the embodiment of the application also provides a testing device of the hybrid App, which is used for determining the functional testing result of the hybrid App, and the testing device of the hybrid App can be a hardware structure, a software module or a hardware structure plus a software module. Based on the above embodiments, referring to fig. 9, a schematic structural diagram of a testing device for a hybrid App in an embodiment of the present application specifically includes:
The generating module 900 is configured to generate an automated test protocol interface of the hybrid App client, where the automated test protocol interface is configured to automatically invoke each protocol to be tested of the hybrid App client and return test result data;
wherein, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information;
Wherein each protocol to be tested represents each protocol required to be invoked for running the hybrid App, and each protocol supports a service function;
The processing module 910 is configured to access a web test script page by the hybrid App client, trigger execution of a test script, and automatically traverse each protocol of the hybrid App through an automated test protocol interface of the hybrid App to obtain each execution result data of the hybrid App;
The web test script page is generated according to the protocol information to be tested of the hybrid App and an automatic test protocol interface;
a sending module 920, configured to send the execution result data to the cross-end working platform;
the functional test result of the mixed App is determined according to each execution result data of each protocol.
Optionally, the web test script page is generated according to the protocol information to be tested and the automated test protocol interface of the hybrid App, and the processing module 910 is further configured to:
Determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code;
And generating the web test script page according to the protocol information and an automatic test protocol interface, wherein the protocol information comprises protocol information to be tested of the mixed App client.
Optionally, when the web test script page is generated according to the protocol information and the test protocol interface, the processing module 910 is specifically configured to:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, the processing module 910 is specifically configured to:
Calling a protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script;
If the protocol execution is monitored to be completed, execution result data are obtained, and the execution result data are packaged and then sent to the cross-end working platform;
And returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
Optionally, if it is monitored that the protocol execution is completed, execution result data is obtained, and the execution result data is encapsulated and then sent to the cross-end working platform, and the processing module 910 is further configured to:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, capturing a current page where the protocol is executed, obtaining an interface capturing image, packaging the interface capturing image into the execution result data, and sending the interface capturing image to the cross-end working platform.
Optionally, if it is monitored that the protocol is executed, execution result data is obtained, and the execution result data is encapsulated and sent to the cross-end working platform, the processing module 910 is further configured to:
If the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the page at the previous stage of the current page.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol, and further includes:
The functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, which specifically includes:
The test result is that the verification passes, the verification fails or a new protocol is added;
checking that the passed test result is that the execution result data accords with the expected result data;
the test result of the verification failure is that the execution result data does not accord with the expected result data;
and the test result of the newly added protocol is expected result data which is not matched with the execution result data.
Optionally, the functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, and the sending module 920 is further configured to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the method further includes a determining module 930, where the determining module 930 is configured to:
Determining a web end protocol use test result of the hybrid App;
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
acquiring protocol information sent by the client from the cross-end working platform;
sequentially judging whether each protocol in the web end code is contained in protocol information sent by the client acquired from the cross-end working platform;
if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the determining module 930 is further configured to:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
Based on the same inventive concept, the embodiment of the application also provides a testing device of the hybrid App, which can be applied to the cross-end working platform in the above embodiment, for example, and the testing device of the hybrid App can be a hardware structure, a software module, or a hardware structure plus a software module. Based on the above embodiments, referring to fig. 10, another schematic structural diagram of a testing device of a hybrid App in an embodiment of the present application specifically includes:
The acquisition module 1000 is used for acquiring protocol information of the hybrid App and an automatic test protocol interface;
The protocol information comprises protocol information to be tested of a hybrid App client, the protocols to be tested represent protocols required to be called for running the hybrid App, each protocol supports to realize a service function, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information, and the automated test protocol interface is used for automatically calling the protocols to be tested of the hybrid App client and returning test result data;
A generating module 1010, configured to generate a web test script page according to the protocol information and an automated test protocol interface;
The web test script page is used for the hybrid App client to access and trigger test script execution to obtain execution result data of each protocol of the hybrid App client;
The first determining module 1020 is configured to receive the execution result data sent by the hybrid App client, and determine a functional test result of the hybrid App according to the execution result data.
Optionally, the acquiring module 1000 is specifically configured to:
And determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code.
Optionally, the generating module 1010 is specifically configured to:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
Optionally, when receiving the execution result data sent by the hybrid App client, the first determining module 1020 is specifically configured to:
And the execution result data is obtained by calling a protocol to be tested of the hybrid App through the automatic test protocol interface by the hybrid App client so as to execute the test script.
Optionally, the preconfigured interface parameter information corresponding to the called protocol to be tested includes an interface logout parameter, where the interface logout parameter is used for logging out the current page and returning to a previous page of the current page after the hybrid App client obtains execution result data.
Optionally, the preconfigured interface parameter information corresponding to the called protocol to be tested includes an interface logout parameter, where the interface logout parameter is used for logging out the current page and returning to a previous page of the current page after the hybrid App client obtains execution result data.
Optionally, when determining the functional test result of the hybrid App according to the execution result data, the first determining module 1020 is specifically configured to:
And determining a function test result of the mixed type App according to the execution result data of each protocol and the expected result data of each protocol of the mixed type App.
Optionally, when determining the functional test result of the hybrid App according to the execution result data of each protocol and the expected result data of each protocol of the hybrid App, the first determining module 1020 is specifically configured to:
If the execution result data is consistent with the expected result data, the test result is verified;
if the execution result data does not accord with the expected result data, the test result is verification failure;
And if the execution result data does not have matched expected result data, the test result is a new protocol.
Optionally, the method further includes a first verification module 1030, where the first verification module 1030 is specifically configured to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
Optionally, the system further includes a second checking module 1040, where the second checking module 1040 is specifically configured to:
Determining a web end protocol use test result of the hybrid App;
acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
Determining protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code;
sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code;
If the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
Optionally, after determining the web-side protocol usage test result of the hybrid App, the method further includes:
and a second determining module 1050, configured to determine an usability test result of the hybrid App according to the hybrid App function test result and a web-side protocol usage test result.
Based on the above embodiments, referring to fig. 11, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown.
Embodiments of the present application provide an electronic device that may include a processor 1110 (Center Processing Unit, a CPU), a memory 1120, an input device 1130, an output device 1140, etc., where the input device 1130 may include a keyboard, a mouse, a touch screen, etc., and the output device 1140 may include a display device, such as a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), a Cathode Ray Tube (CRT), etc.
Memory 1120 may include Read Only Memory (ROM) and Random Access Memory (RAM) and provides processor 1110 with program instructions and data stored in memory 1120. In the embodiment of the present application, the memory 1120 may be used to store a program of the test method of any of the hybrid apps in the embodiment of the present application.
The processor 1110 is configured to execute the test method of any one of the hybrid apps according to the embodiment of the present application by calling the program instructions stored in the memory 1120, and the processor 1110 is configured to execute the obtained program instructions.
Based on the above embodiments, in the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the test method of the hybrid App in any of the method embodiments described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (44)

1. A method of testing a hybrid App comprising:
determining a function test result of the mixed App; it is characterized in that the method comprises the steps of,
Generating an automatic test protocol interface of the hybrid App client, wherein the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data; wherein, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information; the protocols to be tested represent protocols required to be called for running the hybrid App, and each protocol supports a service function;
The mixed type App client accesses a web test script page, triggers execution of a test script, and automatically traverses each protocol of the mixed type App through an automatic test protocol interface of the mixed type App to obtain each execution result data of the mixed type App; the web test script page is generated according to the protocol information to be tested and the automatic test protocol interface of the hybrid App, and comprises the following steps: combining all protocol information of the mixed App with an automatic test protocol interface, generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page;
Transmitting the execution result data to a cross-end working platform; the functional test result of the mixed App is determined according to each execution result data of each protocol.
2. The method of claim 1, wherein the web test script page is generated for protocol information to be tested and an automated test protocol interface according to the hybrid App, specifically comprising:
Determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code;
And generating the web test script page according to the protocol information and an automatic test protocol interface, wherein the protocol information comprises protocol information to be tested of the mixed App client.
3. The method of claim 2, wherein the generating the web test script page according to the protocol information and test protocol interface specifically comprises:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
4. The method of claim 1, wherein the hybrid App client accesses a web test script page, triggers execution of a test script, automatically traverses protocols of the hybrid App through an automated test protocol interface of the hybrid App, and obtains execution result data of the hybrid App, specifically comprising:
Calling a protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script;
If the protocol execution is monitored to be completed, execution result data are obtained, and the execution result data are packaged and then sent to the cross-end working platform;
And returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
5. The method of claim 4, wherein obtaining execution result data after the protocol execution is monitored, and packaging the execution result data and sending the packaged execution result data to the cross-end working platform, further comprising:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, capturing a current page where the protocol is executed, obtaining an interface capturing image, packaging the interface capturing image into the execution result data, and sending the interface capturing image to the cross-end working platform.
6. The method of claim 4, wherein obtaining execution result data after the protocol execution is monitored, and sending the execution result data to the cross-end platform after encapsulation, further comprises:
if the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the page of the previous stage of the current page.
7. The method of claim 1, wherein the functional test results of the hybrid App are determined from execution result data of the protocols, further comprising:
The functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App.
8. The method of claim 7, wherein the functional test results of the hybrid App are determined based on the execution result data of each protocol and the expected result data of each protocol of the hybrid App, respectively, specifically comprising:
The test result is that the verification passes, the verification fails or a new protocol is added;
checking that the passed test result is that the execution result data accords with the expected result data;
the test result of the verification failure is that the execution result data does not accord with the expected result data;
and the test result of the newly added protocol is expected result data which is not matched with the execution result data.
9. The method of claim 8, wherein the functional test results of the hybrid App are determined from respective execution result data of the respective protocols and expected result data of the respective protocols of the hybrid App, further comprising:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
10. The method of claim 1, further comprising:
determining a web-side protocol usage test result of the hybrid App, wherein,
Acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
acquiring protocol information sent by the client from the cross-end working platform;
sequentially judging whether each protocol in the web end code is contained in protocol information sent by the client acquired from the cross-end working platform;
if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
11. The method of claim 10, wherein after determining the web-side protocol usage test result of the hybrid App, further comprising:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
12. A method for testing a hybrid App, comprising:
Acquiring protocol information and an automatic test protocol interface of a hybrid App by a cross-end working platform; the protocol information comprises protocol information to be tested of a hybrid App client, the protocols to be tested represent protocols required to be called for running the hybrid App, each protocol supports to realize a service function, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information, and the automated test protocol interface is used for automatically calling the protocols to be tested of the hybrid App client and returning test result data;
generating a web test script page according to the protocol information and the automatic test protocol interface, which specifically comprises the following steps: combining all protocol information of the mixed App with an automatic test protocol interface, generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page;
The web test script page is used for the hybrid App client to access and trigger test script execution to obtain execution result data of each protocol of the hybrid App client;
and receiving the execution result data sent by the mixed App client, and determining the function test result of the mixed App according to the execution result data.
13. The method of claim 12, wherein the cross-end work platform obtains protocol information and an automated test protocol interface of the hybrid App, specifically comprising:
And determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code.
14. The method of claim 12, wherein the receiving the execution result data sent by the hybrid App client comprises:
And the execution result data is obtained by calling a protocol to be tested of the hybrid App through the automatic test protocol interface by the hybrid App client so as to execute the test script.
15. The method as recited in claim 14, wherein:
The called pre-configuration interface parameter entering information corresponding to the protocol to be tested comprises auxiliary verification parameters, the auxiliary verification parameters are used for capturing a current page where the protocol is executed, and the execution result data also comprise interface capturing images.
16. The method as recited in claim 14, wherein:
The called pre-configuration interface parameter entering information corresponding to the protocol to be tested comprises interface cancellation parameters, wherein the interface cancellation parameters are used for canceling a current page after the mixed App client obtains execution result data, and returning to a previous page of the current page.
17. The method of claim 12, wherein determining the functional test result of the hybrid App based on the execution result data, specifically comprises:
And determining a function test result of the mixed type App according to the execution result data of each protocol and the expected result data of each protocol of the mixed type App.
18. The method of claim 17, wherein determining the functional test result of the hybrid App based on the execution result data of each protocol and the expected result data of each protocol of the hybrid App, respectively, specifically comprises:
If the execution result data is consistent with the expected result data, the test result is verified;
if the execution result data does not accord with the expected result data, the test result is verification failure;
And if the execution result data does not have matched expected result data, the test result is a new protocol.
19. The method as recited in claim 18, further comprising:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
20. The method of claim 12, further comprising:
determining a web-side protocol usage test result of the hybrid App, wherein,
Acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
Determining protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code;
sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code;
If the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
21. The method of claim 20, wherein after determining the web-side protocol usage test result of the hybrid App, further comprising:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
22. A test device of a hybrid App, wherein the test device of the hybrid App is used for determining a functional test result of the hybrid App; characterized by comprising the following steps:
The generation module is used for generating an automatic test protocol interface of the hybrid App client, and the automatic test protocol interface is used for automatically calling each protocol to be tested of the hybrid App client and returning test result data; wherein, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information; the protocols to be tested represent protocols required to be called for running the hybrid App, and each protocol supports a service function;
The processing module is used for the mixed type App client to access a web test script page, trigger execution of a test script and automatically traverse each protocol of the mixed type App through an automatic test protocol interface of the mixed type App to obtain each execution result data of the mixed type App; the web test script page is generated according to protocol information to be tested and an automatic test protocol interface of the hybrid App, and when the web test script page is generated, each protocol information of the hybrid App is combined with the automatic test protocol interface, and a test protocol list which can be automatically identified and executed by a generating client is spliced in the web test script page;
the sending module is used for sending the execution result data to a cross-end working platform; the functional test result of the mixed App is determined according to each execution result data of each protocol.
23. The apparatus of claim 22, wherein the web test script page is generated from protocol information to be tested and an automated test protocol interface of the hybrid App, the processing module further to:
Determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code;
And generating the web test script page according to the protocol information and an automatic test protocol interface, wherein the protocol information comprises protocol information to be tested of the mixed App client.
24. The apparatus of claim 23, wherein, when generating the web test script page according to the protocol information and test protocol interface, the processing module is specifically configured to:
and combining all protocol information of the mixed App with an automatic test protocol interface, and generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page.
25. The apparatus of claim 22, wherein the processing module is specifically configured to:
Calling a protocol to be tested of the hybrid App through the automatic test protocol interface to execute the test script;
If the protocol execution is monitored to be completed, execution result data are obtained, and the execution result data are packaged and then sent to the cross-end working platform;
And returning to the web test script page, and calling the next protocol to be tested through the automatic test protocol interface to execute the test script until all the protocols to be tested are called.
26. The apparatus of claim 25, wherein if it is monitored that the protocol execution is completed, execution result data is obtained, the execution result data is encapsulated and sent to the cross-end working platform, and the processing module is further configured to:
If the pre-configured interface parameter entering information corresponding to the protocol comprises auxiliary verification parameters, capturing a current page where the protocol is executed, obtaining an interface capturing image, packaging the interface capturing image into the execution result data, and sending the interface capturing image to the cross-end working platform.
27. The apparatus of claim 25, wherein if the protocol execution is monitored to be completed, execution result data is obtained, the execution result data is encapsulated and sent to the cross-end platform, and the processing module is further configured to:
if the pre-configured interface parameter information corresponding to the protocol also comprises an interface cancellation parameter, after the execution result data is obtained, canceling the current page and returning to the page of the previous stage of the current page.
28. The apparatus of claim 22, wherein the functional test results of the hybrid App are determined from execution result data for each protocol, further comprising:
The functional test result of the hybrid App is determined according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App.
29. The apparatus of claim 28, wherein the functional test results of the hybrid App are determined based on the execution result data of the protocols and the expected result data of the protocols of the hybrid App, respectively, specifically comprising:
The test result is that the verification passes, the verification fails or a new protocol is added;
checking that the passed test result is that the execution result data accords with the expected result data;
the test result of the verification failure is that the execution result data does not accord with the expected result data;
and the test result of the newly added protocol is expected result data which is not matched with the execution result data.
30. The apparatus of claim 29, wherein the functional test results of the hybrid App are determined from respective execution result data for the respective protocols and expected result data for the respective protocols of the hybrid App, the transmission module further to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
31. The apparatus of claim 22, further comprising a determination module to:
determining a web-side protocol usage test result of the hybrid App, wherein,
Acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
acquiring protocol information sent by the client from the cross-end working platform;
sequentially judging whether each protocol in the web end code is contained in protocol information sent by the client acquired from the cross-end working platform;
if the protocol information sent by the client acquired from the cross-end working platform contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
32. The apparatus of claim 31, wherein after determining the web-side protocol usage test result of the hybrid App, the determining module is further to:
And determining an availability test result of the hybrid App according to the test result of the hybrid App function and the test result of the web terminal protocol.
33. The utility model provides a testing arrangement of hybrid App, is applied to and strides end work platform, its characterized in that includes:
The acquisition module is used for acquiring protocol information of the hybrid App and an automatic test protocol interface; the protocol information comprises protocol information to be tested of a hybrid App client, the protocols to be tested represent protocols required to be called for running the hybrid App, each protocol supports to realize a service function, the entry of the automated test protocol interface comprises protocol information of at least one protocol to be tested and corresponding pre-configured interface entry information, and the automated test protocol interface is used for automatically calling the protocols to be tested of the hybrid App client and returning test result data;
the generation module is used for generating a web test script page according to the protocol information and the automatic test protocol interface;
The generating module is specifically used for: combining all protocol information of the mixed App with an automatic test protocol interface, generating a test protocol list which can be automatically identified and executed by a client and splicing the test protocol list in the web test script page;
The web test script page is used for the hybrid App client to access and trigger test script execution to obtain execution result data of each protocol of the hybrid App client;
The first determining module is used for receiving the execution result data sent by the mixed type App client and determining the function test result of the mixed type App according to the execution result data.
34. The apparatus of claim 33, wherein the obtaining module is specifically configured to:
And determining protocol information and an automatic test protocol interface of the hybrid App from the client code based on detection and identification of the hybrid App client code.
35. The apparatus of claim 33, wherein, when receiving the execution result data sent by the hybrid App client, the first determining module is specifically configured to:
And the execution result data is obtained by calling a protocol to be tested of the hybrid App through the automatic test protocol interface by the hybrid App client so as to execute the test script.
36. The apparatus as recited in claim 35, wherein:
The called pre-configuration interface parameter entering information corresponding to the protocol to be tested comprises auxiliary verification parameters, the auxiliary verification parameters are used for capturing a current page where the protocol is executed, and the execution result data also comprise interface capturing images.
37. The apparatus as recited in claim 35, wherein:
The called pre-configuration interface parameter entering information corresponding to the protocol to be tested comprises interface cancellation parameters, wherein the interface cancellation parameters are used for canceling a current page after the mixed App client obtains execution result data, and returning to a previous page of the current page.
38. The apparatus of claim 33, wherein when determining the functional test result of the hybrid App according to the execution result data, the first determining module is specifically configured to:
And determining a function test result of the mixed type App according to the execution result data of each protocol and the expected result data of each protocol of the mixed type App.
39. The apparatus of claim 38, wherein when determining the functional test result of the hybrid App according to each execution result data of each protocol and the expected result data of each protocol of the hybrid App, the first determining module is specifically configured to:
If the execution result data is consistent with the expected result data, the test result is verified;
if the execution result data does not accord with the expected result data, the test result is verification failure;
And if the execution result data does not have matched expected result data, the test result is a new protocol.
40. The apparatus of claim 39, further comprising a first verification module, the first verification module being specifically configured to:
if the test result is that the verification fails or a protocol is newly added, whether the test result is executed correctly is further determined according to the execution result data of the protocol;
And if the test result is determined to be executed correctly, updating the expected result of the corresponding protocol and the protocol of the mixed App client.
41. The apparatus of claim 33, further comprising a second checking module, the second checking module being specifically configured to:
determining a web-side protocol usage test result of the hybrid App, wherein,
Acquiring a web end code of the hybrid App, and identifying and acquiring each protocol of the hybrid App according to the web end code;
Determining protocol information of the hybrid App from the client code based on detection and identification of the hybrid App client code;
sequentially judging whether each protocol in the web end code is contained in the protocol information of the mixed App determined from the client end code;
If the protocol information of the mixed App determined from the client code contains the protocol, determining that the test record passes verification, otherwise, recording as a use error;
And after the fact that all the protocols are detected to be matched is determined, generating a web end protocol use test result according to all the test records.
42. The apparatus of claim 41, wherein after determining the web-side protocol usage test result of the hybrid App, further comprises:
And the second determining module is used for determining an availability test result of the hybrid App according to the hybrid App function test result and the web end protocol use test result.
43. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1-11 or 12-21 when the program is executed.
44. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program implementing the steps of the method of any of claims 1-11 or 12-21 when executed by a processor.
CN202110467333.5A 2021-04-28 2021-04-28 Test method and device for hybrid App Active CN113094281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110467333.5A CN113094281B (en) 2021-04-28 2021-04-28 Test method and device for hybrid App

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110467333.5A CN113094281B (en) 2021-04-28 2021-04-28 Test method and device for hybrid App

Publications (2)

Publication Number Publication Date
CN113094281A CN113094281A (en) 2021-07-09
CN113094281B true CN113094281B (en) 2024-05-03

Family

ID=76680640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110467333.5A Active CN113094281B (en) 2021-04-28 2021-04-28 Test method and device for hybrid App

Country Status (1)

Country Link
CN (1) CN113094281B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114385483B (en) * 2021-12-06 2024-10-29 杭州趣链科技有限公司 Database interface testing method, device, equipment and storage medium
CN115269435A (en) * 2022-08-18 2022-11-01 抖音视界有限公司 A functional interface testing method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6662217B1 (en) * 1999-01-19 2003-12-09 Microsoft Corporation Distributed and automated test administration system for administering automated tests on server computers over the internet
CN106484613A (en) * 2016-09-13 2017-03-08 郑州云海信息技术有限公司 A kind of interface automated test frame based on fitnese
WO2018082462A1 (en) * 2016-11-01 2018-05-11 腾讯科技(深圳)有限公司 Application interface traversing method and system, and testing device
CN109491890A (en) * 2018-10-16 2019-03-19 深圳壹账通智能科技有限公司 The interface scans method and terminal device of application program
CN109828900A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Test script automatic generation method, device, electronic equipment and storage medium
CN110287109A (en) * 2019-06-18 2019-09-27 广州华多网络科技有限公司 Test method, device, computer equipment and its storage medium of protocol interface
WO2019232961A1 (en) * 2018-06-05 2019-12-12 平安科技(深圳)有限公司 Interface automation method and system, computer device, and storage medium
CN110781089A (en) * 2019-10-31 2020-02-11 睿云联(厦门)网络通讯技术有限公司 Method and device for automatically testing UI of equipment, electronic equipment and medium
WO2020082585A1 (en) * 2018-10-25 2020-04-30 深圳壹账通智能科技有限公司 Method and device for interface testing
CN111159049A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Automatic interface testing method and system
CN112115051A (en) * 2020-09-09 2020-12-22 福建新大陆软件工程有限公司 Page traversal detection method, device and equipment for application and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110289484A1 (en) * 2010-05-19 2011-11-24 Also Energy Method and System for Script Processing for Web-Based Applications
US10565095B2 (en) * 2016-12-15 2020-02-18 Syntel, Inc. Hybrid testing automation engine
US20210096979A1 (en) * 2019-10-01 2021-04-01 Visa International Service Association Client automated transaction testing portal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6662217B1 (en) * 1999-01-19 2003-12-09 Microsoft Corporation Distributed and automated test administration system for administering automated tests on server computers over the internet
CN106484613A (en) * 2016-09-13 2017-03-08 郑州云海信息技术有限公司 A kind of interface automated test frame based on fitnese
WO2018082462A1 (en) * 2016-11-01 2018-05-11 腾讯科技(深圳)有限公司 Application interface traversing method and system, and testing device
WO2019232961A1 (en) * 2018-06-05 2019-12-12 平安科技(深圳)有限公司 Interface automation method and system, computer device, and storage medium
CN109491890A (en) * 2018-10-16 2019-03-19 深圳壹账通智能科技有限公司 The interface scans method and terminal device of application program
WO2020082585A1 (en) * 2018-10-25 2020-04-30 深圳壹账通智能科技有限公司 Method and device for interface testing
CN109828900A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Test script automatic generation method, device, electronic equipment and storage medium
CN110287109A (en) * 2019-06-18 2019-09-27 广州华多网络科技有限公司 Test method, device, computer equipment and its storage medium of protocol interface
CN110781089A (en) * 2019-10-31 2020-02-11 睿云联(厦门)网络通讯技术有限公司 Method and device for automatically testing UI of equipment, electronic equipment and medium
CN111159049A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Automatic interface testing method and system
CN112115051A (en) * 2020-09-09 2020-12-22 福建新大陆软件工程有限公司 Page traversal detection method, device and equipment for application and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android智能终端功能测试方法设计与系统实现;刘璐;;软件(第12期);全文 *
HTTP异步接口性能测试方案设计与实践;孙立哲;;计算机应用与软件(第06期);全文 *

Also Published As

Publication number Publication date
CN113094281A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
US7054881B2 (en) Method and system for reporting standardized and verified data
US8515876B2 (en) Dry-run design time environment
CN110908909B (en) Automatic test method, device, storage medium and equipment
CN108509344B (en) Daily cutting batch test method, equipment and readable storage medium
CN107977308A (en) interface test method and device
CN113515453B (en) Webpage testing system
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN111444101A (en) Method and device for automatically creating product test defects
CN113094281B (en) Test method and device for hybrid App
CN116841865A (en) Visual test method and device, electronic equipment and storage medium
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN110737985A (en) Running data verification method and device, computer equipment and readable storage medium
US12222833B2 (en) Method and device for determining coverage in HIL testing, and storage medium
CN115470152B (en) Test code generation method, test code generation device, and storage medium
US10296449B2 (en) Recording an application test
CN115599683A (en) Automatic testing method, device, equipment and storage medium
CN116127212A (en) Data access method, electronic equipment and storage medium
CN114816970A (en) Applet testing method and device, electronic equipment and storage medium
CN111813665A (en) Big data platform interface data testing method and system based on python
CN101251824B (en) Methods and testing tools for testing common object request proxy structures
CN116932414B (en) Method and equipment for generating interface test case and computer readable storage medium
CN115525546B (en) Shell function set test platform, method, equipment and storage medium
CN110109833A (en) Automatic test cases acquisition methods and equipment based on the interface UI
CN107577601B (en) Method and system for positioning execution fault errors of integrated test framework

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