CN111124877B - Train display software testing method, device and system - Google Patents

Train display software testing method, device and system Download PDF

Info

Publication number
CN111124877B
CN111124877B CN201811294498.1A CN201811294498A CN111124877B CN 111124877 B CN111124877 B CN 111124877B CN 201811294498 A CN201811294498 A CN 201811294498A CN 111124877 B CN111124877 B CN 111124877B
Authority
CN
China
Prior art keywords
test
display
script
data
tested
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
CN201811294498.1A
Other languages
Chinese (zh)
Other versions
CN111124877A (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.)
Zhuzhou CRRC Times Electric Co Ltd
Original Assignee
Zhuzhou CRRC Times Electric 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 Zhuzhou CRRC Times Electric Co Ltd filed Critical Zhuzhou CRRC Times Electric Co Ltd
Priority to CN201811294498.1A priority Critical patent/CN111124877B/en
Publication of CN111124877A publication Critical patent/CN111124877A/en
Application granted granted Critical
Publication of CN111124877B publication Critical patent/CN111124877B/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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

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)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The invention discloses a train display software testing method, device and system. The method comprises the following steps: according to the read configuration file of the automatic test software, executing an automatic test script in the configuration file; sending test data generated after the automatic test script is executed to a display to be tested; acquiring an interface image of the tested display responding to the test data, and matching the acquired interface image with a preset image template; and determining the test result of the automatic test script according to the matching result. The scheme provided by the invention can improve the software testing efficiency and reusability, and is more convenient to use.

Description

