CN113190456B - 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
CN113190456B
CN113190456B CN202110528231.XA CN202110528231A CN113190456B CN 113190456 B CN113190456 B CN 113190456B CN 202110528231 A CN202110528231 A CN 202110528231A CN 113190456 B CN113190456 B CN 113190456B
Authority
CN
China
Prior art keywords
version
difference code
test
channel
code
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.)
Active
Application number
CN202110528231.XA
Other languages
Chinese (zh)
Other versions
CN113190456A (en
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110528231.XA priority Critical patent/CN113190456B/en
Publication of CN113190456A publication Critical patent/CN113190456A/en
Application granted granted Critical
Publication of CN113190456B publication Critical patent/CN113190456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

According to the testing method, the testing device, the electronic equipment and the storage medium, the difference codes of the main line version are obtained according to the codes before and after updating of the main line version; obtaining a difference code of the channel version according to the codes before and after updating of the channel version; acquiring a first difference code between a difference code of a main line version and a difference code of a channel version; and testing the first difference code to obtain a channel version test result. By the method, when codes of the channel version are tested, only the difference codes of the main line version and the first difference codes among the difference codes of the channel version are required to be tested, so that repeated testing between the codes of the main line version and the codes of the channel version is avoided, and the time for testing is shortened.

Description

Test method, test device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of test development, and in particular, to a test method, a test apparatus, an electronic device, and a storage medium.
Background
Currently, in the development process of mobile application projects, different branch versions, such as a mainline version and a channel version, are generally included, wherein the channel version is a version customized on the basis of the mainline version according to the requirements of different manufacturers, and the channel version is mostly the same as the mainline version in function, but has partial differences. When the same function needs to be modified, added or deleted on the main line version and the channel version, the main line version and the channel version are respectively adapted to different manufacturers, so that even if the functions of the main line version and the channel version are the same, the code modified on the bottom layer will also have a difference, and therefore, the changed main line version and channel version code need to be tested.
In the prior art, when testing, the testing of the main line version is distinguished from the testing of the channel version, the difference codes before and after the main line version is changed are tested respectively, and then the difference codes before and after the channel version is changed are tested.
However, when the method is adopted for testing, the difference codes of the main line version and the difference codes of the channel version have the same parts and have certain difference, so that the codes tested on the main line version can be tested again on the channel version, and the testing time is increased.
Disclosure of Invention
The application provides a testing method, a testing device, electronic equipment and a storage medium, which are used for solving the problem that the testing time is more in the prior art.
In a first aspect, the present application provides a test method comprising:
obtaining a difference code of the mainline version according to the codes before and after updating of the mainline version;
obtaining a difference code of the channel version according to the codes before and after updating of the channel version;
acquiring a first difference code between the difference code of the main line version and the difference code of the channel version;
and testing the first difference code to obtain a test result of the channel version.
In one possible implementation manner, the testing the first difference code includes:
analyzing and obtaining a function to which the first difference code belongs according to the first difference code;
inquiring a test association library of the channel version to obtain a first test case corresponding to a function to which the first difference code belongs, wherein the test association library of the channel version comprises test cases corresponding to functions in the channel version;
and executing the first test case to obtain a test result of the channel version.
In one possible implementation manner, after the testing the first difference code to obtain the testing result of the channel version, the method further includes:
if the test result of the channel version is not passed, updating the code of the channel version, and returning to the step of executing the codes before and after updating according to the channel version to obtain the difference code of the channel version.
In one possible implementation manner, the obtaining the difference code of the mainline version according to the pre-update code and the post-update code of the mainline version includes:
updating code of the mainline version;
determining a difference code of the current update according to codes of the mainline versions before and after the current update;
and testing the updated difference code, and taking the updated difference code as the difference code of the main line version if the test result of the main line version is passed.
In one possible implementation manner, the testing the updated difference code includes:
analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the updated difference code belongs, wherein the test association library of the main line version comprises test cases corresponding to the functions in the main line version;
and executing the second test case to obtain a test result of the mainline version.
In one possible implementation, the method further includes:
and if the test result of the mainline version is not passed, returning to the step of executing the code for updating the mainline version.
In a second aspect, the present application provides a test apparatus, the apparatus comprising:
the first acquisition unit is used for acquiring the difference codes of the mainline version according to the codes before and after updating of the mainline version;
the second acquisition unit is used for acquiring the difference codes of the channel version according to the codes before and after updating of the channel version;
a third obtaining unit, configured to obtain a first difference code between the difference code of the mainline version and the difference code of the channel version;
and the testing unit is used for testing the first difference code to obtain a testing result of the channel version.
In one possible implementation, the test unit includes:
the analysis module is used for analyzing and obtaining a function to which the first difference code belongs according to the first difference code;
the acquisition module is used for inquiring the test association library of the channel version and acquiring a first test case corresponding to the function to which the first difference code belongs, wherein the test association library of the channel version comprises test cases corresponding to functions in the channel version;
and the first test module is used for executing the first test case to obtain a test result of the channel version.
In one possible implementation manner, the apparatus further includes:
and the first return execution unit is used for updating the codes of the channel version if the test result of the channel version is not passed after the test result of the channel version is obtained by the test unit, and returning to the step of executing the codes before and after updating according to the channel version to obtain the difference codes of the channel version.
In one possible implementation manner, the first obtaining unit includes:
the updating module is used for updating the code of the mainline version;
the determining module is used for determining the difference code of the current update according to the codes of the mainline versions before and after the current update;
and the second test module is used for testing the updated difference code, and if the test result of the main line version is passed, the updated difference code is used as the difference code of the main line version.
In one possible implementation, the second test module is specifically configured to:
analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the updated difference code belongs, wherein the test association library of the main line version comprises test cases corresponding to the functions in the main line version;
and executing the second test case to obtain a test result of the mainline version.
In one possible implementation, the apparatus further includes:
and the second return execution module is used for returning to execute the step of updating the code of the mainline version if the test result of the mainline version is not passed.
In a third aspect, the present application provides an electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method according to any of the first aspects according to the executable instructions.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any of the first aspects when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to any of the first aspects.
According to the testing method, the testing device, the electronic equipment and the storage medium, the difference codes of the main line version are obtained according to the codes before and after updating of the main line version; obtaining a difference code of the channel version according to the codes before and after updating of the channel version; acquiring a first difference code between a difference code of a main line version and a difference code of a channel version; and testing the first difference code to obtain a channel version test result. By the method, when codes of the channel version are tested, only the difference codes of the main line version and the first difference codes among the difference codes of the channel version are required to be tested, so that repeated testing between the codes of the main line version and the codes of the channel version is avoided, and the time for testing is shortened.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in the present application;
fig. 2 is a flow chart of a first test method according to an embodiment of the present application;
FIG. 3 is a flow chart of a second test method according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a third test method according to an embodiment of the present disclosure;
FIG. 5 is a flow chart of a fourth test method according to an embodiment of the present disclosure;
FIG. 6 is a flowchart of a fifth test method according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a testing device according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a further test device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Currently, in the development process of mobile application projects, different branch versions, such as a mainline version and a channel version, are generally included, wherein the channel version is a version customized on the basis of the mainline version according to the requirements of different manufacturers, and the channel version is mostly the same as the mainline version in function, but has partial differences. For example, when developing a mobile phone APP (Application program), in order to promote the APP in a large range, a development company of the APP generally selects to release and update versions in a large number of popularization channels (such as Application markets and Application treasures of each mobile phone), and in order to meet the personalized requirements of each mobile phone manufacturer, a developer (for example, makes the APP more conform to the operation habits, operation interfaces and interface styles of the mobile phone manufacturer) modifies the code of the main line version on the basis of the main line version of the mobile phone Application program, so that the mobile phone Application program can be adapted to different mobile phone manufacturers. Fig. 1 is a schematic view of an application scenario provided in the present application. The figure includes a developer, and manufacturer 1, manufacturer 2, and manufacturer 3. On the basis of the mainline version of the mobile application program, the developer provides mobile application program codes of channel versions corresponding to 3 manufacturers, namely channel version 1, channel version 2 and channel version 3.
However, when the same function needs to be modified, added or deleted on the main line version and the channel version, since the main line version and the channel version are respectively adapted to different manufacturers, even if the functions of the main line version and the channel version are the same, the code modified on the bottom layer will also have a difference, so that the changed main line version and channel version code need to be tested.
In the prior art, when testing, the testing of the main line version is distinguished from the testing of the channel version, the difference codes before and after the main line version is changed are tested respectively, and then the difference codes before and after the channel version is changed are tested.
However, when the method is adopted for testing, the difference codes of the main line version and the difference codes of the channel version have the same parts and have certain difference, so that the codes tested on the main line version can be tested again on the channel version, and the testing time is increased.
The application provides a testing method, a testing device, electronic equipment and a storage medium, and aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flow chart of a first test method according to an embodiment of the present application. As shown in fig. 2, the method includes:
s101, obtaining difference codes of the mainline version according to the codes before and after updating of the mainline version.
For example, after the testing of the mainline version by the tester is completed, when the code of the channel version needs to be tested, the code of the mainline version before and after the update can be obtained first, so as to obtain the difference code of the mainline version before and after the update. Optionally, when acquiring the code of the main line version, a common code management tool git may be adopted, an updated test code of the main line version is acquired through a gitpull instruction in the git tool, and a difference code of the main line version is determined according to a gitdif instruction in the management tool.
S102, obtaining the difference codes of the channel version according to the codes before and after updating of the channel version.
Illustratively, after the difference code of the mainline version is acquired, the codes before and after updating of the channel version are continuously acquired to acquire the difference code of the channel version. Alternatively, when the code of the channel version is obtained, a common code management tool git can be adopted, the updated test code of the channel version is obtained through a gitpull instruction in the git tool, and the difference code of the channel version is determined according to a gitdif instruction in the management tool.
S103, acquiring a first difference code between the difference code of the main line version and the difference code of the channel version.
Illustratively, the first difference code between the difference code of the mainline version and the difference code of the channel version is obtained according to the obtained difference codes. For example, the code before and after updating the mainline version is denoted by Z1 and Z2, respectively, and the difference code of the mainline version is Z; the codes before updating and after updating the channel version are respectively represented by Q1 and Q2, and the difference code of the channel version is Q; and continuing to acquire the difference code between the difference code Z and the difference code Q, namely continuing to acquire the first difference code.
S104, testing the first difference code to obtain a channel version test result.
Illustratively, after the first difference code is obtained, the first difference code is tested, so that a testing result of the channel edition is obtained. Specifically, when testing the first difference code, a test case of a channel version corresponding to the first difference code can be selected according to the first difference code, and then the test case corresponding to the first difference code is executed, so that a test result of the channel version is obtained.
In the method, when testing the channel version, the same code part as the code part in the difference code of the main line version is removed from the difference code of the channel version, so that a first difference code is obtained. Furthermore, only the first difference code needs to be tested, so that the workload of testing is reduced, and the time required by testing is reduced.
In a possible implementation, the method shown in fig. 3 may be adopted when the first differential code is tested (i.e., when step S104 is performed). Fig. 3 is a flow chart of a second test method according to an embodiment of the present application. As shown in fig. 3, the method includes:
s1041, analyzing and obtaining a function to which the first difference code belongs according to the first difference code;
s1042, inquiring a test association library of a channel version to obtain a first test case corresponding to a function to which a first difference code belongs, wherein the test association library of the channel version comprises test cases corresponding to functions in the channel version;
s1043, executing the first test case to obtain a channel version test result.
For example, when a test is performed on the first differential code, it may be first determined that the first differential code belongs to a function. And then, searching a first test case corresponding to the function to which the first difference code belongs in a test association library of the channel version according to the relation between the function and the test case in the channel version.
Optionally, after determining the difference code of the channel version each time, the test association library of the channel version analyzes the difference code to determine whether the test case needs to be modified/added in the test association library or the relation between the modification/addition function and the test case.
Alternatively, only the mapping relation between the function and the test case may be stored in the channel version test association library, and the test case may be stored in another database, or the test case and the mapping relation between the test case and the function may be directly stored in the test case association library. The mapping relationship between the function and the test case may be one-to-one or one-to-many.
And further, after the first test case is obtained, a channel version result is obtained by executing the first test case.
In the method, when the first difference code is tested, the first test case can be obtained according to the function to which the first difference code belongs and the channel version test association library, and then only the first test case is tested, so that the testing efficiency is improved.
Fig. 4 is a flow chart of a third test method according to an embodiment of the present application. As shown in fig. 4, the method includes:
s101, obtaining a difference code of a main line version according to codes before and after updating of the main line version;
s102, obtaining a difference code of the channel version according to the codes before and after updating of the channel version;
s103, acquiring a first difference code between a difference code of the main line version and a difference code of the channel version;
s104, testing the first difference code to obtain a channel version test result.
The steps S101-S104 are exemplarily the same as the steps S101-S104 in fig. 2, and will not be described again.
S105, if the test result of the channel version is not passed, updating the code of the channel version, and returning to execute the codes before and after updating according to the channel version to obtain the difference code of the channel version.
Illustratively, after the test result of the channel version is obtained, if the test result of the channel version is not passed, the code of the channel version needs to be continuously updated, steps S102-S104 are continuously executed, and the above-mentioned processes are continuously circulated, so that the test result is passed.
Fig. 5 is a flow chart of a fourth test method according to an embodiment of the present application. As shown in fig. 5, the method includes:
s201, updating codes of the mainline version;
s202, determining a difference code of the current update according to codes of main line versions before and after the current update;
and S203, testing the updated difference code, and taking the updated difference code as the difference code of the mainline version if the test result of the mainline version is passed.
Illustratively, when the difference code of the mainline version is acquired, the code of the mainline version first needs to be updated, which can be performed by a developer. And then, the tester acquires the code updated at the time and compares the code with the main line code before updating to determine the difference code updated at the time. And then, in the test of the main line version, testing the updated difference code, and taking the updated difference code as the difference code of the main line version when the test result of the main line version is passed.
In one example, if the test result of the mainline version is not passed, the step of executing the code of updating the mainline version is returned, that is, the step S201 is executed.
S204, obtaining a difference code of the channel version according to the codes before and after updating of the channel version;
s205, acquiring a first difference code between the difference code of the main line version and the difference code of the channel version;
s206, testing the first difference code to obtain a channel version test result.
For example, the principle of steps S204-S206 can be seen in steps S102-S104 in fig. 2, and will not be described here again.
In this embodiment, when testing a channel version, testing is first required for code of a mainline version. That is, when testing the code of the mainline version, the difference code before and after updating the mainline version may be tested, and if the test result is not passed, the steps S201 to S203 are repeatedly executed. And after all the codes of the main line version pass the test, taking the updated difference codes as the difference codes of the main line version, and continuously testing the channel version.
In a possible embodiment, the method shown in fig. 6 may be adopted when the difference code updated this time is tested (i.e., when step S203 is performed). Fig. 6 is a flowchart of a fifth test method according to an embodiment of the present application. The method comprises the following steps:
s2031, analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
s2032, inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the difference code updated at this time belongs, wherein the test association library of the main line version comprises test cases corresponding to the functions in the main line version;
s2033, executing the second test case to obtain a test result of the mainline version.
For example, when a test is performed on the current updated difference code, it may be first determined to which function the current updated difference code belongs. And then, searching a second test case corresponding to the function to which the updated difference code belongs according to the relation between the function in the main line version and the test case in the test association library of the main line version. Further, after the updated test case is obtained, a result of the mainline version is obtained by executing the second test case.
Optionally, after determining the difference code of the mainline version each time, the test association library of the mainline version analyzes the difference code to determine whether the test case needs to be modified/added in the mainline test association library or the relation between the function and the test case needs to be modified/added.
Alternatively, only the mapping relation between the function and the test case may be stored in the test association library of the mainline version, and the test case may be stored in another database, or the test case and the mapping relation between the test case and the function may be directly stored in the test case association library. The mapping relationship between the function and the test case may be one-to-one or one-to-many.
In the application, when the updated difference code is tested, the second test case can be obtained according to the function to which the updated difference code belongs and the test association library of the main line version, so that the test of the main line version is realized.
Fig. 7 is a schematic structural diagram of a testing device according to an embodiment of the present application, as shown in fig. 7, where the testing device includes:
the first obtaining unit 81 is configured to obtain a difference code of the mainline version according to the codes before and after updating of the mainline version.
A second obtaining unit 82, configured to obtain a difference code of the channel version according to the codes before and after updating of the channel version;
a third acquiring unit 83 for acquiring a first difference code between the difference code of the main line version and the difference code of the channel version;
and the testing unit 84 is configured to test the first difference code to obtain a channel version test result.
The device provided in this embodiment is configured to implement the technical scheme provided by the method, and the implementation principle and the technical effect are similar and are not repeated.
FIG. 8 is a schematic structural view of a testing device according to an embodiment of the present application, as shown in FIG. 8, which includes, based on the structure of the device shown in FIG. 7
In one possible implementation, the test unit 84 includes:
an analysis module 841, configured to analyze and obtain a function to which the first difference code belongs according to the first difference code;
the obtaining module 842 is configured to query a channel version test association library to obtain a first test case corresponding to a function to which the first difference code belongs, where the channel version test association library includes test cases corresponding to functions in the channel version;
the first test module 843 is configured to execute the first test case to obtain a channel version test result.
In one possible implementation, the apparatus further includes:
the first return execution unit 85 is configured to update the code of the channel version if the test result of the channel version is failed after the test unit 84 tests the first difference code to obtain the test result of the channel version, and return to execute the codes before and after updating according to the channel version to obtain the difference code of the channel version.
In one possible implementation manner, the first obtaining unit 81 includes:
an update module 811 for updating the code of the mainline version;
a determining module 812, configured to determine a difference code of the current update according to codes of the mainline versions before and after the current update;
the second test module 813 is configured to test the updated difference code, and if the test result of the mainline version is passed, take the updated difference code as the difference code of the mainline version.
In one possible implementation, the second test module 813 is specifically configured to:
analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the updated difference code belongs, wherein the test association library of the main line version comprises the test cases corresponding to the functions in the main line version;
and executing the second test case to obtain a test result of the mainline version.
In one possible implementation, the apparatus further includes:
the second return execution module 814 is configured to return to executing the step of updating the code of the mainline version if the test result of the mainline version is not passed.
The device provided in this embodiment is configured to implement the technical scheme provided by the method, and the implementation principle and the technical effect are similar and are not repeated.
Fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, as shown in fig. 8, where the electronic device includes:
a processor 291, the electronic device further comprising a memory 292; a communication interface (Communication Interface) 293 and bus 294 may also be included. The processor 291, the memory 292, and the communication interface 293 may communicate with each other via the bus 294. Communication interface 293 may be used for information transfer. The processor 291 may call logic instructions in the memory 294 to perform the methods of the above embodiments.
Further, the logic instructions in memory 292 described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product.
The memory 292 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running software programs, instructions and modules stored in the memory 292, i.e., implements the methods of the method embodiments described above.
Memory 292 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the terminal device, etc. Further, memory 292 may include high-speed random access memory, and may also include non-volatile memory.
The present application provides a computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any of the first aspects.
A computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the first aspects.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (5)

1. A method of testing, the method comprising:
obtaining a difference code of the mainline version according to the codes before and after updating of the mainline version;
obtaining a difference code of the channel version according to the codes before and after updating of the channel version;
acquiring a first difference code between the difference code of the main line version and the difference code of the channel version;
testing the first difference code to obtain a test result of the channel version;
the testing the first difference code includes:
analyzing and obtaining a function to which the first difference code belongs according to the first difference code;
inquiring a test association library of the channel version to obtain a first test case corresponding to a function to which the first difference code belongs, wherein the test association library of the channel version comprises test cases corresponding to functions in the channel version;
executing the first test case to obtain a test result of the channel version;
after the testing is performed on the first difference code to obtain the testing result of the channel version, the method further comprises the following steps:
if the test result of the channel version is not passed, updating the code of the channel version, and returning to the step of executing the codes before and after updating according to the channel version to obtain the difference code of the channel version;
the obtaining the difference code of the mainline version according to the codes before and after updating of the mainline version comprises the following steps:
updating code of the mainline version;
determining a difference code of the current update according to codes of the mainline versions before and after the current update;
testing the updated difference code, and taking the updated difference code as the difference code of the main line version if the test result of the main line version is passed;
the testing of the updated difference code comprises the following steps:
analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the updated difference code belongs, wherein the test association library of the main line version comprises test cases corresponding to the functions in the main line version;
executing the second test case to obtain a test result of the mainline version;
and if the test result of the mainline version is not passed, returning to the step of executing the code for updating the mainline version.
2. A test apparatus, the apparatus comprising:
the first acquisition unit is used for acquiring the difference codes of the mainline version according to the codes before and after updating of the mainline version;
the second acquisition unit is used for acquiring the difference codes of the channel version according to the codes before and after updating of the channel version;
a third obtaining unit, configured to obtain a first difference code between the difference code of the mainline version and the difference code of the channel version;
the testing unit is used for testing the first difference code to obtain a testing result of the channel version;
the analysis module is used for analyzing and obtaining a function to which the first difference code belongs according to the first difference code;
the acquisition module is used for inquiring the test association library of the channel version and acquiring a first test case corresponding to the function to which the first difference code belongs, wherein the test association library of the channel version comprises test cases corresponding to functions in the channel version;
the first test module is used for executing the first test case to obtain a test result of the channel version;
the first return execution unit is used for updating the codes of the channel version after the test unit tests the first difference codes to obtain the test result of the channel version, and returning to execute the codes before and after updating according to the channel version to obtain the difference codes of the channel version if the test result of the channel version is not passed;
the first acquisition unit includes:
the updating module is used for updating the code of the mainline version;
the determining module is used for determining the difference code of the current update according to the codes of the mainline versions before and after the current update;
the second test module is used for testing the updated difference code, and if the test result of the main line version is passed, the updated difference code is used as the difference code of the main line version;
the second test module is specifically configured to:
analyzing and obtaining a function to which the updated difference code belongs according to the updated difference code;
inquiring a test association library of the main line version to obtain a second test case corresponding to the function to which the updated difference code belongs, wherein the test association library of the main line version comprises test cases corresponding to the functions in the main line version;
executing the second test case to obtain a test result of the mainline version;
and the second return execution module is used for returning to execute the step of updating the code of the mainline version if the test result of the mainline version is not passed.
3. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method of claim 1 in accordance with the executable instructions.
4. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the method of claim 1.
5. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, implements the method of claim 1.
CN202110528231.XA 2021-05-14 2021-05-14 Test method, test device, electronic equipment and storage medium Active CN113190456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110528231.XA CN113190456B (en) 2021-05-14 2021-05-14 Test method, test device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110528231.XA CN113190456B (en) 2021-05-14 2021-05-14 Test method, test device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113190456A CN113190456A (en) 2021-07-30
CN113190456B true CN113190456B (en) 2024-03-26

Family

ID=76981873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110528231.XA Active CN113190456B (en) 2021-05-14 2021-05-14 Test method, test device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113190456B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468507A (en) * 2014-09-03 2016-04-06 腾讯科技(深圳)有限公司 Branch fulfillment detection method and apparatus
US9430229B1 (en) * 2013-03-15 2016-08-30 Atlassian Pty Ltd Merge previewing in a version control system
CN112732578A (en) * 2021-01-11 2021-04-30 北京字节跳动网络技术有限公司 Code performance evaluation method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9684507B2 (en) * 2015-03-31 2017-06-20 Ca, Inc. Effective defect management across multiple code branches
US10922213B2 (en) * 2019-05-29 2021-02-16 Red Hat, Inc. Embedded quality indication data for version control systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9430229B1 (en) * 2013-03-15 2016-08-30 Atlassian Pty Ltd Merge previewing in a version control system
CN105468507A (en) * 2014-09-03 2016-04-06 腾讯科技(深圳)有限公司 Branch fulfillment detection method and apparatus
CN112732578A (en) * 2021-01-11 2021-04-30 北京字节跳动网络技术有限公司 Code performance evaluation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Android操作系统的App环境分离实现技术;杨柏楠;《中国高新区》;20171031(第19期);189 *

Also Published As

Publication number Publication date
CN113190456A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
CN106909510B (en) Method for obtaining test case and server
CN112394942B (en) Distributed software development compiling method and software development platform based on cloud computing
CN103970659B (en) Android application software automation testing method based on pile pitching technology
CN108920370B (en) Compatibility problem detection method, device and equipment
US10354031B2 (en) Information processing by interpenetrating signal transmission channel in design for testability of chip
CN109977670B (en) Android application security monitoring method based on plug-in loading and storage medium
CN111158741B (en) Method and device for monitoring dependency relationship change of service module on third party class library
CN106407111B (en) Terminal test device, terminal test equipment and variable maintaining method
CN111897570A (en) Multi-dependency file extraction method and device based on Maven plug-in
CN104679500B (en) Method and device for realizing automatic generation of entity class
CN111797073A (en) Database management method, electronic device, and computer-readable storage medium
US9760470B2 (en) Device, method, and program analysis of new source code to be added to execution program to check for bug
CN101739340A (en) Method and device for verifying script file
CN116610568A (en) Method, device, equipment and medium for identifying dependency relationship of codes
CN112052037A (en) Application software development method, device, equipment and medium
CN113190456B (en) Test method, test device, electronic equipment and storage medium
CN110618829A (en) Business data checking method and system for upgrading database system
CN111857752B (en) PostgreSQL database installation method, device and equipment
CN110968507B (en) Coverage rate statistics method and coverage rate statistics device
CN113688031B (en) Test positioning method based on byte code enhancement technology
CN115456628A (en) Intelligent contract viewing method and device based on block chain, storage medium and equipment
CN114816984A (en) JAVA program regression test method and test device
CN115809290A (en) Method, device, equipment and medium for generating data persistence layer entry
CN103677846A (en) SQLite database development kit and development method thereof
US20120330878A1 (en) Conventions for inferring data models

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
GR01 Patent grant
GR01 Patent grant