CN113672504A - Intelligent equipment testing method, device, equipment and storage medium - Google Patents
Intelligent equipment testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113672504A CN113672504A CN202110891405.9A CN202110891405A CN113672504A CN 113672504 A CN113672504 A CN 113672504A CN 202110891405 A CN202110891405 A CN 202110891405A CN 113672504 A CN113672504 A CN 113672504A
- Authority
- CN
- China
- Prior art keywords
- test
- tested
- file
- parameters
- case
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 400
- 238000000034 method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 12
- 238000013507 mapping Methods 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 235000013361 beverage Nutrition 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to the field of testing, and discloses an intelligent device testing method, which comprises the following steps: reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters; analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the equipment to be tested; and updating parameters of the items to be tested in the equipment to be tested according to the test instruction and the test data, and executing the test of the equipment to be tested according to the items to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested. In addition, the application also provides an intelligent device testing device, an electronic device and a computer readable storage medium. The intelligent device testing efficiency can be improved.
Description
Technical Field
The present disclosure relates to the field of testing, and in particular, to a method and an apparatus for testing an intelligent device, an electronic device, and a computer-readable storage medium.
Background
With the development of the technology of equipment products such as smart televisions, the existing intelligent equipment products have a lot of functions, strict function and performance tests are required to be performed in the design and production stages of the intelligent equipment products, and with more and more test items of the intelligent equipment products, manual tests are laborious, the test task amount is large, the test efficiency is low, and the product test requirements are seriously not met, so that a software method is required to perform automatic tests.
At present, the automated testing of the intelligent device product is usually realized based on the test cases compiled by software programming languages (such as Python, Java, and the like), that is, one test case is compiled by one or a group of script files to realize the automated testing of the intelligent device product, but because the test cases of the intelligent device product are usually thousands to tens of thousands, the test cases compiled by using the software programming languages need to be compiled and converted by one, the workload is huge, and in addition, along with the update and the replacement of the intelligent device product, the script files need to be changed again through the test cases compiled by the software programming languages, so the testing efficiency of the intelligent device product becomes very low.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present application provides a method and an apparatus for testing an intelligent device, an electronic device, and a computer-readable storage medium, which can improve testing efficiency of the intelligent device.
In a first aspect, the present application provides a method for testing an intelligent device, including:
reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
It can be seen that, in the embodiment of the present application, according to the testing protocol of the to-be-tested home appliance, the testing route file and the testing case file of the to-be-tested home appliance are configured, and the configuration items such as the menu operation and the function parameter change of the to-be-tested home appliance can be separated from the software operation center, and the testing case file configuration of the configuration items such as the menu operation and the function parameter change is performed by adopting the text format, so as to instantiate the configuration modification requirements of all the function parameters on the to-be-tested home appliance interface, thereby avoiding the writing and conversion of the testing cases one by one through the testing script, and improving the testing efficiency of the to-be-tested home appliance; secondly, in the embodiment of the application, the routing table of the test routing file and the test data of the test case file are analyzed, so that the test routing file and the test case file can be converted into instructions and data which can be identified by the running of a subsequent program, and the normal running of the testing of the subsequent household appliance to be tested is ensured.
In a possible implementation manner of the first aspect, the defining, in a text format, the test parameters of the configuration file to obtain a test file includes:
acquiring a test object and a test position corresponding to the test object in the configuration file, and creating a test field point according to the test object and the test position corresponding to the test object;
configuring the routing parameters of the test field points by adopting the text format to obtain a routing file;
loading case parameters in the test field points by adopting the text format to obtain case files;
and generating the test file according to the routing file and the case file.
In a possible implementation manner of the first aspect, the configuring, in a text format, the routing parameter of the test field point to obtain a routing file includes:
inquiring the incidence relation between the test field points;
determining the routing mapping of the test field points according to the incidence relation;
and compiling the test route of the test field point by adopting the text format according to the route mapping so as to obtain the route file.
In a possible implementation manner of the first aspect, the loading, in a text format, a use case parameter in the test field point to obtain a use case file includes:
acquiring a field attribute value of the case parameter, and matching the field attribute value with the test field point;
and adding case parameters to the successfully matched test field points by adopting the text format to obtain the case file.
In a possible implementation manner of the first aspect, the updating parameters of the items to be tested in the device to be tested according to the test instruction and the test data includes:
inquiring the test object in the test data and the test content corresponding to the test object;
identifying the parameter position of an item to be tested in the equipment to be tested according to the test object;
and transmitting the test content to the parameter position by using the test instruction so as to update the parameter of the item to be tested.
In a possible implementation manner of the first aspect, the identifying, according to the test object, a parameter location of an item to be tested in the device to be tested includes:
performing field matching on the test object and the items to be tested in the equipment to be tested;
if the field matching of the test object and the item to be tested fails, the parameter position of the item to be tested is not used as the updating position of the test object corresponding to the test content;
and if the field matching of the test object and the item to be tested is successful, taking the parameter position of the item to be tested as the updating position of the test content corresponding to the test object.
In a possible implementation manner of the first aspect, the executing the test of the device to be tested according to the item to be tested after the parameter update to obtain a test result of the device to be tested includes:
creating an object receiving script in a preset use case test program, and receiving an external signal of the device to be tested by using the object receiving script;
sending the items to be tested with updated parameters to a case running environment by using a publishing machine in the case testing program according to the external signal;
executing the test of the item to be tested after the parameters are updated in the case running environment to obtain a test result of the item to be tested;
summarizing the test results of the items to be tested, and generating the test results of the equipment to be tested.
In a second aspect, the present application provides an intelligent device testing apparatus, the apparatus comprising:
the parameter definition module is used for reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
the file analysis module is used for analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
the parameter updating module is used for updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and the equipment testing module is used for executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the smart device testing method as defined in any one of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the intelligent device testing method as described in any one of the first aspects above.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic diagram of a system architecture of an intelligent device testing method according to an embodiment of the present application;
fig. 2 is another schematic diagram of a system architecture of an intelligent device testing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a testing method for an intelligent device according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a step of the intelligent device testing method provided in fig. 3 according to an embodiment of the present application;
fig. 5 is a schematic diagram of partial information of a routing file of an intelligent device testing method according to an embodiment of the present application;
fig. 6 is a schematic diagram of partial information of a use case file of an intelligent device testing method according to an embodiment of the present application;
fig. 7 is a block diagram of an intelligent device testing apparatus according to an embodiment of the present application;
fig. 8 is a schematic diagram of an internal structure of an electronic device implementing an intelligent device testing method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
Fig. 1 is a schematic diagram of a system architecture of an intelligent device testing method according to an embodiment of the present application, where the system architecture includes: computer end 1, test link 2 and device under test 3.
In the embodiment of the present application, the computer terminal 1 is an electronic device, such as an industrial computer, for controlling the device to be tested 3 to perform a device test, and automatically processing mass device data according to the operation of a computer program; the test link 2 refers to a data communication channel between the computer end 1 and the device to be tested 3; the device to be tested 3 is a device product which is not formally operated online, such as an intelligent household appliance product or an intelligent terminal product, specifically, the intelligent household appliance product can comprise an intelligent video, an intelligent security or an intelligent television, and the intelligent terminal product can comprise an intelligent beverage vending machine, an intelligent terminal navigation instrument or an intelligent earphone.
Further, in this embodiment of the application, the computer terminal 1 reads a configuration file from the device to be tested 3 according to the test link 2, and defines and analyzes test parameters of the configuration file, so as to update test parameter items of the device to be tested 3, thereby implementing the test of the device to be tested 3.
Based on the system architecture of fig. 1, referring to fig. 2, which is another schematic diagram of the system architecture provided in an embodiment of the present application, based on the system architecture shown in fig. 1, the computer side 1 includes a menu traversal component 4 and a web page driver script 5, and the device side 3 to be tested includes a menu navigation interface 6, an interface engine control 7, and an interface agent component 8.
In this embodiment of the present application, the menu traversal component 4 refers to an equipment menu routing component compiled in the computer terminal 1, and is configured to read a configuration file in the equipment to be tested 3 and define test parameters of the configuration file, and the web page driver script 5 refers to an equipment test control component compiled in the computer terminal 1, and is configured to parse the configuration file defined in the menu traversal component 4 to generate a test instruction and test data in the equipment to be tested 3; the menu navigation interface 6 is configured to traverse parameters of menu navigation and device functions in the device to be tested 3 to generate a configuration file of the device to be tested 3, the interface engine control 7 is configured to document the configuration file in the menu navigation interface 6 so that the menu traversal component 4 can read the configuration file, and the interface agent component 8 is configured to act on the document configuration file to realize transmission of the document configuration file.
Fig. 3 is a schematic flow chart of the intelligent device testing method according to an embodiment of the present application. The intelligent device testing method described in fig. 3 is applied to the computer terminal 1, and includes:
s1, reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters.
As shown in fig. 1, in the embodiment of the present application, the device to be tested refers to a home appliance that has not been put into operation on line, such as an intelligent home appliance or an intelligent terminal. It should be appreciated that before the equipment product comes online, the equipment product needs to be tested to ensure proper operation of the equipment product.
In this embodiment of the application, the configuration file may be understood as a file for characterizing device information in the device to be tested, where the device information may include data such as a device interface, a device function, and a device performance, specifically, a device menu navigation item, a device signal connection item, or a device response item. It should be further understood that, based on the configuration file, a test object and a corresponding test position in the device to be tested may be queried, where the test object refers to a target to be tested in the device to be tested, and the test position refers to a position where a specific test content is configured for the test object, it should be noted that different configuration files may exist in different devices to be tested, that is, different test objects and corresponding test positions thereof may exist.
For example, if the device to be tested is a smart TV, the profile of the smart TV may query that its test object is a/b/c, where test object a may be a switch button of the smart TV, and a test position of the switch button is at the topmost left side of the smart TV, test object b may be a mute button of the smart TV, and a test position of the mute button is at the topmost right side of the smart TV, and test object c may be a return button of the smart TV, and a test position of the return button is at the bottommost left side of the smart TV.
Further, in this embodiment of the application, the configuration file of the device to be tested may be read to the interface agent component in the device to be tested by using the menu traversal component according to the test link.
Furthermore, the test parameters of the configuration file are defined by adopting a text format to generate the test file, so that the configuration modification requirements for expressing all functional parameters of the to-be-tested equipment can be instantiated, the test case compiling and converting of the to-be-tested equipment one by one through a test script can be avoided, and the test efficiency of the to-be-tested equipment is improved. The test parameters comprise routing parameters and use case parameters, the test files comprise routing files and use case files, the routing parameters are used for representing position information of parameters of items to be tested in the equipment to be tested, the use case parameters are used for representing test information of the parameters of the items to be tested in the equipment to be tested, namely the routing files are used for determining test positions of the test parameters, and the use case files are used for determining test contents of the test parameters.
In an optional embodiment, the text format may be a TXT text format, and based on the TXT text format, the test file may be conveniently and quickly viewed and modified by a user.
S2, analyzing the route file and the case file to obtain a test instruction and test data of the route file and the case file in the device to be tested.
It should be understood that the routing file and the use case file generated in S1 are defined separately from the device product, and therefore, in the process of testing the device product, the routing file and the use case file need to be converted into instructions and data that can be recognized by subsequent computer program operation, so that the application analyzes the routing file and the use case file to obtain the test instructions and test data of the routing file and the use case file in the device to be tested, thereby ensuring the normal operation of the subsequent test of the device to be tested.
The test instruction refers to a test operation command sent by the computer end to the device to be tested, and the test data refers to parameter data of the item to be tested in the device to be tested, which needs to be updated.
In an optional embodiment of the present application, the analysis of the routing file and the use case file may be performed by a reverse translation algorithm, that is, according to a test parameter definition process of the routing file and the use case file, a routing parameter position of the routing file and a use case parameter content of the use case file are reversely queried, and according to the queried routing parameter position and the use case parameter content, a test instruction and test data of the routing file and the use case file in the device to be tested are obtained.
S3, according to the test instruction and the test data, updating parameters of items to be tested in the equipment to be tested, and according to the items to be tested after the parameters are updated, executing the test of the equipment to be tested to obtain a test result of the equipment to be tested.
In this embodiment of the application, the item to be tested may be understood as an object to be tested in the device to be tested, such as a device menu navigation item, where the parameter refers to specific content in the item to be tested, and if the item to be tested is the device menu navigation item, the parameter of the device menu navigation item may include a menu page pull-down parameter, a menu page return parameter, a menu page jump parameter, and the like.
In an optional embodiment of the present application, the updating parameters of the items to be tested in the devices to be tested according to the test instruction and the test data includes: and inquiring a test object and test content corresponding to the test object in the test data, identifying the parameter position of an item to be tested in the equipment to be tested according to the test object, and transmitting the test content to the parameter position by using the test instruction so as to update the parameter of the item to be tested.
The test object and the test data may be queried for the use case file through a query statement, and the query statement may be a select statement.
In an optional embodiment, the identifying, according to the test object, a parameter position of an item to be tested in the device to be tested includes: and performing field matching on the test object and an item to be tested in the equipment to be tested, if the field matching of the test object and the item to be tested fails, not taking the parameter position of the item to be tested as the updating position of the test object corresponding to the test content, and if the field matching of the test object and the item to be tested succeeds, taking the parameter position of the item to be tested as the updating position of the test object corresponding to the test content.
S4, according to the item to be tested after the parameter updating, executing the test of the equipment to be tested to obtain the test result of the equipment to be tested
In an optional embodiment of the present application, the executing the test of the device to be tested according to the item to be tested after the parameter update to obtain a test result of the device to be tested includes: creating an object receiving script in a preset use case test program, and receiving an external signal of the device to be tested by using the object receiving script; sending the items to be tested with updated parameters to a case running environment by using a publishing machine in the case testing program according to the external signal; and executing the test of the item to be tested after the parameters are updated in the case running environment to obtain the test result of the item to be tested, summarizing the test result of the item to be tested and generating the test result of the equipment to be tested.
The preset use case test program is compiled through Java language, the object receiving script is created through JavaScript scripting language, the publishing machine can be a tomcat machine, the use case running environment is used for publishing semi-compiled running codes to a target machine to run, and the semi-compiled running codes comprise a Java running environment.
The method and the device for testing the household appliance interface read the configuration file of the to-be-tested device firstly, the configuration items such as menu control and parameter change of the to-be-tested device can be separated from the to-be-tested device, the test parameters of the configuration file of the to-be-tested device are defined in a text format, the parameter configuration of the configuration items such as the menu control and parameter change of the to-be-tested device can be realized, the configuration modification requirements of all functional parameters on the to-be-tested household appliance interface are expressed in an instancing mode, the test case compiling and converting of the to-be-tested device one by one through a test script can be avoided, and the test efficiency of the to-be-tested device is improved; secondly, the routing file and the case file are analyzed to obtain a test instruction and test data of the routing file and the case file in the device to be tested, so that the normal operation of the subsequent test of the device to be tested can be guaranteed; furthermore, according to the test instruction and the test data, the embodiment of the application updates the parameters of the items to be tested in the devices to be tested so as to realize the device test of the devices to be tested, and can meet the requirement of synchronous execution of different test items in the devices to be tested, thereby further improving the test efficiency of the devices to be tested. Therefore, the intelligent device testing method can improve the testing efficiency of the intelligent device.
Fig. 4 is a schematic flowchart of step S1 in the intelligent device testing method according to an embodiment of the present application, where the method is applied to the menu traversal component 4 in the computer 1. Specifically, the defining the test parameters of the configuration file by using a text format to obtain the test file includes:
s401, obtaining a test object in the configuration file and a test position corresponding to the test object, and creating a test field point according to the test object and the test position corresponding to the test object;
s402, configuring the routing parameters of the test field points by adopting the text format to obtain a routing file;
s403, loading case parameters in the test field points by adopting the text format to obtain case files;
s404, generating the test file according to the routing file and the case file.
The test field point is used to load test field information of a test object in the device to be tested, and the routing parameter and the use case parameter may be the parameters described in step S1, which is not further described herein. Optionally, the test field point may be defined by a preset universal formula, for example, the following universal formula:
the 1 st to 7 th fields refer to test positions of the test object, and the subscript information in the 1 st to 7 th fields refers to test contents in the test object.
Further, in another optional embodiment of the present application, the configuring, in a text format, the routing parameter of the test field point to obtain a routing file includes: and inquiring the incidence relation among the test field points, determining the routing mapping of the test field points according to the incidence relation, and compiling the test routing of the test field points by adopting the text format according to the routing mapping so as to obtain the routing file. The incidence relation refers to a position relation among the test field points, such as a parallel relation, an inclusion relation, a jump relation and the like.
In an optional embodiment, the loading, in a text format, the use case parameters in the test field points to obtain a use case file includes: and acquiring a field attribute value of the case parameter, matching the field attribute value with the test field point, and adding the case parameter to the successfully matched test field point by adopting the text format to obtain the case file. The use case parameters are added based on different user requirements, for example, the use case parameter of the network password is set to be '888888888'.
For further understanding the definition information of the routing file and the use case file, refer to fig. 5 and fig. 6, where fig. 5 is a schematic diagram of part of information of the routing file of the intelligent device testing method provided in an embodiment of the present application, and fig. 6 is a schematic diagram of part of information of the use case file of the intelligent device testing method provided in an embodiment of the present application.
Fig. 7 is a schematic block diagram of an intelligent device testing apparatus according to an embodiment of the present application.
The smart device testing apparatus 700 may be installed in an electronic device. According to the implemented functions, the intelligent device testing apparatus may include a parameter definition module 701, a file parsing module 702, a parameter updating module 703, and a device testing module 704. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the parameter definition module 701 is configured to read a configuration file of a device to be tested, and define a test parameter of the configuration file by using a text format to obtain a test file, where the test file includes a routing file and a case file, the routing file is used to determine a test position of the test parameter, and the case file is used to determine a test content of the test parameter;
the file analysis module 702 is configured to analyze the routing file and the use case file to obtain a test instruction and test data of the routing file and the use case file in the device to be tested;
the parameter updating module 703 is configured to perform parameter updating on an item to be tested in the device to be tested according to the test instruction and the test data;
the device testing module 704 is configured to execute the test of the device to be tested according to the item to be tested after the parameter update, so as to obtain a test result of the device to be tested.
In detail, when the modules in the intelligent device testing apparatus 700 in the embodiment of the present application are used, the same technical means as the intelligent device testing method described in fig. 3 and fig. 6 are used, and the same technical effect can be produced, and details are not described here.
Fig. 8 is a schematic structural diagram of an electronic device implementing the intelligent device testing method according to the present application.
The electronic device 8 may comprise a processor 80, a memory 81 and a bus, and may further comprise a computer program, such as a smart device test program 82, stored in the memory 81 and executable on the processor 80.
The memory 81 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 81 may in some embodiments be an internal storage unit of the electronic device 8, for example a removable hard disk of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the electronic device 8. The memory 81 may be used not only to store application software installed in the electronic device 8 and various types of data, such as codes of the smart device test program 82, but also to temporarily store data that has been output or is to be output.
The processor 80 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 80 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 8 by running or executing programs or modules (for example, executing the smart device test program 82, etc.) stored in the memory 81 and calling data stored in the memory 81.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 81 and at least one processor 80 or the like.
Fig. 8 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 8 does not constitute a limitation of the electronic device 8, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 8 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 80 through a power management device, so that functions such as charge management, discharge management, and power consumption management are implemented through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 8 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 8 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device 8 and other electronic devices.
Optionally, the electronic device 8 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device 8 and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The intelligent device test program 82 stored in the memory 81 of the electronic device 8 is a combination of computer programs that, when executed in the processor 80, enable:
reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
Specifically, the processor 80 may refer to the description of the relevant steps in the embodiment corresponding to fig. 3 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 8, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present application also provides a computer-readable storage medium, storing a computer program that, when executed by a processor of an electronic device, may implement:
reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An intelligent device testing method, characterized in that the method comprises:
reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
2. The intelligent device testing method of claim 1, wherein the defining the test parameters of the configuration file in a text format to obtain a test file comprises:
acquiring a test object and a test position corresponding to the test object in the configuration file, and creating a test field point according to the test object and the test position corresponding to the test object;
configuring the routing parameters of the test field points by adopting the text format to obtain a routing file;
loading case parameters in the test field points by adopting the text format to obtain case files;
and generating the test file according to the routing file and the case file.
3. The intelligent device testing method of claim 2, wherein configuring the routing parameters of the test field points in a text format to obtain a routing file comprises:
inquiring the incidence relation between the test field points;
determining the routing mapping of the test field points according to the incidence relation;
and compiling the test route of the test field point by adopting the text format according to the route mapping so as to obtain the route file.
4. The intelligent device testing method of claim 2, wherein the loading of the use case parameters in the test field points in a text format to obtain a use case file comprises:
acquiring a field attribute value of the case parameter, and matching the field attribute value with the test field point;
and adding case parameters to the successfully matched test field points by adopting the text format to obtain the case file.
5. The method for testing an intelligent device according to claim 1, wherein the updating parameters of the items to be tested in the devices to be tested according to the test instructions and the test data comprises:
inquiring the test object in the test data and the test content corresponding to the test object;
identifying the parameter position of an item to be tested in the equipment to be tested according to the test object;
and transmitting the test content to the parameter position by using the test instruction so as to update the parameter of the item to be tested.
6. The method for testing intelligent equipment according to claim 5, wherein the identifying the parameter position of the item to be tested in the equipment to be tested according to the test object comprises:
performing field matching on the test object and the items to be tested in the equipment to be tested;
if the field matching of the test object and the item to be tested fails, the parameter position of the item to be tested is not used as the updating position of the test object corresponding to the test content;
and if the field matching of the test object and the item to be tested is successful, taking the parameter position of the item to be tested as the updating position of the test content corresponding to the test object.
7. The method for testing an intelligent device according to any one of claims 1 to 6, wherein the performing the test of the device to be tested according to the item to be tested after the parameter update to obtain the test result of the device to be tested comprises:
creating an object receiving script in a preset use case test program, and receiving an external signal of the device to be tested by using the object receiving script;
sending the items to be tested with updated parameters to a case running environment by using a publishing machine in the case testing program according to the external signal;
executing the test of the item to be tested after the parameters are updated in the case running environment to obtain a test result of the item to be tested;
summarizing the test results of the items to be tested, and generating the test results of the equipment to be tested.
8. An intelligent device testing apparatus, the apparatus comprising:
the parameter definition module is used for reading a configuration file of a device to be tested, and defining test parameters of the configuration file by adopting a text format to obtain a test file, wherein the test file comprises a routing file and a case file, the routing file is used for determining the test position of the test parameters, and the case file is used for determining the test content of the test parameters;
the file analysis module is used for analyzing the routing file and the case file to obtain a test instruction and test data of the routing file and the case file in the device to be tested;
the parameter updating module is used for updating parameters of items to be tested in the equipment to be tested according to the test instruction and the test data;
and the equipment testing module is used for executing the test of the equipment to be tested according to the item to be tested after the parameters are updated so as to obtain the test result of the equipment to be tested.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the smart device testing method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the smart device testing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110891405.9A CN113672504B (en) | 2021-08-04 | 2021-08-04 | Intelligent device testing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110891405.9A CN113672504B (en) | 2021-08-04 | 2021-08-04 | Intelligent device testing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113672504A true CN113672504A (en) | 2021-11-19 |
CN113672504B CN113672504B (en) | 2024-08-20 |
Family
ID=78541354
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110891405.9A Active CN113672504B (en) | 2021-08-04 | 2021-08-04 | Intelligent device testing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113672504B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114328214A (en) * | 2021-12-27 | 2022-04-12 | 深圳市六度人和科技有限公司 | Method and device for improving efficiency of interface test case of report software and computer equipment |
CN114812695A (en) * | 2022-06-27 | 2022-07-29 | 芯耀辉科技有限公司 | Product testing method and device, computer equipment and storage medium |
CN115278224A (en) * | 2022-08-24 | 2022-11-01 | 视若飞信息科技(上海)有限公司 | Method and device for testing HbbTV of smart television |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144865A (en) * | 2018-08-14 | 2019-01-04 | 深圳壹账通智能科技有限公司 | Method, apparatus, computer equipment and the storage medium of head end test |
CN111639026A (en) * | 2020-05-25 | 2020-09-08 | 上海中通吉网络技术有限公司 | Interface test method, device and system |
CN111752826A (en) * | 2020-06-03 | 2020-10-09 | 五八有限公司 | Interface testing method and device, electronic equipment and storage medium |
-
2021
- 2021-08-04 CN CN202110891405.9A patent/CN113672504B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144865A (en) * | 2018-08-14 | 2019-01-04 | 深圳壹账通智能科技有限公司 | Method, apparatus, computer equipment and the storage medium of head end test |
CN111639026A (en) * | 2020-05-25 | 2020-09-08 | 上海中通吉网络技术有限公司 | Interface test method, device and system |
CN111752826A (en) * | 2020-06-03 | 2020-10-09 | 五八有限公司 | Interface testing method and device, electronic equipment and storage medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114328214A (en) * | 2021-12-27 | 2022-04-12 | 深圳市六度人和科技有限公司 | Method and device for improving efficiency of interface test case of report software and computer equipment |
CN114812695A (en) * | 2022-06-27 | 2022-07-29 | 芯耀辉科技有限公司 | Product testing method and device, computer equipment and storage medium |
CN114812695B (en) * | 2022-06-27 | 2022-10-28 | 芯耀辉科技有限公司 | Product testing method and device, computer equipment and storage medium |
CN115278224A (en) * | 2022-08-24 | 2022-11-01 | 视若飞信息科技(上海)有限公司 | Method and device for testing HbbTV of smart television |
Also Published As
Publication number | Publication date |
---|---|
CN113672504B (en) | 2024-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10713149B2 (en) | Processing automation scripts of software | |
CN113672504B (en) | Intelligent device testing method, device, equipment and storage medium | |
US11403364B2 (en) | Method and terminal device for extracting web page content | |
CN104252410A (en) | Method and equipment for testing control in page | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
CN105743736B (en) | Automated testing method and system | |
US9715483B2 (en) | User interface for testing and asserting UI elements with natural language instructions | |
CN117033249B (en) | Test case generation method and device, computer equipment and storage medium | |
CN103873318A (en) | Website automated testing method and automated testing system | |
CN111427760B (en) | Page test method, device, equipment and storage medium | |
CN110727429B (en) | Front-end page generation method, device and equipment | |
CN112306594A (en) | Rendering method and device based on mobile terminal and storage medium | |
WO2017141893A1 (en) | Software analysis apparatus and software analysis method | |
WO2016122508A1 (en) | Test generation for browser-based user interface | |
CN109669854A (en) | Page assembly rapid extracting method and system based on data processing | |
CN113687827B (en) | Data list generation method, device and equipment based on widget and storage medium | |
CN111125605A (en) | Page element acquisition method and device | |
CN110990264A (en) | Element identification method, device and equipment for UI automation test and storage medium | |
CN108694242B (en) | Node searching method, equipment, storage medium and device based on DOM | |
CN114727100B (en) | Joint debugging method and device for monitoring equipment | |
CN106648925B (en) | Mobile terminal and method for acquiring character string information thereof | |
CN114564413B (en) | Synchronous equipment testing method and device | |
CN106406888B (en) | Application program interface display method and device | |
US20140068558A1 (en) | Displaying Dependent Files for Computer Code in a Tabbed-Application User Interface | |
CN112764750B (en) | Interface generation method, device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |