CN114564413B - Synchronous equipment testing method and device - Google Patents

Synchronous equipment testing method and device Download PDF

Info

Publication number
CN114564413B
CN114564413B CN202210455768.2A CN202210455768A CN114564413B CN 114564413 B CN114564413 B CN 114564413B CN 202210455768 A CN202210455768 A CN 202210455768A CN 114564413 B CN114564413 B CN 114564413B
Authority
CN
China
Prior art keywords
test
functional entity
equipment
synchronous
data synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210455768.2A
Other languages
Chinese (zh)
Other versions
CN114564413A (en
Inventor
鲁锐
宋凯
王霞
石晶晶
王菲晓
丁军祥
程尉
刘淑玮
殷明正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingwang Technology Co ltd
Original Assignee
Jingwang Technology 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 Jingwang Technology Co ltd filed Critical Jingwang Technology Co ltd
Priority to CN202210455768.2A priority Critical patent/CN114564413B/en
Publication of CN114564413A publication Critical patent/CN114564413A/en
Application granted granted Critical
Publication of CN114564413B publication Critical patent/CN114564413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • 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/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to the field of equipment test, and discloses a synchronous equipment test method, which comprises the following steps: receiving a test control instruction through the data synchronization equipment, transmitting the test control instruction to the tested object equipment, and creating a synchronous operation instruction with preset data synchronization equipment in the tested object equipment according to the test control instruction; identifying a functional entity object of the tested object equipment, and establishing a functional entity mirror image of the tested object equipment in the data synchronization equipment according to the functional entity object; according to the synchronous operation instruction, operating the functional entity mirror image in the data synchronization equipment to obtain a first operation result; operating the functional entity object in the tested object equipment to obtain a second operation result; and generating a synchronous test result of the tested object according to the first operation result and the second operation result. The invention can solve the problem that the equipment synchronization test can not be normally carried out due to the incompatibility of the interfaces between the synchronization equipment.

Description

Synchronous equipment testing method and device
Technical Field
The present invention relates to the field of device testing, and in particular, to a method and an apparatus for testing a synchronous device, an electronic device, and a computer-readable storage medium.
Background
In general, when a device synchronization test or a device synchronization analysis is performed, a test control device is compatible with an interface of a device to be tested, and a data stream of the device to be tested is completely or partially controllable, so that the device to be tested can be operated and controlled by correctly utilizing certain interface signals of the device to be tested, and meanwhile, intermediate data, power consumption characteristics and the like in an operation process can be synchronously recorded, so that further analysis can be performed.
However, in the actual application process, when a device synchronization test or a device synchronization analysis is performed, the problem that the interface of the test control device and the device to be tested is not compatible is often encountered, and if the interface of the test control device and the interface of the device to be tested are not compatible, especially for some objects (adopting non-standard communication protocols) adopting customized interface protocols, the synchronization control is difficult to be effectively realized, so that the device synchronization test is easily impossible to be performed normally.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device for testing synchronization equipment, electronic equipment and a computer readable storage medium, which can solve the problem that the equipment synchronization test cannot be normally performed due to the incompatibility of interfaces between the synchronization equipment.
In a first aspect, the present invention provides a method for testing a synchronization device, including:
receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction with the preset data synchronization device in the tested object device according to the test control instruction;
identifying a functional entity object of the device to be tested, and establishing a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object;
according to the synchronous operation instruction, operating the functional entity mirror image in the data synchronization equipment to obtain a first operation result;
operating the functional entity object in the tested object equipment to obtain a second operation result;
and generating a synchronous test result of the tested object according to the first operation result and the second operation result.
In a possible implementation manner of the first aspect, the receiving, by the preset data synchronization device, the test control instruction includes:
responding to a device test request, and configuring a test control instruction of the device test request;
creating a data transmission channel of the equipment test request and the preset data synchronization equipment;
and transmitting the test control instruction to the preset data synchronization equipment according to the data transmission channel.
In a possible implementation manner of the first aspect, the transmitting the test control instruction to the device to be tested includes:
acquiring a data format of the test control instruction, and selecting a network transmission protocol of the test control instruction according to the data format;
and transmitting the control command to the tested object equipment according to the network transmission protocol.
In a possible implementation manner of the first aspect, the creating, according to the test control instruction, a synchronous operation instruction with the preset data synchronization device in the device to be tested includes:
analyzing the test item in the test control command by using the device to be tested;
detecting whether the test item exists in the tested object equipment or not, and creating a synchronous test event of the preset data synchronization equipment in the tested object equipment when the test item exists in the tested object equipment;
and generating the synchronous operation instruction according to the synchronous test event.
In one possible implementation manner of the first aspect, the identifying a functional entity object of the device under test includes:
acquiring a device test item of the tested object device, and identifying the test type of the device test item;
determining the test function of the equipment test item according to the test type, and detecting the test entity of the equipment test item;
and generating the functional entity object according to the test function and the test entity.
In a possible implementation manner of the first aspect, the establishing, in the data synchronization device, a functional entity image of the device to be tested according to the functional entity object includes:
acquiring a test item set in the functional entity object, and converting each test item in the test item set into a compiled file according to a preset file format to obtain a plurality of compiled files;
configuring a program running file of each compiled file in a preset compiling environment;
and generating a functional entity mirror image of the tested object device in the data synchronization device according to the program running file.
In a possible implementation manner of the first aspect, the operating, according to the synchronous operation instruction, the functional entity image in the data synchronization device to obtain a first operation result includes:
creating a running environment of the functional entity mirror in the data synchronization equipment;
configuring an operation strategy of the functional entity mirror image in the operation environment according to the synchronous operation instruction;
and executing the mirror image of the functional entity according to the strategy to obtain a first operation result.
In a possible implementation manner of the first aspect, the configuring, according to the synchronous execution instruction, an execution policy of the functional entity image in the execution environment includes:
configuring the running time of the functional entity mirror image in the running environment according to the synchronous running instruction;
configuring the operation logic and the operation mode of the functional entity mirror image in the operation environment;
and generating the operation strategy of the functional entity mirror image according to the operation time, the operation logic and the operation mode.
In a possible implementation manner of the first aspect, the generating a synchronous test result of the object to be tested according to the first operation result and the second operation result includes:
inquiring the operation results with the same test items in the first operation results and the second operation results;
identifying whether the operation results with the same test items in the first operation result and the second operation result are consistent;
if the operation results with the same test items in the first operation result and the second operation result are not consistent, obtaining a synchronous test failure result of the tested object equipment;
and if the operation results with the same test items in the first operation result and the second operation result are consistent, obtaining a successful synchronous test result of the tested object equipment.
In a second aspect, the present invention provides a synchronous device testing apparatus, the apparatus comprising:
the operation instruction creating module is used for receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction of the preset data synchronization device in the tested object device according to the test control instruction;
the entity mirror image establishing module is used for identifying a functional entity object of the tested object equipment and establishing a functional entity mirror image of the tested object equipment in the data synchronization equipment according to the functional entity object;
the entity mirror image operation module is used for operating the functional entity mirror image in the data synchronization equipment according to the synchronous operation instruction to obtain a first operation result;
the entity object operation module is used for operating the functional entity object in the tested object equipment to obtain a second operation result;
and the test result generating module is used for generating a synchronous test result of the tested object according to the first operation result and the second operation result.
Compared with the prior art, the technical principle and the beneficial effects of the scheme are as follows:
according to the embodiment of the invention, firstly, a test control instruction is received by a data synchronization device and is transmitted to a tested object device, so that a synchronous operation instruction with a preset data synchronization device is established in the tested object device according to the test control instruction, and the premise of verifying the data consistency of the tested object device and the data synchronization device is realized; secondly, the embodiment of the invention establishes the functional entity mirror image of the device to be tested in the data synchronization device by identifying the functional entity object of the device to be tested according to the functional entity object, so that the operation result in the device to be tested can be synchronously and compatibly reproduced in the data synchronization device, thereby solving the problem of interface incompatibility of the synchronization device in the test process and ensuring the test stability of the synchronization device; further, the embodiment of the present invention executes the functional entity mirror image in the data synchronization device according to the synchronous execution instruction to obtain a first execution result, executes the functional entity object in the device to be tested to obtain a second execution result, and generates the synchronous test result of the device to be tested according to the first execution result and the second execution result to realize the synchronous test of the device to be tested. Therefore, the method, the device, the electronic device and the computer-readable storage medium for testing the synchronization devices provided by the embodiments of the present invention can solve the problem that the device synchronization test cannot be performed normally due to the incompatibility of the interfaces between the synchronization devices.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings 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 that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a synchronous device testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a step of the method for testing synchronous devices shown in FIG. 1 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another step of the method for testing synchronous devices shown in FIG. 1 according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a testing apparatus for synchronous devices according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an internal structure of an electronic device for implementing a synchronous device testing method according to an embodiment of the present invention.
Detailed Description
It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the invention provides a synchronous device testing method, and an execution subject of the synchronous device testing method includes but is not limited to at least one of electronic devices such as a server and a terminal which can be configured to execute the method provided by the embodiment of the invention. In other words, the synchronous device testing method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Example 1:
fig. 1 is a schematic flow chart illustrating a method for testing a synchronous device according to an embodiment of the present invention. The synchronous device testing method described in fig. 1 includes:
and S1, receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction of the preset data synchronization device in the tested object device according to the test control instruction.
According to the embodiment of the invention, the test control instruction received by the preset data synchronization equipment can be transmitted to the tested object equipment after being analyzed, so that the premise of data synchronization test of the subsequent tested object equipment is ensured. The preset data synchronization device refers to a data synchronization tool for executing subsequent tested object devices, a plurality of different interfaces may exist in the preset data synchronization device, and each interface is responsible for different responsibilities, such as a data receiving interface, a data sending interface, a data analyzing interface, a data loading interface, a data processing interface and the like.
As an embodiment of the present invention, the receiving, by a preset data synchronization device, a test control instruction includes: responding to a device test request, configuring a test control instruction of the device test request, creating a data transmission channel of the device test request and the preset data synchronization device, and transmitting the test control instruction to the preset data synchronization device according to the data transmission channel.
The device test request refers to a requirement which can be understood as a requirement for performing a device synchronization test, and may be generated based on different service scenarios. The data transmission channel refers to a link for performing data transmission between devices.
Further, in an optional implementation of the present invention, the test control instruction is configured by a control instruction generation tool, the control instruction generation tool may be obtained by compiling by a compiler, the data transmission channel is created by a data interface, and the transmission of the test control instruction may be performed by a transmission protocol, such as a TCP protocol.
Further, the embodiment of the present invention transmits the test control instruction to the device to be tested, so as to ensure the premise that the device to be tested generates the synchronous operation instruction according to the test control instruction, thereby implementing the test of the data synchronization device. The device to be tested is a device which needs to perform data synchronization test.
Further, before transmitting the test control command to the device to be tested, the embodiment of the present invention further includes: the test control instruction needs to be analyzed by a data analysis module in the data synchronization equipment, so that the test control instructions of different types are divided into a plurality of independent parameter information by a cutting method of any development language, and then the plurality of independent parameter information are packaged into the test control instruction of a fixed format according to a preset data template, optionally, the preset data template is a data object of a fixed format, such as an entity class, a map object and the like.
As an embodiment of the present invention, the transmitting the test control instruction to the device to be tested includes: and acquiring a data format of the test control instruction, selecting a network transmission protocol of the test control instruction according to the data format, and transmitting the control instruction to the tested object equipment according to the network transmission protocol.
Further, according to the test control instruction, a synchronous operation instruction with the preset data synchronization device is created in the device to be tested, so that the premise of data consistency verification of the device to be tested and the data synchronization device is achieved. The synchronous operation instruction refers to a data synchronization test command for realizing the tested object device and the data synchronization device.
As an embodiment of the present invention, referring to fig. 2, the creating a synchronous operation instruction with the preset data synchronization device in the device to be tested according to the test control instruction includes:
s201, analyzing a test item in the test control command by using the device to be tested;
s202, detecting whether the test item exists in the tested object equipment or not, and creating a synchronous test event of the preset data synchronization equipment in the tested object equipment when the test item exists in the tested object equipment;
and S203, generating the synchronous operation instruction according to the synchronous test event.
The test items refer to specific equipment items needing to be tested, such as a line time node item, a database basic connection information item, a migration mode category item and the like, and the synchronous test events refer to description events of the synchronous items needing to be tested.
Further, in an optional embodiment of the present invention, the test item captures the test control instruction through a programming code in the device to be tested to parse into a specific test item in a JSON format of an original key value pair, the test item is detected through an automation script in the device to be tested, the automation script may be compiled through a shell script language, and the synchronous test event is created through a Java language.
And S2, identifying the functional entity object of the device to be tested, and establishing the functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object.
The embodiment of the invention identifies the functional entity object of the tested object equipment to determine the functional effect required by the test item in the tested object equipment. The functional entity object refers to a functional set of all executable programs in the device to be tested, and includes objects such as a service switching function, a service control function, a special resource function, a service management function, a service generation environment function and the like of the device to be tested.
As an embodiment of the present invention, the identifying a functional entity object of the device under test includes: the method comprises the steps of obtaining a device test item of the device to be tested, identifying the test type of the device test item, determining the test function of the device test item according to the test type, detecting the test entity of the device test item, and generating the functional entity object according to the test function and the test entity.
The test type refers to a category of the device test item, such as a database, a program code, a file, and the like, the test function refers to a device function that the device test item needs to implement, and the test entity refers to features that can be distinguished from each other in the device test item, such as a name, a location, and the like.
Further, the test type of the device test item is identified by querying the device attribute of the device test item, the test function of the device test item is determined by querying the device feature of the device test item, and the test entity of the device test item is detected by an entity identification tool.
Further, according to the embodiment of the present invention, the functional entity mirror image of the device to be tested is established in the data synchronization device according to the functional entity object, so that the operation result in the device to be tested can be synchronously and compatibly reproduced in the data synchronization device, thereby solving the problem of interface incompatibility of the synchronization device in the test process and ensuring the test stability of the synchronization device. The functional entity image can be understood as a carrier which covers all test items in the device to be tested in a file storage form.
As an embodiment of the present invention, referring to fig. 3, the establishing a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object includes:
s301, acquiring a test item set in the functional entity object, and converting each test item in the test item set into a compiled file according to a preset file format to obtain a plurality of compiled files;
s302, configuring a program running file of each compiled file in a preset compiling environment;
and S303, generating a functional entity mirror image of the tested object device in the data synchronization device according to the program running file.
The preset file format comprises a class format, the compiled file refers to a code file representing the test item in a code form, the preset compiling environment comprises an eclipse environment, and the program running file refers to a file for on-line running.
Further, in an optional embodiment of the present invention, the conversion of the test items and the configuration of the program run files may be implemented by using Java language
And S3, operating the functional entity mirror image in the data synchronization equipment according to the synchronous operation instruction to obtain a first operation result.
According to the embodiment of the invention, the functional entity mirror image is operated in the data synchronization equipment according to the synchronous operation instruction, so that the data test result of the tested object equipment in the data synchronization equipment is obtained, and the premise of verifying the data test result of the tested object equipment is ensured.
As an embodiment of the present invention, the running the functional entity image in the data synchronization device according to the synchronous running instruction to obtain a first running result includes: creating an operating environment of the functional entity mirror image in the data synchronization equipment, configuring an operating strategy of the functional entity mirror image in the operating environment according to the synchronous operating instruction, and executing the functional entity mirror image according to the strategy to obtain a first operating result.
The running environment refers to a testing environment of the functional entity image during testing, and the running strategy refers to a testing strategy of the functional entity image during testing. Optionally, the running environment of the functional entity image includes a Java running environment.
Further, in an optional embodiment of the present invention, the configuring, according to the synchronous operation instruction, an operation policy of the functional entity image in the operation environment includes: configuring the running time of the functional entity mirror image in the running environment according to the synchronous running instruction, configuring the running logic and the running mode of the functional entity mirror image in the running environment, and generating the running strategy of the functional entity mirror image according to the running time, the running logic and the running mode.
The running logic refers to a running rule of the functional entity image, for example, the length of a character string cannot exceed a preset threshold, a character must contain upper and lower case English letters, and the like, and the running mode refers to a method adopted by the functional entity image during running, for example, running in a thread mode.
And S4, operating the functional entity object in the tested object device to obtain a second operation result.
In the embodiment of the invention, the functional entity object is operated in the tested object device to realize the data consistency check with the operation effect in the data synchronization device, and the precondition of generating the test result of the functional entity mirror image is ensured.
It should be noted that, in the embodiment of the present invention, the operation of the functional entity object is the same as the operation principle of the functional entity mirror image, and further description is not repeated here.
And S5, generating a synchronous test result of the tested object device according to the first operation result and the second operation result.
According to the embodiment of the invention, the synchronous test result of the tested object is generated according to the first operation result and the second operation result, so that the synchronous test of the tested object equipment is completed.
As an embodiment of the present invention, the generating a synchronous test result of the measured object according to the first operation result and the second operation result includes: inquiring the operation results with the same test items in the first operation result and the second operation result, identifying whether the operation results with the same test items in the first operation result and the second operation result are consistent, if the operation results with the same test items in the first operation result and the second operation result are inconsistent, obtaining a synchronous test failure result of the tested object equipment, and if the operation results with the same test items in the first operation result and the second operation result are consistent, obtaining a synchronous test success result of the tested object equipment. Optionally, the running results with the same test item may be implemented by a query statement, such as an SQL statement.
It can be seen that, in the embodiment of the present invention, a test control instruction is received by a data synchronization device, and the test control instruction is transmitted to a device to be tested, so as to create a synchronous operation instruction with a preset data synchronization device in the device to be tested according to the test control instruction, and implement a precondition of data consistency check of the device to be tested and the data synchronization device; secondly, the embodiment of the invention establishes the functional entity mirror image of the device to be tested in the data synchronization device by identifying the functional entity object of the device to be tested according to the functional entity object, so that the operation result in the device to be tested can be synchronously and compatibly reproduced in the data synchronization device, thereby solving the problem of interface incompatibility of the synchronization device in the test process and ensuring the test stability of the synchronization device; further, the embodiment of the present invention obtains a first operation result by operating the functional entity mirror in the data synchronization device according to the synchronous operation instruction, obtains a second operation result by operating the functional entity object in the device to be tested, and generates a synchronous test result of the device to be tested according to the first operation result and the second operation result, thereby implementing the synchronous test of the device to be tested. Therefore, the method for testing the synchronous equipment provided by the embodiment of the invention can solve the problem that the synchronous test of the equipment cannot be normally carried out due to the incompatibility of the interfaces between the synchronous equipment.
Example 2:
fig. 4 is a functional block diagram of the testing apparatus for synchronous devices according to the present invention.
The synchronous device testing apparatus 400 of the present invention may be installed in an electronic device. According to the implemented functions, the synchronous device testing apparatus may include an operation instruction creation module 401, an entity mirror creation module 402, an entity mirror operation module 403, an entity object operation module 404, and a test result generation module 405. The module of 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 embodiment of the present invention, the functions of the modules/units are as follows:
the operation instruction creating module 401 is configured to receive a test control instruction through a preset data synchronization device, transmit the test control instruction to a device to be tested, and create a synchronous operation instruction of the preset data synchronization device in the device to be tested according to the test control instruction;
the entity mirror image establishing module 402 is configured to identify a functional entity object of the device to be tested, and establish a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object;
the entity mirror image operation module 403 is configured to operate the functional entity mirror image in the data synchronization device according to the synchronous operation instruction, so as to obtain a first operation result;
the entity object running module 404 is configured to run the functional entity object in the device to be tested to obtain a second running result;
the test result generating module 405 is configured to generate a synchronous test result of the object to be tested according to the first operation result and the second operation result.
In detail, when the modules in the synchronization apparatus testing device 400 according to the embodiment of the present invention are used, the same technical means as the synchronization apparatus testing method described in fig. 1 to fig. 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Example 3:
fig. 5 is a schematic structural diagram of an electronic device implementing the synchronous device testing method according to the present invention.
The electronic device may comprise a processor 50, a memory 51, a communication bus 52 and a communication interface 53, and may further comprise a computer program, such as a synchronous device test program, stored in the memory 51 and executable on the processor 50.
In some embodiments, the processor 50 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 50 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 by running or executing programs or modules (e.g., executing synchronous device test programs, etc.) stored in the memory 51 and calling data stored in the memory 51.
The memory 51 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 51 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 51 may also be an external storage device of the electronic device 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. Further, the memory 51 may also include both an internal storage unit and an external storage device of the electronic device. The memory 51 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a synchronous device test program, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. 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 51 and at least one processor 50 or the like.
The communication interface 53 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (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 and for displaying a visualized user interface.
Fig. 5 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the electronic device, and may include 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 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 50 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized 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 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are for illustrative purposes only and that the scope of the claimed invention is not limited to this configuration.
The synchronous device test program stored in the memory 51 of the electronic device is a combination of computer programs, which when executed in the processor 50, enable:
receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction with the preset data synchronization device in the tested object device according to the test control instruction;
identifying a functional entity object of the device to be tested, and establishing a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object;
according to the synchronous operation instruction, operating the functional entity mirror image in the data synchronization equipment to obtain a first operation result;
operating the functional entity object in the tested object equipment to obtain a second operation result;
and generating a synchronous test result of the tested object according to the first operation result and the second operation result.
Specifically, the processor 50 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, 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 invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction with the preset data synchronization device in the tested object device according to the test control instruction;
identifying a functional entity object of the device to be tested, and establishing a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object;
according to the synchronous operation instruction, operating the functional entity mirror image in the data synchronization equipment to obtain a first operation result;
operating the functional entity object in the tested object equipment to obtain a second operation result;
and generating a synchronous test result of the tested object according to the first operation result and the second operation result.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. 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 position, or may be distributed on multiple 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 invention 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 invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention 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 invention 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 foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. 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 invention. Thus, the present invention 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 (7)

1. A method for testing synchronous equipment, the method comprising:
receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction with the preset data synchronization device in the tested object device according to the test control instruction;
identifying a functional entity object of the device to be tested, and establishing a functional entity mirror image of the device to be tested in the data synchronization device according to the functional entity object;
according to the synchronous operation instruction, operating the functional entity mirror image in the data synchronization equipment to obtain a first operation result;
operating the functional entity object in the tested object equipment to obtain a second operation result;
generating a synchronous test result of the tested object according to the first operation result and the second operation result;
the creating a synchronous operation instruction of the preset data synchronization device in the tested object device according to the test control instruction comprises:
analyzing the test item in the test control command by using the device to be tested;
detecting whether the test item exists in the tested object equipment or not, and creating a synchronous test event of the preset data synchronization equipment in the tested object equipment when the test item exists in the tested object equipment;
generating the synchronous operation instruction according to the synchronous test event;
the identifying the functional entity object of the measured object device comprises the following steps:
acquiring a device test item of the tested object device, and identifying the test type of the device test item;
determining the test function of the equipment test item according to the test type, and detecting the test entity of the equipment test item;
generating the functional entity object according to the test function and the test entity;
according to the functional entity object, establishing a functional entity mirror image of the device to be tested in the data synchronization device, which comprises:
acquiring a test item set in the functional entity object, and converting each test item in the test item set into a compiled file according to a preset file format to obtain a plurality of compiled files;
configuring a program running file of each compiled file in a preset compiling environment;
and generating a functional entity mirror image of the tested object device in the data synchronization device according to the program running file.
2. The method according to claim 1, wherein the receiving of the test control command by the preset data synchronization device comprises:
responding to a device test request, and configuring a test control instruction of the device test request;
creating a data transmission channel of the equipment test request and the preset data synchronization equipment;
and transmitting the test control instruction to the preset data synchronization equipment according to the data transmission channel.
3. The method of claim 2, wherein transmitting the test control instructions to the device under test comprises:
acquiring a data format of the test control instruction, and selecting a network transmission protocol of the test control instruction according to the data format;
and transmitting the control command to the tested object equipment according to the network transmission protocol.
4. The method according to claim 1, wherein the operating the functional entity image in the data synchronization device according to the synchronous operation instruction to obtain a first operation result comprises:
creating a running environment of the functional entity mirror in the data synchronization equipment;
configuring an operation strategy of the functional entity mirror image in the operation environment according to the synchronous operation instruction;
and executing the mirror image of the functional entity according to the strategy to obtain a first operation result.
5. The method of claim 4, wherein configuring the execution policy of the functional entity image in the execution environment according to the synchronous execution instruction comprises:
configuring the running time of the functional entity mirror image in the running environment according to the synchronous running instruction;
configuring the operation logic and the operation mode of the functional entity mirror image in the operation environment;
and generating the operation strategy of the functional entity mirror image according to the operation time, the operation logic and the operation mode.
6. The method of any one of claims 1 to 5, wherein generating the synchronous test result of the object under test based on the first and second operation results comprises:
inquiring the operation results with the same test items in the first operation results and the second operation results;
identifying whether the operation results with the same test items in the first operation result and the second operation result are consistent;
if the operation results with the same test items in the first operation result and the second operation result are not consistent, obtaining a synchronous test failure result of the tested object equipment;
and if the operation results with the same test items in the first operation result and the second operation result are consistent, obtaining a successful synchronous test result of the tested object equipment.
7. Synchronous device test apparatus for implementing the method according to any of claims 1 to 6, characterized in that the apparatus comprises:
the operation instruction creating module is used for receiving a test control instruction through a preset data synchronization device, transmitting the test control instruction to a tested object device, and creating a synchronous operation instruction of the preset data synchronization device in the tested object device according to the test control instruction;
the entity mirror image establishing module is used for identifying a functional entity object of the tested object equipment and establishing a functional entity mirror image of the tested object equipment in the data synchronization equipment according to the functional entity object; acquiring a test item set in the functional entity object, and converting each test item in the test item set into a compiled file according to a preset file format to obtain a plurality of compiled files; configuring a program running file of each compiled file in a preset compiling environment; generating a functional entity mirror image of the tested object equipment in the data synchronization equipment according to the program running file;
the entity mirror image operation module is used for operating the functional entity mirror image in the data synchronization equipment according to the synchronous operation instruction to obtain a first operation result;
the entity object operation module is used for operating the functional entity object in the tested object equipment to obtain a second operation result;
and the test result generating module is used for generating a synchronous test result of the tested object according to the first operation result and the second operation result.
CN202210455768.2A 2022-04-28 2022-04-28 Synchronous equipment testing method and device Active CN114564413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210455768.2A CN114564413B (en) 2022-04-28 2022-04-28 Synchronous equipment testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210455768.2A CN114564413B (en) 2022-04-28 2022-04-28 Synchronous equipment testing method and device

Publications (2)

Publication Number Publication Date
CN114564413A CN114564413A (en) 2022-05-31
CN114564413B true CN114564413B (en) 2022-07-29

Family

ID=81721409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210455768.2A Active CN114564413B (en) 2022-04-28 2022-04-28 Synchronous equipment testing method and device

Country Status (1)

Country Link
CN (1) CN114564413B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201301026A (en) * 2011-06-28 2013-01-01 Hon Hai Prec Ind Co Ltd Method and system for controlling synchronous testing
CN110674039A (en) * 2019-09-20 2020-01-10 广州虎牙科技有限公司 Multi-device synchronous testing method and device, server and storage medium
WO2021218143A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Data synchronization method and apparatus, and server and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2826224B1 (en) * 2001-06-15 2003-09-26 Thomson Licensing Sa METHOD FOR SYNCHRONIZING PROGRAM BROADCAST AND INCORPORATING BROADCAST CONTENT, DEVICE AND PRODUCTS THEREOF
US20060036907A1 (en) * 2004-08-11 2006-02-16 Emc Corporation Area-and product-independent test automation system and method for automatically synchronizing tests of multiple devices
CN102591194B (en) * 2012-03-06 2013-06-19 广西电网公司电力科学研究院 Intelligent test system and method used for IRIG (Inter-range Instrumentation Group)-B code fault-tolerant function of time synchronizer
CN102608910B (en) * 2012-03-06 2014-03-26 广西电网公司电力科学研究院 Time reference redundancy signal intelligent testing system and method of time synchronization device
CN109213642B (en) * 2017-06-29 2023-09-15 国民技术股份有限公司 Data synchronization device, test system and test method
US10970310B2 (en) * 2018-08-02 2021-04-06 Netapp Inc. Synchronous replication based cutover engine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201301026A (en) * 2011-06-28 2013-01-01 Hon Hai Prec Ind Co Ltd Method and system for controlling synchronous testing
CN110674039A (en) * 2019-09-20 2020-01-10 广州虎牙科技有限公司 Multi-device synchronous testing method and device, server and storage medium
WO2021218143A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Data synchronization method and apparatus, and server and storage medium

Also Published As

Publication number Publication date
CN114564413A (en) 2022-05-31

Similar Documents

Publication Publication Date Title
US10579344B2 (en) Converting visual diagrams into code
CN113238929B (en) Code testing method and device based on Mock data, electronic equipment and storage medium
CN112131118A (en) Mock testing method, Mock testing device, electronic equipment and computer readable storage medium
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN113268245A (en) Code analysis method, device and storage medium
CN108874384B (en) Terminal device, server, web page data processing method, and computer storage medium
CN114006885A (en) Data acquisition method and device based on intelligent equipment and electronic equipment
CN112579475A (en) Code testing method, device, equipment and readable storage medium
CN114564413B (en) Synchronous equipment testing method and device
CN114727100B (en) Joint debugging method and device for monitoring equipment
CN111488144A (en) Data processing method and equipment
CN111158777A (en) Component calling method and device and computer readable storage medium
CN113468458B (en) WEB-based application running method
CN113051171B (en) Interface testing method, device, equipment and storage medium
CN115033489A (en) Code resource detection method and device, electronic equipment and storage medium
CN114398282A (en) Test script generation method, device, equipment and storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN114020414A (en) Symbiotic method and device of Android system and bottom layer Linux, electronic equipment and storage medium
CN114595106B (en) Service control equipment debugging method and device
CN113176993A (en) Case testing method and device, electronic equipment and storage medium
CN116594960B (en) Descriptive file format conversion method, descriptive file format conversion device, computer equipment and storage medium
CN112667491A (en) Function test method and device of virtual machine
CN112947974B (en) Desktop icon updating method, device and equipment and computer readable storage medium
CN113032003B (en) Development file export method, development file export device, electronic equipment and computer storage medium
CN114389948B (en) Function upgrading and verifying method, device, equipment and medium based on white list

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A test method and device for synchronous equipment

Effective date of registration: 20221028

Granted publication date: 20220729

Pledgee: Bank of China Limited Wuhan Jianghan sub branch

Pledgor: Jingwang Technology Co.,Ltd.

Registration number: Y2022420000356