CN116820954A - Front-end risk testing method and device - Google Patents

Front-end risk testing method and device Download PDF

Info

Publication number
CN116820954A
CN116820954A CN202310761302.XA CN202310761302A CN116820954A CN 116820954 A CN116820954 A CN 116820954A CN 202310761302 A CN202310761302 A CN 202310761302A CN 116820954 A CN116820954 A CN 116820954A
Authority
CN
China
Prior art keywords
case
risk
operation event
change operation
executable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310761302.XA
Other languages
Chinese (zh)
Inventor
徐瑞
李芳敏
唐寅
王永庚
杨道利
王宇
韩扬
张鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202310761302.XA priority Critical patent/CN116820954A/en
Publication of CN116820954A publication Critical patent/CN116820954A/en
Pending legal-status Critical Current

Links

Abstract

One or more embodiments of the present disclosure provide a front-end risk testing method and apparatus, including determining corresponding front-end element information based on a change operation event when the change operation event of a system configuration change is detected, generating a corresponding static test case based on the front-end element information, generating an executable case according to the static test case, and executing the executable case to obtain a risk testing result. In the embodiment of the specification, the processes of front-end element information extraction, static test case generation and executable case test are automatically completed when the system configuration is changed, the front-end risk test can be adaptively realized according to the system configuration change, the front-end risk test efficiency is improved, the risk test process does not need to depend on manual experience, the accurate prevention and control of the front-end risk are realized, and the front-end quality and stability are ensured.

Description

