CN112511386A - Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment - Google Patents

Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment Download PDF

Info

Publication number
CN112511386A
CN112511386A CN202011448193.9A CN202011448193A CN112511386A CN 112511386 A CN112511386 A CN 112511386A CN 202011448193 A CN202011448193 A CN 202011448193A CN 112511386 A CN112511386 A CN 112511386A
Authority
CN
China
Prior art keywords
test
robotframe
ethernet
testing
work
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
CN202011448193.9A
Other languages
Chinese (zh)
Other versions
CN112511386B (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.)
Infotech Shanghai Co ltd
Original Assignee
Infotech Shanghai 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 Infotech Shanghai Co ltd filed Critical Infotech Shanghai Co ltd
Priority to CN202011448193.9A priority Critical patent/CN112511386B/en
Publication of CN112511386A publication Critical patent/CN112511386A/en
Application granted granted Critical
Publication of CN112511386B publication Critical patent/CN112511386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a vehicle-mounted Ethernet test method, a vehicle-mounted Ethernet test system and an Ethernet test device based on robotframe work, wherein robotframe work and googleest are combined, vehicle-mounted Ethernet test is carried out through robotframe work, and each robotframe work test case is actually used for executing a corresponding googleest test case during execution, so that the advantages that the robotframe work can automatically deploy test software, automatically intercept tcpdump logs, generate test reports easy to read and flexibly select test cases are brought, the advantages of the googleest in the Ethernet test system are also reserved, and the advantages are achieved.

