CN110309056B - Cross-platform simulation system for testing software input and output functions - Google Patents
Cross-platform simulation system for testing software input and output functions Download PDFInfo
- Publication number
- CN110309056B CN110309056B CN201910434186.4A CN201910434186A CN110309056B CN 110309056 B CN110309056 B CN 110309056B CN 201910434186 A CN201910434186 A CN 201910434186A CN 110309056 B CN110309056 B CN 110309056B
- Authority
- CN
- China
- Prior art keywords
- switching value
- input
- output
- test
- test instruction
- 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
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 19
- 238000012360 testing method Methods 0.000 claims abstract description 111
- 230000000875 corresponding effect Effects 0.000 claims abstract description 18
- 238000012905 input function Methods 0.000 claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 8
- 238000004891 communication Methods 0.000 description 10
- 230000001960 triggered effect Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000001276 controlling effect Effects 0.000 description 2
- 238000011835 investigation Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a cross-platform simulation system for testing the input and output functions of software, which is used for testing the input and output functions of an application program to be tested, and comprises an input function testing unit and an output function testing unit; the input function test unit is used for generating a switching value input test instruction and transmitting the switching value input test instruction to an application program to be tested; the output function test unit is used for receiving a switching value output test instruction sent by an application program to be tested and carrying out corresponding effect display according to the switching value output test instruction; the method comprises the steps that an application program to be tested generates a switching value output test instruction, receives the switching value input test instruction, and performs corresponding logic test according to the received switching value input test instruction. The invention has the advantages of simplicity, convenience, time and labor saving and high working efficiency.
Description
Technical Field
The invention relates to the technical field of software project testing, in particular to a cross-platform simulation system for testing a software input and output function.
Background
The switching value input/output module is equipment for collecting, inputting and controlling output of switching value signals, and is also commonly called as a digital value I/O module; the switching value input/output module collects switching value signals to the computer through an RS-485 bus or an RS232 communication interface, or the computer sends related instructions to control related states of the switch through the switching value input/output module; the related state of the switch can be remotely controlled by carrying out paired communication through the RS-485 bus; the communication protocol of the switching value input/output module is a standard Modbus protocol or a customized related protocol.
In the projects of the actual Internet of things and automatic control front-stage acquisition control, a switching value input/output module is generally used for acquiring and controlling related circuits.
At present, as shown in fig. 4, during the development of a project and during the later fault investigation, a user must connect the developed project to a real hardware environment for circuit acquisition and control to test the implementation effect of the software system function and the fault investigation, so that the test of the project function is always limited by a hardware platform, and the time and the labor are wasted.
In addition, various problems of the hardware platform often interfere with the direction and thought of a software system developer to solve the problems, and the development efficiency and quality of the whole project are greatly reduced.
In order to solve the above problems, an ideal technical solution is always sought.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art, and provides a cross-platform simulation system for testing the input and output functions of software.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows: a cross-platform simulation system for testing input and output functions of software comprises an input function test unit and an output function test unit;
the input function test unit is used for generating a switching value input test instruction and transmitting the switching value input test instruction to an application program to be tested;
the output function test unit is used for receiving a switching value output test instruction sent by an application program to be tested and carrying out corresponding effect display according to the switching value output test instruction;
the method comprises the steps of generating a switching value output test instruction by an application program to be tested, receiving the switching value input test instruction, and carrying out corresponding logic test according to the received switching value input test instruction.
Based on the above, the input function test unit sets a switching value input control interface, and a first button is set on the switching value input control interface;
the first button is used for simulating a switch in an actual hardware circuit, and a user controls the first button to switch states according to test requirements.
Based on the above, the output function test unit sets a switching value output display interface, and a second button is set on the switching value output display interface;
the second button is used for simulating a switch in an actual hardware circuit, and outputting a test instruction according to the switching value to control the switching state of the second button.
Compared with the prior art, the invention has outstanding substantive characteristics and remarkable progress, in particular to a cross-platform simulation system for testing the input and output functions of software, which gets rid of the restriction of application program testing on a hardware platform when the comprehensive test of input and output control is carried out, can simulate the input and output conditions of various switching values in the actual application program project at any time and any place, and provides great convenience for the test and debugging of developers; meanwhile, the situation that various problems of a hardware platform interfere with the direction and thought of solving the problems of software system developers is avoided, and the development efficiency and quality of the whole project are greatly improved.
Drawings
Fig. 1 is a schematic flow chart of the present invention.
FIG. 2 is a schematic diagram of a switching value input control interface of the present invention.
FIG. 3 is a schematic diagram of a switching value output display interface of the present invention.
Fig. 4 is a schematic diagram of a prior art structure.
Detailed Description
The technical scheme of the invention is further described in detail through the following specific embodiments.
Example 1
As shown in figure 1, a cross-platform simulation system for testing input and output functions of software is used for testing input and output functions of an application program to be tested, and comprises an input function testing unit and an output function testing unit; the input function test unit is used for generating a switching value input test instruction and transmitting the switching value input test instruction to an application program to be tested; the output function test unit is used for receiving a switching value output test instruction sent by an application program to be tested and carrying out corresponding effect display according to the switching value output test instruction; the method comprises the steps of generating a switching value output test instruction by an application program to be tested, receiving the switching value input test instruction, and carrying out corresponding logic test according to the received switching value input test instruction.
In this embodiment, when the cross-platform simulation system for testing the software input/output function is in communication interconnection with an application program to be tested, the following operations are executed:
step 1, a SCoket server is established, and a TCP server is started on an operating host to monitor through a C# script; waiting for Socket communication connection request of the application program to be tested;
step 2, the application program to be tested configures the IP address of the cross-platform simulation system for testing the software input and output functions, which needs to be connected, and the port number monitored by the IP address, and after the consistent communication protocol is selected, the application program to be tested sends a Socket communication connection request to the cross-platform simulation system for testing the software input and output functions;
and step 3, the cross-platform simulation system for testing the software input and output functions receives the Socket communication connection request, and establishes TCP communication connection with the application program to be tested according to the received Socket communication connection request.
In the process of developing a software system, the invention ensures that the input and output control comprehensive test of the application program gets rid of the restriction of a hardware platform and does not depend on a real hardware platform; the user can use the cross-platform simulation system for testing the software input and output functions to simulate the input and output conditions of various switching values in the actual project at any time and any place, and great convenience is provided for testing and debugging of developers.
The cross-platform simulation system for testing the software input and output functions can virtualize an isolated switching value input and output module and a corresponding hardware circuit structure into a simple control system; the simple control system can be packaged by a Unity platform and run on a Windows platform, an Android platform, an IOS platform and a WebGL platform; the method is simple and convenient, and therefore the technical problem that a real hardware environment must be built for the comprehensive test of the input and output control of the application program in the project development process is solved.
Example 2
The embodiment provides a specific implementation manner of an input function test unit, as shown in fig. 2, the input function test unit is provided with a switching value input control interface, and a first button is arranged on the switching value input control interface; the first button is used for simulating a switch in an actual hardware circuit, and a user controls the first button to switch states according to test requirements.
In this embodiment, the switching value input control interface is designed in the Unity3D platform, and the number of the first buttons is set according to the test requirement. If the first button is in the selected state, a certain switch is in a triggered state, namely a corresponding switching value input port is triggered; if the first button is in an unselected state, a certain switch is in an off state, namely the corresponding switching value input port is in an off state. After the cross-platform simulation system for testing the software input and output functions is connected with the application program to be tested, a user can control the first button to switch states according to testing requirements so as to simulate different switching value input states.
When the application program to be tested performs input control test: and after the switching value input test instruction generated by the input function test unit is analyzed by the background of the system and packaged into a double-side agreed protocol, the double-side agreed protocol is sent to the application program to be tested through a TCP network. After the application program to be tested receives the input control test, the input control test is analyzed into a state that the corresponding switching value input port is triggered through information, and the state can be directly used for various logic judgment processes, so that the input control test is realized.
Example 3
The embodiment provides a specific implementation manner of an output function test unit, as shown in fig. 3, the output function test unit is provided with a switching value output display interface, and a second button is arranged on the switching value output display interface; the second button is used for simulating a switch in an actual hardware circuit, and outputting a test instruction according to the switching value to control the switching state of the second button.
In this embodiment, the switching value output control panel is designed in the Unity3D platform, and the number of the second buttons is set according to the test requirement. If the second button is in the selected state, the corresponding switching value output port is in the triggered state; if the second button is in an unselected state, the corresponding switching value output port is in an off state. After the cross-platform simulation system for testing the software input and output functions is connected with the application program to be tested, the output function testing unit controls the second button to switch states according to the switching value output testing instruction so as to simulate different switching value output states.
When the application program to be tested performs output control test: according to the test requirement of closing or opening the control circuit, the application program to be tested generates a corresponding switching value output test instruction and sends the corresponding switching value output test instruction to the output function test unit; the output function test unit receives the switching value output test instruction, analyzes the switching value output test instruction into a triggered state through a background, and then controls the corresponding second buttons to be switched into a selected state; therefore, the invention can directly display the test result on the switching value output control panel, and a user can intuitively observe whether the control of the application program to be tested on each path of switching value is correct or not, thereby realizing the output control test.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same; while the invention has been described in detail with reference to the preferred embodiments, those skilled in the art will appreciate that: modifications may be made to the specific embodiments of the present invention or equivalents may be substituted for part of the technical features thereof; without departing from the spirit of the invention, it is intended to cover the scope of the invention as claimed.
Claims (3)
1. A cross-platform simulation system for testing the input and output functions of software is characterized in that: the system refers to a simple control system which virtualizes an isolated switching value input/output module and a corresponding hardware circuit structure, and comprises an input function test unit and an output function test unit, so that the input/output control comprehensive test of an application program gets rid of the restriction of a hardware platform and does not depend on the real hardware platform;
the input function test unit is used for generating a switching value input test instruction and transmitting the switching value input test instruction to an application program to be tested;
the output function test unit is used for receiving a switching value output test instruction sent by an application program to be tested and carrying out corresponding effect display according to the switching value output test instruction;
the method comprises the steps of generating a switching value output test instruction by an application program to be tested, receiving the switching value input test instruction, and carrying out corresponding logic test according to the received switching value input test instruction.
2. The cross-platform simulation system for software input-output functional testing of claim 1, wherein: the input function test unit is provided with a switching value input control interface, and a first button is arranged on the switching value input control interface;
the first button is used for simulating a switch in an actual hardware circuit, and a user controls the first button to switch states according to test requirements.
3. The cross-platform simulation system for software input-output functional testing of claim 1, wherein: the output function test unit is provided with a switching value output display interface, and a second button is arranged on the switching value output display interface;
the second button is used for simulating a switch in an actual hardware circuit, and outputting a test instruction according to the switching value to control the switching state of the second button.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434186.4A CN110309056B (en) | 2019-05-23 | 2019-05-23 | Cross-platform simulation system for testing software input and output functions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434186.4A CN110309056B (en) | 2019-05-23 | 2019-05-23 | Cross-platform simulation system for testing software input and output functions |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110309056A CN110309056A (en) | 2019-10-08 |
CN110309056B true CN110309056B (en) | 2023-11-24 |
Family
ID=68074998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910434186.4A Active CN110309056B (en) | 2019-05-23 | 2019-05-23 | Cross-platform simulation system for testing software input and output functions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110309056B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112904104A (en) * | 2021-01-15 | 2021-06-04 | 欧拓飞科技(珠海)有限公司 | Method for product function test by using graphical interface |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104932479A (en) * | 2015-04-27 | 2015-09-23 | 深圳市中电电力技术股份有限公司 | Automatic test method and system |
CN105607995A (en) * | 2015-11-11 | 2016-05-25 | 北汽福田汽车股份有限公司 | Software test system, method and apparatus |
CN105738130A (en) * | 2014-12-08 | 2016-07-06 | 联创汽车电子有限公司 | Electric power steering controller hardware function test board |
CN205983198U (en) * | 2016-07-18 | 2017-02-22 | 中国电子信息产业集团有限公司第六研究所 | Cross -platform PLC board level frock test system based on QT |
CN107102221A (en) * | 2017-03-16 | 2017-08-29 | 江苏方天电力技术有限公司 | A kind of quick test platform of protective relaying device logic function |
CN108732443A (en) * | 2018-05-21 | 2018-11-02 | 湖北三江航天万峰科技发展有限公司 | A kind of Auto-Test System and method based on Linux |
CN108982996A (en) * | 2018-06-29 | 2018-12-11 | 国网江苏省电力有限公司电力科学研究院 | A kind of extra-high voltage direct-current of outdoor scene substituted keeps the scene intact test device |
-
2019
- 2019-05-23 CN CN201910434186.4A patent/CN110309056B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105738130A (en) * | 2014-12-08 | 2016-07-06 | 联创汽车电子有限公司 | Electric power steering controller hardware function test board |
CN104932479A (en) * | 2015-04-27 | 2015-09-23 | 深圳市中电电力技术股份有限公司 | Automatic test method and system |
CN105607995A (en) * | 2015-11-11 | 2016-05-25 | 北汽福田汽车股份有限公司 | Software test system, method and apparatus |
CN205983198U (en) * | 2016-07-18 | 2017-02-22 | 中国电子信息产业集团有限公司第六研究所 | Cross -platform PLC board level frock test system based on QT |
CN107102221A (en) * | 2017-03-16 | 2017-08-29 | 江苏方天电力技术有限公司 | A kind of quick test platform of protective relaying device logic function |
CN108732443A (en) * | 2018-05-21 | 2018-11-02 | 湖北三江航天万峰科技发展有限公司 | A kind of Auto-Test System and method based on Linux |
CN108982996A (en) * | 2018-06-29 | 2018-12-11 | 国网江苏省电力有限公司电力科学研究院 | A kind of extra-high voltage direct-current of outdoor scene substituted keeps the scene intact test device |
Also Published As
Publication number | Publication date |
---|---|
CN110309056A (en) | 2019-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113312879B (en) | Chip circuit function verification system, method, device and storage medium | |
CN107704346B (en) | SOC chip debugging method and system | |
US8041553B1 (en) | Generic software simulation interface for integrated circuits | |
CN206400286U (en) | A kind of test system based on hardware in loop equipment | |
CN105446933B (en) | The debugging system and adjustment method of multi-core processor | |
CN109740222B (en) | Testing device and system for automobile networking scene | |
CN106445811B (en) | A kind of automatization test system and method based on SecureCRT | |
CN104483959A (en) | Fault simulation and test system | |
CN102023922A (en) | System and method for testing automotive electronic diagnostic software | |
WO2012077704A1 (en) | Debug stub server, debugging method and program | |
CN103686813A (en) | Device and method for testing automatic switching stability of wireless AP (access point) channels | |
CN206523872U (en) | A kind of USB device test system | |
WO2017113848A1 (en) | Testing method, testing platform and simulated testing device for test case | |
CN110309056B (en) | Cross-platform simulation system for testing software input and output functions | |
CN106815150B (en) | Server-side interface test system and method | |
CN105045712A (en) | Test system for testing graphic processing module | |
US20230035673A1 (en) | Information processing system, information processing apparatus, use method of information processing apparatus, user terminal, and program therefor | |
JP2000163456A (en) | Logic verifying method | |
CN112346975A (en) | Automobile software evaluation device | |
CN210466051U (en) | Fault injection test system for redundant flight control computer | |
CN113608935B (en) | Method, system, equipment and medium for testing network card | |
CN109587663A (en) | A kind of automated testing method and its system of vehicle-mounted Wi-Fi switch | |
CN107193705B (en) | Chip debugging method and device | |
CN108415839A (en) | The development frame of multinuclear SoC chip and the development approach of multinuclear SoC chip | |
CN113923146B (en) | Visual block chain consensus algorithm performance test method |
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 |