Front-end risk testing method and device
Technical Field
One or more embodiments of the present disclosure relate to the field of software testing, and in particular, to a front-end risk testing method and apparatus.
Background
With the development of internet technology, internet business demands tend to pay more attention to the user experience, so as to gain a larger market by pulling the difference between user susceptibility levels, and the front end is used as a communication bridge between users and products, and the quality assurance is the basis for improving the user experience.
In the related art, identification and test for front-end risks mainly depend on manpower, and discovery and identification for front-end potential risks are mainly depend on manual experience, so that test standardization and test efficiency are low.
Disclosure of Invention
In order to improve testing efficiency and effect on front-end risk, one or more embodiments of the present disclosure provide a front-end risk testing method, device, testing system, and storage medium.
According to a first aspect of one or more embodiments of the present specification, a front-end risk testing method is provided, including
In response to detecting a change operation event of a system configuration change, determining front-end element information corresponding to the change operation event based on the change operation event, wherein the system comprises a front end and a server, and the front-end element information represents the front-end information with an association relation with the change operation event;
generating a static test case corresponding to the change operation event based on the front-end element information;
and generating an executable case according to the static test case, and executing the executable case to obtain a risk test result.
In one or more embodiments of the present disclosure, the determining, in response to detecting a change operation event of a system configuration change, front-end element information corresponding to the change operation event based on the change operation event includes:
In response to detecting a change operation event of a system configuration change, determining a target system object according to the change operation event;
determining front-end page identification and link information associated with the target system object based on a preset association relation;
and extracting front-end information according to the front-end page identification and the link information to obtain the front-end element information.
In one or more embodiments of the present disclosure, the generating, based on the front-end element information, a static test case corresponding to the change operation event includes:
and acquiring case data based on the front-end element information, and carrying out data assembly according to the case data and the front-end element information to obtain the static test case.
In one or more embodiments of the present disclosure, after the generating, based on the front-end element information, a static test case corresponding to the change operation event, the method further includes:
and storing the static test case, and updating the static test case when the configuration parameters of the system object corresponding to the static test case are changed.
In one or more embodiments of the present disclosure, the generating an executable case according to the static test case, and executing the executable case to obtain a risk test result, includes:
Performing case assembly based on the static test case to obtain the executable case;
and sending the executable case to a case testing device for execution to obtain the risk testing result, wherein the case testing device comprises front-end equipment or a virtual machine.
In one or more embodiments of the present disclosure, executing the executable use case to obtain a risk test result includes:
determining the type of the risk test result according to the use case type of the executable use case;
and executing the executable case, and obtaining the risk test result according to the execution result and the type of the risk test result.
In one or more embodiments of the present disclosure, the front-end risk testing method further includes:
and generating alarm information in response to the risk test result being that the risk exists.
According to a second aspect of one or more embodiments of the present specification, there is provided a front-end risk testing apparatus, comprising:
a risk module configured to determine front-end element information corresponding to a change operation event based on the change operation event in response to detecting the change operation event of a system configuration change, the system including a front end and a server, the front-end element information representing front-end information having an association relationship with the change operation event;
An asset module configured to generate a static test case corresponding to the change operation event based on the front-end element information;
and the quality module is configured to generate an executable case according to the static test case and execute the executable case to obtain a risk test result.
In one or more embodiments of the present specification, the risk module is configured to:
in response to detecting a change operation event of a system configuration change, determining a target system object according to the change operation event;
determining front-end page identification and link information associated with the target system object based on a preset association relation;
and extracting front-end information according to the front-end page identification and the link information to obtain the front-end element information.
In one or more embodiments of the present description, the asset module is configured to:
and acquiring case data based on the front-end element information, and carrying out data assembly according to the case data and the front-end element information to obtain the static test case.
In one or more embodiments of the present description, the asset module is configured to:
and storing the static test case, and updating the static test case when the configuration parameters of the system object corresponding to the static test case are changed.
In one or more embodiments of the present specification, the mass module is configured to:
performing case assembly based on the static test case to obtain the executable case;
and sending the executable case to a case testing device for execution to obtain the risk testing result, wherein the case testing device comprises front-end equipment or a virtual machine.
In one or more embodiments of the present specification, the mass module is configured to:
determining the type of the risk test result according to the use case type of the executable use case;
and executing the executable case, and obtaining the risk test result according to the execution result and the type of the risk test result.
In one or more embodiments of the present specification, the mass module is configured to:
and generating alarm information in response to the risk test result being that the risk exists.
According to a third aspect of one or more embodiments of the present specification, there is provided a test system comprising:
a front end and a server comprising a processor and a memory storing computer instructions for causing the processor to perform the method according to any of the embodiments of the first aspect.
According to a fourth aspect of one or more embodiments of the present specification, a storage medium is proposed, storing computer instructions for causing a computer to perform the method according to any embodiment of the first aspect.
According to the front-end risk test method of one or more embodiments of the present disclosure, when a change operation event of system configuration change is detected, corresponding front-end element information is determined based on the change operation event, a corresponding static test case is generated based on the front-end element information, an executable case is generated according to the static test case, and the executable case is executed to obtain a risk test result. In the embodiment of the specification, the processes of front-end element information extraction, static test case generation and executable case test are automatically completed when the system configuration is changed, the front-end risk test can be adaptively realized according to the system configuration change, the front-end risk test efficiency is improved, the risk test process does not need to depend on manual experience, the accurate prevention and control of the front-end risk are realized, and the front-end quality and stability are ensured.
Drawings
Fig. 1 is a schematic diagram of a test system according to an exemplary embodiment of the present disclosure.
Fig. 2 is a block diagram of a front-end risk testing apparatus according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart of a front-end risk testing method according to an exemplary embodiment of the present disclosure.
Fig. 4 is a flowchart of a front-end risk testing method according to an exemplary embodiment of the present disclosure.
Fig. 5 is a flowchart of a front-end risk testing method according to an exemplary embodiment of the present disclosure.
Fig. 6 is a flowchart of a front-end risk testing method according to an exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification may be described as being broken down into multiple steps in other embodiments; while various steps described in this specification may be combined into a single step in other embodiments.
In addition, in the embodiments of the present specification, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) involved are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data is required to comply with the related laws and regulations and standards of the related country and region, and is provided with a corresponding operation portal for the user to select authorization or rejection.
With the development of internet technology, internet business demands tend to pay more attention to the experience of a stock user, so as to gain a larger market by pulling the difference between user perceptions, and the front end plays a vital role as a communication bridge between users and products, and even relates to the aging of the products.
Front-end quality assurance refers to discovering, identifying and testing potential risks possibly existing in the front end, so that the front-end risks are eliminated, and front-end stability is guaranteed. Taking an online shopping platform as an example, when the online shopping platform is used for large-scale sales promotion, a plurality of configuration changes aiming at the front end and the rear end exist, the configuration changes are likely to bring risks to a system, and finally the changes are directly reflected on a front-end page, so that the problems of page faults, inability to pay and the like observed by a user occur. For example, assuming that the configuration of the order interface of the server is changed, the user may possibly cause the page to not jump to the order confirmation page normally after the front end clicks the "order" button. Aiming at the quality assurance of the front end, namely, when the system configuration is changed, a test case is generated for potential risks possibly existing in the front end, and the front-end risk test is carried out according to the test case to confirm whether the risks exist.
In the related art, the front-end quality assurance is mainly performed by means of "manually identifying risks-manually inputting static use cases-manually recording automatic use cases", for example, after the system configuration is changed, judging the risk types by manual experience, and extracting related front-end information to complete use case generation and test. This approach is highly dependent on human experience and is not optimal in terms of both test standardization and test efficiency.
Although some software automatic test schemes exist in the related art, for the front-end risk test scenario, the automatic test schemes only can cover part of services, for example, automatic case test can be realized, and for front-end risk identification caused by configuration change and extraction of case data, manual work is still required, so that more comprehensive front-end risk test cannot be realized.
As can be seen from the above, the front-end risk test in the related art needs to rely on manual experience, the risk test has high cost and low efficiency, and the test effect is difficult to be standardized.
Based on the defects existing in the related art, the embodiment of the specification provides a front-end risk testing method, a device, a testing system and a storage medium, and aims to realize comprehensive automatic testing on front-end risks, reduce testing cost and improve risk testing efficiency and effect.
Fig. 1 shows a schematic view of a scenario of a test system according to some embodiments of the present disclosure, and an application scenario of a front-end risk testing method of the present disclosure is described below with reference to fig. 1.
As shown in fig. 1, the test system includes a client 100 and a server 200, where the client 100 and the server 200 establish a communicable connection in a wireless or wired manner, and the device form of the client 100 includes, but is not limited to, a mobile terminal, a PC (Personal Computer, a personal computer), and the like. Taking a certain online shopping platform as an example, the client 100 may install the shopping software or access the shopping website, so that a page displayed on the client 100 and interacted with by the user is a front-end page, and data interaction can be performed with the back-end server 200 through the front-end page, so as to implement user operations such as page jumping, commodity browsing, order inquiry and the like.
In this embodiment of the present disclosure, the front end is the client 100 directly interacting with the user, the back end is the server 200 interacting with the front end, and the processing can be performed by the server 200 in the front-end risk testing method illustrated in the following description.
For convenience of explanation and understanding, a part of technical terms appearing in the embodiments hereinafter described in the specification will be explained and explained first.
Risk: refers to the potential online risk brought to the front end by system configuration changes (e.g., server port interface changes, server resource changes, front end page parameter changes, etc.).
Assets: the static test case is composed of relevant user scenes, operation lines, necessary data and the like. The user scene is the use scene when the user operates the front-end page. The operation line refers to a route that the user experiences when operating the front page.
Asset preservation: it means that the static test case needs to be adaptively modified according to the latest system configuration change.
And (3) link: the system call link is considered in the process of risk tracing.
The actions are as follows: refers to operations such as clicking, sliding, etc. employed when the user performs a single step operation.
Front-end element information: the information related to the front end, such as the front end page, the front end action, the page jump link, etc., can be used as the front end element information, which is necessary information for generating the static test case.
Test cases: the method refers to the description of a specific test task in software test, and the test scheme, technology and strategy are embodied. The test cases comprise static test cases and executable cases, and the static test cases can be used as static assets and are mainly used for result backtracking, asset management, asset preservation and the like. And the executable use cases are used as automatic execution use cases, and the test results aiming at the risk events are obtained by executing the executable use cases.
Fig. 2 shows a software architecture diagram of the front-end risk testing device in some embodiments of the present disclosure, and is described below in conjunction with fig. 2.
As shown in fig. 2, the front-end risk testing apparatus illustrated in this specification mainly includes 3 architecture levels, respectively: a risk module at the top layer, an asset module at the middle layer, and a quality module at the bottom layer.
The risk module comprises two parts, namely a risk tracing part and a risk definition part, wherein the risk tracing part is mainly used for detecting a change operation event of system configuration change and providing capabilities such as link analysis, flow statistics and the like for the change operation event. The risk definition can complete extraction of the front-end element information related to the change operation event through capabilities of scene extraction, page extraction, line data, action acquisition and the like.
The asset module comprises two parts, namely data assembly and asset precipitation, wherein the data assembly is mainly used for generating a static test case according to front-end element information related to a change operation event, and the static test case can be stored in the system as a static asset. Asset precipitation is mainly used for completing the management, preservation and the like of static test cases through the capabilities of asset management, preservation strategies and the like.
The quality module comprises a use case generation and intelligent coverage, and the use case generation mainly provides the capabilities of use case assembly, execution check, inferior case filtering, use case optimization and the like for the executable use case. The intelligent coverage can perform automatic use case test according to the generated executable use cases, and finish reporting, statistics, inspection and other works according to the test results.
The function of each module of the front-end risk testing device is briefly described herein, and the front-end risk testing method will be specifically described hereinafter.
As shown in fig. 3, in some embodiments, the front-end risk testing method illustrated in the present specification includes:
s310, in response to detecting a change operation event of the system configuration change, front-end element information corresponding to the change operation event is determined based on the change operation event.
In this embodiment of the present disclosure, the system is the system shown in fig. 1 and includes a front end and a server, and in combination with the foregoing, the front end risk refers to a potential online risk brought to the front end by a system configuration change, where the system configuration change may include, for example, a server interface change, a server resource change, a front end page parameter change, and the like, and the potential risk may be brought to the front end due to a change operation event of the system configuration change.
For example, in an example, taking an online shopping platform as an example, when a promotion is online, assuming that an order interface of a server side is changed, after a front-end user clicks an order button on a client side, a risk event that a normal jump to an order confirmation page is likely to occur.
In the embodiment of the present invention, a change operation event of a system configuration change may be detected, and when a certain change operation event is detected, it indicates that a certain system object in the system has a configuration change, which may cause a front-end risk. Therefore, when a change operation event is detected, it is necessary to determine the corresponding front-end element information from the change operation event.
From the foregoing, the front-end element information is related information constituting the front end, and it is understood that when a configuration change occurs in a certain system object, the configuration change may affect a part of the front-end information. For example, in the foregoing example, when the service side order placing interface is changed, the front end "commodity order placing page", "order confirmation page" and "page skip link" referring to the order placing interface may be affected. The front-end element information corresponding to the change operation event described in the specification is all front-end information associated with the change operation event, and the front-end information may include various types of information such as a front-end page, link information, user scene, and the like.
In this embodiment of the present disclosure, the risk module may detect a configuration change operation of each system object in the system, for example, may detect a front end code and a back end code, and when detecting that a code corresponding to a certain system object changes, determine a change operation event in which the configuration change of the system object is detected.
It can be appreciated that in the application development process, an association relationship needs to be configured for each created system object, and other objects or systems associated with the system object are mapped. For example, if the system creates an order interface at the server, all pages and components of the front end referencing the order interface will be recorded in the association relationship. Therefore, in some embodiments of the present specification, when a change operation event in which a configuration of a certain system object is changed is detected, front-end information corresponding to the system object, that is, the front-end element information described in the present specification, may be determined based on the pre-configured association relationship, and the embodiments of the present specification will be described below.
S320, generating a static test case corresponding to the change operation event based on the front-end element information.
In the present embodiment, after the front-end element information related to the change operation event is obtained, it is necessary to generate corresponding test cases from the front-end element information to perform a test for the front-end risk due to the change operation event.
The front-end element information may include, for example, a front-end page corresponding to a change operation event, link information for a page jump, user action information, and the like. For example, in the foregoing example, the change operation event is that the service end order interface is changed, so that the front end element information corresponding to the event may include: the information of the commodity order page and the order confirmation page, the link information of the order confirmation page, the action information of the order button clicked by the user and the like.
In the embodiment of the specification, after the front-end element information is obtained, data assembly is performed according to the front-end element information to obtain the static test case, and the static test case cannot directly execute the test, but can be stored as a static asset, so that the risk tracing and positioning effects are achieved, and the method is very critical for converting the executable case. For example, in the foregoing examples, the static test case may be described as an example of "user enters a merchandise order page-user clicks an order button-automatically jumps to an order confirmation page".
In some embodiments, the asset module may collect related case data based on the front-end element information, and perform data assembly on the case data and the front-end element information according to a preset static case assembly rule, so as to obtain a static test case.
For example, in the foregoing example scenario, the front-end element information extracted by the risk module is mainly fragmented front-end information related to the change operation event, and the asset module needs to further acquire specific necessary information according to the front-end element information, for example, link information in the front-end element information is information of "skip from order page to order confirmation page", and the asset module needs to further acquire network links, skip parameters and the like of the order page and order confirmation page, where the acquired specific information is use case data described in the present specification.
In the embodiment of the specification, after each piece of required case data is collected according to the front-end element information, the fragmented front-end element information and the collected case data can be subjected to data assembly according to the corresponding case assembly rule, so as to obtain the corresponding static test case.
In some embodiments, after the static test cases corresponding to each change operation event are obtained, the static test cases may be stored in the system as static assets. On one hand, the quality module can automatically generate executable cases according to the static test information to carry out automatic test, on the other hand, when the configuration of the system object is changed, the quality module can synchronously update and manage the stored static test cases to realize the preservation of static assets, and the description is described below.
S330, generating an executable case according to the static test case, and executing the executable case to obtain a risk test result.
In the embodiment of the specification, after the static test case is obtained, the quality module needs to generate a corresponding executable case according to the static test case, namely, the static test case describing that the user enters a commodity order page, the user clicks an order button and automatically jumps to an order confirmation page is converted into the executable case of the computer.
In some embodiments, an automation test script may be utilized to perform case assembly according to a static test case to obtain an executable case, and in the related art, there are many automation test scripts for the executable case, which can be understood and fully implemented by those skilled in the art with reference to the related art, and this description is omitted herein.
In the embodiment of the present specification, after the executable case is obtained, the executable case needs to be executed, so that the corresponding risk test result is obtained. For example, in the foregoing example scenario, for a change operation event of a single interface change under a server, after an executable case corresponding to the change operation event is obtained through the foregoing process, the executable case may be run, and a risk test result corresponding to the change operation event is obtained.
In some embodiments, in conjunction with the scenario example of fig. 1, after obtaining the executable case, the server may run the executable case on the front-end device, may run the executable case on the server, and may also run the executable case through interaction between the front-end and the server, which is not limited in this specification. In other embodiments, the server may also create a use case testing environment including a front-end virtual machine and a back-end virtual machine by generating a virtual machine, where the executable use case is obtained by executing the virtual machine, which will be understood by those skilled in the art, and will not be described in detail in this specification.
In some embodiments, after the risk test result is obtained, if the risk test result is that there is a risk, which indicates that the change operation event generates a risk to the front end, alarm information may be generated, and the alarm information is reported to a downstream quality assurance system to prompt a developer that the front end risk occurs. If the risk test result is that the risk is not found, the change operation event is indicated not to influence the front-end stability, and alarm information is not needed to be reported, so that the risk test is completed.
It can be understood that through the method process of the foregoing embodiment of the present disclosure, when a configuration change is performed on a front end or a server, a system may automatically complete, through the foregoing process, a process of extracting front-end element information, generating a static test case, and testing an executable case when a change operation event of the configuration change is detected each time, so as to obtain a risk test result corresponding to each change operation event, so that a developer only needs to adjust and avoid a front-end risk according to the reported risk test result, and the whole risk test process does not need to rely on a manual experience, thereby realizing accurate prevention and control of the front-end risk, and guaranteeing quality and stability of the front-end.
According to the method and the device, in the embodiment of the specification, the processes of front-end element information extraction, static test case generation and executable case test are automatically completed when the system configuration is changed, front-end risk test can be adaptively realized according to the system configuration change, front-end risk test efficiency is improved, manual experience is not needed in the risk test process, accurate prevention and control of front-end risks are realized, and front-end quality and stability are guaranteed.
As shown in fig. 4, in some embodiments, the front-end risk testing method illustrated in the present specification determines front-end element information corresponding to a change operation event based on the change operation event, including:
s311, in response to detecting a change operation event of the system configuration change, determining a target system object according to the change operation event.
According to the foregoing, in the application development process, when the front end or the server side configuration of the system is changed, a corresponding change operation event may be detected, so that a system object with a changed configuration, that is, a target system object described in the present specification, may be determined according to the change operation time.
For example, in an exemplary scenario, taking an online large promotion activity of a certain online shopping platform as an example, when an application is developed for the activity, a configuration change is performed for an order interface of a server, so that a system can detect a change operation event of the order interface for the configuration change, and then determine that a target system object for the configuration change is the "server order interface" according to the change operation event.
Of course, it should be understood that the foregoing is merely an example of the present disclosure, and in other embodiments, the target system object may be another object of the server, for example, a server resource, another interface of the server, or the like, or the target system object may also be an object of the front end, for example, in a case where the configuration of the front end page is changed, the target system object is a front end page, which will be understood by those skilled in the art, and will not be repeated herein.
S312, based on a preset association relation, determining a front-end page identification and link information associated with the target system object.
In this embodiment of the present disclosure, the preset association relationship refers to an association relationship between each system object and front-end element information associated with each system object in a system configuration. For example, in some embodiments, in the application development process, an association relationship is configured for each created system object, and other objects or systems associated with the system object are mapped.
After the target system object with the configuration change is determined, the front-end page identification and the link information associated with the target system object can be determined according to the preset association relation.
In an example scenario, taking the foregoing "server side order interface" as an example, the target system object may determine, according to the "server side order interface" through a preset association relationship, a front end page identifier and link information associated with the server side order interface in the front end. In this example, the front end page identifier includes the identifiers of "commodity order page" and "order confirmation page", and the link information includes the link information of "the user clicks the order button of the commodity order page, and the commodity order page jumps to the order confirmation page".
S313, extracting the front-end information according to the front-end page identification and the link information to obtain the front-end element information.
According to the method, after the front-end page identification and the link information are obtained, the front-end page information corresponding to the front-end page identification can be extracted from the front-end information according to the front-end page identification and the link information.
For example, in the foregoing example scenario, front-end page information corresponding to the "commodity order page" and the "order confirmation page" is extracted from the front-end code based on the front-end page identifiers of the "commodity order page" and the "order confirmation page", and then front-end element information, front-end page information corresponding to the "commodity order page" and the "order confirmation page" and link information including the "jump from the commodity order page to the order confirmation page" are obtained according to the link information.
As can be seen from the above, in the embodiments of the present disclosure, each time a change operation event in which a configuration change occurs in a system object is detected, extraction and generation of front-end element information corresponding to the change operation event can be automatically completed, and a data base is laid for subsequent use case asset generation and automatic use case testing.
As shown in fig. 5, in some embodiments, the front-end risk testing method illustrated in the present specification, a process of generating a static test case includes:
s510, collecting case data based on the front-end element information, and carrying out data assembly according to the case data and the front-end element information to obtain a static test case.
Based on the foregoing, the front-end element information extracted by the risk module is mainly fragmented front-end information related to the change operation event, and the asset module needs to further acquire specific necessary information according to the front-end element information. Therefore, in the embodiment of the present specification, after the front-end element information is obtained, the required case data may be further collected according to the front-end element information, and the static test case may be obtained by data assembling according to the case data and the front-end element information.
For example, in the foregoing example, the link information in the front-end element information is "jump from order-placing page to order-confirming page", and the asset module further collects the network links, jump parameters, etc. of the order-placing page and the order-confirming page, and these collected specific information is the use case data described in the present specification. After the required case data is collected, the fragmented front-end element information and the collected case data can be subjected to data assembly according to the corresponding case assembly rule to obtain the corresponding static test case. Those skilled in the art can refer to the foregoing embodiments, and the details are not repeated here.
S520, storing the static test case, and updating the static test case when the configuration parameters of the system object corresponding to the static test case are changed.
In the embodiment of the specification, after the static test case corresponding to the change operation event is obtained, the static test case may be stored as a static asset in the system.
It can be understood that, each time the configuration of the system object is changed, the static test case of the change operation event can be obtained and stored through the above method process. And under the condition that the static test cases of the system objects are stored in the system, the static test cases stored in the history can be updated based on the latest configuration parameter change, so that the asset preservation is realized.
For example, taking the scenario shown in the foregoing as an example, in the development process of the historical application, the configuration change is performed on the server-side issuing interface, so that the production and storage of the static test case for the server-side issuing interface are realized through the steps of the method. In the subsequent development process, the configuration parameters of the server side lower single interface are changed again, so that the system can update the related parameters of the static test cases stored in the history according to the configuration parameters of the current change under the condition that the system detects the change operation event of the server side lower single interface configuration change, and the static test cases stored in the asset platform are kept in the latest state, thereby realizing asset preservation.
Of course, it will be understood by those skilled in the art that the management of the static assets by the asset platform is not limited to the above-mentioned refreshing operation, and may include, for example, adding, deleting, etc., which will not be repeated herein.
It is worth to be noted that, in the embodiment of the present specification, the stored static test case may also be used for subsequent risk tracing, for example, when a risk test result is obtained and there is a risk, the static test case may be used to find and locate the front-end element with an abnormality, so that subsequent avoidance and elimination of the risk are facilitated.
According to the method and the device, in the embodiment of the specification, after the static test cases are generated, the static test cases can be stored, so that the static assets are formed, a data base is laid for subsequent automatic case tests, management and fresh-keeping of the static assets are realized, and risk tracing is facilitated.
As shown in fig. 6, in some embodiments, the front-end testing method illustrated in the present specification executes a process that an executable use case obtains a risk test result, including:
s610, determining the type of the risk test result according to the use case type of the executable use case.
S620, executing the executable use case, and obtaining a risk test result according to the execution result and the type of the risk test result.
In the embodiment of the specification, the system object types of configuration changes are considered to be numerous, so that the risk test results of corresponding types can be generated for different system objects.
For example, in some embodiments, after the executable use case is obtained, the type of risk test result may be determined according to the use case type of the executable use case. The use case type of the executable use case refers to a test type for automatically testing the executable use case, for example, the executable use case is a use case for comparing two front-end pages, and the use case type is page comparison; for another example, if the executable use case is a use case for detecting whether the front page has an abnormality, the type of the use case is "abnormality judgment"; for another example, the executable use case is a use case for detecting whether the jump between the front-end pages is abnormal, and the type of the use case is "response judgment". Of course, those skilled in the art will understand that the use case type is not limited to this example, and this will not be repeated in this specification.
After determining the use case type of the executable use case, the use case type of the executable use case can be determined as the type of the risk test result. Then, an execution result corresponding to the executable use case can be obtained by running the executable use case, and a final risk test result is output according to the execution result and the type of the risk test result. For example, the executable case is a case for detecting whether the jump between the front-end pages is abnormal, the execution result is "risk exists", and the risk test result output according to the type of the execution result and the risk test result may be "jump abnormality exists in the front-end pages".
According to the method and the device, in the embodiment of the specification, the final risk test result is obtained according to the use case type of the executable use case, so that a more visual and effective front-end test result is provided for a developer, rapid tracing and risk positioning are facilitated, and the front-end test efficiency and effect are improved.
Referring to fig. 2, in some embodiments of the present disclosure, a front-end risk testing apparatus is provided, which includes:
a risk module configured to determine front-end element information corresponding to a change operation event based on the change operation event in response to detecting the change operation event of the system configuration change, the system including a front end and a server, the front-end element information representing front-end information having an association relationship with the change operation event;
The asset module is configured to generate a static test case corresponding to the change operation event based on the front-end element information;
and the quality module is configured to generate an executable case according to the static test case and execute the executable case to obtain a risk test result.
According to the method and the device, in the embodiment of the specification, the processes of front-end element information extraction, static test case generation and executable case test are automatically completed when the system configuration is changed, front-end risk test can be adaptively realized according to the system configuration change, front-end risk test efficiency is improved, manual experience is not needed in the risk test process, accurate prevention and control of front-end risks are realized, and front-end quality and stability are guaranteed.
In one or more embodiments of the present specification, the risk module is configured to:
in response to detecting a change operation event of a system configuration change, determining a target system object according to the change operation event;
determining front-end page identification and link information associated with a target system object based on a preset association relation;
and extracting the front-end information according to the front-end page identification and the link information to obtain the front-end element information.
As can be seen from the above, in the embodiments of the present disclosure, each time a change operation event in which a configuration change occurs in a system object is detected, extraction and generation of front-end element information corresponding to the change operation event can be automatically completed, and a data base is laid for subsequent use case asset generation and automatic use case testing.
In one or more embodiments of the present description, the asset module is configured to:
and acquiring case data based on the front-end element information, and carrying out data assembly according to the case data and the front-end element information to obtain the static test case.
In one or more embodiments of the present description, the asset module is configured to:
and storing the static test cases, and updating the static test cases when configuration parameters of system objects corresponding to the static test cases are changed.
According to the method and the device, in the embodiment of the specification, after the static test cases are generated, the static test cases can be stored, so that the static assets are formed, a data base is laid for subsequent automatic case tests, management and fresh-keeping of the static assets are realized, and risk tracing is facilitated.
In one or more embodiments of the present description, the quality module is configured to:
performing case assembly based on the static test case to obtain an executable case;
and sending the executable use case to a use case testing device for execution to obtain a risk testing result, wherein the use case testing device comprises front-end equipment or a virtual machine.
In one or more embodiments of the present description, the quality module is configured to:
Determining the type of the risk test result according to the use case type of the executable use case;
and executing the executable use case, and obtaining a risk test result according to the type of the execution result and the risk test result.
In one or more embodiments of the present description, the quality module is configured to:
and generating alarm information in response to the risk test result being that the risk exists.
According to the method and the device, in the embodiment of the specification, the final risk test result is obtained according to the use case type of the executable use case, so that a more visual and effective front-end test result is provided for a developer, rapid tracing and risk positioning are facilitated, and the front-end test efficiency and effect are improved.
As shown in connection with fig. 1, one or more embodiments of the present disclosure provide a test system comprising:
front end is client 100 shown in fig. 1, and server end is server end 200 shown in fig. 1.
In some embodiments, the server includes a processor and a memory storing computer instructions for causing the processor to perform the method of any of the preceding embodiments.
In one or more embodiments of the present specification, there is provided a storage medium storing computer instructions for causing a computer to perform the method of any of the preceding embodiments.
Fig. 7 is a schematic structural diagram of an apparatus according to an exemplary embodiment, and the electronic apparatus may be the foregoing client 100 or the server 200, which is not limited in this specification.
Referring to fig. 7, at the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, memory 708, and non-volatile storage 710, although other scenarios may also include the hardware required. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 702 reading a corresponding computer program from the non-volatile storage 710 into the memory 708 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes certain embodiments of the present description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (10)

