Test processing method and device

By detecting and updating the login information of the Web application test account, the login pressure and cumbersome testing problems caused by the expiration of the login information are solved, and more efficient testing is achieved.

CN119025411APending Publication Date: 2024-11-26ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992879.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

During the testing process of web applications, frequent login needs to be logged in after the validity of the login information expires, resulting in high login pressure, cumbersome testing, and it is difficult for the existing technology to effectively manage and update the login information of the test account, affecting the testing efficiency.

Method used

Through the detection cycle of the detection task, the centralized login information of the test account of the web application is detected, the target login information is obtained, and the interactive processing is performed to update the invalid login information as the valid login information, and in the login information of the update login information and the remaining test account are login information. Query valid login information for testing processing.

Benefits of technology

It reduces the login pressure of web applications during the testing process, improves testing efficiency, simplifies the testing process, ensures the effective status of the login information, and avoids test failure caused by system risk control interception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025411A_ABST
    Figure CN119025411A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test processing method and device.The test processing method comprises the steps that in the process of updating login information, information detection is conducted on login information of all test accounts in a test account set of a Web application according to the detection period of a detection task, and target login information matched with the detection task is obtained, interactively processing the target login information and the Web application to obtain an interaction processing result, and updating the target login information according to the interaction processing result to obtain updated login information, so as to query effective login information of a target test account corresponding to the test task in the updated login information and login information of residual test accounts. And testing the Web application based on the effective login information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data processing technology, and in particular to a test processing method and device. Background Art

[0002] Web (World Wide Web) application is an Internet-based application that is accessed through a browser, such as games and social media. The use of browsers allows Web applications to be compatible with most standard computers and operating systems. For Web applications, which provide services to the outside world through front-end Web pages, they usually include UI (user interface) automated testing and interface testing. Therefore, how to better perform various tests such as UI automated testing and interface testing on Web applications has gradually become the focus of attention of all parties. Summary of the invention

[0003] One or more embodiments of the present specification provide a test processing method, including: performing information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtaining the target login information matching the detection task. Performing interactive processing with the Web application based on the target login information, and obtaining an interactive processing result. Performing update processing on the target login information according to the interactive processing result, and obtaining updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and performing test processing on the Web application based on the valid login information.

[0004] One or more embodiments of the present specification provide a test processing device, including: a detection module, configured to perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information matching the detection task. An interactive processing module, configured to perform interactive processing with the Web application based on the target login information, and obtain an interactive processing result. An update processing module, configured to perform update processing on the target login information according to the interactive processing result, and obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and perform test processing on the Web application based on the valid login information.

[0005] One or more embodiments of the present specification provide a test processing device, including: a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor: performs information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtains the target login information matching the detection task. Performs interactive processing with the Web application based on the target login information to obtain an interactive processing result. Performs update processing on the target login information according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and performs test processing on the Web application based on the valid login information.

[0006] One or more embodiments of the present specification provide a computer-readable storage medium for storing computer-executable instructions, which implement the following steps when executed: perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information that matches the detection task. Perform interactive processing with the Web application based on the target login information to obtain an interactive processing result. Perform update processing on the target login information according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and perform test processing on the Web application based on the valid login information. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0008] Figure 1 A schematic diagram of an implementation environment of a test processing method provided for one or more embodiments of this specification;

[0009] Figure 2 A process flow chart of a test processing method provided for one or more embodiments of this specification;

[0010] Figure 3 A processing flow chart of a test processing method applied to a first test scenario provided in one or more embodiments of this specification;

[0011] Figure 4 A processing flow chart of a test processing method applied to a second test scenario provided in one or more embodiments of this specification;

[0012] Figure 5 A processing flow chart of a test processing method applied to a third test scenario provided in one or more embodiments of this specification;

[0013] Figure 6 A schematic diagram of a test processing device embodiment provided for one or more embodiments of this specification;

[0014] Figure 7 A schematic diagram of the structure of a test processing device provided for one or more embodiments of this specification. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0016] The test processing method provided in one or more embodiments of this specification can be applied to the implementation environment of the information management system. Figure 1 , the implementation environment at least includes:

