CN113934619A - Sound source testing method, system and storage medium based on Robot Framework testing Framework - Google Patents

Sound source testing method, system and storage medium based on Robot Framework testing Framework Download PDF

Info

Publication number
CN113934619A
CN113934619A CN202111030611.7A CN202111030611A CN113934619A CN 113934619 A CN113934619 A CN 113934619A CN 202111030611 A CN202111030611 A CN 202111030611A CN 113934619 A CN113934619 A CN 113934619A
Authority
CN
China
Prior art keywords
test
sound source
framework
testing
robot
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
Application number
CN202111030611.7A
Other languages
Chinese (zh)
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.)
Huizhou Desay SV Automotive Co Ltd
Original Assignee
Huizhou Desay SV Automotive 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 Huizhou Desay SV Automotive Co Ltd filed Critical Huizhou Desay SV Automotive Co Ltd
Priority to CN202111030611.7A priority Critical patent/CN113934619A/en
Publication of CN113934619A publication Critical patent/CN113934619A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of vehicle-mounted multimedia equipment manufacturing, and provides a sound source testing method, a system and a storage medium based on a Robot Framework testing Framework, wherein a Shell instruction is sent by an automatic control serial port to simulate a user to click a tested device to play different sound sources (a first testing sound source and a second testing sound source) so as to replace manual testing, thereby effectively improving the testing efficiency and the testing accuracy; the playing data fed back by the tested equipment is collected through the serial port, the priority state of the current sound source management is automatically analyzed and judged, a test execution report is output according to the test result, and the playing data is automatically obtained, so that the test result is analyzed more objectively, and the test efficiency and the test accuracy can be further improved; a Robot frame test framework is adopted to manage test case scripts, and code keywords are packaged and called, so that the code reuse rate is improved.

Description

