CN115934575A - Product testing method, device, equipment and storage medium - Google Patents

Product testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115934575A
CN115934575A CN202310225490.4A CN202310225490A CN115934575A CN 115934575 A CN115934575 A CN 115934575A CN 202310225490 A CN202310225490 A CN 202310225490A CN 115934575 A CN115934575 A CN 115934575A
Authority
CN
China
Prior art keywords
target
test
script
product
plug
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
CN202310225490.4A
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.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute 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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202310225490.4A priority Critical patent/CN115934575A/en
Publication of CN115934575A publication Critical patent/CN115934575A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a product testing method, a device, equipment and a storage medium, which are applied to an automatic testing platform and comprise the following steps: the script templates corresponding to the various test types are displayed to a user through a human-computer interaction interface, so that the user can generate a target test script corresponding to a target product according to the script templates; calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; in the process of running a target test script, determining a target communication interface matched with a target product simulator, and performing data interaction with the target product simulator through the target communication interface; and determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script. The technical scheme of the embodiment of the invention can improve the expansibility and the applicability of the automatic test platform, reduce the maintenance cost of a tester on the test platform and realize the expansion of the instruction library of the target product.

Description

Product testing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for product testing.
Background
The automatic test platform has been widely used in product testing due to its characteristics of low time cost and high test efficiency. When the automatic test platform tests a product, it is common to control the script to execute instructions to implement automatic testing.
Existing Product tests generally include Product Function Test (PFT) and Product Data Test (PDT). The PFT test is used for testing the modified function points of the product, and a test case is designed according to the function characteristics of the product so as to verify whether the product meets the design requirements. The PDT test is used for testing data with different dimensions of a product so as to verify the accuracy of data configuration in the product.
However, the existing automatic test platform cannot realize PFT test and PDT test at the same time; secondly, interface types corresponding to different test platforms are independently developed by adopting different architectures and different scripting languages, so that testers need to master multiple scripting languages to adapt to the use modes of the different test platforms, and maintain the multiple test platforms, which causes higher maintenance cost; finally, when the existing test platform deploys the test environment, a third-party tool, such as a script controller, needs to be introduced, which results in a complex environment deployment process.
Disclosure of Invention
The invention provides a product testing method, a product testing device and a storage medium, which can realize that an automatic testing platform simultaneously performs PFT testing and PDT testing on a target product, improve the expansibility and the applicability of the automatic testing platform, reduce the maintenance cost of testing personnel on the testing platform and realize the expansion of a target product instruction library.
In a first aspect, the present invention provides a product testing method applied in an automated testing platform, where the method includes:
the script templates corresponding to the various test types are displayed to a user through a human-computer interaction interface, so that the user can generate a target test script corresponding to a target product according to the script templates; the test types comprise a function test and a data test;
calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to target products;
in the process of running a target test script, determining a target communication interface matched with a target product simulator, and performing data interaction with the target product simulator through the target communication interface;
and determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
Optionally, before the script templates corresponding to the multiple test types are displayed to the user through the human-computer interaction interface, the method further includes:
and generating script templates corresponding to each test type respectively according to the test items, the test requirements and the test cases corresponding to the different test types.
Optionally, a plurality of unified interfaces for performing data operation on the plug-in are pre-deployed in the automated testing platform;
the unified interface comprises a data interface, an emulator communication interface, a log output interface and a database access interface;
the calling of the target plug-in matched with the target test script comprises the following steps:
and calling a target plug-in matched with the target test script through the data interface so as to obtain a plurality of test instructions included in the target plug-in.
Optionally, in the process of running the target test script, determining a target communication interface matched with the target product simulator includes:
and in the process of running the target test script, determining a target communication interface matched with the target product simulator in a plurality of preset communication interfaces according to the identification information of the target product simulator.
Optionally, after determining a target test result corresponding to the target product according to the data interaction result and the running result of the target test script, the method further includes:
and acquiring a preset standard file template, and filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product.
Optionally, the standard document template includes: a standard report template and a standard report template;
filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product, wherein the standard test result comprises the following steps:
filling a standard report template according to the target test result to obtain a target test report corresponding to a target product;
and filling the standard report template according to the target test result to obtain a target test report corresponding to the target product.
Optionally, after obtaining the target test report and the target test report, the method further includes:
and displaying the target test report and the target test report to a user through a human-computer interaction interface so that the user can check, edit and export the target test report and the target test report.
In a second aspect, the present invention provides a product testing apparatus applied in an automated testing platform, the apparatus comprising:
the script generation module is used for displaying the script templates corresponding to the various test types to a user through a human-computer interaction interface so that the user can generate a target test script corresponding to a target product according to the script templates; the test types comprise a function test and a data test;
the plug-in calling module is used for calling a target plug-in matched with the target test script and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to the target product;
the data interaction module is used for determining a target communication interface matched with the target product simulator in the process of running the target test script and carrying out data interaction with the target product simulator through the target communication interface;
and the result determining module is used for determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
In a third aspect, the present invention provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of product testing according to any of the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to perform a product testing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme provided by the embodiment of the invention, through showing script templates respectively corresponding to various test types to a user through a human-computer interaction interface, the user generates a target test script corresponding to a target product according to the script templates, calls a target plug-in matched with the target test script, runs the target test script according to the target plug-in, determines a target communication interface matched with a target product simulator in the running process of the target test script, performs data interaction with the target product simulator through the target communication interface, and determines a target test result corresponding to the target product according to the data interaction result and the running result of the target test script, the automatic test platform can simultaneously perform PFT test and PDT test on the target product, the expansibility and the applicability of the automatic test platform are improved, the maintenance cost of a tester on the test platform is reduced, and the expansion of a target product instruction library is realized.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for testing a product according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method of product testing provided in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of another method of product testing provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a product testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
When the existing automatic test platform tests a product, PFT test and PDT test cannot be realized simultaneously; secondly, interface types corresponding to different test platforms are independently developed by adopting different architectures and different scripting languages, so that testers need to master multiple scripting languages to adapt to the use modes of the different test platforms, and maintain the multiple test platforms, which causes higher maintenance cost; finally, when the existing test platform deploys the test environment, a third-party tool, such as a script controller, needs to be introduced, which results in a complex environment deployment process. In view of this, the present invention provides a product testing method.
Fig. 1 is a flowchart of a product testing method according to an embodiment of the present invention, where the embodiment is applicable to a situation of automatically testing functions and data of a product, and the method may be executed by a product testing apparatus, where the product testing apparatus may be implemented in a form of hardware and/or software, and the product testing apparatus may be configured in an automated testing platform. As shown in fig. 1, the method includes:
and 110, displaying the script templates corresponding to the various test types to a user through a human-computer interaction interface so that the user can generate a target test script corresponding to a target product according to the script templates.
In this embodiment, the test types include a function test and a data test. Before testing the target product, script templates corresponding to various test types can be generated in advance according to test requirements corresponding to different test types. Optionally, the script template may include an instruction frame common to the test scripts; the target product may be a program product integrating software under test. Specifically, the target product may be a rail transit signal product.
In this step, the script templates corresponding to different test types can be displayed to the user through the visual interface, so that the user can fill the test parameters corresponding to the target product in the corresponding script template according to the user's own requirements, and generate the target test script corresponding to the target product.
In a specific embodiment, if a user writes a script template for a function test, a function test script corresponding to a target product may be generated, and the function test script may be used to perform a PFT test on the target product; if the user writes the script template of the data test, a data test script corresponding to the target product can be generated, and the data test script can be used for PDT test of the target product.
The method has the advantages that the script templates corresponding to different test types are provided for the user, so that the user can generate the test script of the target product according to the actual requirement, the automatic test platform can simultaneously carry out PFT test and PDT test on the target product, and the expansibility and the applicability of the automatic test platform are improved; and secondly, the script template can be compiled by adopting a uniform script language, so that a tester can be prevented from mastering various script languages, and the maintenance cost of the tester on the test platform is reduced.
Step 120, calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to the target product.
In this embodiment, after the target test script corresponding to the target product is generated, optionally, a target plug-in corresponding to the target product may be called, where the target plug-in stores a plurality of test instructions corresponding to the target product in advance. After the calling of the target plug-in is completed, the target test script can be operated according to the test instruction in the target plug-in.
The method has the advantages that the test instruction of the target product is stored in a plug-in mode, so that the extension of the instruction library of the target product can be realized, and the complexity of the test environment deployment process of the automatic test platform is reduced.
And step 130, in the process of running the target test script, determining a target communication interface matched with the target product simulator, and performing data interaction with the target product simulator through the target communication interface.
In this embodiment, optionally, multiple communication interfaces of different standards may be integrated in the automation test platform in advance, and in the process of running the target test script, a target communication interface matched with the target product simulator may be determined in the multiple communication interfaces according to the communication type of the target product, and data interaction is performed with the target product simulator through the target communication interface.
Compared with the mode that the interface types corresponding to different test platforms are not consistent in the prior art, the test platform can communicate with multiple simulators, and therefore the applicability of the test platform is improved.
And 140, determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
In this embodiment, optionally, the function and the data characteristic of the target product may be analyzed according to the data interaction result between the automated testing platform and the simulator and the operation result of the testing script, so as to obtain the target testing result corresponding to the target product.
According to the technical scheme provided by the embodiment of the invention, through showing script templates respectively corresponding to various test types to a user through a human-computer interaction interface, the user generates a target test script corresponding to a target product according to the script templates, calls a target plug-in matched with the target test script, runs the target test script according to the target plug-in, determines a target communication interface matched with a target product simulator in the running process of the target test script, performs data interaction with the target product simulator through the target communication interface, and determines a target test result corresponding to the target product according to the data interaction result and the running result of the target test script, the automatic test platform can simultaneously perform PFT test and PDT test on the target product, the expansibility and the applicability of the automatic test platform are improved, the maintenance cost of a tester on the test platform is reduced, and the expansion of a target product instruction library is realized.
Fig. 2 is a flowchart of another product testing method provided in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 2, the method provided in this embodiment may further include:
step 210, generating a script template corresponding to each test type according to the test items, the test requirements and the test cases corresponding to the different test types.
In this embodiment, the test item (Project) is used for managing all test requirements of the object to be tested (i.e. the target product). Specifically, assuming that the test type is PFT test, the target product as a whole may be used as a test item; assuming that the test type is a PDT test, the engineering project corresponding to the target product may be used as the test project.
In a specific embodiment, the information to be configured in the test project includes a project name, description information, an instruction library file used, a front operation and a back operation of the project, a front operation and a back operation of a requirement, a front operation and a back operation of a use case, that is, the project, the requirement, a wiping operation instruction for starting execution of the use case and ending execution of the use case, such as simulator starting operation and simulator closing operation.
In this embodiment, the test requirement (Request) is used to manage a series of test cases. Specifically, assuming that the target product is a track traffic signal product, taking a test item corresponding to the PFT test as an example, a track circuit state test, an interval occupancy check test, and the like may be defined in the test requirements. Taking the test items corresponding to the PDT test as an example, the test requirements may define a code sequence test, a degradation test, and the like.
In a specific embodiment, the configuration information in the test requirement includes a name and a description of the requirement, a pre-operation and a post-operation of a use case, and the configuration of the default inherited item, where the test requirement is different from the test item configuration, subject to the test requirement configuration.
In this embodiment, a test Case (Case) for completing a test purpose through a series of test steps may be a minimum executable test unit. Taking a case corresponding to the PDT test as an example, the data can be used as a minimum test unit; taking the example corresponding to the PFT test as an example, the functional test point location may be used as the minimum test unit.
In a specific embodiment, the information to be configured in the test case includes a test case name, description information, a script file name, a pre-operation and a post-operation, the configuration of the requirement is inherited by default, and when the test case configuration is different from the test requirement configuration, the test case configuration is taken as a standard.
In this embodiment, optionally, the test items, the test requirements, and the test cases corresponding to the different test types may be version controlled by a version control System (SVN) of an open source code.
In this step, optionally, a universal test script frame (i.e., a script template) corresponding to each test type may be generated according to the test items, the test requirements, and the test cases corresponding to different test types, respectively.
The method has the advantages that the script template can be matched with the actual test requirements corresponding to the test types, so that the effectiveness of the test script is improved, and the reliability and the accuracy of the test result of the target product are ensured.
And 220, displaying the script templates corresponding to the various test types to a user through a human-computer interaction interface so that the user can generate a target test script corresponding to a target product according to the script templates.
Step 230, calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to the target product.
In an implementation manner of the embodiment of the present invention, a plurality of unified interfaces for performing data operation on a plug-in are pre-deployed in the automated testing platform; the unified interface comprises a data interface, a simulator communication interface, a log output interface and a database access interface.
In a specific embodiment, the invoking a target plug-in matching the target test script includes: and calling a target plug-in matched with the target test script through the data interface so as to obtain a plurality of test instructions included in the target plug-in.
In this embodiment, optionally, the emulator communication interface is used for the target plug-in to perform data transceiving with the emulator; the log output interface is used for outputting a target plug-in execution log and an instruction execution result, and specifically, the output mode comprises text output, database output, UI output and the like; the database access interface is used for accessing the product configuration database by the target plug-in, reading configuration data and the like.
The advantage of setting up like this is, through deploying a plurality of unified interfaces that are used for the plug-in to carry out data operation, can realize that the plug-in carries out standardized data operation flow, improves data operation efficiency.
In this embodiment, a plug-in development structure may be adopted to uniformly manage the plug-ins corresponding to the products to be tested. And in the loading and initializing process of the plug-in, a standard interface specified in a plug-in framework is realized by means of inheriting a plug-in base class. Specifically, the standard interface of the plug-in base class is used for initializing, starting, closing, acquiring data and the like, so as to realize the management work of the life cycle of the plug-in. Each plug-in can be placed under a specified product directory, and the test instruction in each plug-in can be defined according to specific test requirements.
And 240, in the process of running the target test script, determining a target communication interface matched with the target product simulator in a plurality of preset communication interfaces according to the identification information of the target product simulator.
In this embodiment, a plurality of communication interfaces are pre-deployed in the automation test platform, and optionally, in the running process of the target test script, according to identification information (for example, a communication protocol and a communication mode supported by the simulator) of the simulator, a communication interface matched with the identification information is selected from the plurality of communication interfaces, and the communication interface is used as the target communication interface.
Compared with the mode that the types of the interfaces corresponding to different test platforms are inconsistent in the prior art, the method has the advantages that the test platform can be communicated with various simulators, and therefore the applicability and the expansibility of the test platform are improved.
In a specific embodiment, the target communication interface may be used for automatically starting the simulator according to the configuration, creating a communication connection between the test platform and the simulator, creating a data transceiving queue, starting a data transceiving thread, providing a calling interface for a test instruction in the plug-in, and the like. Specifically, the call interface is used for realizing simulator registration, acquiring a communication state, sending data, receiving data and the like.
In this embodiment, the preset communication interfaces may provide multiple communication modes such as a virtual User Datagram Protocol (UDP), a real UDP, a Transmission Control Protocol (TCP) server, and a TCP client, and provide a unified communication data transceiving interface for an instruction in the plug-in.
In a specific embodiment, in addition to the various communication interfaces pre-deployed in the automatic test platform, the communication interfaces may also be extended according to the actual communication mode of the simulator, so as to improve the applicability of the automatic test platform.
And step 250, performing data interaction with the target product simulator through the target communication interface.
And step 260, determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
According to the technical scheme provided by the embodiment of the invention, script templates corresponding to each test type are generated according to test items, test requirements and test cases corresponding to different test types, the script templates corresponding to various test types are displayed to a user through a human-computer interaction interface, so that the user generates a target test script corresponding to a target product according to the script templates, calls a target plug-in matched with the target test script and operates the target test script according to the target plug-in, in the operation process of the target test script, a technical means for determining a target test result corresponding to the target product in a plurality of preset communication interfaces according to identification information of a target product simulator is used for determining a target communication interface matched with the target product simulator, performing data interaction with the target product simulator through the target communication interface, determining PFT test and PDT test on the target product simultaneously according to the data interaction result and the operation result of the target test script, improving the accuracy of the test result of the target product, reducing the expansibility of a test personnel on the test platform, and realizing the expansibility of the target product maintenance instruction of the automatic test platform.
Fig. 3 is a flowchart of another product testing method provided in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 3, the method provided in this embodiment may further include:
step 310, showing the script templates corresponding to the various test types to a user through a human-computer interaction interface so that the user can generate a target test script corresponding to a target product according to the script templates; the test types include a functional test and a data test.
Step 320, calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to the target product.
And 330, in the process of running the target test script, determining a target communication interface matched with the target product simulator, and performing data interaction with the target product simulator through the target communication interface.
And 340, determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
And 350, acquiring a preset standard file template, and filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product.
In this embodiment, optionally, a plurality of standard data items may be predefined in the standard file template, and after the target test result corresponding to the target product is determined, the plurality of standard data items may be filled according to the target test result to obtain the standard test result corresponding to the target product.
The method has the advantages that the standardization of the test result can be realized, and a user can conveniently analyze the performance of the target product according to the test result.
In an implementation manner of the embodiment of the present invention, the standard document template includes: a standard report template and a standard report template. Filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product, wherein the standard test result comprises the following steps: filling a standard report template according to the target test result to obtain a target test report corresponding to a target product; and filling the standard report template according to the target test result to obtain a target test report corresponding to the target product.
In a specific embodiment, the standard report template may be a file template generated based on a Word file format. Specifically, the standard report template may provide a customized format in the form of a Word mail merge domain, where the template includes multiple data table domains and field domains, and the field domains are used to define basic fields required by a test report, such as information of a product to be tested, test date, and the like; the data table field can be a section or a table, such as a test execution statistics table, a test case execution table, and the like.
In another specific embodiment, the standard report template may be a file template generated based on an Excel format. Specifically, the standard report template may correspond to the test requirements one to one, and the template may include a cover page, a statistical information page, and a detailed data page. The cover page is used for recording the test basic information of the test, such as a tested object, a tester, test time and the like; the statistical information page is used for counting the passing conditions of all use cases; the detailed data page is used for recording the execution result of each instruction in each use case.
And 360, displaying the standard test result corresponding to the target product to a user through a human-computer interaction interface.
In an implementation manner of the embodiment of the present invention, the standard test result may include a target test report and a target test report.
In this step, optionally, the target test report and the target test report may be displayed to a user through a human-computer interaction interface, so that the user views, edits and exports the target test report and the target test report.
The target test report and the target test report corresponding to the target product are displayed to the user in a visual interface mode, and the user can conveniently analyze the performance of the target product.
According to the technical scheme provided by the embodiment of the invention, script templates corresponding to various test types are displayed to a user through a human-computer interaction interface, so that the user generates a target test script corresponding to a target product according to the script templates, calls a target plug-in matched with the target test script, operates the target test script according to the target plug-in, determines a target communication interface matched with a target product simulator in the operation process of the target test script, performs data interaction with the target product simulator through the target communication interface, determines a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script, acquires a preset standard file template, fills the standard file template according to the target test result to obtain a standard test result corresponding to the target product, displays the standard test result corresponding to the target product to the user through the human-computer interaction interface, can realize that an automatic test platform simultaneously performs PFT test and PDT test on the target product, improves the applicability and applicability of the automatic test platform, improves the accuracy of the target product test result, reduces the accuracy of the human-computer interaction interface, realizes the expansibility of the test platform, and realizes the expansibility of the target product, and realizes the extension of the performance of the test platform.
Fig. 4 is a schematic structural diagram of a product testing apparatus according to an embodiment of the present invention, where the product testing apparatus is applied to an automated testing platform, and the apparatus includes: a script generation module 410, a plug-in calling module 420, a data interaction module 430 and a result determination module 440.
The script generating module 410 is configured to display script templates corresponding to multiple test types to a user through a human-computer interaction interface, so that the user generates a target test script corresponding to a target product according to the script templates; the test types comprise a function test and a data test;
the plug-in calling module 420 is used for calling a target plug-in matched with the target test script and running the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to the target product;
the data interaction module 430 is used for determining a target communication interface matched with the target product simulator in the process of running the target test script, and performing data interaction with the target product simulator through the target communication interface;
and the result determining module 440 is configured to determine a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
According to the technical scheme provided by the embodiment of the invention, through showing script templates respectively corresponding to various test types to a user through a human-computer interaction interface, the user generates a target test script corresponding to a target product according to the script templates, calls a target plug-in matched with the target test script, runs the target test script according to the target plug-in, determines a target communication interface matched with a target product simulator in the running process of the target test script, performs data interaction with the target product simulator through the target communication interface, and determines a target test result corresponding to the target product according to the data interaction result and the running result of the target test script, the automatic test platform can simultaneously perform PFT test and PDT test on the target product, the expansibility and the applicability of the automatic test platform are improved, the maintenance cost of a tester on the test platform is reduced, and the expansion of a target product instruction library is realized.
On the basis of the embodiment, a plurality of uniform interfaces for the plug-in to perform data operation are pre-deployed in the automatic test platform;
the unified interface comprises a data interface, an emulator communication interface, a log output interface and a database access interface.
The product testing apparatus further includes:
and the script template generating module is used for generating script templates corresponding to each test type according to the test items, the test requirements and the test cases corresponding to the different test types.
The plug-in calling module 420 includes:
and the data interface calling unit is used for calling the target plug-in matched with the target test script through the data interface so as to acquire a plurality of test instructions included in the target plug-in.
The data interaction module 430 includes:
and the communication interface determining unit is used for determining a target communication interface matched with the target product simulator in a plurality of preset communication interfaces according to the identification information of the target product simulator in the process of running the target test script.
The result determination module 440 includes:
the file template acquisition unit is used for acquiring a preset standard file template and filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product; the standard file template comprises: a standard report template and a standard report template;
the report template filling unit is used for filling the standard report template according to the target test result to obtain a target test report corresponding to a target product;
the report template filling unit is used for filling the standard report template according to the target test result to obtain a target test report corresponding to the target product;
and the standard result display unit is used for displaying the target test report and the target test report to a user through a human-computer interaction interface so that the user can check, edit and export the target test report and the target test report.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For technical details which are not described in detail in the embodiments of the present invention, reference may be made to the methods provided in all the aforementioned embodiments of the present invention.
FIG. 5 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the product testing methods provided by embodiments of the present disclosure.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 11 performs the various methods and processes described above, such as product testing methods.
In some embodiments, the product testing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the product testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the product testing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A product testing method is applied to an automatic testing platform, and the method comprises the following steps:
the script templates corresponding to the various test types are displayed to a user through a human-computer interaction interface, so that the user can generate a target test script corresponding to a target product according to the script templates; the test types comprise a function test and a data test;
calling a target plug-in matched with the target test script, and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to target products;
in the process of running a target test script, determining a target communication interface matched with a target product simulator, and performing data interaction with the target product simulator through the target communication interface;
and determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
2. The method of claim 1, before displaying the script templates corresponding to the plurality of test types to the user through the human-computer interface, further comprising:
and generating script templates corresponding to each test type according to the test items, the test requirements and the test cases corresponding to the different test types.
3. The method according to claim 1, wherein a plurality of uniform interfaces for plug-ins to perform data operations are pre-deployed in the automated testing platform;
the unified interface comprises a data interface, a simulator communication interface, a log output interface and a database access interface;
the calling of the target plug-in matched with the target test script comprises the following steps:
and calling a target plug-in matched with the target test script through the data interface so as to obtain a plurality of test instructions included in the target plug-in.
4. The method of claim 1, wherein determining a target communication interface that matches a target product simulator during execution of a target test script comprises:
and in the process of running the target test script, determining a target communication interface matched with the target product simulator in a plurality of preset communication interfaces according to the identification information of the target product simulator.
5. The method of claim 1, after determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script, further comprising:
and acquiring a preset standard file template, and filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product.
6. The method of claim 5, wherein the standard document template comprises: a standard report template and a standard report template;
filling the standard file template according to the target test result to obtain a standard test result corresponding to the target product, wherein the standard test result comprises the following steps:
filling a standard report template according to the target test result to obtain a target test report corresponding to a target product;
and filling the standard report template according to the target test result to obtain a target test report corresponding to the target product.
7. The method of claim 6, after obtaining the target test report and the target test report, further comprising:
and displaying the target test report and the target test report to a user through a human-computer interaction interface so that the user can check, edit and export the target test report and the target test report.
8. A product testing device, which is applied to an automatic testing platform, the device comprises:
the script generation module is used for displaying script templates corresponding to various test types to a user through a human-computer interaction interface so that the user can generate a target test script corresponding to a target product according to the script templates; the test types comprise a function test and a data test;
the plug-in calling module is used for calling a target plug-in matched with the target test script and operating the target test script according to the target plug-in; the target plug-in comprises a plurality of test instructions corresponding to target products;
the data interaction module is used for determining a target communication interface matched with the target product simulator in the process of running the target test script and carrying out data interaction with the target product simulator through the target communication interface;
and the result determining module is used for determining a target test result corresponding to the target product according to the data interaction result and the operation result of the target test script.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the product testing method of any of claims 1-7.
10. A storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, carries out a method for product testing according to any one of claims 1-7.
CN202310225490.4A 2023-03-10 2023-03-10 Product testing method, device, equipment and storage medium Pending CN115934575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310225490.4A CN115934575A (en) 2023-03-10 2023-03-10 Product testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310225490.4A CN115934575A (en) 2023-03-10 2023-03-10 Product testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115934575A true CN115934575A (en) 2023-04-07