Train display software testing method, device and system
Technical Field
The invention relates to the technical field of software, in particular to a method, a device and a system for testing train display software.
Background
At present, a train becomes one of important vehicles, and a train display is also an important device in the train. The train display is a device for displaying system information of trains and running states of the trains, and is installed in a train cab, and displayed related information can provide help for drivers to operate, so that the display is called as the eyes of the drivers in an image. The display is one of the key devices in train control, and the reliability, safety and availability of the display are important guarantees for train operation.
In the related art, the product quality is generally guaranteed by a test verification method in the display design stage. When testing software of a train display, a tester needs to design thousands of test cases according to software requirement functions, communication protocols and the like, and needs to input huge data to test when executing the cases. Referring to fig. 1, a connection diagram of a test environment in the prior art is shown. The system comprises a display for running tested software and an accompanying module for running the accompanying software, wherein the display and the accompanying module are connected through a special MVB (Multifunction Vehicle Bus) connecting line; wherein, the accompanying software is written by adopting a graphic programming language of a MULTIPROG (programmable logic controller programming software); the PC 1 is respectively connected with the test accompanying module and the tested module (namely a display) in a serial port or Ethernet mode and is used for forcibly inputting data. The method adopted by the prior art display software test comprises the following steps: firstly, writing accompanying software according to the requirements of an accompanying module and an MVB communication protocol of a display; and then, the display runs the tested software, corresponding information is displayed after data input by the test accompanying module is received, and whether the displayed result is correct or not is observed on the display through human eyes.
In the method in the prior art, when the test case is executed, the corresponding variable can only be manually and forcibly input data on the accompanying test software, the whole execution process is manually operated step by step, the result cannot be automatically stored, and the result can only be manually observed. Therefore, the test method adopted by the prior art is inflexible, extremely low in efficiency and incapable of being reused in subsequent projects.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, and a system for testing software of a train display, which can improve software testing efficiency and reusability and are more convenient to use.
According to one aspect of the invention, a train display software testing method is provided, which comprises the following steps:
according to the read configuration file of the automatic test software, executing an automatic test script in the configuration file;
sending test data generated after the automatic test script is executed to a display to be tested;
acquiring an interface image of the tested display responding to the test data, and matching the acquired interface image with a preset image template;
and determining the test result of the automatic test script according to the matching result.
Preferably, the sending the test data generated after the automated test script is executed to the display under test includes:
and sending the test data generated after the automatic test script is executed to a protocol conversion module, converting the test data into MVB protocol data by the protocol conversion module and sending the MVB protocol data to a display to be tested.
Preferably, the acquiring an interface image of the display under test responding to the test data includes:
and receiving an interface image of the tested display responding to the test data, which is acquired by the camera equipment, wherein the interface image of the tested display responding to the test data is acquired by the camera equipment according to the mapped interface after the screen splitting device maps the interface of the tested display to the computer terminal equipment.
Preferably, the matching the acquired interface image with a preset image template includes:
and matching the acquired interface image with a preset image template in a color template matching mode.
Preferably, after determining the test result of the automated test script according to the matching result, the method further includes:
storing the test result and the test process data;
and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
Preferably, the configuration file of the automated testing software includes a test script Excel file of a fixed format automatically generated by the automated testing software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
According to another aspect of the present invention, there is provided a train display software testing apparatus, comprising:
the script execution module is used for executing the automatic test script in the configuration file according to the read configuration file of the automatic test software;
the data transmission module is used for transmitting the test data generated after the script execution module executes the automatic test script to the display to be tested;
the image matching module is used for acquiring an interface image of the tested display responding to the test data sent by the data transmission module and matching the acquired interface image with a preset image template;
and the test processing module is used for determining the test result of the automatic test script according to the matching result of the image matching module.
According to another aspect of the present invention, there is provided a train display software testing system, comprising:
the computer terminal equipment is used for executing an automatic test script in the configuration file according to the read configuration file of the automatic test software, sending test data generated after the automatic test script is executed to a display to be tested through a protocol conversion module, acquiring an interface image of the display to be tested, collected by camera equipment, responding to the test data by the display to be tested, matching the acquired interface image with a preset image template, and determining a test result of the automatic test script according to a matching result;
the protocol conversion module is used for receiving test data generated after the computer terminal equipment executes the automatic test script, converting the test data into MVB protocol data and then sending the MVB protocol data to the display to be tested;
the screen splitting device is used for mapping the interface of the display to be tested to the computer terminal equipment;
and the camera equipment is used for acquiring an interface image of the display to be tested responding to the test data according to the interface mapped by the screen splitting device and sending the interface image to the computer terminal equipment.
Preferably, after the computer terminal equipment determines the test result of the automatic test script according to the matching result, the test result and the test process data are stored; and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
Preferably, the computer terminal equipment is provided with automated testing software, the configuration file of the automated testing software comprises a test script Excel file with a fixed format automatically generated by the automated testing software, and the test script Excel file is set or modified according to a required function or a communication protocol.
It can be found that the technical solution of the embodiment of the present invention is to execute the automated testing script in the configuration file according to the read configuration file of the automated testing software; and sending the test data generated after the automatic test script is executed to the display to be tested. That is, the scheme of the invention adopts the automatic execution of the automatic test script, can be repeatedly executed after being compiled once, has reusability, does not need manual intervention, ensures that the communication data of the display port can be automatically tested, reduces the workload of organizing the data and improves the efficiency. In addition, the invention obtains the interface image of the tested display responding to the test data, and matches the obtained interface image with a preset image template; and determining the test result of the automatic test script according to the matching result, namely automatically judging whether the display of the display equipment is correct or not through image analysis, and carrying out image and fault diagnosis on the display by combining an artificial intelligence technology. Therefore, the method can greatly improve the efficiency of software testing, can be repeatedly used for regression testing and other similar projects, reduces the workload, ensures the software testing quality and effectively reduces the software testing cost.
Furthermore, compared with the prior art that the operation is completely manual operation, the whole process is not recorded and stored, and the problem finding process is not favorable for reproduction and repeated utilization of subsequent tests.
Further, the configuration file of the automated testing software according to the embodiment of the present invention includes a test script Excel file of a fixed format automatically generated by the automated testing software, and the test script Excel file may be set or modified according to a required function or a communication protocol, so that information required for testing may be continuously and automatically input to the display device by way of extracting an Excel table field as required.
Furthermore, the embodiment of the present invention may send test data generated after executing an automated test script to a protocol conversion module, the protocol conversion module converts the test data into MVB protocol data, and sends the MVB protocol data to a tested display, and may map an interface of the tested display to a computer terminal device by a screen splitter (that is, whatever interface is displayed on the tested display is mapped to an automated test system of the computer terminal device for display), and a camera device collects an interface image of the tested display responding to the test data according to the mapped interface and sends the interface image to the computer terminal device, thereby implementing image collection and automatic comparison by automated test software, and determining whether a displayed result is correct.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in greater detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a prior art test environment connection diagram;
FIG. 2 is a schematic flow chart diagram of a train display software testing method according to one embodiment of the present invention;
FIG. 3 is another schematic flow chart diagram of a train display software testing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of the internal data flow of the test software in the train display software test method according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a display under test of a train in a train display software testing method according to an embodiment of the invention;
fig. 6 is a schematic diagram of a structure of a template matching program in a train display software testing method according to an embodiment of the invention;
fig. 7 is a schematic diagram illustrating a test result in a train monitor software testing method according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of a train display software testing system according to an embodiment of the present invention;
FIG. 9 is another schematic block diagram of a train display software testing system according to an embodiment of the present invention;
FIG. 10 is a schematic block diagram of a train display software testing apparatus according to one embodiment of the present invention;
fig. 11 is a schematic block diagram of a computer terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The invention provides a train display software testing method which can improve software testing efficiency and reusability and is more convenient to use. The method can realize the automatic test of the train display software, has the advantages of high test efficiency, reusability and the like, can be fused with the artificial intelligence technology to diagnose the display image and the fault, and can automatically store the execution result.
The technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a train display software testing method according to an embodiment of the invention.
Referring to fig. 2, the method includes:
in step 201, according to the read configuration file of the automated testing software, the automated testing script in the configuration file is executed.
In step 202, the test data generated after the automated test script is executed is sent to the display under test.
In this step, the test data generated after the execution of the automated test script may be sent to the protocol conversion module, and the test data may be sent to the display under test after being converted into MVB protocol data by the protocol conversion module.
In step 203, an interface image of the display under test responding to the test data is obtained, and the obtained interface image is matched with a preset image template.
In this step, the interface image of the display under test responding to the test data is obtained, which may be the interface image of the display under test responding to the test data collected by the camera device, wherein the interface image of the display under test responding to the test data is collected by the camera device according to the mapped interface after the screen splitter maps the interface of the display under test to the computer terminal device.
In this step, the acquired interface image is matched with a preset image template, which may be matching the acquired interface image with a preset image template in a color template matching manner.
In step 204, the test result of the automated test script is determined according to the matching result.
In the step, if the matching results are consistent, the test result of the automatic test script is determined to be that the script is executed to pass, and if the matching results are inconsistent, the test result of the automatic test script is determined to be that the script is not executed to pass.
It should be noted that, after determining the test result of the automated test script according to the matching result, the method may further include: storing the test result and the test process data; and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
It can be found that the technical solution of the embodiment of the present invention is to execute the automated testing script in the configuration file according to the read configuration file of the automated testing software; and sending the test data generated after the automatic test script is executed to the display to be tested. That is, the scheme of the invention adopts the automatic execution of the automatic test script, can be repeatedly executed after being compiled once, has reusability, does not need manual intervention, ensures that the communication data of the display port can be automatically tested, reduces the workload of organizing the data and improves the efficiency. In addition, the invention obtains the interface image of the tested display responding to the test data, and matches the obtained interface image with a preset image template; and determining the test result of the automatic test script according to the matching result, namely automatically judging whether the display of the display equipment is correct or not through image analysis, and carrying out image and fault diagnosis on the display by combining an artificial intelligence technology. Therefore, the method can greatly improve the efficiency of software testing, can be repeatedly used for regression testing and other similar projects, reduces the workload, ensures the software testing quality and effectively reduces the software testing cost.
Fig. 3 is another schematic flow chart of a train display software testing method according to an embodiment of the invention. Fig. 3 depicts the inventive arrangement in more detail with respect to fig. 2.
Referring to fig. 3, the method includes:
in step 301, a configuration file of automated test software is read.
In this step, the configuration file of the automated test software may be read by the computer terminal device. And installing automatic test software on the computer terminal equipment. The configuration file of the automatic test software comprises a test script Excel file with a fixed format, which is automatically generated by the automatic test software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
For example, when a tester performs software testing, an initial test script Excel file with a fixed format can be automatically generated through automatic test software of computer terminal equipment, and setting, modification, perfection and the like are performed according to a required function or a communication protocol. The test script Excel file may include information such as an MVB communication port, and the test script information may include: port number, word offset, bit offset, signal name, preconditions, operating steps, expected results, actual results, conclusions, etc. The whole configuration file is written according to the preposition condition, the test function and other pages. At the beginning of the execution of the automatic test, the automatic test software will automatically read the configuration file to obtain all the test functions and script information.
In step 302, the function under test is selected.
In this step, the function under test selected by the tester is acquired.
In step 303, the automated test script in the configuration file is executed.
In this step, the automated test script in the configuration file is executed, that is, a new use case in the configuration file is executed.
In step 304, the generated test data is sent to the display under test.
The automatic test software constructs all port data character strings with specified length during running, firstly analyzes an automatic test script after the execution of the automatic test is started, writes data into the specified port position, sends the character strings, namely the test data to the protocol conversion module, converts the character strings into MVB protocol data by the protocol conversion module and then sends the MVB protocol data to the display to be tested, and the display to be tested responds according to the received test data.
In step 305, an interface image of the display under test responding to the test data is obtained and stored.
In this step, the interface of the display under test can be mapped to the computer terminal device by the screen splitter. Referring to fig. 5, fig. 5 is a schematic display diagram of a train display under test in a train display software testing method according to an embodiment of the invention. In fig. 5, a train number is shown, and the function menu at the bottom of the interface includes: event logging, setup, maintenance, homepage, etc., and also display speed and dc voltage on the interface.
Then, the camera equipment collects an interface image of the display to be tested responding to the test data according to the mapped interface and sends the interface image to the computer terminal equipment, and the computer terminal equipment receives and stores the interface image of the display to be tested responding to the test data sent by the camera equipment.
In step 306, the acquired interface image is matched with a preset image template.
In the step, the computer terminal equipment compares and matches the acquired interface image with the corresponding image template in the background, and judges whether the acquired interface image is consistent with the expected result.
The step can match the acquired interface image with a preset image template in a color template matching mode.
The invention relates to an automatic image identification and comparison part of automatic test software, namely a function of matching an acquired interface image with a preset image template, which can be realized by a LabVIEW (program development environment) machine vision development system. The invention can adopt a color template matching mode to complete the detection of the interface change of the display, for example, the icon, the character and the like of the interface change due to the change of the execution of the use case. The color template matching mode is mainly based on the color and space distribution characteristics of a target image, such as shape and size, and combines the color matching and gray level image pattern matching technology to quickly locate the color pattern in the image. Referring to fig. 6, a schematic diagram of a structure of a template matching program in a train display software testing method according to an embodiment of the present invention is shown. Firstly, reading an icon template image of a display into a memory, and learning information such as color, shape and the like of the icon template image; then reading the target image to be detected into an internal memory, matching the target image with the icon template image, and performing secondary verification according to the returned matching information and the position information to further ensure the matching accuracy; and finally, judging whether the detection result is successfully matched.
In step 307, it is determined whether the acquired interface image matches a preset image template, if not, step 308 is performed, and if so, step 309 is performed.
In step 308, a determination is made that the script did not execute, and step 310 is entered.
In this step, if the obtained interface image is unsuccessfully matched with the preset image template, the current script execution does not pass, that is, the present case does not pass.
In step 309, the script execution is determined to pass, and step 310 is entered.
In this step, if the obtained interface image is successfully matched with the preset image template, the current script is executed and passed, that is, the present case is passed.
In step 310, the test result and the test procedure data are saved, and the process proceeds to step 311.
In this step, the test results and test procedure data are saved.
In step 311, it is determined whether all the automation test scripts have been executed, if not, the process returns to step 303, and if yes, the process proceeds to step 312.
This step determines whether the execution of all the selected automation test scripts is completed, and if not, returns to step 303 to continue executing a new automation test script.
In step 312, the test ends.
And finishing the execution of the selected automatic test scripts and generating a test report if the execution of the automatic test scripts is finished.
After all tests are executed, the invention can automatically issue the test report and export and store the test result and the test process data by one key. The execution condition and the final result statistics of each test script are recorded in detail in the test report, so that the test personnel can conveniently perform test analysis and recording.
The invention further introduces the internal data flow of the test script execution independently. Fig. 4 is a schematic diagram of internal data flow of test software in a train display software test method according to an embodiment of the invention. As shown in fig. 4, the process of the internal data flow includes:
in step 401, test script editing is performed or a test script is imported.
In step 402, test script compilation or inspection is performed.
In step 403, the test script is automatically executed. In this step, data interaction with the protocol conversion module is involved.
In step 404, test result statistics and test reports are generated.
Fig. 7 is a schematic diagram of a test result displayed in a train monitor software testing method according to an embodiment of the invention. As shown in FIG. 7, the interface for the test results in the figure includes serial number, vehicle number, list number, input information, output information, test results, and notes.
For example, the train numbered 95 in the figure shows that the test result is OK (success); the train display device with the serial number 101 is failed, and the train display device with the serial number 102 gives an alarm. Equipment failures and equipment warnings may be displayed in different colors to alert test personnel.
From the embodiment of fig. 3 of the present invention, it can be found that:
1) the data input of the prior art method is inflexible, and brings inconvenience to test execution operators. The test execution operator must be familiar with the principle of the accompanying software, the protocol, the variable name and the like to correctly execute the use case, otherwise, errors can be caused; the scheme of the invention adopts the automatic execution of the automatic test script, does not need manual intervention, and has simple and convenient operation.
2) The prior art method can not execute the cases in batch and has large workload. The method has the advantages that a simple use case is executed by a plurality of steps of manual operation, and usually, thousands of use cases are designed when one display application software is tested, so that the workload is very large; the scheme of the invention can be repeatedly executed after being compiled once, has reusability, and can continuously and automatically input information required by testing to display equipment in a mode of extracting Excel table fields, thereby reducing the workload of organizing data and improving the efficiency.
3) The prior art method has low testing efficiency. The method needs to spend several minutes for executing a simple case, and the test time for completing the whole software is very long, so the test efficiency is very low; the scheme of the invention adopts the automatic test script to automatically execute, the whole test process does not need other operations, the software automatically executes the test script, the execution time of each case is adjustable, the fastest execution of one case only needs a few seconds, the test time is greatly reduced, and the operation of testers is also reduced, so the test efficiency is high.
4) The prior art methods are not reusable. The method is completely manually operated, and the whole process is not recorded and stored, so that the reproduction of the process of finding problems and the reutilization of subsequent tests are not facilitated; the scheme of the invention saves the test process data, the format of the test script file is fixed, and the script case information is detailedly split and recorded, so that the problem reproduction and the repeated utilization of the subsequent test can be conveniently carried out, and the reusability is realized.
5) The test result of the prior art method can not be automatically identified and stored, and the output result can only be manually observed and recorded; the scheme of the invention combines the artificial intelligence technology to diagnose the display image and the fault, can be repeatedly executed, can store the test result data and has reusability.
The above describes the train display software testing method of the present invention in detail, and the following describes a train display software testing apparatus, device and system corresponding to the present invention.
Fig. 8 is a schematic block diagram of a train display software testing system according to an embodiment of the present invention.
Referring to fig. 8, the present invention relates to a train display software testing system 80, which comprises: computer terminal equipment 81, protocol conversion module 82, screen separator 84 and camera equipment 85.
The computer terminal device 81 is configured to execute an automated test script in a configuration file according to the read configuration file of the automated test software, send test data generated after the execution of the automated test script to a display under test through a protocol conversion module 82, obtain an interface image of the display under test collected by the camera device 85, which responds to the test data, match the obtained interface image with a preset image template, and determine a test result of the automated test script according to a matching result.
And the protocol conversion module 82 is configured to receive test data generated after the computer terminal device 81 executes the automated test script, convert the test data into MVB protocol data, and send the MVB protocol data to the display 83 to be tested.
And the screen splitter 84 is used for mapping the interface of the display to be tested to the computer terminal device 81.
And the camera device 85 is configured to collect an interface image of the display under test responding to the test data according to the interface mapped by the screen splitter 84, and send the interface image to the computer terminal device 81.
After determining the test result of the automated test script according to the matching result, the computer terminal device 81 stores the test result and the test process data; and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
The computer terminal device 81 is installed with automated test software, the configuration file of the automated test software includes a test script Excel file of a fixed format automatically generated by the automated test software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
The computer terminal device 81 may match the acquired interface image with a preset image template in a color template matching manner.
FIG. 9 is another schematic block diagram of a train display software testing system according to an embodiment of the present invention.
Fig. 9 includes: computer terminal equipment 81, protocol conversion module 82, display 83 to be tested, screen separator 84, camera equipment 85 and power supply 86; the computer terminal device 81, the protocol conversion module 82, the screen splitter 84 and the camera device 85 form a train display software testing system.
In fig. 9, a power supply 86 is connected to a display 83 to be tested and a protocol conversion module 82, the protocol conversion module 82 is connected to the display 83 to be tested through an MVB connection line, the display 83 to be tested is connected to a screen splitter 84, a computer terminal device 81 is connected to the protocol conversion module 82 and a camera device 85 through an ethernet, and the screen splitter 84 is connected to the computer terminal device 81.
The tested display 83 runs the tested software, and is connected with the protocol conversion module 82 through an MVB connecting line; the computer terminal device (PC) 81 runs display automated test software, is connected to the protocol conversion module 82 in an ethernet manner, and is configured to force input and receive data, simultaneously maps an interface of the display 83 to be tested to the computer terminal device 81 in real time through the screen splitter 84, monitors an interface image of the display 83 to be tested through the camera device 85 (e.g., an intelligent camera), and feeds a result back to the automated test software of the computer terminal device 81 for image result determination and identification.
The tested display 83 runs the tested software, and the tested software mainly displays the relevant information of the network logic control module and the train, including the communication, working state, fault and the like of each subsystem according to the protocol information. When the tested display 83 receives the data input by the protocol conversion module 82, the corresponding information is displayed, the interface image is mapped to the computer terminal device 81, the image collected by the camera device 85 is automatically compared with the automatic test software sent to the computer terminal device 81, and whether the displayed result is correct or not is judged.
The protocol conversion module 82 may adopt a data conversion board, and through simple configuration file setting, the ethernet and MVB data conversion can be conveniently realized.
The automated testing software of the computer terminal device 81 may use a development environment LabVIEW based on a graphical programming language to complete programming, and the main functions include engineering management, case management, editing, importing, exporting, and automatically executing a test script, judging, counting, and analyzing a test result, and generating a test report. The automated testing software of the computer terminal device 81 analyzes and executes the automated testing script according to the testing sequence, generates testing data, and performs data interaction with the protocol conversion module 82. Meanwhile, the interface of the display 83 to be tested is mapped in real time through the screen splitter 84 (that is, whatever interface is displayed on the display 83 to be tested is mapped to the computer terminal device 81 and displayed in the automatic test system of the computer terminal device 81).
Therefore, by the scheme of the invention, the automatic execution of the software test script of the train display can be realized, the test execution efficiency and the regression test efficiency are improved, the working efficiency of software testers is improved, and the automatic test level is improved.
Fig. 10 is a schematic block diagram of a train display software testing device according to an embodiment of the present invention.
Referring to fig. 10, the train display software testing apparatus 100 according to the present invention includes a script execution module 110, a data transmission module 120, an image matching module 130, and a test processing module 140.
And the script execution module 110 is configured to execute the automatic test script in the configuration file according to the read configuration file of the automatic test software.
And the data transmission module 120 is configured to send test data generated after the script execution module executes the automated test script to the display to be tested.
And the image matching module 130 is configured to acquire an interface image of the test data sent by the tested display in response to the data transmission module, and match the acquired interface image with a preset image template.
And the test processing module 140 is configured to determine a test result of the automated test script according to the matching result of the image matching module.
The image matching module 130 may match the acquired interface image with a preset image template in a color template matching manner.
The data transmission module 120 may send test data generated after executing the automated test script to the protocol conversion module, and the test data is converted into MVB protocol data by the protocol conversion module and then sent to the display under test.
The configuration file of the automated testing software may include a test script Excel file of a fixed format automatically generated by the automated testing software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
Fig. 11 is a schematic block diagram of a computer terminal device according to an embodiment of the present invention.
Referring to fig. 11, in a computer terminal device 111, there are included:
a processor 112; and
a memory 113 having executable code stored thereon, which when executed by the processor 112, causes the processor 112 to perform the method as follows:
according to the read configuration file of the automatic test software, executing an automatic test script in the configuration file;
sending test data generated after the automatic test script is executed to a display to be tested;
acquiring an interface image of the tested display responding to the test data, and matching the acquired interface image with a preset image template;
and determining the test result of the automatic test script according to the matching result.
Embodiments of the present invention also provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to perform the following method:
according to the read configuration file of the automatic test software, executing an automatic test script in the configuration file;
sending test data generated after the automatic test script is executed to a display to be tested;
acquiring an interface image of the tested display responding to the test data, and matching the acquired interface image with a preset image template;
and determining the test result of the automatic test script according to the matching result.
In summary, according to the technical solution of the embodiment of the present invention, the automated testing script in the configuration file is executed according to the read configuration file of the automated testing software; and sending the test data generated after the automatic test script is executed to the display to be tested. That is, the scheme of the invention adopts the automatic execution of the automatic test script, can be repeatedly executed after being compiled once, has reusability, does not need manual intervention, ensures that the communication data of the display port can be automatically tested, reduces the workload of organizing the data and improves the efficiency. In addition, the invention obtains the interface image of the tested display responding to the test data, and matches the obtained interface image with a preset image template; and determining the test result of the automatic test script according to the matching result, namely automatically judging whether the display of the display equipment is correct or not through image analysis, and carrying out image and fault diagnosis on the display by combining an artificial intelligence technology. Therefore, the method can greatly improve the efficiency of software testing, can be repeatedly used for regression testing and other similar projects, reduces the workload, ensures the software testing quality and effectively reduces the software testing cost.
The technical solution according to the present invention has been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for carrying out the above-mentioned steps defined in the above-mentioned method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
Those of ordinary skill in the art will understand that: the invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.