[0017] An information management system 101 and a Web application 102 for managing and updating login information.

[0018] Among them, the information management system 101 can be deployed on a computer device, which can be a mobile phone, a personal computer, a tablet computer, an e-book reader, a wearable device, a device for information interaction based on AR (Augmented Reality) / VR (Virtual Reality), a laptop computer, etc. The computer device can also be a server, and the server can be a single server, or a server cluster composed of several servers, or one or more cloud servers in a cloud computing platform.

[0019] The Web application 102 may be deployed on a server, which may be a single server, or a server cluster consisting of a plurality of servers, or one or more cloud servers in a cloud computing platform.

[0020] In this implementation environment, the information management system 101 performs information detection on the login information of each test account in the test account set of the Web application 102 stored in the storage unit according to the detection cycle of the detection task, obtains the target login information matching the detection task, obtains the interaction processing result by interactively processing with the Web application 102 through the target login information, updates the target login information according to the interaction processing result, obtains the updated login information, queries the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and performs test processing on the Web application 102 based on the valid login information.

[0021] One or more embodiments of a test processing method provided in this specification are as follows:

[0022] Reference Figure 2 The test processing method provided in this embodiment specifically includes steps S202 to S206.

[0023] Step S202 , performing information detection on the login information of each test account in the test account set of the Web application according to the detection period of the detection task, and obtaining target login information matching the detection task.

[0024] The detection task described in this embodiment refers to a detection task for performing information detection on the login information of each test account in the test account set of the Web application; the detection task includes a first detection task and / or a second detection task; optionally, the detection task includes a first detection task for detecting invalid login information of the Web application and / or a second detection task for detecting valid login information of the Web application; the detection period of the first detection task is less than the detection period of the second detection task, the detection period of the first detection task may also be equal to the detection period of the second detection task, and the detection period of the first detection task may also be greater than the detection period of the second detection task; the detection period of the second detection task may be determined according to the effective duration of the login information of the Web application.

[0025] The login information in this embodiment includes information indicating whether the test account is logged in and other information. The login information may be a cookie. The specific information carried in the cookie may include a login identifier, user operation information, etc. The specific information carried is not specifically limited here. Invalid login information in this embodiment includes login information whose status is invalid or whose login information is empty, such as a cookie whose status is invalid or an empty cookie. Valid login information refers to login information whose status is valid.

[0026] The test account set of the Web application refers to a set of one or more test accounts for testing the Web application; optionally, the target login information includes invalid login information, and the target login information includes at least one valid login information; that is, the target login information may include at least one invalid login information and / or at least one valid login information.

[0027] In actual applications, during the testing of Web applications, it may be necessary to keep the account logged in. However, for Web applications, the login information has a validity period, and the login information expires after the validity period expires. During this process, if the test account is not logged in, the test account needs to be logged in during the testing of the Web application. When a large number of test tasks are executed at the same time, it may cause a large login pressure on the Web application and make the testing process cumbersome. In view of this, in order to simplify the testing process and reduce the login pressure of the Web application during the testing process, a detection task can be introduced. According to the detection task, the login information of each test account in the test account set of the Web application is updated regularly, so that the login information of the test account can remain valid. In this way, the login pressure of the Web application during the testing process is reduced and the testing efficiency is improved by testing with the login information in the valid state.

[0028] Specifically, in the process of performing information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task to obtain the target login information matching the detection task, at least one invalid login information can be detected and obtained in the login information of each test account in the test account set of the Web application according to the detection cycle of the first detection task; or, at least one valid login information can be detected and obtained in the login information of each test account in the test account set of the Web application according to the detection cycle of the second detection task.

