CN116225960A - Test method and device and electronic equipment - Google Patents

Test method and device and electronic equipment Download PDF

Info

Publication number
CN116225960A
CN116225960A CN202310313238.9A CN202310313238A CN116225960A CN 116225960 A CN116225960 A CN 116225960A CN 202310313238 A CN202310313238 A CN 202310313238A CN 116225960 A CN116225960 A CN 116225960A
Authority
CN
China
Prior art keywords
test
target
file information
subdirectory
hierarchical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310313238.9A
Other languages
Chinese (zh)
Inventor
陈小龙
何坤
黄�俊
汤旭
叶晓虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Nsfocus Technologies Inc
Nsfocus Technologies Group 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 Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Nsfocus Technologies Inc
Priority to CN202310313238.9A priority Critical patent/CN116225960A/en
Publication of CN116225960A publication Critical patent/CN116225960A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a testing method and device and electronic equipment, wherein the method comprises the following steps: acquiring target file information corresponding to a target test task, and determining a target test tag corresponding to the target file information based on a first mapping relation between preset file information and the test tag; determining a target test case corresponding to the target test tag based on a second mapping relation between the preset test tag and the test case; under a test environment, testing a target test task by using a target test case; and determining the failure file information corresponding to the failure test case, and feeding back the failure file information. Therefore, in the receiving test process, all cases are required to be executed in each test, so that the time cost is increased, meanwhile, the modified content cannot be tested in a targeted manner, a large number of redundant tests are caused, and the efficiency is reduced.

Description