Family

ID=86652719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310225490.4A Pending CN115934575A (en) 2023-03-10 2023-03-10 Product testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115934575A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229567A (en) * 2017-06-09 2017-10-03 山东超越数控电子有限公司 A kind of IPMI firmwares automatization test system
CN114138654A (en) * 2021-12-04 2022-03-04 杭州安恒信息技术股份有限公司 Interface test case generation method and device, computer equipment and storage medium
CN115437933A (en) * 2022-09-02 2022-12-06 深圳前海环融联易信息科技服务有限公司 Automatic testing method and device, computer equipment and storage medium
WO2023273561A1 (en) * 2021-06-30 2023-01-05 中国民航信息网络股份有限公司 Test method and apparatus, electronic device, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229567A (en) * 2017-06-09 2017-10-03 山东超越数控电子有限公司 A kind of IPMI firmwares automatization test system
WO2023273561A1 (en) * 2021-06-30 2023-01-05 中国民航信息网络股份有限公司 Test method and apparatus, electronic device, and storage medium
CN114138654A (en) * 2021-12-04 2022-03-04 杭州安恒信息技术股份有限公司 Interface test case generation method and device, computer equipment and storage medium
CN115437933A (en) * 2022-09-02 2022-12-06 深圳前海环融联易信息科技服务有限公司 Automatic testing method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵琳;: "自主化无线闭塞中心测试平台研究", 中国铁路 *

