CN110687888A - Automatic upgrading test device and system applied to locomotive - Google Patents

Automatic upgrading test device and system applied to locomotive Download PDF

Info

Publication number
CN110687888A
CN110687888A CN201910915811.7A CN201910915811A CN110687888A CN 110687888 A CN110687888 A CN 110687888A CN 201910915811 A CN201910915811 A CN 201910915811A CN 110687888 A CN110687888 A CN 110687888A
Authority
CN
China
Prior art keywords
test
tested
module
upper computer
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910915811.7A
Other languages
Chinese (zh)
Other versions
CN110687888B (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.)
Shanghai Heqian Electronic Technology Co Ltd
Original Assignee
Shanghai Heqian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Heqian Electronic Technology Co Ltd filed Critical Shanghai Heqian Electronic Technology Co Ltd
Priority to CN201910915811.7A priority Critical patent/CN110687888B/en
Publication of CN110687888A publication Critical patent/CN110687888A/en
Application granted granted Critical
Publication of CN110687888B publication Critical patent/CN110687888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/021Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system adopting a different treatment of each operating region or a different mode of the monitored system, e.g. transient modes; different operating configurations of monitored system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0267Fault communication, e.g. human machine interface [HMI]
    • G05B23/0272Presentation of monitored results, e.g. selection of status reports to be displayed; Filtering information to the user

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automatic upgrading test device and system applied to a locomotive. The upper computer comprises a test module, an upgrading module and a test module, the test module at least comprises a test case module, the test case module comprises a plurality of preset test cases, the upper computer regularly establishes connection with the server according to a built-in program and then acquires an upgrading file to upgrade the equipment to be tested, and then the test cases included by the test module test the equipment to be tested one by one and finally generate a test report. By the technical scheme provided by the invention, the equipment to be tested can be automatically tested, the investment of manpower and material resources is reduced, and the testing cost is reduced.

Description