Test method and device and electronic equipment
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a testing method and apparatus, and an electronic device.
Background
At present, the main process of receiving test is mainly that new codes are lifted and tested, mirror images are manufactured manually or semi-automatically, then, the test purpose is achieved by combining some automatic frame tests and various unit tests, each test needs to be tested in a targeted manner by executing all cases, so that time waste is caused, efficiency is low, and the iteration speed of a version is slowed down. Meanwhile, the problem can not be accurately positioned by the test, so that the time cost for backtracking the problem is greatly increased.
Disclosure of Invention
The application aims to provide a testing method and device and electronic equipment. The method and the device are used for solving the problems that in the receiving test process, all use cases are required to be executed for each test, so that the time cost is increased, meanwhile, the modified content cannot be tested in a targeted manner, a large number of redundant tests are caused, and the efficiency is reduced.
In a first aspect, an embodiment of the present application provides a testing method applied to a first network device, where the method includes:
acquiring target file information corresponding to a target test task, and determining a target test tag corresponding to the target file information based on a first mapping relation between preset file information and the test tag;
determining a target test case corresponding to the target test tag based on a second mapping relation between the preset test tag and the test case;
under a test environment, testing the target test task by using the target test case; the test environment is obtained by initializing tested network equipment and auxiliary test equipment corresponding to the target test task by utilizing a target mirror corresponding to the target test task;
determining failure file information corresponding to the failure test case, and feeding back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
In some possible embodiments, determining, based on a first mapping relationship between preset file information and test tags, a target test tag corresponding to the target file information includes:
determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information; wherein each of the at least one hierarchical subdirectory includes file information therein;
and determining a target test tag corresponding to the file information in the target level subdirectory based on the first mapping relation.
In some possible embodiments, the determining the target hierarchical subdirectory from at least one hierarchical subdirectory included in the target file information includes:
for each hierarchical subdirectory of the at least one hierarchical subdirectory, determining the hierarchical subdirectory as a target hierarchical subdirectory when the ratio of the number of second file information in the hierarchical subdirectory to the total number of file information contained in the hierarchical subdirectory is greater than or equal to a set threshold;
the file information contained in the hierarchical subdirectory comprises first file information belonging to a new addition category and second file information not belonging to the new addition category.
In some possible embodiments, the determining the failure file information corresponding to the failure test case includes:
based on the second mapping relation, determining a failure test label corresponding to the failure test case;
and determining failure file information corresponding to the failure test label based on the first mapping relation.
In a second aspect, embodiments of the present application provide a test apparatus, the apparatus including:
the target test label determining module is used for acquiring target file information corresponding to a target test task and determining a target test label corresponding to the target file information based on a first mapping relation between preset file information and the test label;
the target test case determining module is used for determining a target test case corresponding to a target test tag based on a second mapping relation between the preset test tag and the test case;
the test module is used for testing the target test task by utilizing the target test case under a test environment; the test environment is obtained by initializing tested network equipment and auxiliary test equipment corresponding to the target test task by utilizing a target mirror corresponding to the target test task;
the feedback module is used for determining failure file information corresponding to the failure test case and feeding back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
In a third aspect, embodiments of the present application provide an electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test method provided in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing a computer program for causing a computer to execute the test method provided in the first aspect.
According to the embodiment of the application, a mode of full-automatic test and test case selection is adopted, meanwhile, the label generator is adopted, modification of codes can be automatically identified, the test cases are automatically selected, the full-automatic process of development, production, test and feedback is completed, the time for receiving the test and the probability of test failure caused by error code submission in the development process are greatly reduced, and the process of developing self-test and upgrading package manufacture is simplified. Meanwhile, the corresponding modification points can be tested in a targeted manner, the testing process is simplified, the overall testing efficiency is improved, and the problems caused by modification of codes can be exposed as soon as possible. The automatic test case matching technology is used, so that test case selection and test execution are invisible to users, and the threshold used by the automatic test system is reduced, namely, all users are faced in a black box mode. Besides the developer, other non-code submitters can also select test cases to execute verification tests only according to the built-in function tags.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, and it is obvious that the drawings that are described below are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a network device according to an embodiment of the present application;
FIG. 2 is a flow chart of a test method according to one embodiment of the present application;
FIG. 3 is a schematic diagram of the structure of directories and files in a target test task according to one embodiment of the present application;
FIG. 4 is a schematic diagram of a test device according to one embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and in addition, in the description of the embodiments of the present application, "plural" means two or more than two.
In the description of the embodiments of the present application, unless otherwise indicated, the term "plurality" refers to two or more, and other words and phrases are to be understood and appreciated that the preferred embodiments described herein are for illustration and explanation of the present application only and are not intended to limit the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
In order to further explain the technical solutions provided in the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide the method operational steps as shown in the following embodiments or figures, more or fewer operational steps may be included in the method based on routine or non-inventive labor. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the control device is executing.
In view of the problem that in the related art, in the receiving test process, each test needs to execute all cases, which leads to an increase in time cost, and meanwhile, the modified content cannot be tested in a targeted manner, so that a large number of redundant tests are caused, and the efficiency is reduced. The application provides the testing method and device and the electronic equipment, which can quickly realize the testing automation, improve the testing efficiency, have targeted testing modification points, face all users in a black box mode, and simultaneously can facilitate further functional perfection in subsequent maintenance.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The test method in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of a network device according to an embodiment of the present application is shown.
As shown in FIG. 1, in a first network device, there are 5 parts including a task pool, a label generator, a test case set, an environment instantiation, and a result analyzer. The function of each part is explained in more detail below. The overall application environment in the application includes a network system, where the network system includes a first network device for deploying an overall test method, a device under test for testing, and auxiliary devices for providing some auxiliary support for a test process, such as providing traffic, data packets, and the like.
Fig. 2 shows a flow chart of a test method according to an embodiment of the present application, including:
step 201: acquiring target file information corresponding to a target test task, and determining a target test tag corresponding to the target file information based on a first mapping relation between preset file information and the test tag.
Specifically, when a developer submits a new code to be tested, the first network device automatically creates a test task and adds the test task to the task pool.
As an optional implementation manner, determining the target test tag corresponding to the target file information based on the first mapping relation between the preset file information and the test tag includes: determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information; wherein each of the at least one hierarchical subdirectory includes file information therein; and determining a target test tag corresponding to the file information in the target level subdirectory based on the first mapping relation.
Specifically, the monitoring process sequentially acquires target file information corresponding to a target test task from the task pool, where the target test task corresponds to at least one target file information, the target file information includes directory information where a new code submitted by a developer is located, for example, referring to fig. 3, the target test task includes 6 target file information, the 6 target file information is respectively set in different directory information, a directory a, a directory B, and a directory C may be defined as a first-level subdirectory, and a directory a, a directory B, and a directory C may be defined as a second-level subdirectory.
The first mapping relation is a corresponding relation between preset file information and a test label, the test label is used for identifying the corresponding file information, and the test label corresponding to the target file information can be determined through the first mapping relation. It should be noted that, the tag generator receives the target file information from the task pool, and generates the corresponding target test tag through the directory where the target file information is located.
As an alternative embodiment, determining the target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information includes: for each hierarchical subdirectory of the at least one hierarchical subdirectory, determining the hierarchical subdirectory as a target hierarchical subdirectory when the ratio of the number of second file information in the hierarchical subdirectory to the total number of file information contained in the hierarchical subdirectory is greater than or equal to a set threshold; the file information contained in the hierarchical subdirectory comprises first file information belonging to a new addition category and second file information not belonging to the new addition category.
As an alternative embodiment, the threshold is sixty percent, and it should be noted that this threshold may be adjusted according to specific test requirements.
Specifically, referring to FIG. 3, suppose that the target test task in a system modifies the code for a developer by modifying directory A/File 1, modifying directory A/directory a/File 3, modifying directory B/directory a/File 4, and adding directory C/directory C/File 7. Since the proportion of the total number of modified files to the total number of files (6 files) is 50% (because file 7 is newly added and excluded), and is not more than 60% (threshold is set), the hierarchical subdirectory where each file is located is recursively judged. According to the above judgment condition, the file 1 returns to the tag a, the file 3 returns to the tag a (because the total number of files modified by the whole directory a is greater than 60% of the total number of files in the directory a under the directory a, the file 4 returns to the directory a instead of the directory a/a), the file 4 returns to the tag B/a (because the total number of files modified by the whole directory B under the directory B is less than 60% of the total number of files in the directory B, the recursive sub-directory B/a is continued, and thus the sub-directory B/a is returned), and the file 7 carries information (C/file 7) to inform the tester to supplement the functional test case according to the directory information. The label generator outputs the label of the task as (A, B/a), namely, the code modifies all files of the directory A to be tested and the files of the subdirectory a of the directory B.
Step 202: and determining a target test case corresponding to the target test tag based on a second mapping relation between the preset test tag and the test case.
Specifically, the second mapping relationship is a correspondence relationship between a preset test tag and a test case, and is used for associating the target test tag with the target test case, the directory structure of the test case set has a correspondence relationship with the code directory of the system to be tested, the code directory of the system to be tested corresponds to a certain function, meanwhile, the directory name corresponds to the test case of each function in the test case set, that is, the generated target test tag is transmitted to the test case set, and the monitoring process automatically matches the target test case according to the transmitted target test tag, so as to complete the association of the case. According to the test cases corresponding to the test labels, automatic selection of the test cases according to the test labels is achieved, and meanwhile the label generator can accurately correspond to the test cases.
Step 203: under a test environment, testing the target test task by using the target test case; the test environment is obtained by initializing the tested network equipment and the auxiliary test equipment corresponding to the target test task by utilizing the target mirror corresponding to the target test task.
Specifically, this step 203 is executed in the above-mentioned environment instantiation device, after the target test tag is generated, the code corresponding to the test task submitted at this time is packaged into an image or upgrade package, the environment instantiation device uses the image or upgrade package to initialize a test environment, the test environment includes a device to be tested and an auxiliary device in the network system, and after the test environment is ready, the test is started by executing the target test case matched in step 202.
Step 204: determining failure file information corresponding to the failure test case, and feeding back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
Specifically, the result analyzer is used to analyze the test result in step 204 and feed back the test result to the developer. If the test fails, the failure file information corresponding to the failed test case is fed back to the developer, so that the developer can know the failure file information in the target test task, and can be modified and adjusted in a targeted manner.
As an optional implementation manner, determining the failure file information corresponding to the failure test case includes: based on the second mapping relation, determining a failure test label corresponding to the failure test case; and determining failure file information corresponding to the failure test label based on the first mapping relation.
Specifically, based on the second mapping relation established in advance, the failure test label corresponding to the failure test case can be determined, after the failure test label is obtained, based on the first mapping relation established in advance, the failure file information corresponding to the failure test label can be determined, namely, the failure file information corresponding to the failure test case is accurately positioned after the target test task is tested, and a developer only needs to modify the failure file information without modifying all target file information corresponding to the whole target test task.
The method adopts the full-automatic test and test case selection mode, and simultaneously adopts the label generator, so that the modification of codes can be automatically identified, the test case can be automatically selected, the full-automatic process of development, production, test and feedback is completed, the time for receiving the test and the probability of test failure caused by error code submission in the development process are greatly reduced, and the process of developing self-test and upgrading package production is simplified. Meanwhile, the corresponding modification points can be tested in a targeted manner, the testing process is simplified, the overall testing efficiency is improved, and the problems caused by modification of codes can be exposed as soon as possible. The automatic test case matching technology is used, so that test case selection and test execution are invisible to users, and the threshold used by the automatic test system is reduced, namely, all users are faced in a black box mode. Besides the developer, other non-code submitters can also select test cases to execute verification tests only according to the built-in function tags.
Example 2
Based on the same inventive concept, the present application further provides a testing device, as shown in fig. 4, including:
the target test tag determining module 401 is configured to obtain target file information corresponding to a target test task, and determine a target test tag corresponding to the target file information based on a first mapping relationship between preset file information and a test tag;
a target test case determining module 402, configured to determine a target test case corresponding to a target test tag based on a second mapping relationship between the preset test tag and the test case;
the test module 403 is configured to test the target test task with the target test case under a test environment; the test environment is obtained by initializing tested network equipment and auxiliary test equipment corresponding to the target test task by utilizing a target mirror corresponding to the target test task;
the feedback module 404 is configured to determine failure file information corresponding to the failure test case, and feed back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
Optionally, the determining target test tag module 401 is specifically configured to: determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information; wherein each of the at least one hierarchical subdirectory includes file information therein;
and determining a target test tag corresponding to the file information in the target level subdirectory based on the first mapping relation.
Optionally, the determining target test tag module 401 is specifically configured to: for each hierarchical subdirectory of the at least one hierarchical subdirectory, determining the hierarchical subdirectory as a target hierarchical subdirectory when the ratio of the number of second file information in the hierarchical subdirectory to the total number of file information contained in the hierarchical subdirectory is greater than or equal to a set threshold;
the file information contained in the hierarchical subdirectory comprises first file information belonging to a new addition category and second file information not belonging to the new addition category.
Optionally, the threshold is sixty percent.
Optionally, the feedback module 404 is specifically configured to: based on the second mapping relation, determining a failure test label corresponding to the failure test case; and determining failure file information corresponding to the failure test label based on the first mapping relation.
Having described the test methods and apparatus of exemplary embodiments of the present application, next, an electronic device according to another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. The memory stores therein program code that, when executed by the processor, causes the processor to perform the steps in the test methods described above in this specification according to various exemplary embodiments of the present application.
An electronic device 130 according to this embodiment of the present application, i.e. the above-described test device, is described below with reference to fig. 5. The electronic device 130 shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 5, the electronic device 130 is in the form of a general-purpose electronic device. Components of electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting the various system components, including the memory 132 and the processor 131.
Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, and a local bus using any of a variety of bus architectures.
Memory 132 may include readable media in the form of volatile memory such as Random Access Memory (RAM) 1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with the electronic device 130, and/or any device (e.g., router, modem, etc.) that enables the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur through an input/output (I/O) interface 135. Also, electronic device 130 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 130, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In some possible embodiments, aspects of a test method provided herein may also be implemented in the form of a program product comprising program code for causing a computer device to carry out the steps of a test method according to various exemplary embodiments of the present application as described herein above, when the program product is run on a computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for monitoring of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device, partly on the remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic device may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., connected through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart and block diagrams, and combinations of flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (9)