Sound source testing method, system and storage medium based on Robot Framework testing Framework
Technical Field
The invention relates to the technical field of vehicle-mounted multimedia equipment manufacturing, in particular to a sound source testing method and system based on a Robot Framework testing Framework and a storage medium.
Background
The multimedia system refers to a system for processing and controlling multimedia information using computer technology and digital communication network technology. In a broad sense, a multimedia system is an information integration system integrating telephone, television, media and computer networks into a whole.
In the research and development test of the current vehicle-mounted multimedia system, aiming at the test of the priority of the sound source, different sound sources with different priorities are played by manually clicking a vehicle-mounted multimedia screen, the sound source which occupies the focus of the current sound source is identified by human ears, and whether the sound source is played correctly is determined according to the standard priority sequence among the sound sources. The test is tedious and boring, and due to the limitation of manpower, test data are easy to miss, test results are too subjective, so that the test efficiency is reduced, and the test accuracy cannot be improved.
Therefore, it is necessary to design a set of schemes capable of automatically testing the sound source management priority of the car multimedia system.
Disclosure of Invention
The invention provides a sound source testing method, a sound source testing system and a storage medium based on a Robot Framework testing Framework, and solves the technical problems that an existing vehicle-mounted multimedia sound source management system cannot effectively play a sound source priority, and is low in testing efficiency and testing accuracy.
In order to solve the technical problems, the invention provides a sound source testing method based on a Robot Framework testing Framework, which comprises the following steps:
s1, generating a shell instruction according to the test case, and sequentially driving the tested equipment to play the first test sound source and the second test sound source;
s2, collecting the playing data of the tested device;
s3, determining the current priority of the first test sound source and the second test sound source according to the playing data, and further determining a test result;
and S4, after the test case is completed, outputting a test execution report according to all the test results.
According to the basic scheme, the automatic control serial port is used for sending the Shell instruction to simulate the user to click the tested equipment to play different sound sources (a first test sound source and a second test sound source) so as to replace manual test, so that the test efficiency and the test accuracy are effectively improved; the playing data fed back by the tested device is collected through the serial port, the priority state of the current sound source management is automatically analyzed and judged, a test execution report is output according to the test result, the playing data is automatically obtained, the test result is analyzed more objectively, and the test efficiency and the test accuracy can be further improved.
In further embodiments, the step S1 includes:
s11, generating a test case in a Robot Framework in advance;
s12, calling a corresponding test script according to the test case, and driving a serial port tool to generate a corresponding shell instruction according to the test script;
and S13, the tested device responds to the shell instruction and sequentially plays the first test sound source and the second test sound source.
According to the scheme, a Robot Framework is adopted to automatically generate the test cases, then the corresponding test scripts are called, the serial port tool is driven to generate the corresponding shell instructions, the tested equipment is controlled to sequentially play the first test sound source and the second test sound source, and therefore simulation of clicking the vehicle-mounted multimedia action by the user is achieved, and the test process is programmed, standardized and automated.
In a further embodiment, the step S2 specifically includes: checking the volume state of the tested equipment through the dumpsys audio to acquire playing data; the playing data at least comprises system volume and sound source focus.
According to the scheme, after the sound source playing is completed, the volume state of the tested device is directly checked through the dump sys audio based on the Robot Framework management serial port, the playing data is obtained, and the data acquisition is performed, so that the fairness and the objectivity of the data can be guaranteed, the test data can be automatically stored, and the follow-up problem analysis and tracing are facilitated.
In further embodiments, the step S3 includes:
s31, according to the playing data, field screening is carried out, and a sound source focus preemption result is determined;
s32, determining a first priority and a second priority which correspond to the first test sound source and the second test sound source at present according to the sound source focus preemption result;
and S33, comparing the first priority and the second priority with corresponding standard priorities, and if the comparison is consistent, outputting a correct test result, otherwise, outputting an incorrect test result.
According to the scheme, after the playing data are obtained, field screening can be carried out to determine the audio source focus preemption result, so that the first priority and the second priority which are output by the tested equipment and correspond to the first test audio source and the second test audio source are determined, whether the tested equipment correctly executes the audio source management priority can be determined by comparing the priority of the first priority and the second priority with the corresponding standard priority, and the testing process is simple and effective.
In a further embodiment, the step S4 specifically includes: and judging whether the test case is completely executed, if not, continuing to execute the next test case, and if so, outputting a test execution report according to all the test results.
In a further embodiment, the calling a corresponding test script according to the test case specifically includes: carrying out keyword identification according to the test case, and calling a pre-packaged test script; the test script is named and packaged by code keywords.
The scheme adopts a Robot frame test framework to manage the test case scripts, and improves the code reuse rate through code keyword packaging and calling.
The invention also provides a sound source testing system based on the Robot Framework testing Framework, which comprises a PC (personal computer) and a serial port debugging board, wherein the serial port debugging board is communicated with the serial port of the PC and the serial port of the tested equipment;
the PC is used for carrying a Robot Framework and storing test cases; the test case generating device is also used for generating a shell instruction according to the Robot Framework by running the test case;
the serial port debugging board is used for responding to the shell instruction and driving the tested equipment to sequentially play a first test sound source and a second test sound source;
the PC is also used for collecting the playing data of the tested equipment, identifying the current priority of the first test sound source and the second test sound source and determining the test result; and then after the test case is finished, a test execution report is output according to all the test results.
Specifically, the tested device is a vehicle-mounted multimedia device.
The invention also provides a storage medium, on which a computer program is stored, wherein the computer program is used for being loaded by the sound source testing system based on the Robot Framework testing Framework, and is used for realizing the sound source testing method based on the Robot Framework testing Framework. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
Drawings
Fig. 1 is a work flow chart of a sound source testing method based on a Robot Framework testing Framework according to embodiment 1 of the present invention;
FIG. 2 is a system test framework provided in embodiment 1 of the present invention;
fig. 3 is a system Framework diagram of a sound source test based on a Robot Framework test Framework according to embodiment 2 of the present invention;
fig. 4 is a test flow chart provided in embodiment 1 or 2 of the present invention.
Detailed Description
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings, which are given solely for the purpose of illustration and are not to be construed as limitations of the invention, including the drawings which are incorporated herein by reference and for illustration only and are not to be construed as limitations of the invention, since many variations thereof are possible without departing from the spirit and scope of the invention.
Example 1
As shown in fig. 1, the sound source testing method based on the Robot Framework provided in the embodiment of the present invention includes steps S1 to S4:
s1, generating a shell instruction according to the test case, and sequentially driving the tested device to play the first test sound source and the second test sound source, wherein the method comprises the following steps of S11-S13:
and S11, generating a test case in the Robot Framework in advance.
The Robot Framework is a Python-based extensible keyword-driven test automation Framework for end-to-end acceptance testing and Acceptance Test Driver Development (ATDD). It can be used to test distributed heterogeneous applications where validation needs involve multiple technologies and interfaces.
And S12, calling the corresponding test script according to the test case, and further driving the serial port tool to generate the corresponding shell instruction according to the test script.
Referring to fig. 2, calling a corresponding test script according to the test case specifically includes: carrying out keyword identification according to the test case, and calling a pre-packaged test script; the test script is named and packaged by the code key words.
In computer science, Shell is colloquially called a Shell (to distinguish it from a core) and refers to software (command parser) that "provides an operation interface for a user". It is similar to command.com and later cmd.exe under DOS. It is used to receive user commands and then to invoke corresponding applications.
In the embodiment, a Robot frame test framework is adopted to manage the test case scripts, and the code reuse rate is improved by code keyword packaging and calling.
And S13, the tested device responds to the shell instruction and sequentially plays the first test sound source and the second test sound source.
In the embodiment, a Robot Framework is adopted to automatically generate the test case, further call the corresponding test script, drive the serial port tool to generate the corresponding shell instruction, and control the tested device to sequentially play the first test sound source and the second test sound source, so as to realize simulation of the action of clicking the vehicle-mounted multimedia by the user, and the test process is programmed, standardized and automated.
S2, collecting the playing data of the tested device, specifically: checking the volume state of the tested equipment through the dumpsys audio to acquire playing data; the playing data at least comprises system volume and sound source focus.
After the sound source playing is completed, the volume state of the tested device is directly checked through the dump sys audio based on the Robot Framework management serial port, playing data is obtained, and data acquisition is performed, so that on one hand, fairness and objectivity of the data can be guaranteed, on the other hand, the testing data can be automatically stored, and subsequent problem analysis and tracing are facilitated.
S3, according to the playing data, determining the current priority of the first test sound source and the second test sound source, and further determining the test result, including steps S31-S33:
s31, according to the playing data, field screening is carried out, and a sound source focus preemption result is determined;
s32, determining a first priority and a second priority which correspond to the first test sound source and the second test sound source at present according to the sound source focus preemption result;
and S33, comparing the first priority and the second priority with the corresponding standard priorities, and if the comparison is consistent, outputting a correct test result, otherwise, outputting an incorrect test result.
After the playing data is acquired, field screening can be performed to determine a sound source focus preemption result, and then a first priority and a second priority which are output by the tested equipment and correspond to the first test sound source and the second test sound source are determined, and whether the tested equipment correctly executes the sound source management priority can be determined by comparing the priority of the first priority and the second priority with the corresponding standard priority, so that the testing process is simple and effective.
S4, after the test case is completed, outputting a test execution report according to all test results, specifically: and judging whether the test case is executed completely, if not, continuing to execute the next test case, and if so, outputting a test execution report according to all test results.
According to the embodiment of the invention, the automatic control serial port is used for sending the Shell instruction to simulate the user to click the tested equipment to play different sound sources (the first test sound source and the second test sound source) so as to replace manual test, thereby effectively improving the test efficiency and the test accuracy; the playing data fed back by the tested device is collected through the serial port, the priority state of the current sound source management is automatically analyzed and judged, a test execution report is output according to the test result, the playing data is automatically obtained, the test result is analyzed more objectively, and the test efficiency and the test accuracy can be further improved.
Example 2
The reference numerals included in the drawings in the present embodiment include: the device comprises a PC (personal computer) 1, a serial port debugging board 2, a tested device 3 and a direct current power supply 4.
The invention also provides a sound source testing system based on the Robot Framework testing Framework, which is shown in figure 3 and comprises a PC (personal computer) 1 and a serial port debugging board 2, wherein the serial port debugging board 2 is in serial port communication with the PC 1 and the tested device 3;
the PC machine 1 is used for carrying a Robot Framework and storing test cases; and the method is also used for generating the shell instruction according to the Robot Framework running test case.
In this embodiment, the PC 1 has python software and Robot frame software installed thereon.
The serial port debugging board 2 is used for responding to the shell instruction and driving the tested device 3 to play a first test sound source and a second test sound source in sequence;
the PC 1 is also used for collecting the playing data of the tested device 3, identifying the current priority of the first test sound source and the second test sound source and determining the test result; and then after the test case is finished, a test execution report is output according to all test results.
The embodiment of the present invention further includes a dc power supply 4 electrically connected to the device under test 3, for supplying power to the device under test 3.
Specifically, the device under test 3 is a vehicle-mounted multimedia device.
The test system provided by the embodiment adopts each module to realize each step in the test method, provides a hardware basis for the test method, and is convenient for method implementation.
Referring to fig. 4, the test procedure of this embodiment is as follows:
the PC 1 opens a serial port to establish communication with the serial port debugging board 2, sends a shell instruction to the serial port debugging board 2 according to the test case, simulates the clicking action of a user, and drives the tested equipment 3 to play a first test sound source A; then, sending the shell instruction to the serial port debugging board 2 again, simulating a user clicking action, and driving the tested device 3 to play a second test sound source B; at this time, the sending shell instruction serial port debugging board 2 checks the volume state of the tested device 3 from the dumpsys audio to obtain playing data (the playing data at least comprises system volume and sound source focus).
At this time, the PC 1 determines the audio source focus preemption result by performing field screening on the play data.
If the sound source focus preemption result is a first test sound source A, determining a first priority currently corresponding to the first test sound source, which is greater than a second priority currently corresponding to a second test sound source; otherwise, the first priority is less than the second priority.
Thus, the magnitude relation between the first priority and the second priority is compared with the magnitude relation between the standard priorities of the first test sound source A and the second test sound source B, if the comparison is consistent, the output test result is correct, for example, the system sets that the standard priority of the first test sound source A is greater than the standard priority of the second test sound source B, and when the first priority is greater than the second priority, the output test result is correct; otherwise, the test result is output to be wrong.
And finally, judging whether the test case is completely executed, if not, continuing to execute the next test case, if so, closing the serial port, and outputting a test execution report according to all test results.
Example 3
The present invention further provides a storage medium, on which a computer program is stored, where the computer program is used to be loaded by the sound source testing system based on the Robot Framework testing Framework in embodiment 2, and is used to implement the sound source testing method based on the Robot Framework testing Framework in embodiment 1. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (9)

