CN112597008A - Function point marking method and device based on webpage code test - Google Patents

Function point marking method and device based on webpage code test Download PDF

Info

Publication number
CN112597008A
CN112597008A CN202011473155.9A CN202011473155A CN112597008A CN 112597008 A CN112597008 A CN 112597008A CN 202011473155 A CN202011473155 A CN 202011473155A CN 112597008 A CN112597008 A CN 112597008A
Authority
CN
China
Prior art keywords
point
functional
function
points
test
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
CN202011473155.9A
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 Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011473155.9A priority Critical patent/CN112597008A/en
Publication of CN112597008A publication Critical patent/CN112597008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The application is applicable to the technical field of software testing, and provides a function point marking method and device based on webpage code testing. The method comprises the following steps: performing embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list; when a webpage code is tested, counting the execution data of the function points in the test process by calling a function point test list; and combining the functional point test list and the statistically obtained execution data to generate an execution record table corresponding to the test process, and marking and displaying the functional points which are not executed in the test process in the execution record table. The method can enable a tester to visually find the unexecuted function points of the webpage code in the testing process and timely follow up the verification of the unexecuted function points, thereby avoiding missing testing, improving the accuracy and effectiveness of test coverage check and ensuring the quality of the webpage code. The application also provides electronic equipment and a storage medium for executing the function point marking method based on the webpage code test.

Description