Description

Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment
Technical Field
The invention belongs to the technical field of vehicle-mounted Ethernet test, and particularly relates to a vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment.
Background
The Google test is a test framework developed by a test technology team of Google, is suitable for different operating systems and different compilers, is compiled by adopting a C/C + + language, can easily call a system API (application program interface) and compile various test cases, and is often used for vehicle-mounted Ethernet test.
However, the following disadvantages are still remained in the vehicular ethernet test using googletest:
1. the test deployment steps are complicated
On-board ethernet testing often requires manual deployment of one or more pieces of software under test into a respective ECU and manual activation of the one or more pieces of software under test.
2. There is no easy-to-read test report.
Disclosure of Invention
Based on this, aiming at the technical problem, a vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment are provided.
In order to solve the technical problems, the invention adopts the following technical scheme:
on one hand, the vehicle-mounted Ethernet test method based on robotframe is provided, and comprises the following steps:
responding to a test starting instruction input by a user, deploying tested software into a corresponding ECU through robotframe work, and starting a test suite selected by the user, wherein the test suite is provided with a plurality of robotframe work test cases written through robotframe work in advance, and each robotframe work test case is written to execute a corresponding googletest case written through googletest in advance;
sequentially executing a plurality of robotframe test cases in the test suite through robotframe:
1) before executing the robotframe test case each time, the robotframe sequentially executes:
intercepting the tcpdump log;
starting a listener program written in a robotframe in advance, wherein the listener program is configured to receive test information from a sender program;
remotely starting the tested software;
2) executing robotframe test case:
executing a corresponding google test case through the google test, and starting a sender program written in the google test in advance, wherein the sender program is configured to obtain test information of the google test executing the google test case and send the test information to the listener program;
after the execution of the current google test case is finished, closing the sender program;
3) after each robotframe test case is executed, the robotframe test cases are sequentially executed:
closing the tested software;
stopping intercepting the tcpdump log;
closing the listener program;
and thirdly, after all robotframe test cases are executed, generating a test report according to the tcpdump logs and the test information through robotframe.
In another aspect, a robotframe based vehicle mounted ethernet testing system is provided, which includes a storage module including instructions loaded and executed by a processor, and when executed, the instructions cause the processor to execute one of the robotframe based vehicle mounted ethernet testing methods described above.
In still another aspect, an ethernet testing device is provided, which has an onboard ethernet testing system based on robotframe as described above.
The invention combines robotframe work with google test, and carries out vehicle-mounted Ethernet test through robotframe work, each robotframe work test case is actually executed during execution, which not only brings the advantages that robotframe work can automatically deploy test software, automatically intercept tcpdump log and generate test report easy to read, but also retains the advantages of google in an Ethernet test system, and each advantage is obtained.
Drawings
The invention is described in detail below with reference to the following figures and detailed description:
FIG. 1 is a framework diagram of an implementation of the present invention;
FIG. 2 is a schematic diagram of the present invention;
fig. 3 is a schematic diagram of a correspondence relationship between a robotframe test case and a google test case according to the present invention.
Detailed Description
As shown in fig. 1 and fig. 2, an embodiment of the present specification provides a robotframe-based vehicle-mounted ethernet testing method, including the following steps:
firstly, responding to a test starting instruction input by a user, deploying the tested software to a corresponding ECU through robotframe, and starting a test suite selected by the user.
In this embodiment, a test suite selection interface is provided for a user to select a test suite.
And selecting a corresponding test suite by a user through the test suite selection interface, inputting a test starting instruction, and appointing corresponding tested software and the ECU through the test starting instruction. The start-up instructions are as follows:
robot--variable ECU_NAME:ECU_to_test--variable Sw:sw_to_test my_test.robot
the variable ECU _ NAME, the ECU _ to _ test, the variable Sw, the Sw _ to _ test, the designated software to be tested.
It should be noted that robotframe is a python-written functional automation testing framework, and automation testing can be realized by calling keywords of a library written based on python, wherein the libraries are classified into a standard library provided by frame and a third-party library which can be installed in frame. The keywords are aliases of python functions in the library, and calling the keywords of the frame library is equivalent to calling the python functions corresponding to the library, so that the method can utilize the keywords of the test case of the robotframe to automatically deploy the tested software to the corresponding ECU through a transmission protocol (adb, SSH or ftp) supported by the ECU when the test starts, and can deploy the tested software to the corresponding ECU through the SSHLibrary of the third-party library of the robotframe when the ECU supports the SSH protocol.
The Ethernet has many protocol stacks, different test kits are developed aiming at different protocol stacks, each test kit has a complete set of test cases of the protocol stack, the test kit of the invention has a plurality of robotframe test cases written by robotframe in advance, each robotframe test case is written to execute a corresponding googleest test case written by googleest in advance, which is equivalent to that the robotframe test cases and the googleest test cases are associated in a one-to-one correspondence manner, and the reference is made to FIG. 3.
Sequentially executing a plurality of robotframe test cases in the test suite through robotframe:
1) before each robotframe test case is executed, the robotframe executes the following steps in sequence:
a. intercept tcpdump log. Robotframework can call linux's command through a keyword in a standard library, thereby intercepting the tcpdump's log. In the Ethernet test, the most important thing is to keep the tcpdump log, which can check the whole network condition during the test, has important effect on analyzing the problem and troubleshooting, can clearly record the condition of the network site, and is convenient for finding and positioning the test script defect.
Although google test can also realize intercepting tcpdump log, in the present invention, intercepting tcpdump log by robotframe has the following advantages:
1) more complete in time.
The test of the invention is started by robotframe work, and the googletest is started after the robotframe work is started, so that the interception of the tcpdump log by robotframe work is more complete in time.
2) More convenient
robotframe is built based on python interpreted language, adding the intercept tcpdump function does not require recompilation, which is required in googletest.
3) Is convenient for multiplexing
The robotframe is a testing framework, and the interception function of tcpdump is realized in the robotframe, so that multiplexing is facilitated. For example, tcpdump can be intercepted automatically when robotframe is used alone for testing.
b. A listener program written in advance in the robotframe is started, the listener program being configured to receive test information from the sender program.
c. And remotely starting the tested software.
2) Executing robotframe test case:
a. and executing a corresponding google test case through the google test, starting a sender program written in the google test in advance, wherein the sender program is configured to obtain test information of the google test executing the google test case, and sending the test information to a listener program.
In this embodiment, a TCP communication mode is used between the listener program and the sender program to transmit information, and the listener program monitors the TCP port 13402.
The test information comprises a test log, a test result, a test case name, a test method, a test purpose, a test expected value and a test actual value.
b. And after the execution of the current google test case is finished, closing the sender program.
3) After each robotframe test case is executed, the robotframe test cases are sequentially executed:
a. and closing the tested software.
b. Intercepting the tcpdump log is stopped.
c. The listener procedure is closed.
In this embodiment, each robotframe test case has a preset tag (tag) to facilitate management and screening of the test cases, and the test suite selection interface displays the tag corresponding to the robotframe test case of each test suite and the check boxes corresponding to the tag one by one.
Assuming that the name of a google test case is gtestcase _1, the test group of the belonging google test is gtestgroup1, and the label name is moduleA, the corresponding robotframe test case (the case name is RF test case1) is written as follows:
RF test case1
[Tags]moduleA
Start Process test_app--gtest_filter\=gtestgroup1.gtestcase_1shell=True
wherein the Start Process is a key word of the standard library Process of robotframe.
In this embodiment, after the user selects the corresponding test suite through the test suite selection interface, the robotframe test case to be executed needs to be selected, and correspondingly, in the second step, the plurality of robotframe test cases selected by the user in the test suite are sequentially executed through the robotframe, so that the test case can be flexibly selected for testing.
And thirdly, after all robotframe test cases are executed, generating a test report according to the tcpdump logs and the test information through robotframe.
The summary information, the statistical information and the detailed information of the test and the test log can be checked in the test report, wherein the test log comprises a tcpdump log and a log displayed by a robotframe according to the test log in the test information through a built-in keyword log.
In the present embodiment, robotframe and googletest (also referred to as gtest) are installed in a PC based on linux x86 operating system, see fig. 1.
Based on the same inventive concept, an embodiment of the present specification further provides a robotframe-based vehicle ethernet testing system, which includes a storage module, where the storage module includes instructions that are loaded and executed by a processor, and when executed, the instructions cause the processor to execute the steps according to various exemplary embodiments of the present invention described in the robotframe-based vehicle ethernet testing method section of the present specification.
The memory module may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) and/or a cache memory unit, and may further include a read only memory unit (ROM).
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Based on the same inventive concept, embodiments of the present specification further provide an ethernet testing device, where the device has the foregoing robotframe-based vehicle-mounted ethernet testing system, and details are not described here again.
However, those skilled in the art should realize that the above embodiments are illustrative only and not limiting to the present invention, and that changes and modifications to the above described embodiments are intended to fall within the scope of the appended claims, provided they fall within the true spirit of the present invention.

