CN112511386B - 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
CN112511386B
CN112511386B CN202011448193.9A CN202011448193A CN112511386B CN 112511386 B CN112511386 B CN 112511386B CN 202011448193 A CN202011448193 A CN 202011448193A CN 112511386 B CN112511386 B CN 112511386B
Authority
CN
China
Prior art keywords
test
robotframe
google
ethernet
vehicle
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
CN202011448193.9A
Other languages
Chinese (zh)
Other versions
CN112511386A (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 Google test technology team, is suitable for different operating systems and different compilers, is written by adopting a C/C + + language, can easily call a system API (application program interface) and write various test cases, and is often used for testing the vehicle-mounted Ethernet.
However, the following disadvantages still exist in the vehicular ethernet test using google test:
1. the test deployment steps are cumbersome
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 problem, 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:
in response to a test starting instruction input by a user, deploying tested software into a corresponding ECU through a robotframe and starting a test suite selected by the user, wherein the test suite is provided with a plurality of robotframe test cases written through the robotframe in advance, and each robotframe test case is written to execute a corresponding google test case written through google;
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 software to be tested;
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 executes in sequence:
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 in-vehicle ethernet testing system is provided, which includes a storage module including instructions loaded and executed by a processor, the instructions, when executed, cause the processor to perform one of the robotframe based in-vehicle 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 the robotframe work with the google test, and carries out the vehicle-mounted Ethernet test through the robotframe work, and each robotframe work case is actually executed with the corresponding google test case during the execution, thereby not only bringing the advantages that the robotframe work can automatically deploy test software, automatically intercept tcpdump logs and generate test reports easy to read, but also keeping the advantages of the google in an Ethernet test system and taking the advantages of the google.
Drawings
The invention is described in detail below with reference to the following figures and embodiments:
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 vehicle-mounted ethernet test method based on robotframe, 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 generated test suite selection interface is provided for a user to select a test suite.
And selecting a corresponding test suite through the test suite selection interface by a user, inputting a test starting instruction, and appointing corresponding software to be tested 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 ECU _ to _ test is the designated ECU, and the variable Sw _ Sw _ to _ test is 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, develop different test kits to different protocol stacks, each test kit has a complete set of test cases of the protocol stack, there are multiple robotframe test cases written by robotframe in advance in the test kit of the invention, each robotframe test case is written to execute corresponding google test case written by google, which is equivalent to associating the robotframe test case with the google test case one to one, see FIG. 3.
And secondly, 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 and after the start, google test is started, so that the interception of tcpdump log by robotframe is more complete in time.
2) More convenient
The robotframe is built based on python interpreted language, adding the intercept tcpdump function does not require recompilation, which is required in google test.
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, and the listener program is configured to receive the test information from the sender program.
c. And remotely starting the tested software.
2) And (3) executing a 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. Close the listener procedure.
In this embodiment, each robotframe test case has a preset tag (tag) to facilitate management and screening of the test cases, and a tag corresponding to the robotframe test case of each test suite and check boxes corresponding to the tags in a one-to-one manner are displayed in the test suite selection interface.
Assuming that the name of a google test case is gtestcase _1, the test group of the belonged 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 log 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-mounted ethernet test system, which includes a storage module, where the storage module includes instructions loaded and executed by a processor, and when the instructions are executed, the processor executes steps according to various exemplary embodiments of the present invention described in the robotframe-based vehicle-mounted ethernet test 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 recognize that the above-described embodiments are illustrative only, and not limiting, and that changes and modifications can be made to the above-described embodiments without departing from the true spirit and scope of the invention, which is defined by the following claims.

Claims (7)

1. A vehicle-mounted Ethernet test method based on robotframe is characterized by comprising the following steps:
in response to a test starting instruction input by a user, deploying tested software into a corresponding ECU through a robotframe and starting a test suite selected by the user, wherein the test suite is provided with a plurality of robotframe test cases written through the robotframe in advance, and each robotframe test case is written to execute a corresponding google test case written through google;
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) and (3) executing a robotframe test case:
executing a corresponding google test case through the google test, starting a sender program written in the google test in advance, and acquiring test information of the google test executing the google test case and sending 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 executes in sequence:
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 one 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 in one-to-one correspondence 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 vehicle-mounted Ethernet test method according to claim 4, wherein 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.
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 it has 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 CN112511386A (en) 2021-03-16
CN112511386B true 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)

Families Citing this family (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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126411B (en) * 2016-06-13 2019-01-01 广州酷狗计算机科技有限公司 The method and apparatus that a kind of pair of tested program code is tested
CN106209515B (en) * 2016-07-12 2019-06-28 中国南方电网有限责任公司电网技术研究中心 Automatic test system for access network equipment
CN107678949B (en) * 2017-09-20 2021-01-26 福建升腾资讯有限公司 Automatic testing method for realizing different communication modes of embedded equipment
CN109901985B (en) * 2017-12-08 2022-09-30 北京京东尚科信息技术有限公司 Distributed test apparatus and method, storage medium, and electronic device
CN110716852B (en) * 2018-07-12 2023-06-23 伊姆西Ip控股有限责任公司 System, method, and medium for generating automated test scripts
CN110928774B (en) * 2019-11-07 2023-05-05 杭州顺网科技股份有限公司 Automatic test system based on node type

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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自动化框架在集散控制系统测试中的应用;李波波等;《工业控制计算机》;20141225(第12期);全文 *
一种基于RobotFramework 的嵌入式软件自动化测试框架;贠海顺;《网络与信息工程》;20180830;全文 *
面向嵌入式通信设备的Ch自动化测试框架设计;毛玉书等;《计算机系统应用》;20110215(第02期);正文第3.3-4节,图3,4 *

Also Published As

Publication number Publication date
CN112511386A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
US7287190B2 (en) Simultaneous execution of test suites on different platforms
WO2018006789A1 (en) Parameter checking method and apparatus, and network management server and computer storage medium
CN107688530B (en) Software testing method and device
CN109740222B (en) Testing device and system for automobile networking scene
US7496815B2 (en) Method and apparatus for automatic generation of system test libraries
CN102693183B (en) Method and system for realizing automatic software testing
US8924933B2 (en) Method and system for automated testing of computer applications
CN108073400A (en) Software automation construction method, server and storage medium
CN111159049A (en) Automatic interface testing method and system
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN106209515B (en) Automatic test system for access network equipment
CN113505073B (en) Performance test method, device, equipment and medium of database
CN110865840B (en) Application management method, device, server and storage medium
WO2019075994A1 (en) Method, device and system for mock data at ios end, 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
CN112445692B (en) Case testing method and terminal
CN112817853A (en) Automatic test method, system and electronic equipment
CN110908708B (en) Code release method, device and system
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN113672502A (en) Program multi-system testing method and corresponding device, equipment and medium
CN114625645A (en) Service testing method and device, electronic equipment and readable storage medium

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