Claims (8)

1. A train display software testing method is characterized by comprising the following steps:
according to the read configuration file of the automatic test software, executing an automatic test script in the configuration file;
sending test data generated after executing the automated test script to a protocol conversion module, converting the test data into multifunctional vehicle bus MVB protocol data by the protocol conversion module, and sending the data to a display to be tested;
acquiring an interface image of the tested display responding to the test data, and matching the acquired interface image with a preset image template in a color template matching mode;
and determining the test result of the automatic test script according to the matching result, if the matching result is consistent, determining that the test result is that the script passes execution, and if the matching result is inconsistent, determining that the test result is that the script does not pass execution.
2. The method of claim 1, wherein said obtaining an interface image of said display under test in response to said test data comprises:
and receiving an interface image of the tested display responding to the test data, which is acquired by the camera equipment, wherein the interface image of the tested display responding to the test data is acquired by the camera equipment according to the mapped interface after the screen splitting device maps the interface of the tested display to the computer terminal equipment.
3. The method of claim 1, wherein after determining the test result of the automated test script based on the matching result, further comprising:
storing the test result and the test process data;
and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
4. The method of claim 1, wherein:
the configuration file of the automatic test software comprises a test script Excel file with a fixed format automatically generated by the automatic test software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
5. A train display software testing device is characterized by comprising:
the script execution module is used for executing the automatic test script in the configuration file according to the read configuration file of the automatic test software;
the data transmission module is used for transmitting test data generated after the script execution module executes the automatic test script to the protocol conversion module, converting the test data into MVB protocol data of the multifunctional vehicle bus by the protocol conversion module and then transmitting the MVB protocol data to the tested display;
the image matching module is used for acquiring an interface image of the tested display responding to the test data sent by the data transmission module and matching the acquired interface image with a preset image template in a color template matching mode;
and the test processing module is used for determining the test result of the automatic test script according to the matching result of the image matching module, determining that the test result is that the script passes execution if the matching result is consistent, and determining that the test result is that the script fails execution if the matching result is inconsistent.
6. A train display software testing system, comprising:
the computer terminal equipment is used for executing an automatic test script in a configuration file according to the read configuration file of the automatic test software, sending test data generated after the automatic test script is executed to a display to be tested through a protocol conversion module, acquiring an interface image of the display to be tested, collected by camera equipment, responding to the test data by the display to be tested, matching the acquired interface image with a preset image template in a color template matching mode, determining a test result of the automatic test script according to a matching result, determining that the test result is that the script is executed to pass if the matching result is consistent, and determining that the test result is that the script is not executed to pass if the matching result is inconsistent;
the protocol conversion module is used for receiving test data generated after the computer terminal equipment executes the automatic test script, converting the test data into MVB protocol data and then sending the MVB protocol data to the display to be tested;
the screen splitting device is used for mapping the interface of the display to be tested to the computer terminal equipment;
and the camera equipment is used for acquiring an interface image of the display to be tested responding to the test data according to the interface mapped by the screen splitting device and sending the interface image to the computer terminal equipment.
7. The system of claim 6, wherein:
after the computer terminal equipment determines the test result of the automatic test script according to the matching result, the test result and the test process data are stored; and judging whether the execution of all the automatic test scripts is finished, if so, confirming the end of the automatic test, and if not, returning to continue executing the new automatic test scripts.
8. The system according to claim 6 or 7, characterized in that:
the computer terminal equipment is provided with automatic test software, the configuration file of the automatic test software comprises a test script Excel file with a fixed format automatically generated by the automatic test software, and the test script Excel file is set or modified according to a demand function or a communication protocol.
CN201811294498.1A 2018-11-01 2018-11-01 Train display software testing method, device and system Active CN111124877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811294498.1A CN111124877B (en) 2018-11-01 2018-11-01 Train display software testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811294498.1A CN111124877B (en) 2018-11-01 2018-11-01 Train display software testing method, device and system

