CN117851265A - Test method, test device, electronic equipment and storage medium - Google Patents

Test method, test device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117851265A
CN117851265A CN202410146054.2A CN202410146054A CN117851265A CN 117851265 A CN117851265 A CN 117851265A CN 202410146054 A CN202410146054 A CN 202410146054A CN 117851265 A CN117851265 A CN 117851265A
Authority
CN
China
Prior art keywords
test
tested
code
test result
result
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
CN202410146054.2A
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202410146054.2A priority Critical patent/CN117851265A/en
Publication of CN117851265A publication Critical patent/CN117851265A/en
Pending legal-status Critical Current

Links

Landscapes

  • Geophysics And Detection Of Objects (AREA)

Abstract

The disclosure relates to the technical field of computers, and discloses a testing method, a testing device, electronic equipment and a storage medium, wherein the testing method comprises the following steps: the method comprises the steps that codes to be tested and test configuration are obtained, the codes to be tested comprise branch codes to be tested and trunk branch codes, the test configuration comprises a test environment and a path of a test control, the test environment is used for providing a data source for buried point test, and the test control is a control corresponding to the trunk branch codes; performing embedded point test on the code to be tested and the trunk branch code based on the test configuration to obtain a corresponding first embedded point test result and a corresponding second embedded point test result; and determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result so as to obtain the test result of the branch code to be tested. The method improves the accuracy and efficiency of the branch merging stuck point of the branch code to be tested by combining the embedded point with the automatic control test.

Description