1. A front-end risk testing method, comprising:
in response to detecting a change operation event of a system configuration change, determining front-end element information corresponding to the change operation event based on the change operation event, wherein the system comprises a front end and a server, and the front-end element information represents the front-end information with an association relation with the change operation event;
generating a static test case corresponding to the change operation event based on the front-end element information;
and generating an executable case according to the static test case, and executing the executable case to obtain a risk test result.
2. The method of claim 1, the determining front-end element information corresponding to a change operation event based on the change operation event in response to detecting the change operation event of a system configuration change, comprising:
In response to detecting a change operation event of a system configuration change, determining a target system object according to the change operation event;
determining front-end page identification and link information associated with the target system object based on a preset association relation;
and extracting front-end information according to the front-end page identification and the link information to obtain the front-end element information.
3. The method of claim 1, the generating a static test case corresponding to the change operation event based on the front-end element information, comprising:
and acquiring case data based on the front-end element information, and carrying out data assembly according to the case data and the front-end element information to obtain the static test case.
4. The method of any one of claims 1 to 3, further comprising, after the generating of the static test case corresponding to the change operation event based on the front-end element information:
and storing the static test case, and updating the static test case when the configuration parameters of the system object corresponding to the static test case are changed.
5. The method of claim 1, wherein the generating the executable case according to the static test case and executing the executable case to obtain the risk test result comprises:
Performing case assembly based on the static test case to obtain the executable case;
and sending the executable case to a case testing device for execution to obtain the risk testing result, wherein the case testing device comprises front-end equipment or a virtual machine.
6. The method of claim 1, executing the executable instance to obtain a risk test result, comprising:
determining the type of the risk test result according to the use case type of the executable use case;
and executing the executable case, and obtaining the risk test result according to the execution result and the type of the risk test result.
7. The method of claim 1 or 6, further comprising:
and generating alarm information in response to the risk test result being that the risk exists.
8. A front-end risk testing apparatus, comprising:
a risk module configured to determine front-end element information corresponding to a change operation event based on the change operation event in response to detecting the change operation event of a system configuration change, the system including a front end and a server, the front-end element information representing front-end information having an association relationship with the change operation event;
an asset module configured to generate a static test case corresponding to the change operation event based on the front-end element information;
And the quality module is configured to generate an executable case according to the static test case and execute the executable case to obtain a risk test result.
9. A test system, comprising:
a front end and a server comprising a processor and a memory, the memory storing computer instructions for causing the processor to perform the method according to any one of claims 1 to 7.
10. A storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202310761302.XA 2023-06-25 2023-06-25 Front-end risk testing method and device Pending CN116820954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310761302.XA CN116820954A (en) 2023-06-25 2023-06-25 Front-end risk testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310761302.XA CN116820954A (en) 2023-06-25 2023-06-25 Front-end risk testing method and device