1. A sound source testing method based on a Robot Framework is characterized by comprising the following steps:
s1, generating a shell instruction according to the test case, and sequentially driving the tested equipment to play the first test sound source and the second test sound source;
s2, collecting the playing data of the tested device;
s3, determining the current priority of the first test sound source and the second test sound source according to the playing data, and further determining a test result;
and S4, after the test case is completed, outputting a test execution report according to all the test results.
2. The sound source testing method based on the Robot Framework testing Framework of claim 1, wherein the step S1 comprises:
s11, generating a test case in a Robot Framework in advance;
s12, calling a corresponding test script according to the test case, and driving a serial port tool to generate a corresponding shell instruction according to the test script;
and S13, the tested device responds to the shell instruction and sequentially plays the first test sound source and the second test sound source.
3. The sound source testing method based on the Robot Framework testing Framework of claim 2, wherein the step S2 specifically comprises: checking the volume state of the tested equipment through the dumpsys audio to acquire playing data; the playing data at least comprises system volume and sound source focus.
4. The sound source testing method based on the Robot Framework testing Framework of claim 1, wherein the step S3 comprises:
s31, according to the playing data, field screening is carried out, and a sound source focus preemption result is determined;
s32, determining a first priority and a second priority which correspond to the first test sound source and the second test sound source at present according to the sound source focus preemption result;
and S33, comparing the first priority and the second priority with corresponding standard priorities, and if the comparison is consistent, outputting a correct test result, otherwise, outputting an incorrect test result.
5. The sound source testing method based on the Robot Framework testing Framework of claim 1, wherein the step S4 specifically comprises: and judging whether the test case is completely executed, if not, continuing to execute the next test case, and if so, outputting a test execution report according to all the test results.
6. The sound source testing method based on the Robot Framework testing Framework according to claim 2, wherein the invoking of the corresponding testing script according to the testing case specifically comprises: carrying out keyword identification according to the test case, and calling a pre-packaged test script; the test script is named and packaged by code keywords.
7. A sound source test system based on a Robot Framework test Framework is characterized in that: the system comprises a PC and a serial port debugging board, wherein the serial port debugging board is in serial port communication with the PC and a tested device;
the PC is used for carrying a Robot Framework and storing test cases; the test case generating device is also used for generating a shell instruction according to the Robot Framework by running the test case;
the serial port debugging board is used for responding to the shell instruction and driving the tested equipment to sequentially play a first test sound source and a second test sound source;
the PC is also used for collecting the playing data of the tested equipment, identifying the current priority of the first test sound source and the second test sound source and determining the test result; and then after the test case is finished, a test execution report is output according to all the test results.
8. The sound source testing system based on the Robot Framework testing Framework of claim 7, wherein: the tested equipment is vehicle-mounted multimedia equipment.
9. A storage medium having a computer program stored thereon, characterized in that: the computer program is used to be loaded by a sound source testing system based on a Robot Framework testing Framework as claimed in any one of claims 7 to 8, and is used to implement a sound source testing method based on a Robot Framework testing Framework as claimed in claims 1 to 6.
CN202111030611.7A 2021-09-03 2021-09-03 Sound source testing method, system and storage medium based on Robot Framework testing Framework Pending CN113934619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111030611.7A CN113934619A (en) 2021-09-03 2021-09-03 Sound source testing method, system and storage medium based on Robot Framework testing Framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111030611.7A CN113934619A (en) 2021-09-03 2021-09-03 Sound source testing method, system and storage medium based on Robot Framework testing Framework