Automatic upgrading test device and system applied to locomotive
Technical Field
The invention relates to the field of locomotives, in particular to an automatic upgrading test device and system applied to airplanes, ships and vehicles.
Background
With the development of the technology, modern transportation devices, such as airplanes, ships and automobiles, are rapidly developed, and the development of the intelligent technology is added, so that the transportation devices become more and more complex and tend to be more and more intelligent due to the combination of software and hardware such as various sensors. Under the development of huge systems, the development period of a project and the periods of continuous upgrading and improvement of product use are very short, many systems are developed in a distributed mode, although the development is in a distributed mode, the components of the systems are related, and the general method is to perform overall testing after the development of each component of the systems is completed. Due to the bulkiness of the system, for example: the intelligent driving automobile has various functions of vehicle-mounted central control and various functions of vehicle-mounted instruments which are very complex, and needs to be tested one by one to see whether the various functions are normally displayed, whether the picture of each application is normally displayed and whether the display of each system controlled by the automobile body is normal. In the prior art, the manual test is adopted, but the test is very time-consuming and labor-consuming, omission also occurs, habits of everyone are different, and a test result has large deviation. The test is also improved by factory production personnel, namely, manual test is not adopted, application programs on a central control display screen and an instrument display screen are simulated to be manually touched by means of an intelligent mechanical arm, and screen icons are clicked one by one to test whether the picture is normal or not. However, due to the fact that the area of the central control display screen or the manual display screen is limited, the intelligent mechanical arm is difficult to guarantee that the position needing to be touched is accurately found in a large number of touch processes, deviation can occur frequently, the test structure is inaccurate or the test is interrupted, and errors are reported frequently, so that the auxiliary of personnel is needed in the test process, and if measures are taken, the tester can correct the mechanical arm timely. Although the test can reduce the burden of partial manual test compared with the single manual test, the test still needs the intervention of a tester, and errors are easy to occur in the test process.
Therefore, it is necessary to develop an automatic test system to reduce the test cost, improve the test accuracy, and avoid the problems of low test accuracy caused by human or mechanical arm tests.
Disclosure of Invention
Based on the defects in the prior art, the technical problem to be solved by the invention is to provide an automatic upgrade testing device and system which can be applied to locomotives.
In order to achieve the aim, the invention provides an automatic upgrade testing device applied to a locomotive, which comprises an upper computer and a server, wherein the upper computer is connected with the server in a wired or wireless mode;
the upper computer comprises a test module and an upgrading module;
the test module is configured to automatically test the equipment to be tested after the upgrading is successful and generate a test report;
the upgrading module is configured to download upgrading files from a server or upgrade equipment to be tested which is accessed to the upper computer;
the test module at least comprises a test case module, the test case module comprises a plurality of preset test cases, the test cases comprise key test cases and non-key test cases, the key test cases comprise application tests of driving safety functions, and the non-key test cases comprise application tests of non-driving safety functions.
The invention provides an automatic upgrade test device applied to a locomotive, and further, a compiled upgrade file for the locomotive is stored in a server, and the compiled upgrade file is downloaded to an upper computer after the upper computer is connected with the server;
and after the upper computer is connected with the equipment to be tested, an SFTP security file transmission protocol is adopted to transmit the upgrade file to the equipment to be tested.
The invention provides an automatic upgrading test device applied to a locomotive, and further comprises a local storage module, a backup module, an authentication module and a data analysis module;
the local storage module is configured to store data used in a test process, and the data comprises one or more of an upgrade file, a test file, data generated in the test process and a test report;
the backup module is configured to backup or restore a system accessed to the device to be tested;
the authentication module is configured to manage authentication for establishing connection with equipment accessed by the upper computer, and the authentication module stores an IP address, a port number and an access authorization code of a peripheral which can be accessed;
and the data analysis module is configured to analyze the test data generated after the automatic test, perform analysis processing and form a test report.
The invention provides an automatic upgrading test device applied to a locomotive, and further, the test module also comprises a test execution module and a comparison and judgment module;
the test execution module comprises a preset calling function which can specify one or more of the test item sequence, the test parameters, the test scheme and whether the test is continued or interrupted of the device to be tested.
And the comparison and judgment module is configured to compare and analyze a result generated by the test of the test case on the equipment to be tested with a corresponding preset result according to the instruction of the test execution module and judge whether the equipment to be tested operates normally.
The invention provides an automatic upgrading test device applied to a locomotive, and further the upper computer further comprises a reminding module, wherein the reminding module is configured to be used for reminding when a test result of a key step of each step is completed or a test error is generated in the process of downloading an upgrading file, upgrading equipment to be tested and testing the equipment to be tested.
The invention provides an automatic upgrading test device applied to a locomotive, and further, a reminding mode of a reminding module comprises the step of carrying out pop-up display in equipment to be tested or sending information to a preset mobile terminal and a computer for reminding in a short message, WeChat and mail mode.
The invention provides an automatic upgrade testing device applied to a locomotive, further, the connection between an upper computer and a server is managed through an authentication module, and the authentication process comprises the following steps: after the upper computer and the server are successfully connected, the server sends a user information message to carry out communication confirmation with the upper computer, wherein the user information message comprises an IP address, a port and an access authorization code of an access peripheral, the authentication module analyzes the user information and judges whether the user information is in an allowed access range, if the user information is in the allowed range, the authentication is successful, and if the user information is not in the allowed range, the authentication is failed;
the device to be tested comprises an authorization management module, and the connection between the upper computer and the device to be tested is authenticated through authorization management.
The invention also provides an automatic upgrading test system applied to the locomotive, which comprises the automatic upgrading test device applied to the locomotive, equipment to be tested and monitoring equipment;
the automatic upgrading test device is used for automatically upgrading and/or testing the equipment to be tested;
the monitoring equipment is used for testing and monitoring the equipment to be tested and sending data generated by monitoring to an upper computer in the automatic upgrading testing device for analysis and processing.
The invention provides an automatic upgrading test system applied to a locomotive, and further, an automatic test device for testing equipment to be tested comprises the following steps:
step S31, selecting a plurality of test cases required by the test according to the test instruction and sending the test cases to the equipment to be tested;
step S32, the device to be tested analyzes the received test case according to a preset protocol, and then sends a corresponding test signal to test according to the test instruction;
the test case comprises a test program written by a scripting language, a java language or a C + + language;
the test program comprises a test signal for testing, wherein the test signal at least comprises one or more of an analog signal, a digital signal and a coordinate of a display interface;
when testing, the testing of the key test case is firstly carried out, and the testing of the non-key test case is carried out after the testing of the key test case is finished.
The invention provides an automatic upgrading test system applied to a locomotive, and further the process that monitoring equipment carries out test monitoring on equipment to be tested and sends data generated by monitoring to an upper computer in an automatic test device for analysis and processing specifically comprises the following steps:
step S41, aiming at each test case, NIVISION is used for carrying out feature picture and pattern matching learning in advance;
step S42, using NIVISION to compare the preset picture of expected result after multiple learning with the current test result, and judging whether the preset picture is in the preset threshold range, if so, executing step S43, if not, recording the current error and storing in the test report, and continuing to execute the next test;
step S43, judging whether the test case is the last test case, if not, continuing to execute the next test; if the test case is the last test case, the test process is ended, and a test passing report is generated.
Has the advantages that:
1. the invention can automatically test, reduce the input of manpower and material resources and reduce the test cost.
2. The backup function of the invention can automatically recover the system after the function test fails after the successful upgrade, thereby avoiding the upgrade equipment from being incapable of running due to the upgrade error brought by the system upgrade.
3. The test case of the invention distinguishes the key case from the non-key case, the key case is tested firstly, if the test of the key case fails, the test is terminated, so as to save the test time.
4. The invention automatically tests the device to be tested without completely obtaining the control right of the device to be tested.
5. For each test case, the invention distinguishes the main function and the auxiliary function, preferentially tests the main function and then tests the auxiliary function.
Drawings
The following drawings are only schematic illustrations and explanations of the present invention, and do not limit the scope of the present invention.
Fig. 1 is a schematic structural diagram of an automatic upgrade testing apparatus according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a test module according to an embodiment of the invention.
FIG. 3 is a flowchart illustrating an automatic testing method according to an embodiment of the invention.
Fig. 4 is a flowchart illustrating an automatic testing method with a backup system function according to an embodiment of the present invention.
Fig. 5 is a schematic flow chart illustrating automatic connection establishment between an upper computer and a device under test according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating an automatic upgrading method for a device under test according to an embodiment of the present invention.
Fig. 7 is a flowchart illustrating an automatic testing method for a device under test according to an embodiment of the invention.
Detailed Description
In order to more clearly understand the technical features, objects, and effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings, in which like reference numerals refer to like parts throughout. For the sake of simplicity, the drawings schematically show the relevant parts of the invention and do not represent the actual structure of the product. In addition, for simplicity and clarity of understanding, only one of the components having the same structure or function is schematically illustrated or labeled in some of the drawings.
As for the control system, the functional module, application program (APP), is well known to those skilled in the art, and may take any suitable form, either hardware or software, and may be a plurality of functional modules arranged discretely, or a plurality of functional units integrated into one piece of hardware. In its simplest form, the control system may be a controller, such as a combinational logic controller, a micro-programmed controller, or the like, so long as the operations described herein are enabled. Of course, the control system may also be integrated as a different module into one physical device without departing from the basic principle and scope of the invention.
Example 1:
the embodiment provides an automatic upgrade testing device applied to a locomotive, and particularly, referring to fig. 1, fig. 1 is a schematic structural diagram of the automatic upgrade testing device in the embodiment, the automatic upgrade testing device specifically includes an upper computer and a server, and the upper computer and the server are in communication connection in a wireless or wired manner.
The server stores compiled upgrading files of the MCU/SOC for the locomotive, the upper computer is connected with the server, and file transmission is carried out after connection is established;
the upper computer comprises an upgrading module, a local storage module, a test module, a backup module, an authentication module and a data analysis module, wherein each functional module is connected to the communication bus;
the upgrading module is configured to download upgrading files from a server or upgrade equipment accessed to an upper computer;
specifically, when an upgrade file is downloaded, the upgrade module regularly triggers the upper computer to establish connection with the server according to a preset time interval, then checks whether the upgrade file of the MCU/SOC exists in the server, acquires the date of the current day if the upgrade file exists, downloads the MCU/SOC file, adds a date suffix after the file name and stores the date suffix in the local storage module, and if the upgrade file does not exist, a popup window reports an error and does not acquire the upgrade file and sends a notice to a developer for processing;
specifically, when the upgrade file is downloaded, the upgrade module detects access to the device to be tested, writes the upgrade file into the MCU/SOC of the device to be tested and upgrades the MCU/SOC when the device to be tested needs to be upgraded, and determines whether the upgrade is successful, if not, reports an error, and if the upgrade is successful, performs the next test.
The local storage module is configured to store data used in a test process, and the data comprises an upgrade file, a test file, data generated in the test process, a test report and the like;
the backup module is configured to backup or restore the MCU/SOC system accessed into the equipment to be tested;
specifically, when the MCU/SOC in the device to be tested is upgraded, the phenomenon of unsuccessful upgrade may occur, and if the upgrade is unsuccessful, the product to be tested may not operate, and the use of the user may be affected.
The test module is configured to automatically test the device to be tested and acquire a test report;
the test module at least comprises: the device comprises a test execution module, a comparison and judgment module and a test case module;
fig. 2 is a schematic structural diagram of the test module in this embodiment, referring to fig. 2. Specifically, the test execution module is configured to test the device to be tested through a built-in test program.
Specifically, the test execution module includes a function call, which can specify the functions of the device under test, such as the test item sequence, the test parameters, whether the test is continued or interrupted, and the like.
The comparison and judgment module is configured to compare and analyze a result generated by the test of the test case on the equipment to be tested with a corresponding preset result according to the instruction of the test execution module and judge whether the equipment to be tested normally operates;
specifically, the preset result obtaining method includes that NIVISION is used for conducting matching learning of feature pictures and patterns in advance for each test case, the NIVISION is used for comparing a set picture of expected results after multiple learning with a current result, whether the set picture is within a preset threshold range or not is judged, if the set picture is within the preset threshold range, success is considered, and if not, failure is considered;
the test case module is configured to test the device to be tested according to the test instruction in the test execution module, the test case module includes a plurality of preset test cases, and the test cases can be test programs written in scripting language, Java language, and C + + language, where the test programs include test signals for testing, and the test signals at least include: analog signals, digital signals, coordinates of a display interface and other information;
the test cases are divided into key test cases and non-key test cases according to the running state of the equipment to be tested, the key test cases comprise application tests of driving safety functions, and the non-key test cases comprise application tests of non-driving safety functions, such as: the key test cases are closely related to the safety of the automobile, such as the engine state, the brake state, the oil temperature state, the light state, the steering control, the reversing radar, the camera and the like, and the non-closely related test cases are not closely related to the safety of the automobile, such as: radio broadcasting, music playing, an air conditioning system, a Bluetooth system, a seat adjusting system and the like.
In the process of testing the equipment to be tested, central control testing can be carried out after a vehicle instrument is tested, and for each test case, a main function and a slave function are defined in the test case according to whether the function can be maintained to operate or not, wherein the main function is defined to enable the basic function of the sub item to be tested to be maintained to operate normally, the slave function is defined to be an auxiliary function which does not influence the normal operation of the sub item to be tested, and the functions are optimized mostly. Such as: in a radio, a function of receiving a broadcast signal and normally receiving and playing a sound is a main function. The slave function may specifically be a style of the display content as the display interface.
The authentication module is configured to manage authentication for establishing connection with equipment accessed by the upper computer, and the authentication module stores an IP address, a port number and an access authorization code of a peripheral which can be accessed;
specifically, the upper computer and the server establish connection authentication through the internet, after the connection is successful, the server sends a user information message to carry out communication confirmation with the upper computer, the user information message comprises an IP address, a port and an access authorization code of a peripheral which is allowed to be accessed to the upper computer, the upper computer analyzes the user information, and if the user information is in an allowed range, the verification is considered to be successful. And if the user information is not in the allowed range, the verification is considered to be failed.
Specifically, the device to be tested is provided with an authorization and authentication module, and the authorization and authentication module is configured to manage an upper computer accessed to the authorization and authentication module to perform authorization and authentication. Specifically, an sftp (secure file transfer protocol) protocol is used when the upper computer and the device to be tested are connected, after the connection is successful, the upper computer sends a user information message to confirm the communication with the device to be tested, the user information message includes an IP address, a port and an access authorization code of a peripheral which is allowed to access the device to be tested, the device to be tested analyzes the user information through an authorization authentication module, and if the user information is in an allowed range, the verification is considered to be successful. And if the user information is not in the allowed range, the verification is considered to be failed.
Specifically, it should be noted that, in the process of establishing a connection between the upper computer and the device to be tested, the device to be tested may also send a user information message to the upper computer, and the upper computer analyzes the message through the authentication management module and then determines whether the access is allowed.
As the equipment to be tested is important equipment, the safety process of the equipment to be tested cannot be ignored, and in order to prevent hacker attack or malicious connection mode, the SFTP protocol is adopted for connection and file transmission when the upper computer is connected with the equipment to be tested.
In the equipment to be tested of the vehicle, such as key equipment of a central control system, an instrument system and the like, the development system platforms of each manufacturer are not consistent at present, and the traditional prior art adopts protocols such as FTPS and the like, so that the compatibility is poor, and the safety is not high.
In the embodiment, an SFTP protocol is adopted, the SFTP port number defaults to 22, and compared with FTPS, the SFTP can support test development based on a wide Unix/Linux platform. In addition, the method can provide a safe encryption method for the transmission file, encrypt/decrypt the transmission file in the transmission process and prevent the transmission file from being modified in the transmission process.
The data analysis module is configured to analyze the test data generated after the automatic test, perform analysis processing and form a test report;
the upper computer also comprises a reminding module, and the reminding module is used for reminding the upgrading file downloading, the equipment to be tested to be upgraded, the test error generated in the test of the equipment to be tested or the test result of each key step;
specifically, test errors generated in the test, such as unsuccessful upgrade, unavailable upgrade file, abnormal operation of test function and the like, can be sent to the WeChat, short message and email of the mobile phone of the developer through the upper computer, so that the developer can timely master the dynamic state of the automatic test and timely process the problems.
The implementation also provides an automatic upgrading test system of the locomotive, wherein the automatic upgrading test system comprises an automatic upgrading test device, monitoring equipment and equipment to be tested, wherein the monitoring equipment is used for monitoring the equipment to be tested and transmitting monitoring information to an upper computer in the automatic upgrading test device;
in particular, the monitoring device includes a graphic sensor or other similar sensor capable of monitoring the device under test, such as a sound sensor or the like. For example: in the upgrading stage, if the device to be tested is a central control host or an instrument host, a picture of a progress bar of an upgrading interface of the central control host is obtained in real time through a camera, after upgrading is completed, the interface is normally started, the picture information can be obtained in real time through the camera, and if upgrading fails, pictures of the central control host or the instrument host which fail in upgrading can be displayed, such as pictures which are not consistent with preset pictures, and the like. And if the upgrading is successful, entering a normally started picture. The implementation is different from the prior art, the equipment to be tested is wirelessly obtained or diagnosed in real time, and whether the upgrading of the central control picture is normal or not can be monitored only by adopting a simple camera as monitoring equipment.
Example 2
The present embodiment provides an automatic upgrade testing method applied to a locomotive, referring to fig. 3, and fig. 3 is a schematic flow chart of the automatic upgrade testing method in this embodiment.
The automatic test method specifically comprises the following steps:
step S1: acquiring an upgrade file and downloading the upgrade file to an upper computer;
step S2: establishing connection between an upper computer and the equipment to be tested, writing an upgrade file into the equipment to be tested through the upper computer, and upgrading the equipment to be tested;
step S3: the upper computer sends a plurality of test samples to the equipment to be tested according to the test instruction and then carries out automatic test;
step S4: and monitoring the equipment to be tested in the ongoing test by the monitoring equipment, transmitting the monitoring information to the upper computer for analyzing and judging the test result and finally generating a test report.
Referring to fig. 4, fig. 4 is a schematic flow chart of an automatic testing method with a backup system function in this embodiment;
in step S2, before the device to be tested is upgraded, a system backup is performed on the device to be tested; after the equipment to be tested is upgraded, if the upgrading fails, executing system recovery of the equipment to be tested;
in step S4, after the device to be tested is successfully upgraded, if an incorrect test result is displayed after a complete test, performing system recovery of the device to be tested;
referring to fig. 2, the specific steps of step S1 include:
s11: acquiring an upgrade file which is compiled and transmitted to a server;
specifically, the upgrade file is compiled by a program developer according to the operation related conditions of the device to be tested to implement bug or some new function, and the upgrade file mainly aims at the device to be tested, such as: and (4) performing by the MCU/SOC, and putting the well compiled upgrade file into the server by a program developer.
S12: connecting the upper computer with the server through the Internet and downloading the upgrade file from the server;
in the step S12, the connection between the upper computer and the server is automatically triggered at regular time according to a preset time interval.
Referring to fig. 5 in detail, fig. 5 is a schematic flow chart of automatically establishing a connection between an upper computer and a device to be tested in this embodiment.
Step S12 specifically includes:
the method comprises the steps that after connection between an upper computer and a server is established through the Internet, whether an upgrade file exists in the server or not is judged, if no upgrade file exists, a popup window reports an error and does not acquire the upgrade file, and a notice is sent to a developer to process the upgrade file; and if the upgrade file exists, downloading the upgrade file to the upper computer.
In step S2, establishing the connection between the host computer and the device to be tested includes:
step S21, using SFTP protocol to assign IP address and port number to the device to be tested to connect to the upper computer, after connection is successful, the upper computer sends user information and message to carry out authorization authentication with the device to be tested;
step S22: judging whether the authentication is successful or not, if the authentication is unsuccessful, prompting disconnection by a popup window and sending a notification of connection failure; if the authentication is successful, the connection is kept and the connected confirmation information is returned.
Referring to fig. 6, fig. 6 is a schematic flow chart of an automatic upgrading method for a device to be tested in this embodiment, and in step S2, the specific steps of writing an upgrade file into the device to be tested and upgrading the device to be tested by using an upper computer include:
step S23, the upper computer transmits the upgrade file to the equipment to be tested by adopting an SFTP protocol and judges whether the upgrade file is successfully transmitted or not, if the upgrade file is successfully transmitted, the step S24 is executed, and if the upgrade file is failed to be transmitted, an execution failure prompt is returned;
specifically, the upgrade file may be stored in a formulated directory, such as a Cache directory, in the device under test.
Step S24, sending an instruction for executing upgrading to the equipment to be tested and executing upgrading to the equipment to be tested;
step S25, judging whether the upgrading of the equipment to be tested is successful, if so, executing step S26, and if not, returning a failure prompt;
step S26, disconnecting the SFTP, waiting for the product until the product is restarted and recovered;
step S27, waiting for a preset time in an overtime mode, detecting the product state, returning to execution failure prompt if the product state is abnormal, and executing step S28 if the product state is normal;
and step S28, executing the ping instruction and judging whether the ping instruction is successful, if the ping instruction is failed, returning to execute failure prompt, and if the ping instruction is successful, ending the upgrading process.
The step S3 includes the specific steps of:
step S31, selecting a plurality of test cases required by the test according to the test instruction and sending the test cases to the equipment to be tested;
specifically, the test instruction tests the device to be tested, the test case module comprises a plurality of preset test cases, and the test cases can be test programs written in scripting language, java language and C + + language, wherein the test programs comprise test signals for testing, the test signals comprise analog signals, digital signals and information such as coordinates of a display interface, and the specific analog signals and digital signals can comprise values such as current, voltage, circuits, inductance and frequency;
step S32, the device to be tested analyzes the received test case according to a preset protocol, and then sends a corresponding test signal to test according to the test instruction;
specifically, the test cases are divided into key test cases and non-key test cases according to the operating state of the device to be tested, the key test cases are closely related to the safety of the vehicle, such as the engine state, the brake state, the oil temperature state, the light state, the steering control, the reversing radar, the camera and the like, and the non-closely related test cases are not closely related to the safety of the vehicle, such as: radio broadcasting, music playing, an air conditioning system, a Bluetooth system, a seat adjusting system and the like;
in the process of waiting for equipment testing, the central control test can be carried out after the vehicle instrument is tested. For each test case, according to whether the function can maintain operation or not, a main function and a slave function are defined in the test case, wherein the main function is defined to enable the basic function of the sub item to be tested to maintain normal operation, and the slave function is defined to be an auxiliary function which does not influence the normal operation of the sub item to be tested, and is mostly optimization of the function. Such as: in a radio, a function of receiving a broadcast signal and normally receiving and playing a sound is a main function. The slave function may specifically be a style of the display content as the display interface.
Specifically, when a test signal is applied to the test device, for example: the simulation manual touch of the corresponding application program icon, for example, the audio-video playing APP (application) needs to be tested, and a certain function of the APP currently being tested and running can be known through a signal simulating the manual touch of the screen, such as a resistance value and a position coordinate generated by manually clicking the screen in the program record, and the position coordinate and the resistance value generated by the screen. When the instrument display test is carried out, for example, a speed signal, such as a signal of 80km/h per hour, can be given to the system, whether the display of the instrument display screen is normal or not can be observed.
When testing, the testing of the key test case is firstly carried out, and the testing of the non-key test case is carried out after the testing of the key test case is finished.
If the key test case is adopted to test the equipment to be tested, the test can be stopped when the function of the equipment to be tested fails, and the time is saved. Because the key test cases relate to the safety of the automobile, the problems are more, and if the test has problems, the system can automatically inform developers to adjust. The non-critical test case does not relate to driving safety, so that the normal use of the automobile cannot be influenced even if the function of the non-critical test case is abnormal, and the subsequent debugging of the bug can be completed in the subsequent development process. By adopting the method, the test time of the equipment to be tested can be saved, and the test resources are reduced.
Fig. 7 is a schematic flow chart of the automatic testing method for the device under test in this embodiment, and the specific step of step S4 is shown in fig. 7, which specifically includes:
s41, aiming at each test case, carrying out matching learning on the feature picture and the pattern by using NIVISION in advance;
s42, using NIVISION to compare the set picture of the expected result after multiple learning with the current test result, and judging whether the picture is in a preset threshold range, if so, executing the step S43, otherwise, recording the current error and storing the current error in a test report, and continuing to execute the next test;
specifically, the test result is derived from a signal transmitted from the monitoring device, in this embodiment, the monitor is a camera, the camera monitors the image of the device to be tested, the monitoring image is transmitted to the upper computer, and the upper computer receives the image and compares the image with a preset image to compare the similarity of the image and the preset image.
Because the test result of the implementation is obtained by adopting monitoring equipment such as a camera to shoot images, the control right of the equipment to be tested does not need to be completely obtained. Because the automobile relates to driving safety, in many times, the ECU control right of the equipment to be tested, such as a central control unit and an instrument, is used for driving safety, the upgrading process is prevented from being attacked and changed by viruses, and the control right of the equipment is not completely opened. In the test process, the corresponding analog signal quantity is sent to the equipment to be tested only according to the test case, and the picture signal shot by the monitor is transmitted to the upper computer for analysis, so that the control authority of the equipment to be tested is prevented from being completely acquired.
S43, judging whether the test case is the last test case, if not, continuing to execute the next test; if the test case is the last test case, the test process is ended, and a test passing report is generated.
What has been described above is only a preferred embodiment of the present invention, and the present invention is not limited to the above examples. It is clear to those skilled in the art that the form in this embodiment is not limited thereto, and the adjustable manner is not limited thereto. It is to be understood that other modifications and variations, which may be directly derived or suggested to one skilled in the art without departing from the basic concept of the invention, are to be considered as included within the scope of the invention.