[0029] In addition, in order to improve the detection flexibility of the detection task, at least one invalid login information and at least one valid login information can also be detected in the login information of each test account in the test account set of the Web application at the same time; specifically, in the process of performing information detection on the login information of each test account in the test account set of the Web application according to the detection period of the detection task to obtain the target login information matching the detection task, at least one invalid login information and at least one valid login information can also be detected in the login information of each test account in the test account set of the Web application according to the detection period of the detection task; the at least one valid login information here can be the remaining login information in the login information of each test account except at least one invalid login information; the detection period of the detection task here can be the detection period of a single detection task.

[0030] Step S204: performing interaction processing with the Web application based on the target login information to obtain an interaction processing result.

[0031] The above-mentioned information detection is performed on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task to obtain the target login information matching the detection task. In this step, the interactive processing is performed with the Web application based on the target login information to obtain the interactive processing result.

[0032] In actual applications, there is invalid login information in the login information of each test account in the test account set of the Web application. For the test of the Web application, there may be a need to restore the invalid login information to valid login information. In view of this, in order to ensure the smooth progress of the application test of the Web application, the invalid login information can be updated; in the first optional implementation mode provided by this embodiment, on the basis that the above-mentioned target login information includes invalid login information, in the process of performing interactive processing with the Web application based on the target login information and obtaining the interactive processing result, login interactive processing can be performed with the Web application based on the test account corresponding to the invalid login information to obtain the login interactive result. Specifically, the following operations can be performed:

[0033] Based on the test account corresponding to the invalid login information, account login processing is performed on the login interface of the Web application to obtain a login request of the test account;

[0034] The login request is sent to a server, and login information of the test account generated based on the login request and returned by the server is obtained.

[0035] The login interface of the Web application may be a login interface displayed in a browser, that is, the Web application may be displayed in a browser, and the browser is deployed in the information management system.

[0036] On this basis, in order to realize the automation of account login and improve the convenience and efficiency of account login, in an optional implementation manner provided by this embodiment, in the process of performing account login processing on the login interface of the Web application based on the test account corresponding to the invalid login information and obtaining the login request of the test account, the following operations are performed:

[0037] The account login use case is called and executed to control the browser to input the test account in the login interface, and a login request for the test account is generated by triggering the login control of the login interface.

[0038] The account login use case refers to a login scheme, method and strategy for testing account login. The server may be a Web server corresponding to the Web application.

[0039] It should be noted that the invalid login information may be at least one invalid login information, that is, one or more; in the process of performing interactive processing with the Web application based on the target login information to obtain the interactive processing result, account login processing may be performed on the login interface of the Web application based on the test account corresponding to each invalid login information in at least one invalid login information to obtain a login request for the test account; the login request is sent to the server, and the login information of the test account generated based on the login request and returned by the server is obtained.

[0040] In actual application scenarios, valid login information existing in the login information of each test account in the test account set of the Web application may actually have expired, that is, changed to an invalid state. In view of this, in order to timely perceive the state change of the valid login information, when the valid login information is changed to an invalid state, the state of the valid login information can be updated, so that new valid login information can be obtained by logging in to the account in a timely manner through the invalid login information, forming a virtuous circle. At the same time, in order to increase the effective time of the valid login information, the validity of the valid login information is maintained; in the second optional implementation mode provided by this embodiment, on the basis that the above-mentioned target login information includes at least one valid login information, in the process of performing interactive processing with the Web application based on the target login information and obtaining the interactive processing result, interface interactive processing can be performed with the Web application based on the target login information to obtain the interface interactive result, and the following operations can be specifically performed:

[0041] Generating, according to each valid login information in the at least one valid login information, each data processing request for the data interface accessed by the Web application;

[0042] The data processing requests are transmitted to the data interface, and the data processing results of the data processing requests returned by the data interface are obtained.

[0043] The data interface may be any (arbitrary) data interface accessed by the Web application. The data interfaces corresponding to the valid login information may be the same or different.

[0044] In addition, in the process of interactively processing with the Web application based on the target login information to obtain the interactive processing result, a data processing request for the data interface accessed by the Web application can also be generated according to the valid login information, the data processing request is transmitted to the data interface, and the data processing result of the data processing request returned by the data result is obtained.

