CN109558315B - Method, device and equipment for determining test range - Google Patents

Method, device and equipment for determining test range Download PDF

Info

Publication number
CN109558315B
CN109558315B CN201811350851.3A CN201811350851A CN109558315B CN 109558315 B CN109558315 B CN 109558315B CN 201811350851 A CN201811350851 A CN 201811350851A CN 109558315 B CN109558315 B CN 109558315B
Authority
CN
China
Prior art keywords
interface
determining
test
safety
level
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
CN201811350851.3A
Other languages
Chinese (zh)
Other versions
CN109558315A (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.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance 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 Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201811350851.3A priority Critical patent/CN109558315B/en
Publication of CN109558315A publication Critical patent/CN109558315A/en
Application granted granted Critical
Publication of CN109558315B publication Critical patent/CN109558315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface

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

The embodiment of the invention provides a method, a device and equipment for determining a test range. The method comprises the following steps: acquiring a log analysis file in a preset format; determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function; determining a first interface according to the requirement change information, wherein the first interface comprises at least one changed interface; and determining a test range according to the first interface and the incidence relation. The method of the embodiment of the invention can accurately determine the test range and improve the test efficiency.

Description

Method, device and equipment for determining test range
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device and equipment for determining a test range.
Background
If the code is modified during the software development process, then a retest is required to confirm whether the modification introduced a new error or caused an error in other code, i.e., a regression test is performed. How to determine the range of regression testing is an important factor affecting the efficiency of software testing and the quality of software.
At present, the regression testing range is determined only by the experience of developers or testers, the testing missing risk exists, and the software quality safety cannot be guaranteed; performing a comprehensive regression test wastes testing resources, increases software cost, and affects software development progress.
How to accurately determine the test range is a problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for determining a test range, which are used for accurately determining the test range and improving the test efficiency.
In a first aspect, an embodiment of the present invention provides a method for determining a test range, including:
acquiring a log analysis file in a preset format;
determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function;
determining a first interface according to the requirement change information, wherein the first interface comprises at least one changed interface;
and determining a test range according to the first interface and the association relation.
Optionally, determining the test range according to the first interface and the association relationship includes:
determining a function corresponding to the first interface according to the first interface and the mapping relation between the interface and the function;
determining the test range includes testing a function corresponding to the first interface.
Optionally, the association relationship further includes a mapping relationship between the interface and the related interface, the related interface includes a called interface and a called interface, and the test range is determined according to the first interface and the association relationship, further including:
determining a second interface according to the first interface and the mapping relation between the interface and the related interface, wherein the second interface is the interface related to the first interface;
determining a function corresponding to the second interface according to the second interface and the mapping relation between the interface and the function;
determining the test range further includes testing a function corresponding to the second interface.
Optionally, the association relationship further includes a mapping relationship between the interface and the application, and the determining the test range according to the first interface and the association relationship further includes:
determining the application to which the first interface belongs according to the first interface and the mapping relation between the interface and the application;
determining the safety testing level of the first interface according to the application to which the first interface belongs and a preset safety dictionary, wherein the preset safety dictionary comprises a mapping relation between the application and the safety testing level;
and if the safety test level of the first interface is higher than the preset safety test level, determining that the test range also comprises the safety test of the first interface.
Optionally, determining a test range according to the first interface and the association relationship, further comprising:
determining the performance test level of the first interface according to the application to which the first interface belongs and a preset performance dictionary, wherein the preset performance dictionary comprises a mapping relation between the application and the performance test level;
and if the performance test level of the first interface is higher than the preset performance test level, determining the test range and carrying out the performance test on the first interface.
Optionally, the method further includes:
and generating early warning information according to the safety test grade and/or the performance test grade of the first interface.
Optionally, the method further includes:
and sending the early warning information to the target user through the instant messaging tool.
In a second aspect, an embodiment of the present invention provides an apparatus for determining a test range, including:
the acquisition module is used for acquiring a log analysis file in a preset format;
the analysis module is used for determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function;
the change module is used for determining a first interface according to the requirement change information, wherein the first interface comprises at least one changed interface;
and the determining module is used for determining the test range according to the first interface and the incidence relation.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method according to any one of the first aspect.
According to the method, the device and the equipment for determining the test range, the obtained log analysis file in the preset format is analyzed, the incidence relation related to the interface is determined, the requirement change information is analyzed, the first interface is determined, the first interface comprises at least one changed interface, and the test range is determined according to the first interface and the incidence relation, so that the accuracy of determining the test range is improved, and the test efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flowchart of an embodiment of a method for determining a test range according to the present invention;
FIG. 2 is a flowchart of a method for determining a test range according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an embodiment of a device for determining a test range according to the present invention;
fig. 4 is a schematic structural diagram of an embodiment of an electronic device provided in the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terms "comprising" and "having," and any variations thereof, in the description and claims of this invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The terms "first" and "second" in the present application are used for identification purposes only and are not to be construed as indicating or implying a sequential relationship, relative importance, or implicitly indicating the number of technical features indicated. "plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
Fig. 1 is a flowchart of an embodiment of a method for determining a test range, as shown in fig. 1, the method of this embodiment may include:
s101, acquiring a log analysis file in a preset format.
Optionally, the preset format may be a format agreed in advance by developers and testers, or may also be a format required by the log analysis tool, so as to obtain a log analysis file with a uniform format, which is convenient for subsequent analysis.
Optionally, a software developer may add corresponding log printing statements in a software development code according to a preset format in the software development process, so that a log analysis file in the preset format is output when the software runs.
For example, for one implementation of interface A, a log record such as "interface A-System A-Login-engineering 1-Call interface B" may be output. Compared with the analysis of codes, the analysis log has much lower difficulty, so that the requirement on testers can be reduced, and the cost is reduced.
And S102, determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function.
Optionally, the log analysis file in the preset format may be analyzed by the log analysis tool according to a preset rule to determine the association relationship.
For each record in the log analysis file with the preset format, one record in the association relationship may be determined, and the association relationship may include a mapping relationship between an interface and a function. For example, by analyzing the log record "interface a-system a-login-project 1-call interface B", it can be determined that the function corresponding to interface a is login.
Since the analysis of the log analysis file is a continuous process, information screening is required to avoid information redundancy. And comparing the incidence relation record determined according to the log record with the stored incidence relation, if the incidence relation record exists, discarding the incidence relation record, and if the incidence relation record does not exist, storing the incidence relation record.
S103, determining a first interface according to the demand change information, wherein the first interface comprises at least one changed interface.
The requirement change information in this embodiment may be a change document from a requirement engineer, for example, requirement change information generated by the requirement engineer according to a requirement of a client; the changes generated by code optimization and function optimization can also be obtained from developers, such as developers.
By analyzing the requirement change information, the changed interface can be determined. The first interface in this embodiment may include at least one changed interface.
It should be noted that, in this embodiment, no requirement is made on the execution order of S102 and S103.
And S104, determining a test range according to the first interface and the association relation.
In this embodiment, the test range may be determined according to the first interface, that is, the changed interface, and the mapping relationship between the interface and the function. For example, the test scope may include tests performed on the modified interface and tests performed on the function corresponding to the modified interface. The tests may include a white box test and a black box test.
In the embodiment, the changed interface is determined according to the requirement change information, the incidence relation related to the interface is determined according to the log analysis file, and the test range is determined according to the incidence relation. Moreover, the test range in this embodiment is determined according to the changed interface and the association relationship thereof, and compared with a comprehensive regression test, the test range is much smaller, so that the test resources can be effectively saved, and the test cost can be reduced.
According to the method for determining the test range, the obtained log analysis file in the preset format is analyzed, the association relation related to the interface is determined, the first interface is determined by analyzing the requirement change information, the first interface comprises at least one changed interface, and then the test range is determined according to the first interface and the association relation, so that the accuracy of determining the test range is improved, and the test efficiency is improved.
Optionally, determining the test range according to the first interface and the association relationship may include:
and determining the function corresponding to the first interface according to the first interface and the mapping relation between the interface and the function.
If the first interface includes a plurality of changed interfaces, it is necessary to determine a function corresponding to each changed interface.
Determining the test range includes testing a function corresponding to the first interface.
The test range in this embodiment may include all tests performed on the function corresponding to the first interface. For example, all the functional test cases for the function corresponding to the changed interface may be included in the test range.
Optionally, on the basis of the foregoing embodiment, in order to further improve reliability and comprehensiveness of the test, the association relationship may further include a mapping relationship between an interface and a related interface, where the related interface includes a called interface and a called interface, and the determining the test range according to the first interface and the association relationship further includes:
and determining a second interface according to the first interface and the mapping relation between the interface and the related interface, wherein the second interface is the interface related to the first interface. The second interface comprises an interface called by the first interface and an interface calling the first interface.
And determining the function corresponding to the second interface according to the second interface and the mapping relation between the interface and the function.
If the second interface includes a plurality of interfaces associated with the first interface, a function corresponding to each interface needs to be determined.
Determining the test range further includes testing a function corresponding to the second interface.
In this embodiment, the test range may include all tests performed on the function corresponding to the first interface and the function corresponding to the second interface. For example, all functional test cases of the function corresponding to the first interface and the function corresponding to the second interface may be included in the test range.
It can be understood that the reliability requirement, the comprehensiveness requirement, the test resource and the test time of the test can be comprehensively considered when determining the test range. For example, if the requirements on reliability and comprehensiveness are low, the test resources are limited, and the test time is short, only the changed interface may be considered, that is, it may be determined that the test range may include the test performed on the function corresponding to the first interface; if the requirements on reliability and comprehensiveness are high, the test resources are rich, and the test time is sufficient, not only the changed interface but also the interface related to the changed interface may be considered, that is, it may be determined that the test range may include tests performed on the function corresponding to the first interface and the function corresponding to the second interface.
On the basis of the above embodiments, the present embodiment combines the above embodiments. Fig. 2 is a flowchart of a method for determining a test range according to another embodiment of the present invention, as shown in fig. 2, the method of this embodiment may include:
s201, acquiring a log analysis file in a preset format.
S202, determining an association relation according to the log analysis file, wherein the association relation comprises a mapping relation between an interface and a function and a mapping relation between the interface and a related interface, and the related interface comprises a calling interface and a called interface.
Table 1 is an example of the determined association from the log analysis file. The function corresponding to the interface A is registration, the interface A is called by the interface C, and the interface A calls the interface E.
TABLE 1
Interface name Function(s) Is called up Invoking
Interface A Registration Interface C Interface E
Interface B Front page Interface C Interface F
Interface C Login to Interface D Interfaces A and B
Interface D Downloading Interface G Interface C
S203, determining a first interface according to the requirement change information, wherein the first interface comprises at least one changed interface.
By analyzing the requirement change information, the changed interface can be determined. The first interface determined in this embodiment is, for example, interface C.
And S204, determining the function corresponding to the first interface according to the first interface and the mapping relation between the interface and the function.
Taking the first interface as the interface C as an example, according to the interface C and the mapping relationship between the interface and the function shown in table 1, the function corresponding to the interface C can be determined as login.
S205, determining a second interface according to the first interface and the mapping relation between the interface and the related interface, wherein the second interface is the interface related to the first interface; and determining the function corresponding to the second interface according to the second interface and the mapping relation between the interface and the function.
Still taking the first interface as the interface C as an example, according to the interface C and the mapping relationship between the interface shown in table 1 and the related interface, it may be determined that the interface C calls the interfaces a and B, and the interface C is called by the interface D, that is, the second interface includes the interface a, the interface B, and the interface D.
According to the second interface and the mapping relationship between the interface and the function shown in table 1, it can be determined that the function corresponding to the interface a is registration, the function corresponding to the interface B is home page, and the function corresponding to the interface D is download, that is, the function corresponding to the second interface includes: registration, home page, and download.
S206, determining the test range comprises testing the function corresponding to the first interface and the function corresponding to the second interface.
Still taking the first interface as interface C and taking the association relationship as table 1 as an example, the determined test range may include tests performed on login, registration, home page, and download functions.
The method for determining the test range according to this embodiment determines the first interface according to the requirement change information, determines the association relationship according to the log analysis file, determines the second interface according to the first interface and the association relationship, and determines the test range including testing the functions corresponding to the first interface and the second interface. The determined test range relates to the changed interface and the interface related to the changed interface, so that the influence of the change on the test range is more accurately determined, the reliability and comprehensiveness of the test are improved, the test missing can be effectively avoided, and the waste of test resources can also be avoided.
Optionally, on the basis of the foregoing embodiment, in order to refine the security test to the interface level, the association relationship in this embodiment may further include a mapping relationship between the interface and the application, and determine the test range according to the first interface and the association relationship, and may further include:
TABLE 2
Interface name Function(s) Is called up Invoking Applications of
Interface A Registration Interface C Interface E System B
Interface B Front page Interface C Interface F System C
Interface C Login to Interface D Interfaces A and B System A
Interface D Downloading Interface G Interface C System A
Table 2 is an example of the association relationship in the present embodiment. As shown in table 2, the mapping relationship between the interface and the application is included.
And determining the application to which the first interface belongs according to the first interface and the mapping relation between the interface and the application.
With the first interface as interface C and the association relationship shown in table 2, it can be determined that the application to which the first interface belongs is system a.
And determining the safety testing level of the first interface according to the application to which the first interface belongs and a preset safety dictionary, wherein the preset safety dictionary comprises a mapping relation between the application and the safety testing level.
Table 3 is an example of a preset security dictionary. As shown in table 3, the security test level of the system a is high, and thus, the security test level of the first interface C is high.
TABLE 3
Applications of Safety test grade
System A Height of
System B In
System C Height of
System D Is low in
And if the safety test level of the first interface is higher than the preset safety test level, determining that the test range also comprises the safety test of the first interface.
The embodiment associates the interface with the safety test level through application, so that the safety test is refined to the interface level, and the test range can be determined more accurately.
Optionally, the safety test level of the second interface may also be determined, and when the safety test level meets the preset condition, the determination of the test range further includes a safety test performed on the second interface.
The preset condition may be, for example, that the safety test level is higher than the preset safety test level, and the safety test flag indicates that the safety test is not performed. The safety test flag is used to identify whether a safety test is performed, and for example, a 1 may be set to indicate that the safety test is performed, and a 0 may indicate that the safety test is not performed.
Optionally, on the basis of the foregoing embodiment, in order to refine the performance test to the interface level, in this embodiment, the determining the test range according to the first interface and the association relationship may further include:
determining the performance test level of the first interface according to the application to which the first interface belongs and a preset performance dictionary, wherein the preset performance dictionary comprises a mapping relation between the application and the performance test level;
table 4 is an example of a preset performance dictionary. As shown in table 4, the performance test level of the system a is medium, and therefore, the performance test level of the first interface C is medium.
TABLE 4
Figure BDA0001864819790000091
Figure BDA0001864819790000101
And if the performance test level of the first interface is higher than the preset performance test level, determining the test range and carrying out the performance test on the first interface.
The performance test is to test each performance index by simulating various normal, peak and abnormal load conditions. The performance tests may include load tests and pressure tests.
The embodiment associates the interface with the performance test level through application, so that the performance test is refined to the interface level, and the test range can be determined more accurately.
Optionally, the performance test level of the second interface may be further determined, and when the performance test level meets the preset condition, determining the test range further includes performing a performance test on the second interface.
The preset condition may be, for example, that the performance test level is higher than the preset performance test level, and the performance test flag indicates that no performance test has been performed. The performance test flag is used to identify whether a performance test is performed, for example, a 1 may be set to indicate that the performance test is performed, and a 0 may indicate that the performance test is not performed.
Optionally, on the basis of the above embodiment, in order to perform early warning on the test risk in time, the method may further include:
and generating early warning information according to the safety test grade and/or the performance test grade of the first interface.
For example, interfaces which have a high security test level and/or performance test level and have not been subjected to the security test and/or performance test may be screened out to generate warning information to remind the user. The early warning information may include interface information that requires security testing and/or performance testing.
Optionally, on the basis of the foregoing embodiment, in order to enable a target user, for example, a tester, to obtain early warning information in time, the method may further include:
and sending the early warning information to the target user through the instant messaging tool. The instant messaging tool may include, for example, a WeChat. And a reference range is provided for timely and accurate arrangement of performance and safety tests for a target user.
Fig. 3 is a schematic diagram of a device for determining a test range according to an embodiment of the present invention, which is only illustrated in fig. 3, and the embodiment of the present invention is not limited thereto. Fig. 3 is a device for determining a test range provided by the present invention. As shown in fig. 3, the test range determining apparatus 30 provided in the present embodiment includes: an acquisition module 301, an analysis module 302, a modification module 303, and a determination module 304.
The obtaining module 301 is configured to obtain a log analysis file in a preset format.
The analysis module 302 is configured to determine an association relationship according to the log analysis file, where the association relationship includes a mapping relationship between an interface and a function.
And a changing module 303, configured to determine a first interface according to the demand change information, where the first interface includes at least one changed interface.
A determining module 304, configured to determine a test range according to the first interface and the association relationship.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Optionally, the determining module 304 may be specifically configured to,
and determining the function corresponding to the first interface according to the first interface and the mapping relation between the interface and the function.
Determining the test range includes testing a function corresponding to the first interface.
Optionally, the association relationship may further include a mapping relationship between the interfaces and the related interfaces, where the related interfaces include the called and called interfaces, and the determining module 304 may further be configured to,
and determining a second interface according to the first interface and the mapping relation between the interface and the related interface, wherein the second interface is the interface related to the first interface.
And determining the function corresponding to the second interface according to the second interface and the mapping relation between the interface and the function.
Determining the test range further includes testing a function corresponding to the second interface.
Optionally, the association relationship may also include a mapping relationship between the interface and the application, and the determining module 304 may also be configured to,
determining the application to which the first interface belongs according to the first interface and the mapping relation between the interface and the application;
determining the safety testing level of the first interface according to the application to which the first interface belongs and a preset safety dictionary, wherein the preset safety dictionary comprises a mapping relation between the application and the safety testing level;
and if the safety test level of the first interface is higher than the preset safety test level, determining that the test range also comprises the safety test of the first interface.
Optionally, the determining module 304 may also be configured to,
determining the performance test level of the first interface according to the application to which the first interface belongs and a preset performance dictionary, wherein the preset performance dictionary comprises a mapping relation between the application and the performance test level;
and if the performance test level of the first interface is higher than the preset performance test level, determining the test range and carrying out the performance test on the first interface.
Optionally, the device 30 for determining a test range may further include a generating module, configured to generate the warning information according to the safety test level and/or the performance test level of the first interface.
Optionally, the device 30 for determining the test range may further include a sending module, configured to send the warning message to the target user through an instant messaging tool.
Fig. 4 is a schematic view of an electronic device according to an embodiment of the present invention, which is illustrated in fig. 4, and the embodiment of the present invention is only illustrated in fig. 4, which does not limit the present invention. As shown in fig. 4, the electronic device 40 provided in this embodiment may include: memory 401, processor 402, and bus 403. The bus 403 is used for connecting the elements.
The memory 401 stores a computer program, which when executed by the processor 402 may implement the solution of any of the above-described method embodiments.
Wherein the memory 401 and the processor 402 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines, such as bus 403. The memory 401 stores therein a computer program for implementing the method for determining the test range, which includes at least one software functional module that can be stored in the memory 401 in the form of software or firmware, and the processor 402 executes various functional applications and data processing by running the software program and the module stored in the memory 401.
The Memory 401 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 401 is used for storing programs, and the processor 402 executes the programs after receiving the execution instructions. Further, the software programs and modules in the memory 401 may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor 402 may be an integrated circuit chip having signal processing capabilities. The Processor 402 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and so on. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. It will be appreciated that the configuration of fig. 4 is merely illustrative and may include more or fewer components than shown in fig. 4 or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware and/or software.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the method for determining the test range provided in any of the above method embodiments. The computer-readable storage medium in this embodiment may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that is integrated with one or more available media, and the available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., SSDs), etc.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for determining a test range, comprising:
acquiring a log analysis file in a preset format;
determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function;
determining a first interface according to the requirement change information, wherein the first interface comprises at least one changed interface;
determining a test range according to the first interface and the incidence relation;
the association relationship further includes a mapping relationship between an interface and an application, and determining a test range according to the first interface and the association relationship includes:
determining the application to which the first interface belongs according to the first interface and the mapping relation between the interface and the application;
determining the safety testing level of the first interface according to the application to which the first interface belongs and a preset safety dictionary, wherein the preset safety dictionary comprises a mapping relation between the application and the safety testing level;
and if the safety test level of the first interface is higher than a preset safety test level, determining that the test range further comprises a safety test performed on the first interface.
2. The method of claim 1, wherein determining a test scope based on the first interface and the association further comprises:
determining a function corresponding to the first interface according to the first interface and the mapping relation between the interface and the function;
determining the test range comprises testing a function corresponding to the first interface.
3. The method of claim 2, wherein the association further includes a mapping relationship between interfaces and related interfaces, wherein the related interfaces include called and called interfaces, and wherein determining a test range according to the first interface and the association further includes:
determining a second interface according to the first interface and the mapping relation between the interface and the related interface, wherein the second interface is the interface related to the first interface;
determining a function corresponding to the second interface according to the second interface and the mapping relation between the interface and the function;
determining the test range further includes testing a function corresponding to the second interface.
4. The method of claim 2, wherein determining a test range based on the first interface and the association further comprises:
determining a performance test level of the first interface according to the application to which the first interface belongs and a preset performance dictionary, wherein the preset performance dictionary comprises a mapping relation between the application and the performance test level;
and if the performance test level of the first interface is higher than a preset performance test level, determining that the test range further comprises a performance test performed on the first interface.
5. The method of claim 4, further comprising:
and generating early warning information according to the safety test level and/or the performance test level of the first interface.
6. The method of claim 5, further comprising:
and sending the early warning information to a target user through an instant messaging tool.
7. An apparatus for determining a test range, comprising:
the acquisition module is used for acquiring a log analysis file in a preset format;
the analysis module is used for determining an incidence relation according to the log analysis file, wherein the incidence relation comprises a mapping relation between an interface and a function; the incidence relation also comprises a mapping relation between the interface and the application;
the system comprises a change module, a first interface module and a second interface module, wherein the change module is used for determining the first interface according to the requirement change information, and the first interface comprises at least one changed interface;
the determining module is used for determining the application to which the first interface belongs according to the first interface and the mapping relation between the interface and the application, and determining the safety testing level of the first interface according to the application to which the first interface belongs and a preset safety dictionary, wherein the preset safety dictionary comprises the mapping relation between the application and the safety testing level; and if the safety test level of the first interface is higher than a preset safety test level, determining that the test range further comprises a safety test performed on the first interface.
8. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-6.
9. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the method of any one of claims 1-6.
CN201811350851.3A 2018-11-14 2018-11-14 Method, device and equipment for determining test range Active CN109558315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811350851.3A CN109558315B (en) 2018-11-14 2018-11-14 Method, device and equipment for determining test range

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811350851.3A CN109558315B (en) 2018-11-14 2018-11-14 Method, device and equipment for determining test range