Function point marking method and device based on webpage code test
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a method and an apparatus for marking a function point based on a web code test, and further, to an electronic device and a storage medium for executing the method for marking a function point based on a web code test.
Background
The internet product generally refers to a product composed of a series of web pages providing internet services, and after code development or code iterative update, the internet product needs to test the code functions of various functions provided by the series of web pages. At present, the existing webpage testing method generally tests through code coverage rate, however, the testing mode through the code coverage rate is easy to have a test missing risk, so that the online webpage code has defects, the accuracy of test coverage inspection is low, the effectiveness is poor, and the webpage code quality is difficult to guarantee.
Disclosure of Invention
In view of this, embodiments of the present application provide a function point marking method and apparatus based on a web code test, and an electronic device and a storage medium for executing the function point marking method based on the web code test, which can avoid missing test, improve accuracy and validity of test coverage check, and ensure web code quality.
A first aspect of an embodiment of the present application provides a method for marking a function point based on a webpage code test, including:
performing embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list;
when a webpage code is tested, counting the execution data of the function points in the test process by calling the function point test list;
and combining the functional point test list and the execution data obtained by statistics to generate an execution record table corresponding to the test process, and marking and displaying the functional points which are not executed in the test process in the execution record table.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the step of performing embedding processing on the to-be-tested webpage code according to the function point to generate the function point test list includes:
analyzing the webpage codes according to the function points to identify code segments corresponding to the function points in the webpage codes;
and embedding the webpage code to be tested in a mode of adding a recording plug-in the code segment corresponding to the functional point, wherein the recording plug-in is used for recording the execution times of the code segment corresponding to the functional point.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the step of performing a site embedding process on the to-be-tested web code according to the function point to generate a function point test list further includes:
counting the total number of application scenes corresponding to the functional points in the webpage codes based on the webpage interface scenes;
and configuring a recording threshold value of the embedded point in the functional point test list according to the total number of the application scenes corresponding to the functional point, wherein the recording threshold value represents the number of times that the functional point corresponding to the embedded point needs to be executed in the test process.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the generating, in combination with the functional point test list and the statistically obtained execution data, an execution record table corresponding to the test procedure, and displaying, in the execution record table, a label of a functional point that is not executed by the test procedure includes:
comparing the statistical execution data corresponding to the function points with the record threshold value corresponding to the function points in the function point test list for the function points in the function point test list;
and if the execution data corresponding to the functional point does not meet the recording threshold requirement, marking and displaying the functional point in the execution recording table.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, if the execution data corresponding to the functional point does not meet the requirement of the record threshold, the step of displaying a mark of the functional point in the execution record table further includes:
and calculating the number of untested application scenes of the functional points in the testing process according to the execution data corresponding to the functional points and the recording threshold value configured corresponding to the functional points in the functional point testing list, and marking and displaying the number of untested application scenes of the functional points in the execution recording list.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the step of counting, by calling the function point test list, execution data of the function point in the test process when the web code test is performed further includes:
acquiring test scene information of the function point;
and when the functional point test list is called to count the execution data of the functional points in the test process, the test scene information of the functional points is recorded together.
With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the generating, in combination with the functional point test list and the statistically obtained execution data, an execution record table corresponding to the test procedure, and displaying, in the execution record table, a label of a functional point that is not executed by the test procedure includes:
performing scene investigation on the function points according to the test scene information of the function points recorded in the execution data obtained by statistics, and determining an application scene of the function points not tested;
and generating an untested scene information table corresponding to the function point in the execution record table according to the untested application scene of the function point.
A second aspect of the embodiments of the present application provides a function point marking device based on a webpage code test, where the function point marking device based on the webpage code test includes:
the embedded point module is used for embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list;
the statistical module is used for counting the execution data of the functional points in the testing process by calling the functional point testing list when the webpage code is tested;
and the generating module is used for generating an execution record table corresponding to the test process by combining the functional point test list and the execution data obtained by statistics, and marking and displaying the functional points which are not executed in the test process in the execution record table.
A third aspect of the embodiments of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the electronic device, where the processor, when executing the computer program, implements the steps of the function point marking method based on the web code test provided in the first aspect.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method for marking a function point based on a webpage code test provided in the first aspect.
The functional point marking method and device based on the webpage code test, the electronic device and the storage medium for executing the functional point marking method based on the webpage code test have the following beneficial effects:
according to the method, a function point test list is generated by performing embedding processing on the webpage codes to be tested according to the function points; when a webpage code is tested, counting the execution data of the function points in the test process by calling the function point test list; and combining the functional point test list and the execution data obtained by statistics to generate an execution record table corresponding to the test process, and marking and displaying the functional points which are not executed in the test process in the execution record table. The method can enable a tester to visually find the unexecuted function points of the webpage code in the testing process and timely follow up the verification of the unexecuted function points, thereby avoiding missing testing, improving the accuracy and effectiveness of test coverage check and ensuring the quality of the webpage code.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a function point marking method based on a web code test according to a first embodiment of the present application;
fig. 2 is a flowchart of a method for marking a functional point based on a web code test according to a second embodiment of the present application;
fig. 3 is a flowchart of a method for marking a function point based on a webpage code test according to a third embodiment of the present application;
fig. 4 is a flowchart of a method for marking a functional point based on a webpage code test according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of an execution record table in a function point marking method based on webpage code testing according to a fourth embodiment of the present application;
fig. 6 is a flowchart of a method for marking a functional point based on a webpage code test according to a fifth embodiment of the present application;
fig. 7 is a flowchart of a method for marking a function point based on a webpage code test according to a sixth embodiment of the present application;
fig. 8 is a schematic diagram of an untested scene information table generated in a function point marking method based on a web code test according to a sixth embodiment of the present application;
fig. 9 is a block diagram illustrating a functional point marking apparatus based on webpage code testing according to a seventh embodiment of the present application;
fig. 10 is a block diagram of an electronic device according to an eighth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a function point marking method based on a web code test according to a first embodiment of the present application. The details are as follows:
step S11: and performing embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list.
In this embodiment, for the webpage code to be tested, when the webpage code is tested, the webpage code may be subjected to a point burying process at the background according to the function point. In this embodiment, the function points are represented as code segments in the web page code, and one embedded point can be configured corresponding to one function point by embedding the code segments in the web page code one by one. In this embodiment, after the point burying processing is completed, a function point test list may be generated by mapping and associating all the function points in the web page code and the buried points corresponding to the function points. The embedded point is used for monitoring and recording the execution condition of the corresponding function point, and the function point test list carries out function execution statistics in the webpage code test process.
Step S12: and when the webpage code is tested, counting the execution data of the function points in the test process by calling the function point test list.
In this embodiment, in the web page code to be tested, the embedded point corresponding to the functional point can identify the execution condition of the code segment corresponding to the functional point in the testing process of the web page code, for example, whether the code segment is executed or not, if the code segment is executed, the embedded point records the functional point and reports the recorded data to the testing server. In this embodiment, the test procedure employs a black box test. The function point test list contains all the function points of the corresponding webpage codes. Based on the data recorded and reported to the testing server, the functional point testing list is called to determine which functional points in the web page code are executed in the testing process, so that the execution data of each functional point of the web page code in the testing process can be obtained through statistics. The execution data includes information whether the function point is executed in the test process.
Step S13: and combining the functional point test list and the execution data obtained by statistics to generate an execution record table corresponding to the test process, and marking and displaying the functional points which are not executed in the test process in the execution record table.
In this embodiment, the execution record table is a record table for reflecting the test conditions of the function points, and records the test conditions of all the function points of the web page code. In the execution log table, the test condition of the function point may be represented as whether the function point is executed. In this embodiment, after the function point test list is called to statistically obtain the execution data of each function point of the web page code in the test process, the function point test list and the statistically obtained execution data may be combined to perform screening and examination, so as to generate an execution record table corresponding to the test process at this time, and the function points that are not executed in the test process at this time are marked and displayed in the execution record table. Specifically, by excluding the function points whose execution data are displayed as executed from the function point test list and marking the function points whose execution data are not displayed, all the function points whose test process is not executed in the execution log list are marked and displayed in the execution log list.
It can be seen from the above that, in the test process, the function point marking method based on the webpage code test provided by this embodiment identifies the execution condition of each function point of the webpage code through the embedded point, counts the function points executed in the test process based on the function point test list generated by the embedded point, further generates the execution record table corresponding to the test process by combining the function point test list and the statistical result, and marks all the unexecuted function points of the webpage code in the test process in the execution record table. The execution record table generated by the method is provided for the tester to check, so that the tester can visually find whether the unexecuted function points exist in the test process of the webpage code at the current time, and can follow up to verify the unexecuted function points in time, thereby avoiding missing test, improving the accuracy and effectiveness of test coverage check, and ensuring the quality of the webpage code.
In some embodiments of the present application, please refer to fig. 2, and fig. 2 is a flowchart of a method for marking a function point based on a webpage code test according to a second embodiment of the present application. The details are as follows:
step S21: analyzing the webpage codes according to the function points to identify code segments corresponding to the function points in the webpage codes;
step S22: and embedding the webpage code to be tested in a mode of adding a recording plug-in the code segment corresponding to the functional point, wherein the recording plug-in is used for recording the execution times of the code segment corresponding to the functional point.
In this embodiment, in the web page code, the function point is implemented by a code segment, that is, one function point corresponds to one code segment. In this embodiment, specifically, the code segments corresponding to the function points in the web page code can be identified by analyzing the web page code according to the function points, so that the web page code is disassembled into the code segments according to the function points. Then, the method realizes the embedding processing of the webpage codes according to the function points by adding a recording plug-in behind each code segment. The recording plug-in is a recording method for monitoring the execution times of the code segments and is used for recording the execution times of the code segments corresponding to the function points. In this embodiment, based on the recording plug-in, the execution times of the code segment corresponding to the function point is recorded in the webpage code testing process, and the execution times recorded in the recording plug-in is added by 1 every time the code segment is executed, so that the test condition of the function point can be reflected by reporting the execution times to the test server.
In some embodiments of the present application, please refer to fig. 3, and fig. 3 is a flowchart of a method for marking a function point based on a webpage code test according to a third embodiment of the present application. The details are as follows:
step S31: counting the total number of application scenes corresponding to the functional points in the webpage codes based on the webpage;
step S32: and configuring a recording threshold value of the embedded point in the functional point test list according to the total number of the application scenes corresponding to the functional point, wherein the recording threshold value represents the number of times that the functional point corresponding to the embedded point needs to be executed in the test process.
In this embodiment, a web page usually has a plurality of application scenarios, that is, one function point in the web page code may have a plurality of different application scenarios, and for example, common function points such as confirm, cancel, search, and the like may generally appear in different application scenarios of one web page. Therefore, the function point corresponding code segment in the web page code may be executed multiple times because the function point exists in multiple different application scenarios. For example, based on different application scenarios, the first scenario, the second scenario, and the third scenario in the web page are all provided with a cancellation function, so that when the first scenario performs the cancellation function, the code segment corresponding to the cancellation function in the web page code will be executed once, when the second scenario performs the cancellation function, the code segment will also be executed once, and when the third scenario performs the cancellation function, the code segment will be executed once again. That is, in the process of testing the web page code, the code segment corresponding to the cancel function needs to be executed three times to test all scenes covering the web page. Therefore, in this embodiment, when the point burying processing is performed on the web page code to be tested according to the function point, the number of the application scenes existing in the web page of each function point can be counted by analyzing and processing the web page corresponding to the web page code according to the function point. After the application scene quantity corresponding to each function point is obtained through statistics, when a function point test list is generated, a recording threshold value of a buried point is configured for each function point in the function point test list according to the application scene quantity corresponding to the function point, and the recording threshold value represents the number of times that the function point corresponding to the buried point needs to be executed in the test process. At this time, when the embedded point identifies the execution condition of the function point in the test process, the embedded point can also count the executed times of the function point, record the counted times information and report the counted times information to the test server. Therefore, whether the testing process covers all application scenes of the function point can be determined by comparing the reported statistical times with the recording threshold value. Aiming at the condition of multiple application scenes of the webpage, whether some scenes are not covered by the test can be reflected, the condition that the scenes are omitted to generate the test missing risk is avoided, the accuracy of test coverage check is improved, and therefore the webpage code quality is guaranteed.
In some embodiments of the present application, please refer to fig. 4, and fig. 4 is a flowchart illustrating a method for marking a function point based on a webpage code test according to a fourth embodiment of the present application. The details are as follows:
step S41: comparing the statistical execution data corresponding to the function points with the record threshold value corresponding to the function points in the function point test list for the function points in the function point test list;
step S42: and if the execution data corresponding to the functional point does not meet the recording threshold requirement, marking and displaying the functional point in the execution recording table.
In this embodiment, the execution data of the function point records the number of times that the code segment corresponding to the function point is executed in the test process. In this embodiment, when the execution record table is generated, the function points in the function point test list are traversed, and for each function point, the statistically obtained execution data corresponding to the function point is compared with the record threshold value configured corresponding to the function point in the function point test list one by one, so as to verify whether the test process covers all application scenarios of the function point. If the execution data corresponding to the function point does not meet the recording threshold requirement, it indicates that there is a missed test scenario for the function point in the test process, and at this time, the execution data corresponding to the function point does not meet the recording threshold requirement, the function point is marked and displayed in the execution record table, specifically, the function point is displayed as an "unexecuted" label, and the label is marked, for example, an underline is configured below the label and the label is made operable, that is, in the execution record table, the "unexecuted" label can be clicked and the like. In this embodiment, the untested application scene number of the functional point in the test process may also be calculated according to the execution data of the functional point and the record threshold configured corresponding to the functional point, and the untested application scene number is marked and displayed in the execution record table. For example, "not executing + 1", indicates that there is a missed measure scenario for the function point.
For example, please refer to fig. 5, fig. 5 is a schematic diagram of an execution record table in a function point marking method based on a web code test according to a fourth embodiment of the present application. As shown in fig. 5, it is assumed that the web page includes three scenarios including a plurality of function points such as query, comparison, confirmation, cancellation, payment, etc., wherein a scenario includes four function points such as query, comparison, confirmation, and cancellation; the scene two packet contains three functional points of comparison, confirmation and cancellation; and the third scene comprises three functional points of payment, confirmation and cancellation. At this time, if the query function point in the first scenario is executed, the comparison function points in the first scenario and the second scenario are executed, the confirmation function points in the first scenario, the second scenario and the third scenario are not executed, the cancellation function points in the first scenario and the third scenario are not executed, and the payment function point in the third scenario is not executed, then in the execution record table, the test execution condition corresponding to the "query" function point row and the "comparison" function point row is recorded and displayed as "executed", the test execution condition corresponding to the "confirmation" function point row is recorded and marked as "unexecuted + 3" and the "unexecuted + 3" label is configured to be operable, similarly, the test execution condition corresponding to the "cancellation" function point row is recorded and marked as "unexecuted + 2" and the "unexecuted + 2" label is configured to be operable, and the test execution condition corresponding to the "payment" function point row is recorded and marked as "unexecuted" and the "label is not executed Configured to be operational.
In some embodiments of the present application, please refer to fig. 6, and fig. 6 is a flowchart illustrating a method for marking a function point based on a webpage code test according to a fifth embodiment of the present application. The details are as follows:
step S61: acquiring test scene information of the function point;
step S62: and when the functional point test list is called to count the execution data of the functional points in the test process, the test scene information of the functional points is recorded together.
In this embodiment, for a case that one function point in a webpage code has multiple webpage application scenarios, the application scenario of the current test of the function point can be identified by acquiring test scenario information of the function point in the test process. The test scenario information of the function point can be represented as test scenario ID information, and is obtained by generating a webpage execution path during test execution. In the process of testing the webpage code, recording an application scene corresponding to a function point when a code segment corresponding to the function point is executed every time, and recording test scene information of the function point when a function point test list is called to count execution data of the function point in the test process, so that which application scenes of the function point are tested and which application scenes are not tested can be obtained, and the application scenes of each function point which are not tested can be reflected in an execution record list when the execution record list is generated subsequently, thereby improving the accuracy and effectiveness of test coverage check, and facilitating the investigation and positioning of missed test scenes.
In some embodiments of the present application, please refer to fig. 7, and fig. 7 is a flowchart illustrating a method for marking a function point based on a webpage code test according to a sixth embodiment of the present application. The details are as follows:
step S71: performing scene investigation on the function points according to the test scene information of the function points recorded in the execution data obtained by statistics, and determining an application scene of the function points not tested;
step S72: and generating an untested scene information table corresponding to the function point in the execution record table according to the untested application scene of the function point.
In this embodiment, the execution data of the function point may further record test scenario information corresponding to each time the code segment corresponding to the function point is executed in the test process. For example, if the current test in the test process is the confirmation function point of the first scene, the test scene information corresponding to the execution of the code segment corresponding to the confirmation function point is the first scene. In this embodiment, based on the statistical execution data of the function point, the function point may be subjected to scene examination according to the test scene information of the function point recorded in the statistical execution data, an application scene of the function point not being tested is determined, and an untested scene information table corresponding to the function point is generated in the execution record table according to the application scene of the function point not being tested. For example, please refer to fig. 8, and fig. 8 is a schematic diagram of an untested scene information table generated in a function point marking method based on a web code test according to a sixth embodiment of the present application. Based on the cancel function points in fig. 5, there are three application scenarios, but the test process is only tested once, that is, only one application scenario is tested, at this time, it can be confirmed that the cancel function point of scenario two is tested through the test scenario information of the function point recorded in the execution data, and then the cancel function points of scenario one and scenario three can be determined through the scenario investigation, so that the untested scenario information table shown in fig. 8 can be generated for the cancel function point in the execution recording table. The untested scene information table may be obtained by clicking "unexecuted + 2" of the test execution condition flag corresponding to the "cancel" functional point row in fig. 5. As shown in fig. 8, the untested scenario information table includes function point information, test scenario ID information, test execution information, and the like. Therefore, the investigation and the positioning of the missed-test scene in the test process can be realized.
Referring to fig. 9, fig. 9 is a block diagram illustrating a functional point labeling apparatus based on a webpage code test according to a seventh embodiment of the present application. The apparatus in this embodiment comprises means for performing the steps of the method embodiments described above. The following description refers to the embodiments of the method. For convenience of explanation, only the portions related to the present embodiment are shown. As shown in fig. 9, the function point marking apparatus based on the webpage code test includes: a buried point module 91, a statistics module 92 and a generation module 93. Wherein: the point burying module 91 is configured to perform point burying processing on the webpage code to be tested according to the function point, and generate a function point test list. The statistical module 92 is configured to perform statistics on execution data of the function points in the test process by calling the function point test list when performing a web code test. The generating module 93 is configured to combine the functional point test list and the statistically obtained execution data to generate an execution record table corresponding to the test process, and mark and display functional points that are not executed in the test process in the execution record table.
It should be understood that the above function point marking device based on the webpage code test corresponds to the above function point marking method based on the webpage code test one by one, and the description thereof is omitted.
Referring to fig. 10, fig. 10 is a block diagram of an electronic device according to an eighth embodiment of the present application. As shown in fig. 10, the electronic apparatus 100 of this embodiment includes: a processor 1001, a memory 1002 and a computer program 1003, such as a program based on a function point marking method of a web code test, stored in said memory 1002 and executable on said processor 1001. The processor 1001, when executing the computer program 1003, implements the steps in the embodiments of the functional point marking method based on the web page code test. Alternatively, the processor 1001, when executing the computer program 1003, implements the functions of the modules in the embodiment corresponding to the functional point marking apparatus based on the web code test. Please refer to the description related to the embodiment, which is not repeated herein.
Illustratively, the computer program 1003 may be divided into one or more modules (units), which are stored in the memory 1002 and executed by the processor 1001 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 1003 in the electronic device 100. For example, the computer program 1003 may be divided into an acquisition module, a processing module, and an execution module, each module having the specific functions described above.
The turntable device may include, but is not limited to, a processor 1001, a memory 1002. Those skilled in the art will appreciate that fig. 10 is merely an example of electronic device 100 and does not constitute a limitation of electronic device 100 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the turntable device may also include input-output devices, network access devices, buses, etc.
The Processor 1001 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 1002 may be an internal storage unit of the electronic device 100, such as a hard disk or a memory of the electronic device 100. The memory 1002 may also be an external storage device of the electronic device 100, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the electronic device 100. Further, the memory 1002 may also include both an internal storage unit and an external storage device of the electronic device 100. The memory 1002 is used for storing the computer programs and other programs and data required by the turntable device. The memory 1002 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments. In this embodiment, the computer-readable storage medium may be nonvolatile or volatile.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A functional point marking method based on webpage code testing is characterized by comprising the following steps:
performing embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list;
when a webpage code is tested, counting the execution data of the function points in the test process by calling the function point test list;
and combining the functional point test list and the execution data obtained by statistics to generate an execution record table corresponding to the test process, and marking and displaying the functional points which are not executed in the test process in the execution record table.
2. The method for marking functional points based on webpage code testing according to claim 1, wherein the step of performing embedding processing on the webpage codes to be tested according to the functional points to generate the functional point test list comprises:
analyzing the webpage codes according to the function points to identify code segments corresponding to the function points in the webpage codes;
and embedding the webpage code to be tested in a mode of adding a recording plug-in the code segment corresponding to the functional point, wherein the recording plug-in is used for recording the execution times of the code segment corresponding to the functional point.
3. The method for marking functional points based on webpage code testing according to claim 1 or 2, wherein the step of performing embedding processing on the webpage code to be tested according to the functional points to generate a functional point test list further comprises:
counting the total number of application scenes corresponding to the functional points in the webpage codes based on the webpage interface scenes;
and configuring a recording threshold value of the embedded point in the functional point test list according to the total number of the application scenes corresponding to the functional point, wherein the recording threshold value represents the number of times that the functional point corresponding to the embedded point needs to be executed in the test process.
4. The method according to claim 3, wherein the step of generating an execution record table corresponding to the testing process by combining the function point testing list and the statistically obtained execution data, and displaying the function points not executed by the testing process in the execution record table by marking includes:
comparing the statistical execution data corresponding to the function points with the record threshold value corresponding to the function points in the function point test list for the function points in the function point test list;
and if the execution data corresponding to the functional point does not meet the recording threshold requirement, marking and displaying the functional point in the execution recording table.
5. The method for marking functional points based on webpage code testing according to claim 4, wherein if the execution data corresponding to the functional points does not satisfy the recording threshold requirement, the step of marking and displaying the functional points in the execution recording table further comprises:
and calculating the number of untested application scenes of the functional points in the testing process according to the execution data corresponding to the functional points and the recording threshold value configured corresponding to the functional points in the functional point testing list, and marking and displaying the number of untested application scenes of the functional points in the execution recording list.
6. The method for marking functional points based on webpage code testing according to claim 1, wherein the step of counting the execution data of the functional points in the testing process by calling the functional point test list when performing the webpage code testing further comprises:
acquiring test scene information of the function point;
and when the functional point test list is called to count the execution data of the functional points in the test process, the test scene information of the functional points is recorded together.
7. The method according to claim 6, wherein the step of generating an execution record table corresponding to the testing process by combining the function point testing list and the statistically obtained execution data, and displaying the function points not executed by the testing process in the execution record table by marking includes:
performing scene investigation on the function points according to the test scene information of the function points recorded in the execution data obtained by statistics, and determining an application scene of the function points not tested;
and generating an untested scene information table corresponding to the function point in the execution record table according to the untested application scene of the function point.
8. A functional point marking device based on webpage code testing is characterized by comprising:
the embedded point module is used for embedding point processing on the webpage codes to be tested according to the function points to generate a function point test list;
the statistical module is used for counting the execution data of the functional points in the testing process by calling the functional point testing list when the webpage code is tested;
and the generating module is used for generating an execution record table corresponding to the test process by combining the functional point test list and the execution data obtained by statistics, and marking and displaying the functional points which are not executed in the test process in the execution record table.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202011473155.9A 2020-12-15 2020-12-15 Function point marking method and device based on webpage code test Pending CN112597008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011473155.9A CN112597008A (en) 2020-12-15 2020-12-15 Function point marking method and device based on webpage code test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011473155.9A CN112597008A (en) 2020-12-15 2020-12-15 Function point marking method and device based on webpage code test