[0045] Step S206, updating the target login information according to the interactive processing result, obtaining updated login information, querying the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and testing the Web application based on the valid login information.

[0046] The above-mentioned interactive processing with the Web application is performed with the help of the target login information to obtain the interactive processing result. In this step, the target login information is updated according to the interactive processing result to obtain the updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

[0047] The remaining test accounts in this embodiment refer to the remaining test accounts in the test account set except the test account corresponding to the updated login information; the test task refers to a test task for testing a Web application; the test task includes an interface test task and / or an interface test task; the target test account refers to a test account of the Web application required to execute the test task; the target test account may be included in the test account set.

[0048] Based on the first optional implementation mode of performing the interactive processing described above, in the first optional implementation mode provided by this embodiment, in the process of updating the target login information according to the interactive processing result and obtaining the updated login information, the following operations are performed:

[0049] Updating the invalid login information to the login information of the test account returned by the server;

[0050] The state of the login information of the test account is marked as a valid state, and the valid login information of the test account is obtained.

[0051] The login information of the test account may be the login information of the test account generated by the server after completing the account login of the test account. The login information in this embodiment has a state, and the state includes a valid state and an invalid state; the login information in the valid state may be called valid login information, and the login information in the invalid state may be called invalid login information.

[0052] By logging in to the test account corresponding to the invalid login information, the login information of the new test account generated after the account login is obtained. The login information is the valid login information of the test account, so as to effectively change the invalid login information of the test account, which helps to maintain the valid status of the login information of each test account of the Web application, thereby improving the testing efficiency of Web application testing through valid login information, eliminating the tedious login process in the Web application testing process, and decoupling the login process from the testing process to avoid test failures caused by system risk control interception.

[0053] Based on the first optional implementation method of updating the target login information provided above, in order to improve the consistency and convenience of detection, the following operations may also be performed:

[0054] Generate data processing requests for the data interface accessed by the Web application according to the valid login information of the test account;

[0055] The data processing requests are transmitted to the data interface, and a data processing result of a processing result type of a processing failure type is determined among the data processing results of the data processing requests transmitted back by the data interface;

[0056] Update the valid state of the valid login information corresponding to the determined data processing result to an invalid state, and obtain the invalid login information of the corresponding test account; thereby query the valid login information of the target test account corresponding to the test task in the invalid login information of the corresponding test account and the login information of the remaining test accounts, and test the Web application based on the valid login information.

[0057] As described in the second optional implementation mode for interactive processing provided above, each data processing request is transmitted to the data interface accessed by the Web application. On this basis, in the second optional implementation mode provided by this embodiment, in the process of updating the target login information according to the interactive processing result and obtaining the updated login information, the following operations are performed:

[0058] Determine the data processing results whose processing result types are processing failure types among the data processing results;

[0059] The valid state of the valid login information corresponding to the determined data processing result is updated to an invalid state, and the invalid login information of the corresponding test account is obtained.

[0060] The processing result type of each data processing result includes a processing success type and a processing failure type. The corresponding test account includes a test account corresponding to the valid login information corresponding to the determined data processing result.

[0061] By introducing a data interface, the invalid login information that is stored as valid login information in the login information of each test account in the test account center of the Web application is detected, and then the invalid login information is effectively changed in time, forming a virtuous cycle to ensure the validity of the login information.

[0062] Furthermore, in order to improve the security of data processing for each data processing request, in an optional implementation manner provided in this embodiment, each data processing result is obtained by:

[0063] Verify whether the valid login information carried in each data processing request is in a real and valid state;

[0064] If not, for the first data processing request with valid login information in an abnormally valid state, generating a processing failure result as a data processing result of the first data processing request;

[0065] If so, data processing is performed on the request parameters carried in the second data processing request carrying the valid login information in a real and valid state to obtain a data processing result of the second data processing request.

[0066] The real valid state refers to the state of the valid login information being actually a valid state. The valid login information in the abnormal valid state refers to the valid login information in a state that is not actually a real valid state. The processing result type of the processing failure result is the processing failure type.

[0067] During the specific execution process, in order to improve the convenience and flexibility of detecting the login information, the first detection task can be executed on the basis of the second detection task, that is, after updating each valid login information in at least one valid login information and obtaining the invalid login information of the corresponding test account, the state change of the invalid login information is realized by account login; in an optional implementation manner provided by this embodiment, after the above-mentioned updating of the valid state of the valid login information corresponding to the determined data processing result to the invalid state and obtaining the invalid login information of the corresponding test account, the following operations are also performed:

[0068] Performing account login processing on the login interface of the Web application based on the corresponding test account to obtain a login request of the corresponding test account;

[0069] Sending the login request to a server to generate login information of the corresponding test account based on the login request;

[0070] The invalid login information is updated according to the login information of the corresponding test account returned by the server, and the status of the login information of the corresponding test account is marked as a valid status; thereby, the valid login information of the target test account corresponding to the test task is queried in the login information of the corresponding test account and the login information of the remaining test accounts, and the Web application is tested based on the valid login information.

[0071] In actual applications, for testing of Web applications, in order to improve the comprehensiveness of testing of Web applications, the testing may include interface testing and interface testing. In addition, other types of testing may also be included. In a first optional implementation manner provided in this embodiment, in the process of testing the Web application based on the valid login information, the following operations are performed:

[0072] Storing the valid login information in the browser's login information configuration for the Web application to obtain an updated login information configuration;

[0073] An interface test case of the Web application is executed based on the updated login information configuration to perform an interface test on the Web application.

[0074] The login information configuration refers to the login information record for the Web application stored in the browser. The interface test case may be a UI automation test case.

[0075] Specifically, in the process of executing the interface test case of the Web application based on the updated login information configuration to perform interface testing on the Web application, the valid login information of the target test account can be read from the updated login information configuration, and the interface test case of the Web application can be executed based on the valid login information to perform interface testing on the Web application.

[0076] In a second optional implementation manner provided by this embodiment, in the process of testing the Web application based on the valid login information, the following operations are performed:

[0077] Generate an interface test request for a Web application containing the valid login information;

[0078] The test interface of the Web application is accessed according to the interface test request, and the test result of the test interface is determined according to the response result returned by the test interface.

[0079] Specifically, valid login information of the target test account can be written into the request header for interface testing of the Web application to obtain an interface test request, which is then passed into the test interface of the Web application, and the test result of the test interface is determined based on the response result returned by the test interface.

[0080] It should be noted that the operation of generating an interface test request for the Web application containing the valid login information and the operation of accessing the test interface of the Web application according to the interface test request and determining the test result of the test interface according to the response result returned by the test interface can be performed once or multiple times. After being performed once or multiple times, the test results of the test interface are counted, and the total test result of the test interface is determined based on the statistical results.

[0081] It should be supplemented that each optional implementation method in steps S202 to S206 in the test processing method provided in this embodiment can be executed independently as needed, or can be combined and referenced with each other. At the same time, each specific execution step in each optional implementation method can also be executed independently, and this embodiment does not make specific limitations.

[0082] In summary, the one or more test processing methods provided in the present embodiment detect and obtain at least one invalid login information in the login information of each test account in the test account set of the Web application according to the detection cycle of the first detection task, perform account login processing on the login interface of the Web application based on the test account corresponding to each invalid login information in the at least one invalid login information, obtain a login request of the test account, send the login request to the server to generate the login information of the test account based on the login request, update each invalid login information to the login information of the test account returned by the server, mark the status of the login information of the test account as a valid status, obtain the valid login information of the test account, query the valid login information of the target test account corresponding to the test task in the valid login information of the test account and the login information of the remaining test accounts, and perform test processing on the Web application based on the valid login information of the target test account;

