Client test method, target server, medium and product

The target server facilitates efficient OPC client testing by directly comparing real-time values with expected settings, bypassing the need for third-party servers and simplifying the configuration process.

CN119127706APending Publication Date: 2024-12-13BEIJING CONSEN AUTOMATION CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411271305.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Traditional OPC client testing requires configuration of multiple OPC servers, which is costly and cumbersome, and is limited by server restrictions on real-time value changes, making it inefficient and difficult to set expected values without exceeding system limits.

Method used

A target server is designed to perform OPC client testing by connecting to the client, using a data reading and writing module to obtain expected information from a test case and compare it with real-time values from a database, eliminating the need for third-party servers.

Benefits of technology

Enables convenient and fast OPC client testing without third-party servers, allowing for efficient configuration and comparison of real-time values against expected settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127706A_ABST
    Figure CN119127706A_ABST
Patent Text Reader

Abstract

The invention discloses a client testing method, a target server, a medium and a product. The client testing method is executed by a target server, the target server is connected with a client to be tested, and the target server comprises a data read-write module; the client test method comprises the following steps: through the data read-write module, obtaining an expected information set from a test case, obtaining a real-time value of a subscription bit number from a database, and comparing the real-time value of the subscription bit number with the expected information set to obtain a test result, the real-time value of the subscription bit number is the real-time value of the target server bit number subscribed by the client to be tested. According to the technical scheme of the invention, the OPC client can be tested conveniently and quickly without the help of a third-party server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of OPC technology, and in particular to a client testing method, a target server, a medium and a product. Background Art

[0002] In traditional testing, OPC (OLE for Process Control) data testing usually requires the help of third-party software. In the usual testing method, if the client is tested, the third-party server needs to be configured first, including but not limited to adding channels, devices, and bit numbers, setting the expected value change frequency of the bit number, setting the user name, password, and security policy, etc.; secondly, run the OPC service and load the configuration; finally, connect the client to be tested to the third-party server for relevant functional testing. In this process, there are the following problems: During the OPC client test, a client needs to connect to a large number of OPC servers, and the cost of configuring a large number of OPC servers for testing is high; when configuring the OPC service, it is cumbersome to add a large number of nodes and bit numbers of various types; the real-time value of the configuration bit number change running in the OPC service is limited by the server, and there are problems such as the expected value cannot be set and the expected value length exceeds the system built-in length. Summary of the invention

[0003] The embodiment of the present invention provides a client testing method, a target server, a medium and a product, so as to realize the convenient and fast completion of the testing of the OPC client without the aid of a third-party server.

[0004] According to one aspect of the present invention, a client testing method is provided, which is executed by a target server, the target server is connected to a client to be tested, and the target server comprises: a data reading and writing module; the client testing method comprises:

[0005] Through the data reading and writing module, the expected information set is obtained from the test case, the real-time value of the subscription position number is obtained from the database, and the real-time value of the subscription position number is compared with the expected information set to obtain the test result, wherein the real-time value of the subscription position number is the real-time value of the position number of the target server subscribed by the client to be tested.

[0006] According to another aspect of the present invention, a target server is provided, the target server comprising:

[0007] at least one processor; and

[0008] a memory communicatively connected to the at least one processor; wherein,

[0009] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the client testing method described in any embodiment of the present invention.

[0010] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client testing method described in any embodiment of the present invention when executed.

[0011] According to another aspect of the present invention, an embodiment of the present invention further provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the client testing method described in any embodiment of the present invention is implemented.

[0012] The embodiment of the present invention designs a target server and connects the target server to the client to be tested. The target server includes: a data reading and writing module. Through the data reading and writing module, the expected information set is first obtained from the test case, and then the real-time value of the subscription bit number is obtained from the database, that is, the real-time value of the bit number of the target server subscribed by the client to be tested is obtained, and finally the real-time value of the subscription bit number is compared with the expected information set to obtain the test result. Through the technical solution of the present invention, it is possible to complete the test of the OPC client conveniently and quickly without the help of a third-party server.

[0013] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 is a flow chart of a client testing method in an embodiment of the present invention;

[0016] Figure 2 is a structural diagram of an exemplary client testing method in an embodiment of the present invention;

[0017] Figure 3 is a structural diagram of another exemplary client testing method in an embodiment of the present invention;

[0018] Figure 4 It is a schematic diagram of the structure of a target server for implementing the client testing method of an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and their meanings are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] Embodiment 1

[0023] Figure 1 It is a flowchart of a client testing method in an embodiment of the present invention. This embodiment is applicable to the case where an OPC client is tested through an OPC server. The client testing method of this embodiment is executed by a target server. In this embodiment, the target server may be an OPC server used to test an OPC client. The target server is connected to a client to be tested, wherein the client to be tested may be an OPC client to be tested, for example, an OPCDA (OPC Data Access) client, an OPC UA (OPC Unified Architecture) client, or an OPC AE (OPC Alarms & Events) client. In this embodiment, the target server includes: a data reading and writing module. Among them, the data reading and writing module may be a data reading and writing module in the OPC server. As Figure 1 As shown, the method specifically comprises the following steps:

[0024] S101. Obtain an expected information set from a test case through a data reading and writing module, obtain a real-time value of a subscription number from a database, compare the real-time value of the subscription number with the expected information set, and obtain a test result.

[0025] The expected information set includes: an expected writing object, an expected writing value, and an expected writing cycle.

[0026] The real-time value of the subscription number is the real-time value of the number of the target server subscribed by the client to be tested.

[0027] The test case may be a test case written by a user and used to test an OPC client to be tested through an OPC server.

[0028] It should be noted that the test result may be a result obtained after testing the client to be tested. Exemplarily, the test result may be that the client to be tested passes the test. In other embodiments, the test result may also be that the client to be tested fails the test.

[0029] Specifically, the data reading and writing module in the target server obtains the expected information set from the test case, and then obtains the real-time value of the subscription target server bit number stored by the client to be tested from the database, compares the real-time value of the subscription bit number with the expected information set, and determines whether the test of the client to be tested passes.

[0030] The embodiment of the present invention designs a target server, connects the target server to the client to be tested, and includes a data reading and writing module. The target server obtains the expected information set from the test case through the data reading and writing module, and then obtains the real-time value of the subscription bit number from the database, compares the real-time value of the subscription bit number with the expected information set, and obtains the test result. Through the technical solution of the present invention, it is possible to complete the test of the OPC client conveniently and quickly without the help of a third-party server.

[0031] Optionally, before obtaining the real-time value of the subscription number from the database through the data reading and writing module, it also includes:

[0032] Through the data reading and writing module, in response to the bit number acquisition request sent by the client to be tested, the bit number set corresponding to the bit number acquisition request is sent to the client to be tested, and the subscription bit number information sent by the client to be tested is received, and the subscription bit number information includes the unchanged bit number information and the changed bit number information, and the unchanged bit number information is sent to the OPC service module.

[0033] The bit number acquisition request may be a request sent by the client to be tested to the target server to acquire the bit number in the target server, and the bit number set may be a set of bit numbers sent by the target server to the client to be tested according to the bit number acquisition request.

[0034] In this embodiment, the subscription number information may be information related to the number subscribed by the client to be tested to the target server, and the subscription number information includes constant number information and variable number information. The constant number information may refer to information related to the number whose real-time value will not change, and the variable number information may refer to information related to the number whose real-time value will change.

[0035] In actual operation, after the client to be tested establishes a connection with the target server, the client to be tested sends a bit number acquisition request to the target server, and the data reading and writing module in the target server sends the bit number set corresponding to the bit number acquisition request to the client to be tested. For example, if the client to be tested needs to obtain all bit numbers of the target server, the data reading and writing module in the target server can form a bit number set of all bit numbers and send it to the client to be tested.

[0036] Afterwards, the client to be tested selects a part of the bit numbers in the received bit number set for subscription, and returns the subscription bit number information to the target server. The subscription bit numbers selected in the client to be tested may include unchanged bit numbers and variable bit numbers. The specific bit number change cycle can be set from the test case. For example, there are 80 bit numbers in the bit number combination, of which 40 bit numbers are subscribed, and the 40 bit numbers include 30 unchanged bit numbers and 10 variable bit numbers. After receiving the unchanged bit number information, the target server sends the unchanged bit number information to the OPC service module, so that the OPC server module can write values ​​to these unchanged bit numbers.

[0037] Through the OPC service module, the constant bit number information sent by the data read-write module is received, and the constant bit number is written according to the constant bit number information to obtain the real-time value corresponding to the constant bit number, and the real-time value corresponding to the changing bit number and the real-time value corresponding to the constant bit number are fed back to the data read-write module, so that the data read-write module sends the real-time value corresponding to the changing bit number and the real-time value corresponding to the constant bit number to the client to be tested.

[0038] Among them, the real-time value corresponding to the unchanged bit number can be the value after the unchanged bit number is changed after the write operation is performed on the unchanged bit number. For example, if the unchanged bit number is 001 before writing the value and 002 after writing the value, then the real-time value of the unchanged bit number is 002.

[0039] Specifically, after the target server performs the write operation, it sends the real-time value of the changed bit number and the real-time value of the unchanged bit number to the client to be tested. After receiving the real-time value, the client to be tested stores the fact values ​​in the database.

[0040] Optionally, the target server also includes: a configuration module.

[0041] Before obtaining the real-time value of the subscription number from the database through the data reading and writing module, it also includes:

[0042] The configuration information is obtained from the test case through the configuration module, and configuration modeling is performed according to the configuration information to obtain a configuration model.

[0043] The configuration information includes: parameter information, IP address, port information, login information, expected value of change bit number and change cycle.

[0044] The configuration model may be a model obtained after the configuration module performs configuration modeling according to the acquired configuration information.

[0045] Specifically, the configuration module of the target server obtains the configuration data defined by the test case, and the configuration module performs configuration modeling according to the obtained data to obtain the configuration model.

[0046] Through the OPC service module, the configuration model is read to complete the server operation.

[0047] Specifically, the OPC service module starts and reads the configuration model established by the configuration module to complete the server operation.

[0048] Optionally, the client testing method also includes:

[0049] Through the data reading and writing module, the expected alarm events are obtained from the test cases, the actual data of the alarm events are obtained from the database, the actual data of the alarm events are compared with the expected alarm events, and the test results are obtained.

[0050] The expected alarm event may be an alarm or event that the target server set in the test case expects to generate. The actual data of the alarm event is the alarm or event actually generated by the target server. The actual data of the alarm event is stored in the database by the client to be tested.

[0051] Specifically, the data reading and writing module in the target server obtains the expected alarm event from the test case, and then obtains the actual data of the alarm event stored in the client to be tested from the database, compares the actual data of the alarm event with the expected alarm event, and determines whether the test of the client to be tested passes.

[0052] Optionally, after obtaining the expected alarm event from the test case through the data reading and writing module, it also includes:

[0053] Generate actual data of alarm events according to the expected alarm events, and send the actual data of alarm events to the client to be tested through the data reading and writing module.

[0054] During the actual operation, after the target server obtains the expected alarm event from the test case, it generates the actual data of the alarm event according to the expected alarm event, and sends the actual data of the alarm event to the client to be tested through the data reading and writing module. The client to be tested stores the actual data of the alarm event in the database.

[0055] As an exemplary description of an embodiment of the present invention, Figure 2 FIG. 1 is a structural diagram of an exemplary client testing method in an embodiment of the present invention. Figure 2 As shown, with the OPC server as the target server, the main operations of the client test method can be described as:

[0056] First, the configuration module of the OPC server reads the configuration data defined in the test case, and the configuration module performs configuration modeling based on the acquired configuration data; secondly, the OPC service module starts and reads the configuration model established by the configuration module to complete the server operation; then, when there is a read and write demand, the OPC server reads the read and write demand in the test case, and the data read and write module of the OPC server is responsible for reading the expected write object, expected write value and expected write cycle. The OPC service module requests the data read and write module to read and write data, and transmits the information to the OPC service module. After completing the subscription and read and write operations, the OPC service module returns the actual data to the data read and write module. The data read and write module sends the actual data to the client to be tested, so that the client to be tested stores the actual data in the database. The data read and write module obtains the actual data from the database, and then compares the parameters passed in by the test case with the actual data obtained from the database to determine the correctness of the data reading and writing.

[0057] The technical solution of the embodiment of the present invention is to connect the target server with the client to be tested by designing a target server. The target server includes: a configuration module, an OPC service module and a data reading and writing module. Through the configuration module, parameter information, IP address, port information, login information, expected value of change bit number and change cycle and other configuration information are obtained from the test case, and configuration modeling is performed according to the configuration information to obtain a configuration model. Through the OPC service module, the configuration model is read to complete the server operation. Afterwards, through the data reading and writing module, in response to the bit number acquisition request sent by the client to be tested, the bit number set corresponding to the bit number acquisition request is sent to the client to be tested, and the subscription bit number information sent by the client to be tested is received, the subscription bit number information includes the unchanged bit number information and the change bit number information, and the unchanged bit number information is sent to the OPC service module, and the unchanged bit number information sent by the data reading and writing module is received through the OPC service module, and the unchanged bit number is written to the unchanged bit number according to the unchanged bit number information, and the real-time value corresponding to the unchanged bit number is obtained, and the real-time value corresponding to the change bit number and the real-time value corresponding to the unchanged bit number are fed back to the data reading and writing module, so that the data reading and writing module sends the real-time value corresponding to the change bit number and the real-time value corresponding to the unchanged bit number to the client to be tested, and the client to be tested stores the real-time value of the subscription bit number in the database, and obtains the expected information set from the test case through the data reading and writing module, obtains the real-time value of the subscription bit number from the database, and compares the real-time value of the subscription bit number with the expected information set to obtain the test result. Through the technical scheme of the present invention, it is possible to achieve the test of the OPC client conveniently and quickly without the help of a third-party server.

[0058] Embodiment 2

[0059] Figure 3 is a structural diagram of another exemplary client testing method in an embodiment of the present invention, which is applicable to the case where an OPC DA client, an OPC UA client, and an OPC AE client are tested through an OPC server. Figure 3 As shown, the client testing method specifically includes the following steps:

[0060] The OPC server obtains configuration information (parameter information, IP address, port information, login information, expected value of change bit number, change cycle) from the test case, and performs configuration modeling based on the configuration information to obtain the configuration model, read the configuration model, and complete the server operation. The OPC DA client, OPC UA client, and OPC AE client to be tested establish a connection with the OPC server. Then start the test:

[0061] The OPC server obtains the expected write object, expected write value, and expected write value cycle from the test case. The OPC DA client and OPC UA client to be tested obtain all the bit numbers of the OPC DA server and OPC UA server respectively, and after determining the subscription bit number, send the unchanged bit number and the changed bit number in the subscription bit number to the OPC server. After the OPC server performs the write operation, it sends the real-time value of the subscription bit number to the OPC DA client and OPC UA client to be tested. The OPC DA client and OPC UA client to be tested store the real-time value of the subscription bit number in the database. The OPC server obtains the real-time value of the subscription bit number from the database, and compares it with the expected write object, expected write value, and expected write value cycle obtained from the test case to obtain the test result.

[0062] The OPC server obtains the expected alarms and events from the test case, and generates the actual data of the alarms and events according to the expected alarms and events, and then sends the actual data of the alarms and events to the OPC AE client to be tested, and the OPC AE client to be tested stores the received actual data of the alarms and events in the database. The OPC server obtains the actual data of the alarms and events from the database, and compares it with the expected alarms and events obtained from the test case to obtain the test results.

[0063] In the technical solution of the embodiment of the present invention, the OPC server obtains the expected configuration content and expected server information in the test case, configures and runs the OPC service, and quickly and conveniently completes the construction of multiple OPC servers. Various OPC clients connect to the corresponding OPC server, and complete the OPC client test by comparing the expected data in the test case with the actual data obtained from the database. The read-write module of the OPC server completes the bit number write operation by obtaining the expected write value object, write value, cycle and other information in the test case, solving the problem of the open source server client's restriction on the bit number write value.

[0064] Embodiment 3

[0065] Figure 4 A schematic diagram of the structure of a target server 30 that can be used to implement an embodiment of the present invention is shown. The target server is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The target server can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0066] like Figure 4 As shown, the target server 30 includes at least one processor 31, and a memory connected to the at least one processor 31, such as a read-only memory (ROM) 32, a random access memory (RAM) 33, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 31 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 32 or the computer program loaded from the storage unit 38 to the random access memory (RAM) 33. In the RAM 33, various programs and data required for the operation of the target server 30 can also be stored. The processor 31, the ROM 32, and the RAM 33 are connected to each other through a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.