Test method, test device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a testing method, a testing device, electronic equipment and a storage medium.
Background
In iteratively updating an application of an interaction class, it is often involved in the merging of the branch code of the updated portion with the main branch code. If the branch code of the updated portion has a problem, the merged application will have a problem. Thus, merging test of branch code with main branch code is involved.
Disclosure of Invention
In view of the above, the present disclosure provides a testing method, a testing device, an electronic device, and a storage medium, so as to solve the testing problem of code merging.
In a first aspect, the present disclosure provides a test method comprising:
acquiring a code to be tested and a test configuration, wherein the code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of a test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code;
performing buried point test on the code to be tested and the trunk branch code based on the test configuration to obtain a corresponding first buried point test result and a corresponding second buried point test result;
and determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result so as to obtain the test result of the branch code to be tested.
In a second aspect, the present disclosure provides a test method comprising:
displaying a test page, wherein the test page comprises a code submitting control;
acquiring an interaction result with the code submitting control, and uploading a branch code to be tested, wherein the code to be tested comprises the branch code to be tested and a trunk branch code;
and acquiring and displaying the test result of the branch code to be tested in the code to be tested, wherein the test result is obtained according to the test method of the first aspect or any corresponding implementation mode of the first aspect.
In a third aspect, the present disclosure provides a test apparatus, the apparatus comprising:
the system comprises an acquisition module, a test control module and a test control module, wherein the acquisition module is used for acquiring a code to be tested and a test configuration, the code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of the test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code;
the embedded point testing module is used for respectively carrying out embedded point testing on the code to be tested and the trunk branch code based on the testing configuration to obtain a corresponding first embedded point testing result and a corresponding second embedded point testing result;
And the test result determining module is used for determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result so as to obtain the test result of the branch code to be tested.
In a fourth aspect, the present disclosure provides a test apparatus, the apparatus comprising:
the first display module is used for displaying a test page, and the test page comprises a code submitting control;
the interaction result acquisition module is used for acquiring an interaction result with the code submitting control, uploading a code to be tested, wherein the code to be tested comprises a branch code to be tested and a trunk branch code;
the second display module is configured to obtain and display a test result of a branch code to be tested in the code to be tested, where the test result is obtained according to the first aspect or any one of the corresponding embodiments of the first aspect.
In a fifth aspect, the present disclosure provides an electronic device comprising: the device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions to execute the first aspect or any implementation manner corresponding to the first aspect or the second aspect or the test method corresponding to any implementation manner.
In a sixth aspect, the present disclosure provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform any one of the embodiments of the first aspect or corresponding thereto, or to perform the test method of any one of the embodiments of the second aspect or corresponding thereto.
According to the testing method provided by the embodiment of the disclosure, the code to be tested is obtained based on the trunk branch code, and the code to be tested is formed by combining the trunk branch code. And respectively performing point burying test on the to-be-tested branch code and the trunk branch code through obtaining a test configuration, and obtaining a corresponding first point burying test result and a corresponding second point burying test result, wherein the test configuration comprises a test environment and a path of a test control, and the point burying test is performed on the to-be-tested code and the trunk branch code through the test environment and the path of the test control, namely, the corresponding first point burying test result and second point burying test result are obtained through responses, which are characterized by the to-be-tested code and the trunk branch code under the test configuration, of the test control. And determining the test result of the code to be tested by comparing the difference between the first buried point test result and the second buried point test result by taking the second buried point test result corresponding to the trunk code as a reference, so that the test result of the branch code to be tested can be accurately and efficiently obtained. The method improves the accuracy and efficiency of the branch merging stuck point of the branch code to be tested by combining the embedded point with the automatic control test.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are required in the detailed description or the prior art will be briefly described, it will be apparent that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow diagram of a test method according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of another test method according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram of yet another test method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of yet another test method according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a test apparatus according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of a further test apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the disclosure;
fig. 8 is a schematic diagram of a hardware structure of yet another electronic device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
In the related art, a Merge Request of a branch code and a trunk branch code is initiated by a Merge Request (MR). After completion of the branch code writing, the backbone branch code is requested to accept these modifications by MR requests. Code merge testing is required before the branch code merges with the trunk branch code. In the related art, the merging test is performed by a user according to experience, and the method is closely related to the experience of the user, so that the accuracy and the efficiency of the merging test result are correspondingly affected.
Based on this, the embodiment of the disclosure provides a test method, which combines control automatic test and buried point test to realize buried point test of a code to be tested and a trunk branch code, and obtain a corresponding buried point test result
In accordance with the disclosed embodiments, a test method embodiment is provided, it being noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In this embodiment, a testing method is provided, which may be used in an electronic device, such as a server, and fig. 1 is a flowchart of a testing method according to an embodiment of the disclosure, and as shown in fig. 1, the flowchart includes the following steps:
step S101, obtaining a code to be tested and a test configuration.
The code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of a test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code.
The code to be tested is obtained by newly adding the branch code to be tested on the basis of the trunk branch code. That is, the code to be tested is implemented in dependence on the backbone branch code. The trunk branch code is a code capable of ensuring normal application of a corresponding target application, for example, a code corresponding to a currently issued application is called a trunk branch code, and when the application is updated, a branch code to be tested needs to be newly added on the basis of the trunk branch code, and the newly added branch code to be tested is used for realizing a new function or optimizing an existing function. The newly added branch code to be tested needs to be combined with the trunk branch code, and then updated application can be obtained. Heretofore, merging tests have been involved to avoid problems with use of the merged application. Meanwhile, the branch code to be tested needs to be combined with the trunk branch code to be used as a complete application, so that the code to be tested comprising the branch code to be tested and the trunk branch code is used as a test object.
The test configuration comprises a test environment and a path of a test control, wherein the test is different from the application in an actual scene, and the test needs data source support to display or play corresponding content on the application, so that the normal operation of the code to be tested is ensured through the setting of the test environment. The path of the test control is the path of the test control in the application, and the test control is the control corresponding to the trunk branch code. The method is characterized in that the buried point test result of the trunk branch code is taken as a reference for analysis in the subsequent test process, so that the test control needs to correspond to the trunk branch code and avoid corresponding to the branch code to be tested. If the main branch code corresponds to the branch code to be tested, the main branch code cannot trigger the response of the corresponding test control during running, so that a test error is caused.
For example, the controls corresponding to the trunk branch code include controls 1 to 5, and the test controls may include all the controls, or may be part of the controls, which are specifically set according to actual requirements, and are not limited in any way. The path of the test control is an operation path for triggering the corresponding test control, and the path can be represented by a unique identifier of each control, and of course, the path can also be represented by other modes, and the path is not limited in any way.
It should be noted that the test configuration corresponds to the application to be tested, and different applications to be tested correspond to different test configurations. Based on this, the current application to be tested needs to be determined before the test configuration is acquired, and accordingly, the test configuration corresponding to the current application to be tested is acquired.
Step S102, performing embedded point test on the code to be tested and the trunk branch code based on the test configuration to obtain a corresponding first embedded point test result and a corresponding second embedded point test result.
As indicated above, the test environment provides a data source for buried point testing and the path of the test control provides a path indication for automated testing of the control. And carrying out buried point test on the code to be tested and the trunk branch code based on the test configuration to obtain a first buried point test result corresponding to the code to be tested and a second buried point test result corresponding to the trunk branch code.
The embedded point test can be realized based on a test script, and the test control is automatically tested. Of course, the testing of the test control may be implemented in other manners, which are not limited in any way herein. And when the test control needs to be displayed, acquiring display content based on the test environment and displaying the display content on the interface.
The buried point test may be to set a buried point in the trunk branch code, or may be performed in other manners, which is not limited in any way. When the code to be tested and the trunk branch code run, due to the arrangement of the buried points, data at the buried points can be collected, so that corresponding first buried point test results and second buried point test results are obtained.
Step S103, determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result, so as to obtain the test result of the branch code to be tested.
As described above, the setting of the branch code to be tested is a condition that needs to be satisfied without affecting the trunk branch code. Meanwhile, the test control corresponds to the trunk branch code, so that the first buried point test result and the second buried point test result are the same under the condition that no other factors influence.
Based on this, by determining the difference based on the difference of the first buried point test result and the second buried point test result. The difference may be caused by a code branch to be tested in the code to be tested, so that the test result of the code to be tested can be determined by analyzing the difference, and accordingly, the test result of the code branch to be tested is obtained. The test result of the code to be tested can be used for representing whether the branch code to be tested can be combined with the trunk branch code, and correspondingly, the test result of the branch code to be tested can be used for representing whether the branch code to be tested has a problem, namely whether the branch code to be tested is abnormal.
According to the testing method provided by the embodiment, the second buried point testing result corresponding to the trunk code is taken as a reference, and the testing result of the code to be tested is determined by comparing the difference between the first buried point testing result and the second buried point testing result, so that the testing result of the branch code to be tested can be accurately and efficiently obtained. The method improves the accuracy and efficiency of the branch merging stuck point of the branch code to be tested by combining the embedded point with the automatic control test.
In this embodiment, a testing method is provided, which may be used in an electronic device, such as a server, and fig. 2 is a flowchart of the testing method according to an embodiment of the disclosure, and as shown in fig. 2, the flowchart includes the following steps:
step S201, obtaining a code to be tested and a test configuration.
The code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of a test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S202, performing embedded point test on the code to be tested and the trunk branch code based on the test configuration to obtain a corresponding first embedded point test result and a corresponding second embedded point test result.
Specifically, the step S202 includes:
in step S2021, the buried point configuration for the buried point test is acquired.
Correspondingly to the above, the buried point configuration for the buried point test also corresponds to the application to be tested. Buried point configuration can be characterized by a buried point rule base, as control automation testing is typically simulating a control path operating on an application to be tested and cannot be the target of actual testing. Because the buried point test will print out the results of the control automation test as a comparison, based on this, the test is performed by way of buried points.
The buried point configuration is provided with a buried point rule, a buried point parameter transmission mode and the like, and the buried point configuration is specifically set according to actual requirements. The embedded point configuration can be automatically updated according to the test result, or passively updated according to the requirement, and the like.
Step S2022, based on the test configuration and the buried point configuration, tests the code to be tested and the trunk branch code respectively, so as to obtain a first buried point test result and a second buried point test result.
And automatically testing the code to be tested based on the test configuration, and collecting data in the test process based on the buried point configuration to obtain a first buried point test result. And similarly, automatically testing the trunk branch codes based on the test configuration, and collecting data in the test process based on the buried point configuration to obtain a second buried point test result.
Step S203, determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result, so as to obtain the test result of the branch code to be tested.
Specifically, the step S203 includes:
step S2031, comparing the difference between the first buried point test result and the second buried point test result to obtain a buried point difference result.
The difference between the first buried point test result and the second buried point test result is obtained through comparison, for example, each buried point is provided with a unique identifier, and the unique identifier and the corresponding test result are correspondingly stored, so that the test result of the corresponding buried point is obtained. For example, if the current application to be tested involves 6 buried points, there may be 6 or less than 6 test results in the first buried point test results, and 6 test results in the second buried point test results. Then, when the two buried point test results are compared, the test results corresponding to the same buried point identification in the two buried point test results are extracted first, and then difference comparison is carried out on the extracted test results, so that a buried point difference result is obtained.
When the difference comparison of the buried point test results is carried out, the difference comparison can be automatically realized through the comparison analysis code, and the buried point difference results are obtained. Of course, the buried point difference result may be either empty or non-empty. If the buried point difference result is null, indicating that no difference exists; if the buried point difference result is non-null, it indicates that there is a difference.
Step S2032, if the differences exist in the buried point difference result representation and the differences are problematic, determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code is problematic, and obtaining the test result of the branch code to be tested as problematic.
In the case where there is a difference in the buried point difference result characterization and there is a problem with the difference, it is indicated that the cause of the buried point difference occurs due to the branch code to be tested. Therefore, the test result of the code to be tested can be determined to be that the merging of the branch code to be tested and the trunk branch code is problematic, and accordingly, the test result of the branch code to be tested is problematic. That is, the occurrence of the buried point difference is caused by the problem of the branch code to be tested, which affects the application of the test control corresponding to the trunk branch code after being combined with the trunk branch code. The difference whether there is a problem may be that the difference is displayed through the interactive interface, and a determination result of whether the displayed difference has a problem is obtained, so as to determine whether the difference has a problem. Of course, other ways of determining whether the discrepancy is problematic may be used, and are not limited in any way herein.
Step S2033, if the differences exist and the differences are not problematic in the buried point difference result representation, determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code is problematic, and obtaining that the test result of the branch code to be tested is problematic.
Under the condition that the characteristic of the buried point difference results shows that the differences exist but the differences are not problematic, the reason for the buried point differences is not the branch code to be tested, and accordingly, the test result of the code to be tested can be determined as that the merging of the branch code to be tested and the trunk branch code is not problematic. Based on this, it is possible to obtain a test result of the branch code to be tested as a problem-free one.
If the difference is not problematic, it means that the buried point difference is due to the buried point arrangement, and it may be that the current buried point arrangement needs to be adjusted.
Step S2034, updates the buried point configuration for the buried point test based on the buried point difference result.
Under the condition that the arrangement of the buried points is determined to need to be adjusted, the buried points with the differences of the buried points are obtained, and then the arrangement of the buried points is updated according to the buried points. The updating mode includes, but is not limited to, deleting, adding, modifying, etc.
For example, the buried point configuration corresponding to the result of the presence of the buried point difference is acquired, and the acquired buried point configuration is updated.
According to the testing method provided by the embodiment, the codes to be tested and the trunk branch codes are tested based on the buried point configuration, so that the collection of test data is facilitated, and the efficiency of code merging testing is improved. If after obtaining the result of the difference in the buried point, it is necessary to further verify whether the difference is problematic, since the difference is not necessarily due to the branch to be tested. Therefore, only under the condition that the buried point difference result representation has differences and the differences have problems, the test result of the branch code to be tested can be determined to have problems, and the accuracy of the test result of the branch code to be tested is improved. In case of no problem with the differences, it means that the branch code to be tested can be merged with the trunk branch code at this time. And the existence of the difference is caused by the buried point, so that the buried point configuration for buried point test is updated based on the buried point difference result, thereby realizing real-time adjustment of the buried point configuration and ensuring the accuracy of the subsequent test result.
In some alternative embodiments, the test method further comprises: if the test result of the branch code to be tested is that the problem exists, generating a buried point analysis result, wherein the buried point analysis result comprises the problem of the branch code to be tested and analysis corresponding to the problem of the branch code to be tested. And generating a buried point analysis result aiming at the problem under the condition that the test result of the branch code to be tested is determined to be the problem. Specifically, the buried point analysis result includes a problem corresponding to the branch code to be tested, and analysis of the cause. Here, the analysis of the cause may also be understood as a fault analysis of the problem.
For example, testing of branch code to be tested may include a variety of test targets including, but not limited to, static analysis, product size, unit testing, product contrast checking, and the like. In the test process, buried point test is carried out on the test targets, and the test result of each test target is determined. If the test result of one of the test targets has a problem, the branch code to be tested has a problem. Accordingly, the test target with the problem is the problem of the branch code to be tested, and analysis is carried out on the test target with the problem to obtain an analysis result corresponding to the problem.
Under the condition that the test result of the branch code to be tested is that the problem exists, a detailed buried point analysis result is generated and used for describing the problem of the branch code to be tested and the analysis corresponding to the problem of the branch code to be tested, so that fault location of the branch code to be tested can be conveniently carried out in time.
In this embodiment, a testing method is provided, which may be used for an electronic device, such as a computer, a tablet computer, etc., and fig. 3 is a flowchart of the testing method according to an embodiment of the disclosure, as shown in fig. 3, where the flowchart includes the following steps:
step S301, displaying the test page.
Wherein the test page includes a code submission control.
The test page is used for uploading the branch codes to be tested, and correspondingly, a code submitting control is arranged on the test page, and the codes to be tested can be obtained through interaction with the code submitting control.
It should be noted that the test page may also include other controls or other page elements, which are specifically set according to actual requirements, and are not limited in any way herein.
Step S302, an interaction result with a code submitting control is obtained, and the code to be tested is uploaded.
The code to be tested comprises a branch code to be tested and a trunk branch code.
And uploading the code to be tested can be realized by interacting with the code submitting control. Wherein, as indicated above, the code to be tested includes the branch code to be tested and the trunk branch code. The specific details of the code to be tested are shown above, and will not be described here again.
Step S303, obtaining and displaying the test result of the branch code to be tested in the code to be tested.
Wherein the test result is obtained according to the test method.
The code to be tested can be uploaded to a server, and the server performs embedded point test on the code to be tested by executing the test method to obtain a test result of the branch code to be tested in the code to be tested. It should be noted that, the trunk branch codes corresponding to the applications to be tested are stored in the server, and because the test configuration required by the embedded point test and the embedded point configuration are related to the applications to be tested, the current applications to be tested are determined in the server, and the trunk branch codes corresponding to the current applications to be tested can be obtained.
After the test result of the branch code to be tested is obtained, displaying is carried out on an interface. If the test result of the branch code to be tested is that the problem exists, displaying prompt information of the problem exists; and if the test result of the branch code to be tested is that the problem exists, displaying an analysis result of the corresponding problem.
According to the test method provided by the embodiment, the uploading of the code to be tested and the display of the test result are realized in an interactive mode at the client, and the test result of the code to be tested is intuitively represented.
In some alternative embodiments, the step S303 includes: if the test result of the branch code to be tested is that the problem exists, a test result page is displayed, and the test result page is used for representing the buried point analysis result of the branch code to be tested. In the event of a problem, a test results page is displayed. The test result page displays the buried point analysis result, for example, the test targets passing the test and the test targets failing the test, and further, the error reasons of the test targets failing the test are displayed, so that the problem positioning is performed quickly.
Under the condition that the test result of the branch code to be tested is that the problem exists, a test result page is displayed on the client side, so that the problem of the branch code to be tested can be known in time, and the problem can be adjusted in time.
As a specific application embodiment of the present disclosure, as shown in fig. 4, a test page is displayed at a code editing end, and the code to be tested is submitted by interaction with a code uploading control in the test page, and accordingly, a continuous integration (Continuous Integration, CI) detection phase is entered. After entering the CI stage, submitting the test control to an automatic test framework in a server to automatically test the test control. The test configuration and the buried point configuration are also read in the CI stage, and the test configuration comprises a test environment and a path of a test control. And respectively executing automation tasks on the trunk branch codes and the branch codes to be tested in an automation test framework in the server, and respectively collecting buried points to obtain a first buried point test result corresponding to the branch to be tested and a second buried point test result corresponding to the trunk branch codes. And performing buried point difference processing on the first buried point test result and the second buried point test result, if the difference exists and the difference is determined to be problematic, generating a buried point analysis result, and displaying the buried point analysis result at a code compiling end. If the difference is determined to exist and the difference is not problematic, new buried point derivation is performed on the buried points causing the difference, and the buried point configuration is updated.
In this embodiment, a test device is further provided, and the test device is used to implement the foregoing embodiments and preferred embodiments, which are not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a testing apparatus, as shown in fig. 5, including:
the obtaining module 501 is configured to obtain a code to be tested and a test configuration, where the code to be tested includes a branch code to be tested and a trunk branch code, the test configuration includes a test environment and a path of a test control, the test environment is used to provide a data source for a buried point test, and the test control is a control corresponding to the trunk branch code.
The embedded point test module 502 is configured to perform embedded point test on the code to be tested and the trunk branch code based on the test configuration, so as to obtain a corresponding first embedded point test result and a corresponding second embedded point test result.
The test result determining module 503 is configured to determine a test result of the code to be tested based on a difference between the first buried point test result and the second buried point test result, so as to obtain a test result of the branch code to be tested.
In some alternative embodiments, the test result determination module 503 includes:
the difference comparison unit is used for comparing the difference between the first buried point test result and the second buried point test result to obtain a buried point difference result.
The first test result determining unit is used for determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code is problematic if the buried point difference result representation is different and the difference is problematic, and obtaining the test result of the branch code to be tested as problematic.
In some alternative embodiments, the test result determination module 503 further includes:
and the second test result determining unit is used for determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code is problematic if the buried point difference result representation has differences and the differences are problematic, and obtaining that the test result of the branch code to be tested is problematic.
And a buried point configuration updating unit for updating the buried point configuration for the buried point test based on the buried point difference result.
In some alternative embodiments, the buried point test module 502 includes:
the embedded point configuration acquisition unit is used for acquiring embedded point configuration for embedded point test.
The code testing unit is used for testing the code to be tested and the trunk branch code based on the test configuration and the buried point configuration respectively to obtain a first buried point test result and a second buried point test result.
In some alternative embodiments, the test device further comprises:
and the third test result determining unit is used for generating a buried point analysis result if the test result of the branch code to be tested is a problem, wherein the buried point analysis result comprises the problem of the branch code to be tested and the analysis corresponding to the problem of the branch code to be tested.
The present embodiment provides a testing apparatus, as shown in fig. 6, including:
the first display module 601 is configured to display a test page, where the test page includes a code submission control.
The interaction result obtaining module 602 is configured to obtain an interaction result with a code submission control, upload a code to be tested, where the code to be tested includes a branch code to be tested and a trunk branch code.
The second display module 603 is configured to obtain and display a test result of the branch code to be tested in the code to be tested, where the test result is obtained according to the test method shown in fig. 1 or fig. 2.
In some alternative embodiments, the second display module 603 includes:
The display unit is used for displaying a test result page if the test result of the branch code to be tested is a problem, and the test result page is used for representing the buried point analysis result of the branch code to be tested.
The test device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit ) circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that can provide the above-described functionality.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the disclosure also provides an electronic device, which is provided with the testing device shown in the above fig. 5 or 6.
Referring to fig. 7 or 8, fig. 7 or 8 is a schematic structural diagram of an electronic device according to an alternative embodiment of the disclosure, as shown in fig. 7 or 8, the electronic device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 7 or 8.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
If the electronic device has the testing device shown in fig. 5, the electronic device has a structure shown in fig. 7, and the electronic device further includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 may be connected by a bus or other means, for example in fig. 7.
The input device 30 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, and the like. The output means 40 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. Such display devices include, but are not limited to, liquid crystal displays, light emitting diodes, displays and plasma displays. In some alternative implementations, the display device may be a touch screen.
If the electronic device has the testing apparatus shown in fig. 6, the electronic device has a structure as shown in fig. 8, and further includes a communication interface 50 for the electronic device to communicate with other devices or a communication network.
The presently disclosed embodiments also provide a computer readable storage medium, and the methods described above according to the presently disclosed embodiments may be implemented in hardware, firmware, or as recordable storage medium, or as computer code downloaded over a network that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and is to be stored in a local storage medium, such that the methods described herein may be stored on such software processes on a storage medium using a general purpose computer, special purpose processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present disclosure have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations are within the scope defined by the appended claims.