[0083] And / or, according to the detection cycle of the second detection task, at least one valid login information is detected and obtained from the login information of each test account in the test account set of the Web application, and each data processing request for the data interface accessed by the Web application is generated according to each valid login information in the at least one valid login information, and each data processing request is transmitted to the data interface, and the data processing result of each data processing request returned by the data interface is obtained, and the data processing result type of each data processing result is determined to be a data processing result of the processing failure type, and the valid state of the valid login information corresponding to the determined data processing result is updated to an invalid state, and the invalid login information of the corresponding test account is obtained, so as to query the valid login information of the target test account corresponding to the test task in the invalid login information of the corresponding test account and the login information of the remaining test accounts, and test the Web application based on the valid login information of the target test account; in this way, by performing regular detection and regular status update on the login information of each test account in the test account set of the Web application, the login information of each test account is kept valid, thereby eliminating the login process in the actual testing process of the Web application, reducing the login pressure of the Web application in the testing process, and improving the testing efficiency.

[0084] The following uses the application of a test processing method provided in this embodiment in the first test scenario as an example to further illustrate the test processing method provided in this embodiment. Figure 3 , the test processing method applied to the first test scenario specifically includes the following steps.

[0085] Step S302: According to the detection cycle of the detection task, at least one invalid cookie is detected in the cookies of each test account in the test account set of the Web application.

[0086] Step S304, calling and executing the account login use case to control the browser to input the test account corresponding to each invalid Cookie in the login interface of the Web application, and generating a login request for the test account by triggering the login control of the login interface.

[0087] Step S306: Send the login request to the server, and obtain the cookie of the test account generated based on the login request returned by the server.

[0088] Step S308: Update each invalid Cookie to the Cookie of the test account returned by the server.

[0089] Step S310, mark the status of the test account's Cookie as valid, obtain the test account's valid Cookie, query the test account's valid Cookie and the remaining test account's Cookie for the target test account's valid Cookie corresponding to the test task, and perform interface testing on the Web application based on the target test account's valid Cookie.

[0090] It should be noted that any one of steps S302 to S310 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S206 according to the needs of implementation and deployment, and will not be described one by one here.

[0091] The following uses the application of a test processing method provided in this embodiment in the second test scenario as an example to further illustrate the test processing method provided in this embodiment. Figure 4 , the test processing method applied to the second test scenario specifically includes the following steps.

[0092] Step S402: According to the detection cycle of the detection task, at least one valid cookie is detected from the cookies of each test account in the test account set of the Web application.

[0093] Step S404: Generate data processing requests for the data interface accessed by the Web application according to each valid Cookie in the at least one valid Cookie.

[0094] Step S406: each data processing request is transmitted to the data interface, and the data processing result of each data processing request transmitted back by the data interface is obtained.

[0095] Step S408: determining data processing results of which the processing result type is a processing failure type among the data processing results.

[0096] Step S410, updates the valid state of the valid Cookie corresponding to the determined data processing result to an invalid state, obtains the invalid Cookie of the corresponding test account, queries the valid Cookie of the target test account corresponding to the test task in the invalid Cookie of the corresponding test account and the Cookie of the remaining test accounts, and performs interface testing on the Web application based on the valid Cookie of the target test account.

[0097] It should be noted that any one of steps S402 to S410 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S206 according to the needs of implementation and deployment, and will not be described one by one here.

[0098] The following uses the application of a test processing method provided in this embodiment in the third test scenario as an example to further illustrate the test processing method provided in this embodiment. Figure 5 , the test processing method applied to the third test scenario specifically includes the following steps.

[0099] Step S502: According to the detection cycle of the detection task, at least one valid cookie is detected and obtained from the cookies of each test account in the test account set of the Web application.

[0100] Step S504: Generate data processing requests for the data interface accessed by the Web application according to each valid Cookie in the at least one valid Cookie.

[0101] Step S506: each data processing request is transmitted to the data interface, and the data processing result of each data processing request transmitted back by the data interface is obtained.

[0102] Step S508: determining data processing results of which the processing result type is a processing failure type among the data processing results.

[0103] Step S510, updating the valid state of the valid Cookie corresponding to the determined data processing result to an invalid state, and obtaining the invalid Cookie of the corresponding test account.

[0104] Step S512, calling and executing the account login use case to control the browser to input the test account in the login interface of the Web application, and generating a login request for the test account by triggering the login control of the login interface.