Claims (10)

1. An automatic upgrading test device applied to a locomotive is characterized by comprising an upper computer and a server, wherein the upper computer is connected with the server in a wired or wireless mode;
the upper computer comprises a test module and an upgrading module;
the test module is configured to automatically test the equipment to be tested after the upgrading is successful and generate a test report;
the upgrading module is configured to download upgrading files from a server or upgrade equipment to be tested which is accessed to the upper computer;
the test module at least comprises a test case module, the test case module comprises a plurality of preset test cases, the test cases comprise key test cases and non-key test cases, the key test cases comprise application tests of driving safety functions, and the non-key test cases comprise application tests of non-driving safety functions.
2. The automatic upgrade testing device applied to a locomotive according to claim 1, wherein the server stores a compiled upgrade file for the locomotive, and the upper computer downloads the compiled upgrade file into the upper computer after establishing connection with the server;
and after the upper computer is connected with the equipment to be tested, an SFTP security file transmission protocol is adopted to transmit the upgrade file to the equipment to be tested.
3. The automatic upgrade testing device applied to the locomotive according to claim 1, wherein the upper computer comprises a local storage module, a backup module, an authentication module and a data analysis module;
the local storage module is configured to store data used in a test process, and the data comprises one or more of an upgrade file, a test file, data generated in the test process and a test report;
the backup module is configured to backup or restore a system accessed to the device to be tested;
the authentication module is configured to manage authentication for establishing connection with equipment accessed by the upper computer, and the authentication module stores an IP address, a port number and an access authorization code of a peripheral which can be accessed;
and the data analysis module is configured to analyze the test data generated after the automatic test, perform analysis processing and form a test report.
4. The automatic upgrade testing device as claimed in claim 1, wherein the testing module further comprises a test execution module and a comparison and judgment module;
the test execution module comprises a preset calling function which can specify one or more of the test item sequence, the test parameters, the test scheme and whether the test is continued or interrupted of the device to be tested.
And the comparison and judgment module is configured to compare and analyze a result generated by the test of the test case on the equipment to be tested with a corresponding preset result according to the instruction of the test execution module and judge whether the equipment to be tested operates normally.
5. The automatic upgrade testing device applied to the locomotive according to claim 1, wherein the upper computer further comprises a reminding module configured to remind a user of an upgrade file downloading process, an upgrade process of a device to be tested, a test error generated during a test process of the device to be tested, or a test result of a key step of each step after the test is completed.
6. The automatic upgrading test device applied to the locomotive according to claim 5, wherein the reminding mode of the reminding module comprises pop-up display in the device to be tested or sending information to a preset mobile terminal or a computer for reminding in a short message, WeChat or mail mode.
7. The automatic upgrade testing device applied to a locomotive according to claim 3, wherein the connection between the upper computer and the server is managed through an authentication module, and the authentication process includes: after the upper computer and the server are successfully connected, the server sends a user information message to carry out communication confirmation with the upper computer, wherein the user information message comprises an IP address, a port and an access authorization code of an access peripheral, the authentication module analyzes the user information and judges whether the user information is in an allowed access range, if the user information is in the allowed range, the authentication is successful, and if the user information is not in the allowed range, the authentication is failed;
the device to be tested comprises an authorization management module, and the connection between the upper computer and the device to be tested is authenticated through authorization management.
8. An automatic upgrade test system applied to a locomotive, comprising an automatic upgrade test apparatus, a device under test, a monitoring device applied to a locomotive according to any one of claims 1 to 7;
the automatic upgrading test device is used for automatically upgrading and/or testing the equipment to be tested;
the monitoring equipment is used for testing and monitoring the equipment to be tested and sending data generated by monitoring to an upper computer in the automatic upgrading testing device for analysis and processing.
9. The automatic test system for a locomotive according to claim 8, wherein the automatic test device tests the device under test comprising the steps of:
step S31, selecting a plurality of test cases required by the test according to the test instruction and sending the test cases to the equipment to be tested;
step S32, the device to be tested analyzes the received test case according to a preset protocol, and then sends a corresponding test signal to test according to the test instruction;
the test case comprises a test program written by a scripting language, a java language or a C + + language;
the test program comprises a test signal for testing, wherein the test signal at least comprises one or more of an analog signal, a digital signal and a coordinate of a display interface; when testing, the testing of the key test case is firstly carried out, and the testing of the non-key test case is carried out after the testing of the key test case is finished.
10. The system of claim 8, wherein the process of the monitoring device performing test monitoring on the device to be tested and sending data generated by the monitoring to the upper computer in the automatic testing device for analysis processing includes the following steps:
step S41, aiming at each test case, NIVISION is used for carrying out feature picture and pattern matching learning in advance;
step S42, using NIVISION to compare the preset picture of expected result after multiple learning with the current test result, and judging whether the preset picture is in the preset threshold range, if so, executing step S43, if not, recording the current error and storing in the test report, and continuing to execute the next test;
step S43, judging whether the test case is the last test case, if not, continuing to execute the next test; if the test case is the last test case, the test process is ended, and a test passing report is generated.
CN201910915811.7A 2019-09-26 2019-09-26 Automatic upgrading test device and system applied to locomotive Active CN110687888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910915811.7A CN110687888B (en) 2019-09-26 2019-09-26 Automatic upgrading test device and system applied to locomotive

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910915811.7A CN110687888B (en) 2019-09-26 2019-09-26 Automatic upgrading test device and system applied to locomotive