Publications (1)

Publication Number Publication Date
CN113934619A true CN113934619A (en) 2022-01-14

Family

ID=79275015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111030611.7A Pending CN113934619A (en) 2021-09-03 2021-09-03 Sound source testing method, system and storage medium based on Robot Framework testing Framework

Country Status (1)

Country Link
CN (1) CN113934619A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117421234A (en) * 2023-11-03 2024-01-19 天讯瑞达通信技术有限公司 Multi-platform multi-concurrency automatic threading testing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117421234A (en) * 2023-11-03 2024-01-19 天讯瑞达通信技术有限公司 Multi-platform multi-concurrency automatic threading testing system

Similar Documents

Publication Publication Date Title
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN103399814B (en) The method and device of automatic test
KR20140053542A (en) Automatic testing apparatus for embedded software, automatic testing method thereof and test scenario composing method
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN104850499A (en) Automatic test method and device for base band software
CN111194046A (en) Automatic WIFI module testing system and method
CN112732576B (en) Automatic testing method, device and equipment based on user interface
WO2007061241A1 (en) Error test method for mobile communication terminals
CN112115038A (en) Application testing method and device and storage medium
CN108491323A (en) A kind of embedded software automatization test system and method based on Lua scripts
CN114238071A (en) DCS software automatic verification system and method based on digital simulation technology
CN112433948A (en) Simulation test system and method based on network data analysis
CN110989549B (en) Software test general automation control method and device for train control system
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN113934619A (en) Sound source testing method, system and storage medium based on Robot Framework testing Framework
CN102025555B (en) Method and device for testing IP multimedia sub-system performance
CN112860587B (en) UI automatic test method and device
US20050203717A1 (en) Automated testing system, method and program product using testing map
CN117290255A (en) Batch interface performance test method based on Python and Locut frameworks
CN111737141A (en) Black box automatic testing system and method combined with deep learning technology
CN100369422C (en) Integrated tester and integrated testing method for media server
CN111444109A (en) Mobile terminal UI automatic testing method and system
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN112199229A (en) Data processing method, device, equipment and 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