Publications (2)

Publication Number Publication Date
CN109558315A CN109558315A (en) 2019-04-02
CN109558315B true CN109558315B (en) 2022-02-15

Family

ID=65866378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811350851.3A Active CN109558315B (en) 2018-11-14 2018-11-14 Method, device and equipment for determining test range

Country Status (1)

Country Link
CN (1) CN109558315B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486738B (en) * 2019-09-12 2022-04-26 阿里巴巴集团控股有限公司 Load testing method and device, electronic equipment and computer readable storage medium
CN111045848B (en) * 2019-12-19 2024-04-19 广州唯品会信息科技有限公司 Log analysis method, terminal device and computer readable storage medium
CN112416781B (en) * 2020-11-25 2024-09-27 广州品唯软件有限公司 Cross-system interface determination method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085555A (en) * 2017-04-19 2017-08-22 广州视源电子科技股份有限公司 code testing method, device, terminal and storage medium
CN107193739A (en) * 2017-05-23 2017-09-22 张泽祎 A kind of black box regression testing method
CN108459949A (en) * 2017-02-17 2018-08-28 腾讯科技(深圳)有限公司 A kind of test method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110271253A1 (en) * 2010-04-28 2011-11-03 International Business Machines Corporation Enhancing functional tests coverage using traceability and static analysis

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459949A (en) * 2017-02-17 2018-08-28 腾讯科技(深圳)有限公司 A kind of test method and terminal
CN107085555A (en) * 2017-04-19 2017-08-22 广州视源电子科技股份有限公司 code testing method, device, terminal and storage medium
CN107193739A (en) * 2017-05-23 2017-09-22 张泽祎 A kind of black box regression testing method

Also Published As

Publication number Publication date
CN109558315A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
CN109558315B (en) Method, device and equipment for determining test range
CN111045921A (en) Automatic interface testing method and device, computer equipment and storage medium
CN110096430B (en) Third party SDK access test method, device, terminal and storage medium
CN111338958B (en) Parameter generation method and device for test cases and terminal equipment
CN110308880B (en) Log printing method, system, computer device and computer readable storage medium
CN110737689A (en) Data standard conformance detection method, device, system and storage medium
CN111209736A (en) Text file analysis method and device, computer equipment and storage medium
CN112241362A (en) Test method, test device, server and storage medium
CN112799953A (en) Interface testing method and device, computer equipment and storage medium
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
CN112988589A (en) Interface testing method, device and system
CN110162982B (en) Method and device for detecting illegal rights, storage medium and electronic equipment
CN116401113A (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN110837469B (en) Data testing method and device, testing server and storage medium
CN115580522A (en) Method and device for monitoring running state of container cloud platform
CN114598547A (en) Data analysis method applied to network attack recognition and electronic equipment
CN112631929A (en) Test case generation method and device, storage medium and electronic equipment
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN113377648A (en) Software system diagnosis method and device, electronic equipment and computer readable medium
CN116954975A (en) Fault processing method, system and device for software product and storage medium
CN116610559A (en) Test method, test device, electronic equipment and computer readable storage medium
CN118535462A (en) Buried point test method, buried point test device, electronic equipment and readable storage medium
CN117131453A (en) Abnormality diagnosis method and device, electronic equipment and storage medium
CN117573461A (en) Method and system for verifying credit-fit performance of power information system

Legal Events

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