Publications (2)

Publication Number Publication Date
CN111124877A CN111124877A (en) 2020-05-08
CN111124877B true CN111124877B (en) 2021-10-29

Family

ID=70494780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811294498.1A Active CN111124877B (en) 2018-11-01 2018-11-01 Train display software testing method, device and system

Country Status (1)

Country Link
CN (1) CN111124877B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113702726A (en) * 2020-05-21 2021-11-26 株洲中车时代电气股份有限公司 Automatic testing device and method for vehicle-mounted display
CN114205261B (en) * 2020-08-27 2024-02-20 中车株洲电力机车研究所有限公司 Automatic test method for correctness of network communication data and storage medium
CN112286825A (en) * 2020-11-24 2021-01-29 北斗星通智联科技有限责任公司 Screen testing method and device for intelligent cabin and electronic equipment
CN112527683B (en) * 2020-12-24 2022-08-26 卡斯柯信号有限公司 Automatic interface test system for computer interlocking system and application
CN113641592B (en) * 2021-10-15 2022-02-22 卡斯柯信号(北京)有限公司 Test sequence generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420712A (en) * 2010-09-28 2012-04-18 中国移动通信集团公司 Testing method and equipment
CN105302115A (en) * 2015-11-05 2016-02-03 株洲南车时代电气股份有限公司 Train network application level control software automation test method
CN106776298A (en) * 2016-11-30 2017-05-31 中国直升机设计研究所 A kind of avionics system shows automatic software test method and system
CN107705296A (en) * 2017-09-18 2018-02-16 东莞华贝电子科技有限公司 Display screen test system, display screen method of testing and equipment
US9946638B1 (en) * 2016-03-30 2018-04-17 Open Text Corporation System and method for end to end performance response time measurement based on graphic recognition

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10120474B2 (en) * 2010-12-09 2018-11-06 T-Mobile Usa, Inc. Touch screen testing platform for engaging a dynamically positioned target feature
CN102929782A (en) * 2012-11-14 2013-02-13 北京奇虎科技有限公司 Device and method for testing software performances
CN105866575B (en) * 2016-03-30 2020-04-10 中车株洲电力机车研究所有限公司 Vehicle-mounted display comprehensive testing device and testing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420712A (en) * 2010-09-28 2012-04-18 中国移动通信集团公司 Testing method and equipment
CN105302115A (en) * 2015-11-05 2016-02-03 株洲南车时代电气股份有限公司 Train network application level control software automation test method
US9946638B1 (en) * 2016-03-30 2018-04-17 Open Text Corporation System and method for end to end performance response time measurement based on graphic recognition
CN106776298A (en) * 2016-11-30 2017-05-31 中国直升机设计研究所 A kind of avionics system shows automatic software test method and system
CN107705296A (en) * 2017-09-18 2018-02-16 东莞华贝电子科技有限公司 Display screen test system, display screen method of testing and equipment