Publications (1)

Publication Number Publication Date
CN112597008A true CN112597008A (en) 2021-04-02

Family

ID=75196113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011473155.9A Pending CN112597008A (en) 2020-12-15 2020-12-15 Function point marking method and device based on webpage code test

Country Status (1)

Country Link
CN (1) CN112597008A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024846A1 (en) * 2011-07-22 2013-01-24 Microsoft Corporation Real-Time Code Coverage Results in AD-HOC Testing
CN103699476A (en) * 2012-09-27 2014-04-02 腾讯科技(深圳)有限公司 Coverage rate testing method and system
CN104063326A (en) * 2014-07-14 2014-09-24 上海零一拼装信息技术有限公司 Software testing data analysis oscilloscope and method
CN107590066A (en) * 2016-07-08 2018-01-16 广州市动景计算机科技有限公司 Method of testing, equipment and the programmable device of application program
CN110196801A (en) * 2018-02-24 2019-09-03 武汉斗鱼网络科技有限公司 A kind of test method and device based on code coverage
CN111338931A (en) * 2020-01-14 2020-06-26 江苏满运软件科技有限公司 Buried point testing method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024846A1 (en) * 2011-07-22 2013-01-24 Microsoft Corporation Real-Time Code Coverage Results in AD-HOC Testing
CN103699476A (en) * 2012-09-27 2014-04-02 腾讯科技(深圳)有限公司 Coverage rate testing method and system
CN104063326A (en) * 2014-07-14 2014-09-24 上海零一拼装信息技术有限公司 Software testing data analysis oscilloscope and method
CN107590066A (en) * 2016-07-08 2018-01-16 广州市动景计算机科技有限公司 Method of testing, equipment and the programmable device of application program
CN110196801A (en) * 2018-02-24 2019-09-03 武汉斗鱼网络科技有限公司 A kind of test method and device based on code coverage
CN111338931A (en) * 2020-01-14 2020-06-26 江苏满运软件科技有限公司 Buried point testing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9317400B2 (en) Code coverage rate determination method and system
CN109871316A (en) A kind of control recognition methods and device
CN112100052B (en) Playback method and device of interface test scene
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN111863649B (en) Finished product testing method and device of chip, terminal equipment and storage medium
CN110543420A (en) Software testing method, system, terminal and storage medium
CN111597069B (en) Program processing method, device, electronic equipment and storage medium
CN113448834A (en) Buried point testing method and device, electronic equipment and storage medium
TW202020713A (en) Evidence collecting and recording method and device and electronic device
CN114253850A (en) Code incremental coverage rate statistical method, device, equipment and storage medium
CN110287700B (en) iOS application security analysis method and device
CN116955097A (en) Test flow display method and device and test flow display system
CN109634822B (en) Function time consumption statistical method and device, storage medium and terminal equipment
CN111124894B (en) Code coverage rate processing method and device and computer equipment
CN109684225A (en) A kind of method for testing software and device
CN114625407A (en) Method, system, equipment and storage medium for implementing AB experiment
CN112597008A (en) Function point marking method and device based on webpage code test
CN110147313B (en) Log output method and device
CN111045915A (en) Safety test method and device based on product function test case
CN113946515A (en) Code coverage rate testing method and device, computer equipment and storage medium
CN114020645A (en) Test method, device, equipment, readable storage medium and computer program product
CN105528932A (en) Method and device for evaluating user recognized character amount
CN111078549A (en) Code coverage rate processing method and device and computer equipment
CN115858354B (en) Test coverage rate calculation method, system, terminal and storage medium
CN115879665B (en) Method and equipment for determining inspection requirements of product configuration and identifying product configuration

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