Publications (2)

Publication Number Publication Date
CN110687888A true CN110687888A (en) 2020-01-14
CN110687888B CN110687888B (en) 2021-09-24

Family

ID=69110293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910915811.7A Active CN110687888B (en) 2019-09-26 2019-09-26 Automatic upgrading test device and system applied to locomotive

Country Status (1)

Country Link
CN (1) CN110687888B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290945A (en) * 2020-01-17 2020-06-16 惠州市德赛西威汽车电子股份有限公司 Compatibility test system and method of vehicle-mounted application equipment to external storage equipment
CN112860555A (en) * 2021-02-08 2021-05-28 重庆长安汽车股份有限公司 Device and method for remote software upgrading, verifying and testing
CN112860559A (en) * 2021-02-19 2021-05-28 一汽解放汽车有限公司 Upgrade test system and method
CN114024735A (en) * 2021-11-02 2022-02-08 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114666301A (en) * 2020-12-22 2022-06-24 深圳Tcl新技术有限公司 APP testing method and system based on mock server

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158544A (en) * 2011-02-25 2011-08-17 深圳市元征软件开发有限公司 Method and device for remote upgrading of vehicle-mounted electronic device
CN102291424A (en) * 2011-05-31 2011-12-21 深圳市元征软件开发有限公司 Vehicle-mounted GPRS (general packet radio service) communication system with FTP (file transfer protocol) remote wireless upgrading function and method thereof
CN103365768A (en) * 2012-04-01 2013-10-23 腾讯科技(深圳)有限公司 Program testing method and controller
US20140266673A1 (en) * 2013-03-15 2014-09-18 Gridpoint, Inc. Method for implementing quality alarms in an energy management system remote terminal
CN104149717A (en) * 2014-07-31 2014-11-19 北京中瑞蓝科电动汽车技术有限公司 Remote non-interference updating system and remote non-interference updating method for vehicle control
CN106502235A (en) * 2016-10-31 2017-03-15 北京新能源汽车股份有限公司 A kind of method of testing of automobile controller and system
CN108918991A (en) * 2018-05-17 2018-11-30 中科创达软件股份有限公司 A kind of car electrics power supply changes automatization test system and its test method
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN110134412A (en) * 2019-03-25 2019-08-16 北京车和家信息技术有限公司 Oftware updating method, device, vehicle and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158544A (en) * 2011-02-25 2011-08-17 深圳市元征软件开发有限公司 Method and device for remote upgrading of vehicle-mounted electronic device
CN102291424A (en) * 2011-05-31 2011-12-21 深圳市元征软件开发有限公司 Vehicle-mounted GPRS (general packet radio service) communication system with FTP (file transfer protocol) remote wireless upgrading function and method thereof
CN103365768A (en) * 2012-04-01 2013-10-23 腾讯科技(深圳)有限公司 Program testing method and controller
US20140266673A1 (en) * 2013-03-15 2014-09-18 Gridpoint, Inc. Method for implementing quality alarms in an energy management system remote terminal
CN104149717A (en) * 2014-07-31 2014-11-19 北京中瑞蓝科电动汽车技术有限公司 Remote non-interference updating system and remote non-interference updating method for vehicle control
CN106502235A (en) * 2016-10-31 2017-03-15 北京新能源汽车股份有限公司 A kind of method of testing of automobile controller and system
CN108918991A (en) * 2018-05-17 2018-11-30 中科创达软件股份有限公司 A kind of car electrics power supply changes automatization test system and its test method
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN110134412A (en) * 2019-03-25 2019-08-16 北京车和家信息技术有限公司 Oftware updating method, device, vehicle and computer readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290945A (en) * 2020-01-17 2020-06-16 惠州市德赛西威汽车电子股份有限公司 Compatibility test system and method of vehicle-mounted application equipment to external storage equipment
CN111290945B (en) * 2020-01-17 2023-07-14 惠州市德赛西威汽车电子股份有限公司 Compatibility test system and method for vehicle-mounted application equipment to externally connected storage equipment
CN114666301A (en) * 2020-12-22 2022-06-24 深圳Tcl新技术有限公司 APP testing method and system based on mock server
CN112860555A (en) * 2021-02-08 2021-05-28 重庆长安汽车股份有限公司 Device and method for remote software upgrading, verifying and testing
CN112860555B (en) * 2021-02-08 2024-05-14 重庆长安汽车股份有限公司 Software remote upgrading verification testing device and method
CN112860559A (en) * 2021-02-19 2021-05-28 一汽解放汽车有限公司 Upgrade test system and method
CN112860559B (en) * 2021-02-19 2024-05-28 一汽解放汽车有限公司 Upgrade test system and method
CN114024735A (en) * 2021-11-02 2022-02-08 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114024735B (en) * 2021-11-02 2024-02-02 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device