[0105] Step S514: Send the login request to the server, and obtain the cookie of the test account generated based on the login request returned by the server.

[0106] Step S516, update the invalid Cookie to the Cookie of the test account returned by the server, and mark the status of the Cookie of the test account as valid, obtain the valid Cookie of the test account, query the valid Cookie of the target test account corresponding to the test task in the valid Cookie of the test account and the Cookie of the remaining test accounts, and test the Web application based on the valid Cookie of the target test account.

[0107] It should be noted that any one of steps S502 to S516 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S206 according to the needs of implementation and deployment, and will not be described one by one here.

[0108] An embodiment of a test processing device provided in this specification is as follows:

[0109] In the above-mentioned embodiment, a test processing method is provided, and correspondingly, a test processing device is also provided, which will be described below with reference to the accompanying drawings.

[0110] Reference Figure 6 , which shows a schematic diagram of an embodiment of a test processing device provided in this embodiment.

[0111] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.

[0112] This embodiment provides a test processing device, including:

[0113] The detection module 602 is configured to perform information detection on the login information of each test account in the test account set of the Web application according to the detection period of the detection task, and obtain the target login information matching the detection task;

[0114] The interactive processing module 604 is configured to perform interactive processing with the Web application based on the target login information to obtain an interactive processing result;

[0115] The update processing module 606 is configured to update the target login information according to the interaction processing result, obtain the updated login information, query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

[0116] An embodiment of a test processing device provided in this specification is as follows:

[0117] Corresponding to the test processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a test processing device, which is used to execute the test processing method provided above. Figure 7 A schematic diagram of the structure of a test processing device provided for one or more embodiments of this specification.

[0118] This embodiment provides a test processing device, including:

[0119] like Figure 7As shown, the test processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 may be a short-term storage or a persistent storage. The application stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the test processing device. Furthermore, the processor 701 may be configured to communicate with the memory 702 to execute a series of computer executable instructions in the memory 702 on the test processing device. The test processing device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input / output interfaces 705, one or more keyboards 706, etc.

[0120] In a specific embodiment, the test processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the test processing device, and the one or more programs configured to be executed by one or more processors include computer executable instructions for performing the following:

[0121] Perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information matching the detection task;

[0122] Performing interactive processing with the Web application based on the target login information to obtain an interactive processing result;

[0123] The target login information is updated according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

[0124] An embodiment of a computer-readable storage medium provided in this specification is as follows:

[0125] Corresponding to the test processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a computer-readable storage medium.

[0126] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions, and the computer-executable instructions implement the following steps when executed:

[0127] Perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information matching the detection task;

[0128] Performing interactive processing with the Web application based on the target login information to obtain an interactive processing result;

[0129] The target login information is updated according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

[0130] It should be noted that the embodiment of a computer-readable storage medium in this specification and the embodiment of a test processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.

[0131] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. For example, the device embodiment, equipment embodiment and computer-readable storage medium embodiment are similar to the method embodiment, so the description is relatively simple. To read the relevant contents in the device embodiment, equipment embodiment and computer-readable storage medium embodiment, please refer to the partial description of the method embodiment.

[0132] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0133] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0134] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0136] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0137] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable test processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable test processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0139] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable test processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0140] These computer program instructions may also be loaded onto a computer or other programmable test processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process described in the flow. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0142] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0145] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0146] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0147] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A test processing method, comprising: Perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information matching the detection task; Performing interactive processing with the Web application based on the target login information to obtain an interactive processing result; The target login information is updated according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

2. The test processing method according to claim 1, wherein the target login information includes invalid login information; Accordingly, performing interactive processing with the Web application based on the target login information to obtain an interactive processing result includes: Based on the test account corresponding to the invalid login information, account login processing is performed on the login interface of the Web application to obtain a login request of the test account; The login request is sent to a server, and login information of the test account generated based on the login request and returned by the server is obtained.