Publications (1)

Publication Number Publication Date
CN116820954A true CN116820954A (en) 2023-09-29

Family

ID=88116129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310761302.XA Pending CN116820954A (en) 2023-06-25 2023-06-25 Front-end risk testing method and device

Country Status (1)

Country Link
CN (1) CN116820954A (en)

Similar Documents

Publication Publication Date Title
CN108563548B (en) Abnormality detection method and apparatus
CN109063920B (en) Transaction risk identification method and device and computer equipment
CN106341248B (en) Fault processing method and device based on cloud platform
CN106657192B (en) Method and equipment for presenting service calling information
CN112580914A (en) Method and device for realizing enterprise-level data middling platform system for collecting multi-source data
CN109062769B (en) Method, device and equipment for predicting IT system performance risk trend
CN110334012B (en) Risk assessment method and device
CN107016028B (en) Data processing method and apparatus thereof
CN112286790A (en) Full link test method, device, equipment and storage medium
CN117234916A (en) Workflow application testing method and device, electronic equipment and storage medium
CN110991241B (en) Abnormality recognition method, apparatus, and computer-readable medium
CN110490132B (en) Data processing method and device
CN111144987A (en) Abnormal shopping behavior limiting method, limiting assembly and shopping system
CN109345249B (en) Payment failure processing method and device
CN111143151B (en) Service monitoring method and device and electronic equipment
CN110389897A (en) SDK logic test method, device, storage medium and server
CN116820954A (en) Front-end risk testing method and device
CN115391224A (en) Flow playback method and device, computer equipment and readable storage medium
KR102418796B1 (en) FMEA failure mode recommend system
CN109992614B (en) Data acquisition method, device and server
CN112990937A (en) Resource data acquisition method and device, computer equipment and storage medium
CN110648222A (en) Analysis method and system for identifying college student network loan risk based on operator data
CN110765006A (en) Flow testing method and device, computer readable storage medium and electronic device
CN113590488B (en) System test method and test platform for simulating financial data support
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage medium

Legal Events

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