Claims (11)

1. A method of testing, the method comprising:
acquiring a code to be tested and a test configuration, wherein the code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of a test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code;
performing buried point test on the code to be tested and the trunk branch code based on the test configuration to obtain a corresponding first buried point test result and a corresponding second buried point test result;
and determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result so as to obtain the test result of the branch code to be tested.
2. The method of claim 1, wherein the determining the test result of the code to be tested based on the difference between the first embedded point test result and the second embedded point test result to obtain the test result of the branch code to be tested comprises:
Comparing the difference between the first buried point test result and the second buried point test result to obtain a buried point difference result;
if the buried point difference result represents that the difference exists and the difference exists, determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code exists, and obtaining the test result of the branch code to be tested as the problem.
3. The method of claim 2, wherein the determining the test result of the code to be tested based on the difference between the first embedded point test result and the second embedded point test result to obtain the test result of the branch code to be tested further comprises:
if the buried point difference result represents that the difference exists and the difference is not problematic, determining that the test result of the code to be tested is that the merging of the branch code to be tested and the trunk branch code is problematic, and obtaining that the test result of the branch code to be tested is problematic;
and updating the buried point configuration for the buried point test based on the buried point difference result.
4. The method according to claim 1, wherein performing the embedded point test on the code to be tested and the trunk branch code based on the test configuration to obtain the corresponding first embedded point test result and second embedded point test result includes:
Acquiring a buried point configuration for the buried point test;
and based on the test configuration and the buried point configuration, testing the code to be tested and the trunk branch code respectively to obtain the first buried point test result and the second buried point test result.
5. The method according to claim 1, wherein the method further comprises:
if the test result of the branch code to be tested is that the problem exists, generating a buried point analysis result, wherein the buried point analysis result comprises the problem of the branch code to be tested and analysis corresponding to the problem of the branch code to be tested.
6. A method of testing, the method comprising:
displaying a test page, wherein the test page comprises a code submitting control;
acquiring an interaction result with the code submitting control, and uploading a code to be tested, wherein the code to be tested comprises a branch code to be tested and a trunk branch code;
obtaining and displaying a test result of a branch code to be tested in the code to be tested, wherein the test result is obtained according to the test method of any one of claims 1 to 5.
7. The method of claim 6, wherein the obtaining and displaying the test result of the branch code to be tested in the code to be tested comprises:
And if the test result of the branch code to be tested is that the problem exists, displaying a test result page, wherein the test result page is used for representing the buried point analysis result of the branch code to be tested.
8. A test apparatus, the apparatus comprising:
the system comprises an acquisition module, a test control module and a test control module, wherein the acquisition module is used for acquiring a code to be tested and a test configuration, the code to be tested comprises a branch code to be tested and a trunk branch code, the test configuration comprises a test environment and a path of the test control, the test environment is used for providing a data source for the buried point test, and the test control is a control corresponding to the trunk branch code;
the embedded point testing module is used for respectively carrying out embedded point testing on the code to be tested and the trunk branch code based on the testing configuration to obtain a corresponding first embedded point testing result and a corresponding second embedded point testing result;
and the test result determining module is used for determining the test result of the code to be tested based on the difference between the first buried point test result and the second buried point test result so as to obtain the test result of the branch code to be tested.
9. A test apparatus, the method comprising:
The first display module is used for displaying a test page, and the test page comprises a code submitting control;
the interaction result acquisition module is used for acquiring an interaction result with the code submitting control, uploading a code to be tested, wherein the code to be tested comprises a branch code to be tested and a trunk branch code;
a second display module, configured to obtain and display a test result of a branch code to be tested in the code to be tested, where the test result is obtained according to the test method according to any one of claims 1 to 5.
10. An electronic device, comprising:
a memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, perform the test method of any one of claims 1 to 5 or of claims 6 or 7.
11. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform any one of claims 1 to 5 or to perform the test method of claim 6 or 7.
CN202410146054.2A 2024-02-01 2024-02-01 Test method, test device, electronic equipment and storage medium Pending CN117851265A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410146054.2A CN117851265A (en) 2024-02-01 2024-02-01 Test method, test device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410146054.2A CN117851265A (en) 2024-02-01 2024-02-01 Test method, test device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117851265A true CN117851265A (en) 2024-04-09

Family

ID=90534447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410146054.2A Pending CN117851265A (en) 2024-02-01 2024-02-01 Test method, test device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117851265A (en)

Similar Documents

Publication Publication Date Title
US10310969B2 (en) Systems and methods for test prediction in continuous integration environments
US9898497B2 (en) Validating coherency between multiple data sets between database transfers
US9594672B1 (en) Test case generation
US10628237B2 (en) Cloud service integration flow
US9251435B2 (en) Screenshot database for application verification
CN108959068B (en) Software interface testing method, device and storage medium
US10108475B2 (en) Pattern analysis for triaging memory leaks
CN108319575B (en) Page component checking method, device, server and storage medium
US11687335B2 (en) Software defect prediction model
CN110851539A (en) Metadata verification method and device, readable storage medium and electronic equipment
CN106575231B (en) Automated saving with cross-user session revocation support for operations
CN106557878B (en) Development project management method and device
CN113014445B (en) Operation and maintenance method, device and platform for server and electronic equipment
US11709759B2 (en) Contextual drill back to source code and other resources from log data
CN111459504A (en) Intelligent contract processing method, device, equipment and storage medium
US20230103989A1 (en) Nested build automation for software dependencies
US11500618B2 (en) Software library differential identification and automated uplift
CN111104123A (en) Automatic deployment of applications
EP4211561A1 (en) Smart span prioritization based on ingestion service backpressure
CN117851265A (en) Test method, test device, electronic equipment and storage medium
CN115269285A (en) Test method and device, equipment and computer readable storage medium
CN115080113A (en) Item code detection method and device, readable storage medium and electronic equipment
CN113986768A (en) Application stability testing method, device, equipment and medium
CN114968751A (en) Program debugging method and program debugging device of code-free development platform
US9785543B2 (en) Dual tagging between test and pods

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