Claims (7)

1. A vehicle-mounted Ethernet test method based on robotframe is characterized by comprising the following steps:
responding to a test starting instruction input by a user, deploying tested software into a corresponding ECU through robotframe work, and starting a test suite selected by the user, wherein the test suite is provided with a plurality of robotframe work test cases written through robotframe work in advance, and each robotframe work test case is written to execute a corresponding googletest case written through googletest in advance;
sequentially executing a plurality of robotframe test cases in the test suite through robotframe:
1) before executing the robotframe test case each time, the robotframe sequentially executes:
intercepting the tcpdump log;
starting a listener program written in a robotframe in advance, wherein the listener program is configured to receive test information from a sender program;
remotely starting the tested software;
2) executing robotframe test case:
executing a corresponding google test case through the google test, and starting a sender program written in the google test in advance, wherein the sender program is configured to obtain test information of the google test executing the google test case and send the test information to the listener program;
after the execution of the current google test case is finished, closing the sender program;
3) after each robotframe test case is executed, the robotframe test cases are sequentially executed:
closing the tested software;
stopping intercepting the tcpdump log;
closing the listener program;
and thirdly, after all robotframe test cases are executed, generating a test report according to the tcpdump logs and the test information through robotframe.
2. The robotframe-based vehicular ethernet testing method according to claim 1, wherein said step S110 further comprises:
and providing a test suite selection interface for the user to select the test suite.
3. The robotframe-based vehicle-mounted Ethernet test method according to claim 2, wherein each robotframe test case has a preset label, and a label corresponding to the robotframe test case of each test suite and a check box corresponding to the label one by one are displayed in the test suite selection interface;
the second step further comprises: and sequentially executing a plurality of robotframe test cases selected by a user in the test suite through robotframe.
4. The robotframe-based vehicular Ethernet test method according to claim 3, wherein the information is transmitted between the listener program and the sender program in a TCP communication manner.
5. The robotframe-based vehicular ethernet testing method according to claim 4, wherein the testing information comprises a testing log, a testing result, a testing case name, a testing method, a testing purpose, a testing expected value and a testing actual value.
6. A robotframe work based in-vehicle ethernet testing system comprising a memory module comprising instructions loaded and executed by a processor, which when executed cause the processor to perform a robotframe work based in-vehicle ethernet testing method according to any of claims 1-5.
7. An ethernet test apparatus, characterized in that, there is a robotframe based on-board ethernet test system according to claim 6.
CN202011448193.9A 2020-12-09 2020-12-09 Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment Active CN112511386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011448193.9A CN112511386B (en) 2020-12-09 2020-12-09 Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011448193.9A CN112511386B (en) 2020-12-09 2020-12-09 Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment

Publications (2)

Publication Number Publication Date
CN112511386A true CN112511386A (en) 2021-03-16
CN112511386B CN112511386B (en) 2022-07-26

Family

ID=74971394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011448193.9A Active CN112511386B (en) 2020-12-09 2020-12-09 Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment

Country Status (1)