1. A method of testing, for use with a first network device, the method comprising:
acquiring target file information corresponding to a target test task, and determining a target test tag corresponding to the target file information based on a first mapping relation between preset file information and the test tag;
determining a target test case corresponding to the target test tag based on a second mapping relation between the preset test tag and the test case;
under a test environment, testing the target test task by using the target test case; the test environment is obtained by initializing tested network equipment and auxiliary test equipment corresponding to the target test task by utilizing a target mirror corresponding to the target test task;
determining failure file information corresponding to the failure test case, and feeding back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
2. The method of claim 1, wherein the determining the target test tag corresponding to the target file information based on the first mapping relationship between the preset file information and the test tag comprises:
determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information; wherein each of the at least one hierarchical subdirectory includes file information therein;
and determining a target test tag corresponding to the file information in the target level subdirectory based on the first mapping relation.
3. The method of claim 2, wherein said determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in said target file information comprises:
for each hierarchical subdirectory of the at least one hierarchical subdirectory, determining the hierarchical subdirectory as a target hierarchical subdirectory when the ratio of the number of second file information in the hierarchical subdirectory to the total number of file information contained in the hierarchical subdirectory is greater than or equal to a set threshold;
the file information contained in the hierarchical subdirectory comprises first file information belonging to a new addition category and second file information not belonging to the new addition category.
4. The method of claim 1, wherein determining failure file information corresponding to a failed test case comprises:
based on the second mapping relation, determining a failure test label corresponding to the failure test case;
and determining failure file information corresponding to the failure test label based on the first mapping relation.
5. A test apparatus, the apparatus comprising:
the target test label determining module is used for acquiring target file information corresponding to a target test task and determining a target test label corresponding to the target file information based on a first mapping relation between preset file information and the test label;
the target test case determining module is used for determining a target test case corresponding to a target test tag based on a second mapping relation between the preset test tag and the test case;
the test module is used for testing the target test task by utilizing the target test case under a test environment; the test environment is obtained by initializing tested network equipment and auxiliary test equipment corresponding to the target test task by utilizing a target mirror corresponding to the target test task;
the feedback module is used for determining failure file information corresponding to the failure test case and feeding back the failure file information; the failed test case refers to a test case in which the test result in the target test case is failed.
6. The apparatus of claim 5, wherein the targeting test tag module is specifically configured to: determining a target hierarchical subdirectory from at least one hierarchical subdirectory contained in the target file information; wherein each of the at least one hierarchical subdirectory includes file information therein;
and determining a target test tag corresponding to the file information in the target level subdirectory based on the first mapping relation.
7. The apparatus of claim 6, wherein the targeting test tag module is specifically configured to: for each hierarchical subdirectory of the at least one hierarchical subdirectory, determining the hierarchical subdirectory as a target hierarchical subdirectory when the ratio of the number of second file information in the hierarchical subdirectory to the total number of file information contained in the hierarchical subdirectory is greater than or equal to a set threshold;
the file information contained in the hierarchical subdirectory comprises first file information belonging to a new addition category and second file information not belonging to the new addition category.
8. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
9. A computer storage medium, characterized in that the computer storage medium stores a computer program for causing a computer to perform the method according to any one of claims 1-4.
CN202310313238.9A 2023-03-28 2023-03-28 Test method and device and electronic equipment Pending CN116225960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310313238.9A CN116225960A (en) 2023-03-28 2023-03-28 Test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310313238.9A CN116225960A (en) 2023-03-28 2023-03-28 Test method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116225960A true CN116225960A (en) 2023-06-06