Also Published As

Publication number Publication date
CN111124877A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111124877B (en) Train display software testing method, device and system
CN107491061B (en) A kind of the network automatically test macro and its method of commercial vehicle OBD diagnostic device
WO2017000424A1 (en) Protocol detection method and apparatus
CN107370637B (en) Vehicle-mounted ECU communication function automatic test system and method
CN107766209B (en) Central control automation test method, device, equipment and computer readable storage medium
CN103698686A (en) Signal testing method and signal testing equipment
CN115080299B (en) Software fault feedback processing method, device, medium and equipment
CN113433921A (en) Method and device for testing real vehicle function and control equipment
CN109815124B (en) MBSE-based interlocking function defect analysis method and device and interlocking system
CN113126993B (en) Automatic test method and system applied to vehicle detection software
CN111857103B (en) Vehicle diagnosis method, device, equipment and storage medium
CN114115168A (en) Fault injection test system
CN114879647A (en) ECU fault code test system, electronic controller and car
WO2023110478A1 (en) Method for automatically exploring states and transitions of a human machine interface (hmi) device
CN113886274A (en) Stability testing method, device, equipment and storage medium for Internet of vehicles terminal
CN115185819A (en) System testing method, device, equipment and computer readable storage medium
CN109592525A (en) Elevator frequency converter fault diagnosis system and method
CN110704252A (en) Automatic testing device and testing method based on cloud dynamic management
CN114166265A (en) Ground test method and system for satellite, storage medium and electronic equipment
CN109960238B (en) Automatic test system and method for vehicle diagnostic instrument
CN112433947A (en) Chaos engineering method and system based on network data
Xu et al. Design of vehicle gateway automatic test system based on canoe
CN113640026B (en) Industrial equipment testing method, device and system
CN113077735B (en) Test method, device and system of vehicle-mounted display equipment
CN117155818A (en) Real vehicle testing method, system and medium based on SOA service

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