Also Published As

Publication number Publication date
CN110687888B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN110687888B (en) Automatic upgrading test device and system applied to locomotive
CN110703726B (en) Automatic upgrading test method applied to locomotive
US12001825B2 (en) Method and apparatus for vehicle software update installation
CN110032507B (en) Application program testing method, device and system, electronic equipment and storage medium
US20150347153A1 (en) System management controller and method of configuration file backup and recovery
CN107766209B (en) Central control automation test method, device, equipment and computer readable storage medium
WO2022237122A1 (en) In-vehicle welcome animation updating method and apparatus, vehicle-mounted terminal, and storage medium
KR102141287B1 (en) Fault injection test method and system for vehicle software based on autosar
CN113760774B (en) OTA simulation test method, platform and system
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN112860559B (en) Upgrade test system and method
CN108717292B (en) Vehicle remote diagnosis method and device
CN113268257A (en) Vehicle-mounted application upgrading system, method and computer storage medium
CN113050960A (en) OTA (over the air) upgrading method and device, vehicle-mounted terminal and storage medium
CN116257270A (en) Vehicle, upgrading method and device of vehicle
US20220317994A1 (en) Ota master, update control method, and non-transitory storage medium
CN116339784A (en) Emergency method and device for failure in upgrading vehicle application, vehicle, equipment and medium
CN115437910A (en) Vehicle offline detection method and device, vehicle, management equipment and storage medium
CN112764964A (en) Method and system for solving problem that FOTA cannot be refreshed after upgrading failure
KR101207342B1 (en) Car digital tachograph apparatus having auto upgrade function
CN114356760A (en) CANFD controller software remote upgrade test method and system based on L3 whole vehicle architecture
CN113919455A (en) Vehicle repair detection method and device, vehicle and storage medium
CN114647424A (en) ECU application program updating method, device, system, storage medium and electronic equipment
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN116662159A (en) Automobile BootLoader abnormal downloading file testing system and testing 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