CN115658460A - Automatic performance testing method and system based on cloud and vehicle-end interface - Google Patents
Automatic performance testing method and system based on cloud and vehicle-end interface Download PDFInfo
- Publication number
- CN115658460A CN115658460A CN202211082449.8A CN202211082449A CN115658460A CN 115658460 A CN115658460 A CN 115658460A CN 202211082449 A CN202211082449 A CN 202211082449A CN 115658460 A CN115658460 A CN 115658460A
- Authority
- CN
- China
- Prior art keywords
- interface
- test
- result
- testing
- cloud
- 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.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides an automatic performance testing method and system based on a cloud end and a vehicle end interface, wherein the method comprises the steps of setting concurrency, port number, IP address and other parameter variables in a Jmeter testing tool, running Jmeter software to obtain a corresponding testing result, analyzing the testing result, compiling a statistical result script, analyzing a result after testing execution, and obtaining a testing effect of the cloud end interface; meanwhile, the invention can test a plurality of interfaces, a plurality of groups of interfaces and a plurality of different IP addresses. The invention can obtain the test results of a plurality of interfaces by running once without inputting the execution command for a plurality of times and rewriting the test script, thereby saving the time of testers, improving the working efficiency and the accuracy in the execution process and providing an effective solution for the software test of the automatic performance test.
Description
Technical Field
The invention relates to the technical field of vehicle cloud testing, in particular to an automatic performance testing method and system based on a cloud and a vehicle-mounted terminal interface.
Background
The automobile networking technology is in a good environment day by day, the realization of a plurality of system functions is realized by depending on software, and when the functions of the vehicle-mounted system are in a problem, the conventional problem processing method is that one person manually clicks an interface at an automobile end, and one person checks a data result of interface response, so that manpower and material resources are consumed.
Disclosure of Invention
In order to solve the problems, the invention provides an automatic performance testing method and system based on a cloud end and a vehicle end interface, which can be used for positioning the problem of the front end or the problem of the rear end through one-person operation, is very convenient for tool operation, can generate a report by clicking and operating a use case to be operated, saves the labor cost and simultaneously improves the working efficiency.
The technical scheme of the invention is as follows, and the automatic performance testing method based on the cloud end and the vehicle end interface comprises the following steps:
s1, defining a test data file;
s2, acquiring an interface test data function;
s3, testing an interface;
s4, testing an interface;
s5, writing an interface test result, writing the interface test result, and comparing the results;
and S6, a test report file is generated, and a result is fed back.
Further, S1 defines a test data file as, establishes an interface test excel file and an interface test excel file;
further, the function of S2 obtaining the interface test data is that a test script corresponding to the interface test excel file is established in Jmeter software, and basic parameters are defined in the Jmeter software;
further, the interface test of S3 is that a bench test frame is used, parameters are adjusted, and the interface test excel defined in S1 is operated to test the interface to obtain an interface test result;
further, the step 4 of testing the interface is to use Jmeter software to run the established interface test script in the step 2 and test the interface to obtain an interface test result;
further, the S5 result is:
if no error occurs, directly generating an interface and an interface report result;
if an error occurs, whether the positioning problem belongs to the interface or the interface needs to be determined according to the interface test result and the interface test result
Further, S6 is to specifically report the error result of S5 and feed back the error result according to a predetermined format.
Further, in S5, if the interface has a problem, screenshot needs to be performed on the log and the port error serial number.
A system using the above method, comprising:
jmeter software: for simulating automobile interface software and testing interface data
Test case: compiling excel files in advance, namely interface test excel and interface test excel respectively;
and (3) testing a script: converting the interface test excel into a corresponding test script in a Jmeter;
bench test framework: the simulation system is used for simulating automobile software and testing interface data.
The invention has the beneficial effects that:
the key point of the invention is that the vehicle-mounted terminal interface and the cloud terminal interface can be used for combined testing, the response result of the interface can be checked through the clicking operation of the vehicle-mounted terminal interface, the problem is located to the front end or the rear end through the testing result, and the corresponding personnel can be efficiently located.
Drawings
FIG. 1 is a schematic diagram of the process of the present invention.
Detailed Description
The technical scheme of the invention is realized as follows: an automated performance testing method and system based on a cloud end and a vehicle end interface. Referring to fig. 1, the interface test system is composed of Jmeter software, test cases, test scripts, interface operations and the like, and by clicking an interface at the vehicle end, the result of interface response is checked, the result is analyzed and sorted, and whether the problem belongs to the front end or the rear end is judged.
An automated performance testing method based on a cloud end and a vehicle end interface comprises the following steps:
s1, defining a test data file;
s2, acquiring an interface test data function;
s3, testing an interface;
s4, testing an interface;
s5, writing an interface test result, writing the interface test result, and comparing the results;
and S6, a test report file is generated, and a result is fed back.
S1, defining a test data file as an interface test excel file and an interface test excel file;
s2, acquiring interface test data, namely establishing a test script corresponding to an interface test excel file in Jmeter software, and defining basic parameters in the Jmeter software;
s3, testing the interface by using a rack testing frame, adjusting parameters and operating the interface testing excel defined in S1 to test the interface to obtain an interface testing result;
s4, the interface test is that Jmeter software is used to run the established interface test script in S2, and the interface is tested to obtain an interface test result;
the results in S5 are:
if no error occurs, directly generating an interface and an interface report result;
if an error occurs, whether the positioning problem belongs to the interface or the interface needs to be determined according to the interface test result and the interface test result
And S6, specifically, the error result of the S5 is raised into a report and fed back according to a preset format.
In S5, if the interface has a problem, screenshot needs to be performed on the log and the port error serial number.
A system using the above method, comprising:
jmeter software: for simulating automobile interface software and testing interface data
Test case: compiling pre-compiled excel files which are interface test excel and interface test excel respectively;
testing the script: converting the excel into a corresponding test script in a Jmeter according to the interface test; bench test framework: for simulating automobile software and testing interface data
Before testing, a test case needs to be compiled, and the test case is an excel file.
For the interface test, test scripts of the interface are written in a Jmeter in a one-to-one correspondence mode according to interface use case excel files.
The interface test is executed on a bench test framework through a test case which is written in advance.
The interface test is mainly provided for a vehicle end, whether the interface is called up or not, the interface is called up, the vehicle end can call, in the test process, a compiled script is operated to obtain a test result, the test result needs to be converted into an excel file, and the excel file is compared with an original interface test excel to find a problem point.
The bench test mainly provides a vehicle interface, test results also need to be converted into excel files, the excel files are compared with the initial interface test excel, problems are found, if the interface has problems, some problems with port serial numbers also need to be captured, log logs are captured, and the contents are fed back to an engineer for processing.
Written script
Step one, testing the function of a data file: firstly, defining a test data file, and writing data to be input by an interface and parameters to be input by interface test in an excel file;
step two, acquiring interface test data and acquiring interface test data functions: reading data in excel through a test script written by Jmeter software, and respectively storing the data in variables defined by interface test and interface test;
step three, interface testing: testing by using a rack testing framework, executing the selected interface testing script in the interface, and applying the defined variables of the interface testing as input data and judgment standards in the executing process;
step four, interface testing: performing interface test by using a Jmeter, executing a selected interface test script through the acquired entry data and result data, wherein the script has the function of initiating an interface request for query, and checking whether an interface response contains a result expected by us;
writing an interface test result and writing the interface test result: writing the results of the running use cases, namely success and failure, into a test report file of the excel through a Jmeter script, saving the screenshot of the interface in a picture mode, and saving the data returned by the interface into the file;
step six, generating a test report file: and sending the test report in the form of excel to a specified developer through a Jmeter script according to a preset format.
The invention simplifies the process as
1. An interface test excel file A is written,
running a in the bench yields a result a',
a' is an excel file, and compared with A, the result of the interface test is added and backfilled.
2. An interface test excel file B is written,
b is converted into a test script B' which can be run by the Jmeter in the Jmeter,
b' is operated in the Jmeter, and the result after the operation of the jmter software is backfilled into an excel B file.
Comparing the difference between the result and the original document, and determining error points.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims. And those not described in detail in this specification are well within the skill of those in the art.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Claims (9)
1. An automated performance testing method based on a cloud end and a vehicle end interface is characterized by comprising the following steps:
s1, defining a test data file;
s2, acquiring an interface test data function;
s3, testing an interface;
s4, testing an interface;
s5, writing an interface test result, writing the interface test result, and comparing the results;
and S6, a test report file is generated, and a result is fed back.
2. The automated performance testing method based on the cloud and the vehicle-end interface of claim 1, wherein in S1, the test data file is defined as: and establishing an interface test excel file and an interface test excel file.
3. The automated performance testing method based on the cloud and the vehicle-end interface of claim 2, wherein in S2, the function of acquiring the interface test data is as follows: in the Jmeter software, a test script corresponding to the interface test excel file is established, and basic parameters are defined in the Jmeter software.
4. The automated performance testing method based on the cloud and the in-vehicle interface of claim 3, wherein the interface test in the S3 is: and adjusting parameters by using a bench test frame, and operating the interface test excel defined in the S1 to test the interface to obtain an interface test result.
5. The automated performance testing method based on the cloud and the in-vehicle interface of claim 4, wherein the S4 interface test is as follows: and running the established interface test script in the S2 by using Jmeter software, and testing the interface to obtain an interface test result.
6. The automated performance testing method based on the cloud and the in-vehicle interface of claim 5, wherein the S5 result is:
if no error occurs, directly generating an interface and an interface report result;
if an error occurs, whether the problem belongs to the interface or the interface needs to be positioned according to the interface test result and the interface test result.
7. The automated performance testing method based on the cloud and the vehicle-end interface of claim 6, wherein the S6 specifically is: and (5) raising the error result of the S5 into a report, and feeding back the report according to a preset format.
8. The automated performance testing method based on the cloud and the in-vehicle interface of claim 6, wherein in S5, if the interface has a problem, screenshot needs to be performed on a log and a port error serial number.
9. A system using the method of claims 1-8, comprising:
test case: compiling an excel file in advance;
testing the script: converting the test script into a Jmeter according to the use case;
jmeter software: the interface testing system is used for simulating automobile interface software and testing interface data;
bench test framework: the method is used for simulating automobile software and testing interface data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082449.8A CN115658460A (en) | 2022-09-06 | 2022-09-06 | Automatic performance testing method and system based on cloud and vehicle-end interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082449.8A CN115658460A (en) | 2022-09-06 | 2022-09-06 | Automatic performance testing method and system based on cloud and vehicle-end interface |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115658460A true CN115658460A (en) | 2023-01-31 |
Family
ID=84984398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211082449.8A Pending CN115658460A (en) | 2022-09-06 | 2022-09-06 | Automatic performance testing method and system based on cloud and vehicle-end interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115658460A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116185879A (en) * | 2023-04-26 | 2023-05-30 | 润芯微科技(江苏)有限公司 | Python-based intelligent cabin instrument automatic test method and system |
-
2022
- 2022-09-06 CN CN202211082449.8A patent/CN115658460A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116185879A (en) * | 2023-04-26 | 2023-05-30 | 润芯微科技(江苏)有限公司 | Python-based intelligent cabin instrument automatic test method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105373478B (en) | Automated testing method and system | |
CN106326108A (en) | New application testing method and device | |
CN109902017A (en) | A kind of method and terminal based on RobotFramework test Dubbo interface | |
CN111522728A (en) | Method for generating automatic test case, electronic device and readable storage medium | |
CN108132876B (en) | Embedded software object code unit testing method based on injection mode | |
CN111462811A (en) | Automatic testing method and device, storage medium and electronic equipment | |
CN113220588A (en) | Automatic testing method, device and equipment for data processing and storage medium | |
CN113010413A (en) | Automatic interface testing method and device | |
CN114064473A (en) | Vehicle machine system testing method and system, vehicle and computer readable storage medium | |
CN115658460A (en) | Automatic performance testing method and system based on cloud and vehicle-end interface | |
CN112181854A (en) | Method, device, equipment and storage medium for generating flow automation script | |
CN111026660A (en) | Penetration testing method based on expert system knowledge base | |
CN112231206A (en) | Script editing method for application program test, computer readable storage medium and test platform | |
CN113126993B (en) | Automatic test method and system applied to vehicle detection software | |
CN101620563A (en) | Method and system for automatically testing input playback mode of terminal system | |
CN114138670A (en) | Method based on interface automation test and function, performance and safety test fusion | |
CN112612706A (en) | Automated testing method, computer device and storage medium | |
CN111240989B (en) | Interface automation test framework and method | |
CN114880239B (en) | Data-driven-based interface automation test framework and method | |
CN116431522A (en) | Automatic test method and system for low-code object storage gateway | |
CN114168461A (en) | Performance test method and system applied to domestic operating system | |
CN111124937A (en) | Method and system for assisting in improving test case generation efficiency based on instrumentation function | |
CN111813665A (en) | Big data platform interface data testing method and system based on python | |
CN115599683A (en) | Automatic testing method, device, equipment and storage medium | |
CN113238901B (en) | Multi-device automatic testing method and device, storage medium and computer device |
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 |