CN118606186A - Application software testing method and device, storage medium and computer equipment - Google Patents

Application software testing method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN118606186A
CN118606186A CN202410726245.6A CN202410726245A CN118606186A CN 118606186 A CN118606186 A CN 118606186A CN 202410726245 A CN202410726245 A CN 202410726245A CN 118606186 A CN118606186 A CN 118606186A
Authority
CN
China
Prior art keywords
data
page
tested
information
application software
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
CN202410726245.6A
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202410726245.6A priority Critical patent/CN118606186A/en
Publication of CN118606186A publication Critical patent/CN118606186A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for testing application software, a storage medium and computer equipment, which belong to the technical field of software testing and mainly solve the problems of low test efficiency and difficult crash and investigation of the application software in the prior art, and comprise the steps of receiving an application software test instruction carrying page information to be tested and determining a target data modification strategy based on the page information to be tested; performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data; and acquiring the abnormal information in the display process of the page to be tested, and generating an abnormal report based on the abnormal information.

Description

Application software testing method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to a method and apparatus for testing application software, a storage medium, and a computer device.
Background
With the gradual perfection of the functions of the application software, the displayed service modules are richer, and various service activities need to be frequently on-line and off-line, so that each service module needs to be frequently updated and iterated. After each service module updating iteration, software testers are required to test the updated application software so as to improve the compatibility, stability and robustness of the application software.
At present, software testers test updated application software by adopting a method for writing test cases, but the method for writing the test cases is low in efficiency and incomplete, and is difficult to check the problem of crashing the application software caused by unmatched parameter types or format errors of some third-party interfaces, so that the stability and the robustness of the application software are reduced.
Disclosure of Invention
In view of this, the present invention provides a method and apparatus for testing application software, a storage medium, and a computer device, and is mainly aimed at solving the problems of low test efficiency of application software and difficult crash detection of application software in the prior art.
According to one aspect of the present invention, there is provided a method for testing application software, including:
Receiving an application software test instruction carrying page information to be tested, and determining a target data modification strategy based on the page information to be tested;
Performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data;
And acquiring the abnormal information in the display process of the page to be tested, and generating an abnormal report based on the abnormal information.
Further, before receiving the application software test instruction carrying the page information to be tested, the method further includes:
Obtaining background access links of all test pages in application software, and classifying the background access links to obtain different link types;
setting a plurality of data modification strategies, and establishing a corresponding relation between the data modification strategies and the link types.
Further, the determining the target data modification policy based on the page information to be tested includes:
acquiring a page ID from the page information to be tested, and determining a target background access link associated with the page ID;
determining a target link type of the target background access link from different link types by adopting one of fuzzy matching and keyword matching;
And determining a target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type.
Further, the performing data modification on the returned data of the background database based on the target data modification policy, and obtaining modified data includes:
performing access operation on the background database based on the target background access link;
receiving the return data of the background database based on the access operation, and identifying the parameter type of the return data;
and acquiring a data modification method corresponding to the parameter type from the target data modification strategy, and carrying out data modification according to the data modification method to obtain modified data.
Further, the obtaining the abnormal information in the page to be tested displaying process, and generating the abnormal report based on the abnormal information includes:
when page display abnormality is carried out based on the modification data, determining abnormal modification data from the modification data;
acquiring an abnormal data interface and an abnormal field corresponding to the abnormal modification data;
And generating an exception report based on the page information to be tested, the exception data interface and the exception field.
Further, when the page information to be tested includes test page jump information, the method further includes:
Determining second-level page information to be tested based on the page jump information, and determining the target data modification strategy based on the second-level page information to be tested;
performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs secondary page display to be tested based on the modified data;
And acquiring the second-level page abnormality information in the second-level page to be tested displaying process, and adding the second-level page abnormality information into the abnormality information so that the abnormality report comprises the second-level page abnormality information.
Further, the method further comprises:
When at least one newly added background access link is detected, classifying the newly added background access link to obtain the link type corresponding to the newly added background access link;
and determining the target data modification strategy corresponding to the newly added background access link based on the link type so as to modify the data of the returned data based on the target data modification strategy.
According to another aspect of the present invention, there is provided a test apparatus for application software, the apparatus comprising:
The determining module is used for receiving an application software testing instruction carrying page information to be tested and determining a target data modification strategy based on the page information to be tested;
the data modification module is used for carrying out data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software carries out page display to be tested based on the modified data;
The abnormality processing module is used for acquiring the abnormality information in the page display process to be tested and generating an abnormality report based on the abnormality information.
Further, the device further comprises:
the classification module is used for acquiring background access links of all the test pages in the application software and classifying the background access links to obtain different link types;
the corresponding relation setting module is used for setting a plurality of data modification strategies and establishing corresponding relation between the data modification strategies and the link types.
Further, the determining module includes:
A link determining unit, configured to obtain a page ID from the page information to be tested, and determine a target background access link associated with the page ID;
The type determining unit is used for determining the target link type of the target background access link from different link types by adopting one matching method of fuzzy matching and keyword matching;
and the modification strategy determining unit is used for determining a target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type.
Further, the data modification module includes:
The access unit is used for performing access operation on the background database based on the target background access link;
the identification unit is used for receiving the return data of the background database based on the access operation and identifying the parameter type of the return data;
And the modification unit is used for acquiring a data modification method corresponding to the parameter type from the target data modification strategy, and carrying out data modification according to the data modification method to obtain modified data.
Further, the exception handling module includes:
An abnormal data determining unit configured to determine abnormal modification data from the modification data when page presentation abnormality is performed based on the modification data;
the abnormal data related information acquisition unit is used for acquiring an abnormal data interface and an abnormal field corresponding to the abnormal modification data;
and the report generating unit is used for generating an exception report based on the page information to be tested, the exception data interface and the exception field.
Further, the device also comprises a skip page testing module, which is used for determining second-level page information to be tested based on the page skip information when the page information to be tested comprises test page skip information, and determining the target data modification strategy based on the second-level page information to be tested;
performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs secondary page display to be tested based on the modified data;
And acquiring the second-level page abnormality information in the second-level page to be tested displaying process, and adding the second-level page abnormality information into the abnormality information so that the abnormality report comprises the second-level page abnormality information.
Further, the device further comprises a new link processing module, which is used for classifying the new background access link when at least one new background access link is detected, so as to obtain the link type corresponding to the new background access link;
and determining the target data modification strategy corresponding to the newly added background access link based on the link type so as to modify the data of the returned data based on the target data modification strategy.
According to still another aspect of the present invention, there is provided a storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the test method of application software as described above.
According to yet another aspect of the present invention, there is provided a computer device comprising a processor, a memory, a communication interface and a communication bus, said processor, said memory and said communication interface completing communication with each other via said communication bus;
The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the test method of the application software.
By means of the technical scheme, the technical scheme provided by the embodiment of the invention has at least the following advantages:
Compared with the prior art, the method and the device for testing the application software provided by the invention have the advantages that the application software testing instruction carrying the page information to be tested is received, and the target data modification strategy is determined based on the page information to be tested; performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data; the abnormal information in the display process of the page to be tested is obtained, and an abnormal report is generated based on the abnormal information, so that automatic investigation of the problem of crashing of the application software caused by unmatched parameter types or format errors in the application software is realized, and the testing efficiency of the application software is improved.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
Fig. 1 shows a flow diagram of a test method of application software according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another method for testing application software according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a testing method of another application software according to an embodiment of the present invention;
Fig. 4 is a schematic flow chart of a test method of another application software according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of a test device for application software according to an embodiment of the present invention;
fig. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for testing application software, as shown in fig. 1, comprising the following steps:
101. Receiving an application software test instruction carrying page information to be tested, and determining a target data modification strategy based on the page information to be tested;
In the embodiment of the invention, the current execution end receives an application software test instruction carrying page information to be tested, wherein the page information to be tested is related information of one or more pages to be tested in the application software, including a service module where the page is located, a page ID, field information contained in the page, and the like. The current execution end determines a target data modification strategy based on the page information to be tested, wherein the data modification strategy is used for representing a data modification method for modifying data returned by the database into dirty data. The method has the advantages that the data returned by the background database is intercepted in the current execution end and then is modified, so that no influence is caused on the data in the original background database, namely, non-invasive modification is realized, and the problem that dirty data is introduced into a production line due to the fact that the data is tampered or forgetting to return after the test personnel test is effectively avoided. The "dirty data" is used to characterize data inconsistent with the parameter type or format set in each field, for example, the parameter type set by the parameter "name" is a "string" type, and the format is 8 characters, for the parameter "name", the parameter type "0.1" of "float" type is dirty data, the parameter type is a "string" type, but the "aaabbbccc" with the string length of 9 is also dirty data, and the embodiment of the present invention is not limited specifically.
It should be noted that, the data modification policy is configured for each page to be tested in advance, and through the page information to be tested, the corresponding data modification policy can be found, and the found data modification policy corresponding to the page information to be tested is determined as the target data modification policy.
102. Performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data;
In the embodiment of the invention, the current execution terminal carries out data modification on the returned data of the background database based on the target data modification strategy to obtain modified data. For example, the target data modification policy includes: a method of modifying return data of a parameter "name" to dirty data; a method for modifying return data of the parameter "age" into dirty data; a method for modifying return data of a parameter address into dirty data; a method for modifying return data of a KEY1 into dirty data; the embodiment of the present invention is not particularly limited, and may be one or more of a method of modifying returned data of the KEY2 into dirty data, and the like. For example, the target data modification policy includes a method of modifying returned data of the parameter "name" into dirty data and a method of modifying returned data of the KEY1 into dirty data, and after the current execution end receives data in the parameter "name" returned by the background database, the data are modified into dirty data, for example, data with a parameter type of "string" is modified into data with a parameter type of "float" type, a "pool" type, and the like, data with a parameter format of 8 characters is modified into data with a parameter format of 9 characters, data with 7 characters, data with 10 characters, and the like. In addition, after the current execution end receives the value in the KEY1 returned by the background database, the value which is originally of the "int" type is modified to be of the "float" type, or the value which is only 1 digit after the original decimal point is modified to be the value which is only 3 digits after the decimal point, etc., and the embodiment of the invention is not particularly limited. After the application software receives the modified data modified in the current execution end, the page to be tested is displayed based on the modified data, including operations such as page rendering and parameter display.
103. And acquiring the abnormal information in the display process of the page to be tested, and generating an abnormal report based on the abnormal information.
In the embodiment of the invention, when page display abnormality is performed based on modified data, the current execution end acquires abnormality information in the process of displaying the page to be tested. The page display abnormality may be represented by an application software crash, a test page white screen, a test page function unavailable, a test page display visual problem, etc., and the embodiment of the invention is not particularly limited. The exception information includes exception service module information, exception test page information, modification data causing exception, data interface information of original returned data corresponding to the modification data, exception fields, exception time information, exception defect levels, and the like, and the embodiment of the invention is not limited in detail. The abnormal defect level is used for representing different abnormal degrees, such as defining the crash of the application software as a first level, defining the white screen of the test page as a second level, defining the unavailable function of the test page as a third level, defining the visual problem displayed on the test page as a fourth level, and the like.
In the embodiment of the invention, the current execution end determines abnormal modification data which causes abnormality from the modification data, acquires a data interface of original return data corresponding to the abnormal modification data, determines the data interface of the original return data as an abnormal data interface, and acquires an interface name of the abnormal data interface. The current execution end determines the exception field according to the exception modification data, including exception parameters, exception keywords, and the like, and the embodiment of the invention is not particularly limited. The current execution end generates an exception report including information such as an exception data interface, an exception field, exception time information, exception service module information, an exception defect level and the like based on the exception information, and embodiments of the present invention are not limited in detail. After the current execution end generates the exception report, the exception report can be sent to related responsible personnel in the form of mail, and the next test cycle is entered after the exception report is sent out.
Further, as a refinement and expansion of the specific implementation manner of the foregoing embodiment, in order to test the same test means for the same type of test task and improve the configuration efficiency of the test task, another method for testing application software is provided, as shown in fig. 2, before the step of receiving the test instruction of the application software carrying the page information to be tested, the method further includes:
201. obtaining background access links of all test pages in application software, and classifying the background access links to obtain different link types;
in the embodiment of the invention, the current execution end acquires the background access links of all the test pages in the application software, and classifies the background access links to obtain different link types. The current execution end can classify according to the user requirements when the links are classified, such as a background access link to be tested and a background access link not to be tested, and then the background access link to be tested can be classified into different categories according to the service module according to the requirements, namely the background access links in the same service module belong to the same category, such as all the background access links in the service module 1 belong to the link type 1, all the background access links in the service module 2 belong to the link type 2, and the like. The background access links that execute the same function may be divided into the same type as required, for example, all the background access links that execute the function 1 belong to the link type 1, all the background access links that execute the function 2 belong to the link type 2, etc., which is not particularly limited in the embodiment of the present invention. Of course, in addition to the above two classification methods, different link type classification methods may be performed as required, and the embodiment of the present invention is not limited specifically.
It should be noted that, the background access links of different link types can establish a link library according to the types, so that the management and matching of links of the same type in the later period are facilitated, and the embodiment of the invention is not particularly limited.
202. Setting a plurality of data modification strategies, and establishing a corresponding relation between the data modification strategies and the link types.
In the embodiment of the invention, a plurality of data modification strategies are set at a current execution end, wherein the data modification strategy 1 comprises a method for modifying return data of a parameter address into dirty data and a method for modifying return data of a KEY1 into dirty data; the data modification strategy 2 only comprises a method for modifying the returned data of the KEY2 into dirty data; the data modification policy 3 includes a method of modifying the return data of the parameter "name" to dirty data, a method of modifying the return data of the parameter "age" to dirty data, and a method of modifying the return data of the parameter "address" to dirty data; the data modification policy 4 includes a method of modifying the returned data of the KEY1 into dirty data, a method of modifying the returned data of the KEY2 into dirty data, and the like, and the embodiment of the present invention is not limited in detail. The current executing end establishes a corresponding relation between the data modification policy and the link type in advance according to the requirement, for example, establishes a corresponding relation between the data modification policy 1 and the link type 2, establishes a corresponding relation between the data modification policy 3 and the link type 1, and the like.
Further, as a refinement and extension of the foregoing embodiment, in order to automatically determine a dirty data modification scheme and improve test efficiency, another method for testing application software is provided, as shown in fig. 3, where the determining, based on the page information to be tested, a target data modification policy includes:
301. acquiring a page ID from the page information to be tested, and determining a target background access link associated with the page ID;
In the embodiment of the invention, the current execution end acquires the page ID from the page information to be tested, wherein the page ID is used for representing the unique identity information of the page to be tested, one page to be tested possibly contains a plurality of associated background access links, and the current execution end can determine the associated background access links as target background access links through the page ID.
302. Determining a target link type of the target background access link from different link types by adopting one of fuzzy matching and keyword matching;
In the embodiment of the invention, the current execution end adopts one matching method of fuzzy matching and keyword matching to determine the target link type of the target background access link from different link types. When fuzzy matching is adopted by the current execution end, the similarity is calculated between the target background access link and the background access links in all link types, then the similarity is ordered, and the link type of the background access link with the highest similarity is determined as the target link type of the target background access link. When the keyword matching is adopted by the current execution end, the link type to which the keyword belongs needs to be defined first, and when the keyword is contained in the target background access link, the link type to which the keyword belongs is directly determined as the target link type of the target background access link.
303. And determining a target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type.
In the embodiment of the invention, the current execution terminal determines the target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type. In step 202, a corresponding relationship is established between the data modification policy 1 and the link type 2, and a corresponding relationship is established between the data modification policy 3 and the link type 1, and when the target link type is the link type 2, the data modification policy 1 can be determined as the target data modification policy by searching the corresponding relationship; when the target link type is the link type 1, the data modification policy 3 may be determined as a target data modification policy or the like through searching the correspondence, which is not particularly limited in the embodiment of the present invention.
Further, as a refinement and expansion of the foregoing embodiment, in order to automatically perform "dirty data" replacement on data returned by the background database, and improve testing efficiency, another method for testing application software is provided, as shown in fig. 4, the steps of performing data modification on the returned data of the background database based on the target data modification policy, where obtaining modified data includes:
401. Performing access operation on the background database based on the target background access link;
402. Receiving the return data of the background database based on the access operation, and identifying the parameter type of the return data;
403. and acquiring a data modification method corresponding to the parameter type from the target data modification strategy, and carrying out data modification according to the data modification method to obtain modified data.
In the embodiment of the invention, the current execution terminal performs access operation on the background database based on the target background access link. The background access link comprises an access path of a background database, and access operation is performed on the background database based on the access path. The current execution end receives the returned data of the background database based on the access operation, and identifies the parameter types of the returned data, including an 'int' type, a 'string' type, a 'float' type, a 'bool' type, a picture type, a 'flash' type and the like, and the embodiment of the invention is not particularly limited. The current execution end obtains a data modification method corresponding to the parameter type from the target data modification strategy, for example, obtains a modification method for the "int" type data from the target data modification strategy, and can modify the value of the "int" type into the "bool" type and the picture type.
Further, as a refinement and expansion of the specific implementation manner of the foregoing embodiment, in order to meet the requirement of multi-page touch, to implement testing of an associated page in application software, another method for testing application software is provided, where when the page information to be tested includes test page skip information, the method further includes:
Determining second-level page information to be tested based on the page jump information, and determining the target data modification strategy based on the second-level page information to be tested;
performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs secondary page display to be tested based on the modified data;
And acquiring the second-level page abnormality information in the second-level page to be tested displaying process, and adding the second-level page abnormality information into the abnormality information so that the abnormality report comprises the second-level page abnormality information.
In the embodiment of the invention, the current execution terminal determines the second-level page information to be tested based on the page jump information, and determines the target data modification strategy based on the second-level page information to be tested. The page jump information is page jump information when the simulated jump function is executed in the current execution end, for example, a section of characters is automatically filled in an input frame to realize the jump, or a jump button is automatically clicked to realize the jump, etc., and the embodiment of the invention is not particularly limited. After the page jumps, determining the next page to be input as a second-level page to be tested, and acquiring related information of the second-level page to be tested, wherein the related information comprises a service module where the page is located, a page ID, field information contained in the page and the like. The steps of determining the target data modification policy based on the second-level page information to be tested refer to steps 301 to 303, and embodiments of the present invention are not limited in detail. The current execution terminal modifies the returned data of the background database based on the target data modification policy, and the process of obtaining the modified data refers to steps 401 to 403, and embodiments of the present invention are not limited in detail. The current execution end obtains the second-level page abnormality information in the second-level page to be tested displaying process, wherein the second-level page abnormality information comprises second-level abnormality service module information, second-level abnormality test page information, modification data for causing second-level page abnormality, data interface information, abnormality fields, abnormality time information, abnormality defect levels and the like of original return data corresponding to the modification data, and the embodiment of the invention is not particularly limited. The current execution end adds the second-level page abnormality information into the abnormality information of the page before the jump to generate an abnormality report containing the abnormality information of the page before the jump and the abnormality information of the second-level page, and the abnormality conditions of the page under different level depths are reflected in the abnormality report, so that a tester can analyze the influence of the level depths on the defect level conveniently.
Further, as a refinement and expansion of the specific implementation manner of the foregoing embodiment, in order to test the stability of the new function in time before the new function of the application software is online, another method for testing the application software is provided, where the method further includes:
When at least one newly added background access link is detected, classifying the newly added background access link to obtain the link type corresponding to the newly added background access link;
and determining the target data modification strategy corresponding to the newly added background access link based on the link type so as to modify the data of the returned data based on the target data modification strategy.
In the embodiment of the invention, when the current execution end detects at least one newly added background access link, classification processing is carried out on the newly added background access link to obtain the link type corresponding to the newly added background access link, and the current execution end adopts one matching method of fuzzy matching and keyword matching to determine the target link type of the target background access link from different link types. When fuzzy matching is adopted by the current execution end, the similarity is calculated between the target background access link and the background access links in all link types, then the similarity is ordered, and the link type of the background access link with the highest similarity is determined as the target link type of the target background access link. When the keyword matching is adopted by the current execution end, the link type to which the keyword belongs needs to be defined first, and when the keyword is contained in the target background access link, the link type to which the keyword belongs is directly determined as the target link type of the target background access link. The current execution end determines the target data modification policy corresponding to the newly added background access link based on the link type, so that the return data is subjected to data modification based on the target data modification policy, and the process refers to steps 401 to 403, and the embodiment of the invention is not particularly limited.
Compared with the prior art, the method for testing the application software has the advantages that the method receives the application software testing instruction carrying the page information to be tested, and determines the target data modification strategy based on the page information to be tested; performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data; the abnormal information in the display process of the page to be tested is obtained, and an abnormal report is generated based on the abnormal information, so that automatic investigation of the problem of crashing of the application software caused by unmatched parameter types or format errors in the application software is realized, and the testing efficiency of the application software is improved.
As an implementation of the method shown in fig. 1, an embodiment of the present invention provides a testing device for application software, as shown in fig. 5, where the device includes:
The determining module 51 is configured to receive an application software testing instruction carrying page information to be tested, and determine a target data modification policy based on the page information to be tested;
the data modification module 52 is configured to perform data modification on the returned data of the background database based on the target data modification policy, so as to obtain modified data, so that the application software performs the page to be tested display based on the modified data;
the exception handling module 53 is configured to obtain exception information in the display process of the page to be tested, and generate an exception report based on the exception information.
Further, the device further comprises:
the classification module is used for acquiring background access links of all the test pages in the application software and classifying the background access links to obtain different link types;
the corresponding relation setting module is used for setting a plurality of data modification strategies and establishing corresponding relation between the data modification strategies and the link types.
Further, the determining module 51 includes:
A link determining unit, configured to obtain a page ID from the page information to be tested, and determine a target background access link associated with the page ID;
The type determining unit is used for determining the target link type of the target background access link from different link types by adopting one matching method of fuzzy matching and keyword matching;
and the modification strategy determining unit is used for determining a target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type.
Further, the data modification module 52 includes:
The access unit is used for performing access operation on the background database based on the target background access link;
the identification unit is used for receiving the return data of the background database based on the access operation and identifying the parameter type of the return data;
And the modification unit is used for acquiring a data modification method corresponding to the parameter type from the target data modification strategy, and carrying out data modification according to the data modification method to obtain modified data.
Further, the exception handling module 53 includes:
An abnormal data determining unit configured to determine abnormal modification data from the modification data when page presentation abnormality is performed based on the modification data;
the abnormal data related information acquisition unit is used for acquiring an abnormal data interface and an abnormal field corresponding to the abnormal modification data;
and the report generating unit is used for generating an exception report based on the page information to be tested, the exception data interface and the exception field.
Further, the device also comprises a skip page testing module, which is used for determining second-level page information to be tested based on the page skip information when the page information to be tested comprises test page skip information, and determining the target data modification strategy based on the second-level page information to be tested;
performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs secondary page display to be tested based on the modified data;
And acquiring the second-level page abnormality information in the second-level page to be tested displaying process, and adding the second-level page abnormality information into the abnormality information so that the abnormality report comprises the second-level page abnormality information.
Further, the device further comprises a new link processing module, which is used for classifying the new background access link when at least one new background access link is detected, so as to obtain the link type corresponding to the new background access link;
and determining the target data modification strategy corresponding to the newly added background access link based on the link type so as to modify the data of the returned data based on the target data modification strategy.
Compared with the prior art, the embodiment of the invention determines the target data modification strategy based on the page information to be tested by receiving the application software test instruction carrying the page information to be tested; performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data; the abnormal information in the display process of the page to be tested is obtained, and an abnormal report is generated based on the abnormal information, so that automatic investigation of the problem of crashing of the application software caused by unmatched parameter types or format errors in the application software is realized, and the testing efficiency of the application software is improved.
According to one embodiment of the present invention, there is provided a storage medium storing at least one executable instruction for executing the method for testing application software in any of the above method embodiments.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and the specific embodiment of the present invention is not limited to the specific implementation of the computer device.
As shown in fig. 6, the computer device may include: a processor 602, a communication interface Communications Interface, a memory 606, and a communication bus 608.
Wherein: processor 602, communication interface 604, and memory 606 perform communication with each other via communication bus 608.
Communication interface 604 is used to communicate with network elements of other devices, such as clients or other servers.
The processor 602 is configured to execute the program 610, and may specifically perform relevant steps in the test method embodiment of the application software.
In particular, program 610 may include program code including computer-operating instructions.
The processor 602 may be a central processing unit CPU, or an Application-specific integrated Circuit ASIC (Application SPECIFIC INTEGRATED Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the computer device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 606 for storing a program 610. The memory 606 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may be specifically operable to cause the processor 602 to:
Receiving an application software test instruction carrying page information to be tested, and determining a target data modification strategy based on the page information to be tested;
Performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data;
And acquiring the abnormal information in the display process of the page to be tested, and generating an abnormal report based on the abnormal information.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for testing application software, comprising:
Receiving an application software test instruction carrying page information to be tested, and determining a target data modification strategy based on the page information to be tested;
Performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs page display to be tested based on the modified data;
And acquiring the abnormal information in the display process of the page to be tested, and generating an abnormal report based on the abnormal information.
2. The method of claim 1, wherein prior to receiving the application software test instruction carrying the page to be tested information, the method further comprises:
Obtaining background access links of all test pages in application software, and classifying the background access links to obtain different link types;
setting a plurality of data modification strategies, and establishing a corresponding relation between the data modification strategies and the link types.
3. The method of claim 2, wherein the determining a target data modification policy based on the page to be tested information comprises:
acquiring a page ID from the page information to be tested, and determining a target background access link associated with the page ID;
determining a target link type of the target background access link from different link types by adopting one of fuzzy matching and keyword matching;
And determining a target data modification strategy corresponding to the target link type based on the corresponding relation between the data modification strategy and the link type.
4. The method of claim 3, wherein the data modifying the return data of the background database based on the target data modification policy to obtain modified data comprises:
performing access operation on the background database based on the target background access link;
receiving the return data of the background database based on the access operation, and identifying the parameter type of the return data;
and acquiring a data modification method corresponding to the parameter type from the target data modification strategy, and carrying out data modification according to the data modification method to obtain modified data.
5. The method of claim 1, wherein the obtaining anomaly information during the presentation of the page to be tested, and generating an anomaly report based on the anomaly information comprises:
when page display abnormality is carried out based on the modification data, determining abnormal modification data from the modification data;
acquiring an abnormal data interface and an abnormal field corresponding to the abnormal modification data;
And generating an exception report based on the page information to be tested, the exception data interface and the exception field.
6. The method according to any one of claims 1 to 5, wherein when the page information to be tested includes test page jump information, the method further comprises:
Determining second-level page information to be tested based on the page jump information, and determining the target data modification strategy based on the second-level page information to be tested;
performing data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software performs secondary page display to be tested based on the modified data;
And acquiring the second-level page abnormality information in the second-level page to be tested displaying process, and adding the second-level page abnormality information into the abnormality information so that the abnormality report comprises the second-level page abnormality information.
7. The method according to claim 2, wherein the method further comprises:
When at least one newly added background access link is detected, classifying the newly added background access link to obtain the link type corresponding to the newly added background access link;
and determining the target data modification strategy corresponding to the newly added background access link based on the link type so as to modify the data of the returned data based on the target data modification strategy.
8. A test device for application software, comprising:
The determining module is used for receiving an application software testing instruction carrying page information to be tested and determining a target data modification strategy based on the page information to be tested;
the data modification module is used for carrying out data modification on the returned data of the background database based on the target data modification strategy to obtain modified data, so that the application software carries out page display to be tested based on the modified data;
The abnormality processing module is used for acquiring the abnormality information in the page display process to be tested and generating an abnormality report based on the abnormality information.
9. A storage medium having stored therein at least one executable instruction for performing operations corresponding to the method for testing application software according to any one of claims 1-7.
10. A computer device comprising a processor, a memory, a communication interface and a communication bus, said processor, said memory and said communication interface completing communication with each other through said communication bus;
The memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the method for testing application software according to any one of claims 1-7.
CN202410726245.6A 2024-06-05 2024-06-05 Application software testing method and device, storage medium and computer equipment Pending CN118606186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410726245.6A CN118606186A (en) 2024-06-05 2024-06-05 Application software testing method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410726245.6A CN118606186A (en) 2024-06-05 2024-06-05 Application software testing method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN118606186A true CN118606186A (en) 2024-09-06

Family

ID=92558344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410726245.6A Pending CN118606186A (en) 2024-06-05 2024-06-05 Application software testing method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN118606186A (en)

Similar Documents

Publication Publication Date Title
CN110413506B (en) Test case recommendation method, device, equipment and storage medium
CN111553137B (en) Report generation method and device, storage medium and computer equipment
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
CN109189686A (en) Automation regression testing method, apparatus, storage medium and computer equipment
CN110471945B (en) Active data processing method, system, computer equipment and storage medium
CN109800147B (en) Test case generation method and terminal equipment
CN110990285B (en) UI (user interface) automatic testing method and device
CN115576834A (en) Software test multiplexing method, system, terminal and medium for supporting fault recovery
CN113342692B (en) Automatic test case generation method and device, electronic equipment and storage medium
CN113468076A (en) Application program exception testing method, device, equipment and storage medium
CN113344023A (en) Code recommendation method, device and system
CN110177006B (en) Node testing method and device based on interface prediction model
CN110196952B (en) Program code search processing method, device, equipment and storage medium
CN112685275A (en) Algorithm strategy searching method and device, electronic equipment and storage medium
CN118606186A (en) Application software testing method and device, storage medium and computer equipment
CN117851233A (en) Software vulnerability reproduction method based on large language model
CN116340172A (en) Data collection method and device based on test scene and test case detection method
CN113468058B (en) Regression testing method and device for software as service platform and electronic equipment
CN112612882B (en) Review report generation method, device, equipment and storage medium
CN111008140B (en) Cross-platform UI (user interface) automatic testing method and device
CN115185833A (en) Abnormal code processing method and device, computer equipment and storage medium
CN112698883A (en) Configuration data processing method, device, terminal and storage medium
CN113628077A (en) Method for generating non-repeated examination questions, terminal and readable storage medium
CN113111713B (en) Image detection method and device, electronic equipment and storage medium
CN112732681B (en) Data platform migration method and system

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