3. The test processing method according to claim 2, wherein the step of performing account login processing on the login interface of the Web application based on the test account corresponding to the invalid login information to obtain a login request of the test account comprises: The account login use case is called and executed to control the browser to input the test account in the login interface, and a login request for the test account is generated by triggering the login control of the login interface.

4. The test processing method according to claim 2, wherein the updating process of the target login information according to the interactive processing result to obtain the updated login information comprises: Updating the invalid login information to the login information of the test account returned by the server; The state of the login information of the test account is marked as a valid state, and the valid login information of the test account is obtained.

5. The test processing method according to claim 1, wherein the target login information includes at least one valid login information; Accordingly, performing interactive processing with the Web application based on the target login information to obtain an interactive processing result includes: Generating, according to each valid login information in the at least one valid login information, each data processing request for the data interface accessed by the Web application; The data processing requests are transmitted to the data interface, and the data processing results of the data processing requests returned by the data interface are obtained.

6. The test processing method according to claim 5, wherein the updating process of the target login information according to the interactive processing result to obtain the updated login information comprises: Determine the data processing results whose processing result types are processing failure types among the data processing results; The valid state of the valid login information corresponding to the determined data processing result is updated to an invalid state, and the invalid login information of the corresponding test account is obtained.

7. The test processing method according to claim 6, wherein each data processing result is obtained by: Verify whether the valid login information carried in each data processing request is in a real and valid state; If not, for the first data processing request with valid login information in an abnormally valid state, generating a processing failure result as a data processing result of the first data processing request; If so, data processing is performed on the request parameters carried in the second data processing request carrying the valid login information in a real and valid state to obtain a data processing result of the second data processing request.

8. The test processing method according to claim 6, wherein after the operation of updating the valid state of the valid login information corresponding to the determined data processing result to an invalid state and obtaining the invalid login information of the corresponding test account is performed, the method further comprises: Performing account login processing on the login interface of the Web application based on the corresponding test account to obtain a login request of the corresponding test account; Sending the login request to a server to generate login information of the corresponding test account based on the login request; The invalid login information is updated according to the login information of the corresponding test account returned by the server, and the status of the login information of the corresponding test account is marked as a valid status.

9. The test processing method according to claim 1, wherein the testing process of the Web application based on the valid login information comprises: Storing the valid login information in the browser's login information configuration for the Web application to obtain an updated login information configuration; An interface test case of the Web application is executed based on the updated login information configuration to perform an interface test on the Web application.

10. The test processing method according to claim 1, wherein the testing process of the Web application based on the valid login information comprises: Generate an interface test request for a Web application containing the valid login information; The test interface of the Web application is accessed according to the interface test request, and the test result of the test interface is determined according to the response result returned by the test interface.

11. The test processing method according to claim 1, wherein the detection task comprises a first detection task for detecting invalid login information of the Web application and / or a second detection task for detecting valid login information of the Web application; The detection period of the first detection task is shorter than the detection period of the second detection task; and the detection period of the second detection task is determined according to the effective duration of the login information of the Web application.

12. A test processing device, comprising: The detection module is configured to perform information detection on the login information of each test account in the test account set of the Web application according to the detection period of the detection task, and obtain the target login information matching the detection task; An interaction processing module, configured to perform interaction processing with the Web application based on the target login information to obtain an interaction processing result; The update processing module is configured to update the target login information according to the interaction processing result, obtain the updated login information, query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

13. A test processing device comprising: processor; and a memory configured to store computer executable instructions that, when executed, cause the processor to: Perform information detection on the login information of each test account in the test account set of the Web application according to the detection cycle of the detection task, and obtain the target login information matching the detection task; Performing interactive processing with the Web application based on the target login information to obtain an interactive processing result; The target login information is updated according to the interactive processing result to obtain updated login information, so as to query the valid login information of the target test account corresponding to the test task in the updated login information and the login information of the remaining test accounts, and test the Web application based on the valid login information.

14. A computer-readable storage medium for storing computer-executable instructions, wherein the computer-executable instructions implement the steps of the method of claim 1 when executed.