Country Link
CN (1) CN112511386B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102888A (en) * 2022-06-17 2022-09-23 北京经纬恒润科技股份有限公司 Vehicle-mounted Ethernet protocol consistency test method, device and related equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126411A (en) * 2016-06-13 2016-11-16 广州酷狗计算机科技有限公司 A kind of method and apparatus that tested program code is tested
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Access network equipment automatization test system
CN107678949A (en) * 2017-09-20 2018-02-09 福建升腾资讯有限公司 Realize the automated testing method of embedded device different communication mode
CN107831757A (en) * 2017-11-29 2018-03-23 合肥巨动力系统有限公司 Based on dSPACE motor control hardware in ring automatization test system and method
CN109408357A (en) * 2017-12-04 2019-03-01 深圳市珍爱网信息技术有限公司 A kind of automatic interface testing method and device
CN109902017A (en) * 2019-03-06 2019-06-18 厦门商集网络科技有限责任公司 A kind of method and terminal based on RobotFramework test Dubbo interface
CN109901985A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 Distribution testing device and method, storage medium and electronic equipment
US20200019492A1 (en) * 2018-07-12 2020-01-16 EMC IP Holding Company LLC Generating executable test automation code automatically according to a test case
CN110928774A (en) * 2019-11-07 2020-03-27 杭州顺网科技股份有限公司 Automatic test system based on node formula
CN111016978A (en) * 2019-12-26 2020-04-17 天津津航计算技术研究所 Method for realizing regional controller equipment test based on GoogleTest test framework
CN111078567A (en) * 2019-12-19 2020-04-28 广州品唯软件有限公司 Report generation method, terminal and storage medium of automatic test platform

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126411A (en) * 2016-06-13 2016-11-16 广州酷狗计算机科技有限公司 A kind of method and apparatus that tested program code is tested
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Access network equipment automatization test system
CN107678949A (en) * 2017-09-20 2018-02-09 福建升腾资讯有限公司 Realize the automated testing method of embedded device different communication mode
CN107831757A (en) * 2017-11-29 2018-03-23 合肥巨动力系统有限公司 Based on dSPACE motor control hardware in ring automatization test system and method
CN109408357A (en) * 2017-12-04 2019-03-01 深圳市珍爱网信息技术有限公司 A kind of automatic interface testing method and device
CN109901985A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 Distribution testing device and method, storage medium and electronic equipment
US20200019492A1 (en) * 2018-07-12 2020-01-16 EMC IP Holding Company LLC Generating executable test automation code automatically according to a test case
CN109902017A (en) * 2019-03-06 2019-06-18 厦门商集网络科技有限责任公司 A kind of method and terminal based on RobotFramework test Dubbo interface
CN110928774A (en) * 2019-11-07 2020-03-27 杭州顺网科技股份有限公司 Automatic test system based on node formula
CN111078567A (en) * 2019-12-19 2020-04-28 广州品唯软件有限公司 Report generation method, terminal and storage medium of automatic test platform
CN111016978A (en) * 2019-12-26 2020-04-17 天津津航计算技术研究所 Method for realizing regional controller equipment test based on GoogleTest test framework

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李波波等: "Robot Framework自动化框架在集散控制系统测试中的应用", 《工业控制计算机》 *
毛玉书等: "面向嵌入式通信设备的Ch自动化测试框架设计", 《计算机系统应用》 *
贠海顺: "一种基于RobotFramework 的嵌入式软件自动化测试框架", 《网络与信息工程》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102888A (en) * 2022-06-17 2022-09-23 北京经纬恒润科技股份有限公司 Vehicle-mounted Ethernet protocol consistency test method, device and related equipment

Also Published As

Publication number Publication date
CN112511386B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN109039824B (en) Automatic test system and method for wireless remote communication protocol of vehicle-mounted terminal
CN109164783B (en) Vehicle diagnosis method, apparatus, device, and medium
CN109740222B (en) Testing device and system for automobile networking scene
US8924933B2 (en) Method and system for automated testing of computer applications
WO2018006789A1 (en) Parameter checking method and apparatus, and network management server and computer storage medium
US20040205406A1 (en) Automatic test system for testing remote target applications on a communication network
US20050188262A1 (en) Simultaneous execution of test suites on different platforms
CN106326088B (en) Method and device for realizing construction of test object and device for realizing service configuration test
CN102693183A (en) Method and system for realizing automatic software testing
CN111159049A (en) Automatic interface testing method and system
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN110865840B (en) Application management method, device, server and storage medium
KR960036378A (en) Remote Command Automatic Control / Verification Method in Satellite Control System
CN112511386B (en) Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment
CN112817853A (en) Automatic test method, system and electronic equipment
CN115546927A (en) UDS diagnosis automatic test system based on AUTOSAR standard
CN113760774B (en) OTA simulation test method, platform and system
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN112506772B (en) Web automatic test method, device, electronic equipment and storage medium
CN112394675A (en) Monitoring system, method and server for rail transit
CN113010187B (en) Application installation method and device and electronic equipment
CN111580853A (en) Universal generation method for multi-channel software installation package
CN113485884B (en) Processor characteristic-based satellite-borne software abnormal state monitoring method
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN113704081A (en) Automatic testing method and system for application program compatibility

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