Similar Documents

Publication Publication Date Title
CN110018955B (en) Generating automated test scripts by transforming manual test cases
CN109302522B (en) Test method, test device, computer system, and computer medium
CN113778898B (en) User interface automatic test method and device, electronic equipment and storage medium
US20230185702A1 (en) Method and Apparatus for Generating and Applying Deep Learning Model based on Deep Learning Framework
CN115168130A (en) Chip testing method and device, electronic equipment and storage medium
CN113778849A (en) Method, apparatus, device and storage medium for testing code
CN115934575A (en) Product testing method, device, equipment and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN113032256B (en) Automated testing method, apparatus, computer system, and readable storage medium
CN115618777A (en) File generation method, device, equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN115098405B (en) Software product evaluation method and device, electronic equipment and storage medium
CN113656268B (en) Performance test method and device for business service, electronic equipment and storage medium
CN109800155B (en) Method and device for testing QTE interlocking application software based on Probe
CN115543748A (en) Signal testing method, device, equipment and storage medium
CN117724980A (en) Method and device for testing software framework performance, electronic equipment and storage medium
CN115086162A (en) Project deployment method, device, electronic equipment, system and storage medium
CN114721964A (en) Automatic generation method, device, equipment and medium of test case
CN115686479A (en) File creation method and related device
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN115309489A (en) Data entry method, device, equipment and medium
CN116303019A (en) Test tracing method, device, equipment and medium
CN115312114A (en) Method, apparatus, device and medium for testing RAM
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN117609038A (en) Method, equipment, device and storage medium for managing process of project automation test

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230407

RJ01 Rejection of invention patent application after publication