[0067] A number of components in the target server 30 are connected to the I / O interface 35, including: an input unit 36, such as a keyboard, a mouse, etc.; an output unit 37, such as various types of displays, speakers, etc.; a storage unit 38, such as a disk, an optical disk, etc.; and a communication unit 39, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 39 allows the target server 30 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0068] The processor 31 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 31 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 31 performs the various methods and processes described above, such as the client test method:

[0069] Through the data reading and writing module, the expected information set is obtained from the test case, the real-time value of the subscription position number is obtained from the database, and the real-time value of the subscription position number is compared with the expected information set to obtain the test result, wherein the real-time value of the subscription position number is the real-time value of the position number of the target server subscribed by the client to be tested.

[0070] In some embodiments, the client test method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 38. In some embodiments, part or all of the computer program may be loaded and / or installed on the target server 30 via the ROM 32 and / or the communication unit 39. When the computer program is loaded into the RAM 33 and executed by the processor 31, one or more steps of the client test method described above may be performed. Alternatively, in other embodiments, the processor 31 may be configured to execute the client test method in any other suitable manner (e.g., by means of firmware).

[0071] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0072] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0073] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0074] To provide interaction with a user, the systems and techniques described herein may be implemented on a target server having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the target server. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0075] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0076] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0077] In one embodiment, the embodiment of the present invention further includes a computer program product, the computer program product includes a computer program, and the computer program implements the client testing method of any embodiment of the present invention when executed by a processor.

[0078] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0079] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0080] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A client testing method, It is characterized in that The method is executed by a target server, the target server is connected to a client to be tested, and the target server includes: a data reading and writing module; the client testing method includes: Through the data reading and writing module, the expected information set is obtained from the test case, the real-time value of the subscription position number is obtained from the database, and the real-time value of the subscription position number is compared with the expected information set to obtain the test result, wherein the real-time value of the subscription position number is the real-time value of the position number of the target server subscribed by the client to be tested.

2. The method according to claim 1, It is characterized in that The target server also includes: an OPC service module; Before obtaining the real-time value of the subscription number from the database through the data reading and writing module, the method further includes: By means of the data reading and writing module, in response to the bit number acquisition request sent by the client to be tested, the bit number set corresponding to the bit number acquisition request is sent to the client to be tested, and the subscription bit number information sent by the client to be tested is received, wherein the subscription bit number information includes the unchanged bit number information and the changed bit number information, and the unchanged bit number information is sent to the OPC service module; The OPC service module receives the constant bit number information sent by the data read-write module, and performs a write operation on the constant bit number according to the constant bit number information to obtain the real-time value corresponding to the constant bit number, and feeds back the real-time value corresponding to the changing bit number and the real-time value corresponding to the constant bit number to the data read-write module, so that the data read-write module sends the real-time value corresponding to the changing bit number and the real-time value corresponding to the constant bit number to the client to be tested.

3. The method according to claim 2, It is characterized in that The target server also includes: a configuration module; Before obtaining the real-time value of the subscription number from the database through the data reading and writing module, the method further includes: Acquiring configuration information from the test case through the configuration module, and performing configuration modeling according to the configuration information to obtain a configuration model; The configuration model is read through the OPC service module to complete the server operation.

4. The method according to claim 1, It is characterized in that Also includes: Through the data reading and writing module, the expected alarm event is obtained from the test case, the actual data of the alarm event is obtained from the database, and the actual data of the alarm event is compared with the expected alarm event to obtain the test result, wherein the actual data of the alarm event is stored in the database by the client to be tested.

5. The method according to claim 3, It is characterized in that After obtaining the expected alarm event from the test case through the data reading and writing module, the method further includes: The actual data of the alarm event is generated according to the expected alarm event, and the actual data of the alarm event is sent to the client to be tested through the data reading and writing module.

6. The method according to claim 1, It is characterized in that The expected information set includes: an expected write object, an expected write value, and an expected write cycle.

7. The method according to claim 3, It is characterized in that The configuration information includes: parameter information, IP address, port information, login information, expected value of change bit number and change cycle.

8. A target server, It is characterized in that The target server includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the client testing method according to any one of claims 1 to 7.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client testing method according to any one of claims 1 to 7 when executed.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the client testing method according to any one of claims 1 to 7.