Family

ID=86578852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310313238.9A Pending CN116225960A (en) 2023-03-28 2023-03-28 Test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116225960A (en)

Similar Documents

Publication Publication Date Title
US10459695B2 (en) Correction of code errors using machine learning
US8140905B2 (en) Incremental problem determination and resolution in cloud environments
US11455566B2 (en) Classifying code as introducing a bug or not introducing a bug to train a bug detection algorithm
CN109408528B (en) Database script generation method and device, calculation device and storage medium
US20110321007A1 (en) Targeting code sections for correcting computer program product defects using records of a defect tracking system
US20180060415A1 (en) Language tag management on international data storage
US20100218176A1 (en) Test system configuration method and system
US8849612B2 (en) System and method of substituting parameter sets in self-contained mini-applications
US20020059561A1 (en) Software package verification
US20210263841A1 (en) Machine code analysis for identifying software defects
CN106681783A (en) Detection method and system for SVN code
US20240045793A1 (en) Method and system for scalable performance testing in cloud computing environments
EP4246332A1 (en) System and method for serverless application testing
US20080022263A1 (en) Identifying The Origin Of Application Resources
CN112685312A (en) Test case recommendation method and device for uncovered codes
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN110716804A (en) Method and device for automatically deleting useless resources, storage medium and electronic equipment
CN114647416A (en) Method and device for realizing service flow based on annotation, storage medium and electronic equipment
CN112988578A (en) Automatic testing method and device
CN116107524B (en) Low-code application log processing method, medium, device and computing equipment
US11971802B2 (en) Method, electronic device, and computer program product for code defect detection
CN116225960A (en) Test method and device and electronic equipment
CN115437675A (en) Method, device, equipment and medium for online upgrading application program
CN110674024A (en) Electronic equipment integration test system and method thereof
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment

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