Automatic voice testing method and device and electronic equipment

By determining the target test category and test corpus, generating and sending test request commands, the problem of low accuracy of voice automation testing in noisy environments is solved, achieving higher test accuracy.

CN119724159APending Publication Date: 2025-03-28SAIC MOTOR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311274615.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Voice automation testing is susceptible to external environmental noise in the development environment, resulting in low test accuracy.

Method used

By obtaining the attribute information of the vehicle under test, determining the target test category, determining the test corpus based on the network connection status and content in the test category, and writing it into the test request command template, generating a test request command, and sending it to the vehicle under test for voice automation testing operations.

Benefits of technology

By sending the test corpus to the vehicle under test in the form of commands, the interference of external environmental noise is avoided and the accuracy of voice automation testing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724159A_ABST
    Figure CN119724159A_ABST
Patent Text Reader

Abstract

The invention provides an automatic voice testing method and device and electronic equipment, and the method comprises the steps: firstly determining a test corpus corresponding to a target test category, then writing the test corpus into a designated position in a test request command template to obtain a test request command, and sending the test request command to a tested vehicle machine, and the tested vehicle machine carries out voice automatic test operation based on the test request command. As the test corpus is sent to the tested vehicle machine in the form of the command and is not interfered by external environment noise, compared with an audio broadcasting mode, the voice automatic test accuracy can be improved for testing the response capability of various verbal skills in the language interaction function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech testing, and more particularly to a speech automation testing method, device and electronic equipment. Background Art

[0002] With the rapid development of intelligent networking, in-vehicle entertainment systems are becoming more and more intelligent and have more and more functions. In order to ensure the reliable operation of the in-vehicle entertainment system, it is necessary to test the voice interaction function of the in-vehicle entertainment system.

[0003] In order to avoid the problem of low efficiency of voice interaction testing caused by manual testing, automated testing can be used. At present, in automated testing, audio broadcasting is generally used to perform automated testing of the voice interaction function of the in-vehicle entertainment system. This method can improve the testing efficiency of the voice interaction function, but in the development environment, it is easily affected by external environmental noise, resulting in low test accuracy. Summary of the invention

[0004] In view of this, the present invention provides a speech automation test method, device and electronic device to solve the problem of low accuracy of speech automation test.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A voice automation testing method, comprising:

[0007] Obtaining attribute information of the vehicle under test, and determining a test category corresponding to the attribute information;

[0008] Selecting a target test category from the test categories;

[0009] Determining the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category;

[0010] Writing the test corpus into a specified position in a test request command template to obtain a test request command;

[0011] The test request command is sent to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

[0012] Optionally, selecting a target test category from the test categories includes:

[0013] Displaying the test category on a display interface;

[0014] Obtain a target test type selected by a user from the test categories displayed on the display interface.

[0015] Optionally, determining the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category includes:

[0016] Determine whether it is possible to connect to the network database through the network;

[0017] If not, obtaining the test corpus in the target test case corresponding to the target test category from the local database;

[0018] If so, based on the content in the test set in the target test category, the test corpus corresponding to the target test category is obtained through interaction with the network database.

[0019] Optionally, based on the content in the test set in the target test category, obtaining the test corpus corresponding to the target test category through interaction with the network database includes:

[0020] Obtaining content in a test set in the target test category, and determining whether the content is a generalization test;

[0021] If yes, then read the corpus data corresponding to the target test category from the network database, and combine the basic corpus in the target test category with the corpus data to obtain the test corpus in the target test case corresponding to the target test category;

[0022] If not, the test corpus in the target test case corresponding to the target test category is obtained from the network database.

[0023] Optionally, obtaining the test corpus in the target test case corresponding to the target test category from the local database includes:

[0024] Acquire a target test case corresponding to the target test category from a local database;

[0025] Generate a test structure corresponding to the target test case;

[0026] Get the test corpus in the test structure.

[0027] Optionally, it also includes:

[0028] A test report is generated based on the target test cases corresponding to the target test category and the test results.

[0029] Optionally, it also includes:

[0030] Determine the progress of the voice automation test and display the test status corresponding to the progress of the voice automation test.

[0031] A speech automation test device, comprising:

[0032] A category determination module, used to obtain the attribute information of the vehicle under test and determine the test category corresponding to the attribute information;

[0033] A category selection module, used to select a target test category from the test categories;

[0034] A corpus determination module, configured to determine the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category;

[0035] A command generation module, used for writing the test corpus into a specified position in a test request command template to obtain a test request command;

[0036] The test output module is used to send the test request command to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

[0037] Optionally, the category selection module is specifically used to:

[0038] The test category is displayed on a display interface, and a target test type selected by a user from the test categories displayed on the display interface is obtained.

[0039] An electronic device comprising: a memory and a processor;

[0040] Wherein, the memory is used to store programs;

[0041] The processor calls the program and is used to execute the above-mentioned voice automation test method.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention provides a voice automation test method, device and electronic device. In the present invention, the test corpus corresponding to the target test category is first determined, and then the test corpus is written into a specified position in a test request command template to obtain a test request command, and the test request command is sent to the vehicle under test, so that the vehicle under test performs a voice automation test operation based on the test request command. Since the test corpus is sent to the vehicle under test in the form of a command in the present invention, it is not affected by external environmental noise, and compared with the audio broadcast method, the accuracy of voice automation testing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0045] Figure 1 A method flow chart of a voice automation testing method provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a vehicle computer test scenario provided by an embodiment of the present invention;

[0047] Figure 3 A method flow chart of another voice automation testing method provided by an embodiment of the present invention;

[0048] Figure 4 A flow chart of a method for determining a test corpus provided by an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of a test state provided by an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of module interaction for executing a voice automation test method provided by an embodiment of the present invention;

[0051] Figure 7 A method flow chart of another voice automation testing method provided by an embodiment of the present invention;

[0052] Figure 8 A schematic diagram of the structure of a speech automation testing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] With the rapid development of intelligent networking, in-vehicle entertainment systems are becoming more and more intelligent and have more and more functions. In order to ensure the reliable operation of the in-vehicle entertainment system, it is necessary to test the voice interaction function of the in-vehicle entertainment system.

[0055] In order to avoid the problem of low efficiency of voice interaction testing caused by manual testing, automated testing can be used. At present, in automated testing, audio broadcasting is generally used to perform automated testing of the voice interaction function of the in-vehicle entertainment system. Specifically, an audio broadcast device is used to play audio, and the in-vehicle entertainment system collects the audio, identifies the audio content, and determines the output result corresponding to the audio content and outputs it. Then the test result is determined based on the output result.

[0056] Although this method can improve the testing efficiency of voice interaction functions, it still has certain limitations:

[0057] 1. In the development environment, it is easy to be affected by external environmental noise, so that the audio received by the in-vehicle entertainment system contains noise, the accuracy of the speech recognition result is low, and the accuracy of the output result is also low. There is also a certain probability that the wake-up voice fails and the audio recognition fails.

[0058] 2. It takes a certain amount of time for the audio broadcasting device to play the audio, which makes the test time longer and the test efficiency lower.

[0059] In order to solve the above-mentioned problem of low accuracy and efficiency in voice interaction function testing, an embodiment of the present invention provides a voice automation test method, device and electronic device. In the present invention, the test corpus corresponding to the target test category is first determined, and then the test corpus is written into a specified position in the test request command template to obtain a test request command, and the test request command is sent to the vehicle under test so that the vehicle under test performs a voice automation test operation based on the test request command. Since the test corpus is sent to the vehicle under test in the form of a command in the present invention, it is not affected by external environmental noise, and compared with the audio broadcast method, the accuracy of voice automation testing can be improved.

[0060] More specifically, by reading the test categories and data in the database, they are displayed on the system. According to the user's selection and settings, the in-vehicle entertainment system is operated through command control to perform voice automation testing, wherein the test categories are divided into generalized test categories and non-generalized test categories (such as basic test categories, etc.), and the test cases corresponding to the generalized test categories include the basic generalized test words (basic corpus) and the corpus data in the database, and the test cases corresponding to the non-generalized test categories are some fixed test cases. This method can perform voice automation testing on the in-vehicle entertainment systems of the Alios system and the Android system at the same time, and can also perform voice automation testing on multiple in-vehicle entertainment systems at the same time. During the test, the automated testing tool pushes the voice test service script to the car computer to realize the direct interaction between the computer and the car computer, solving the problems of low accuracy and long test cycle of voice testing.

[0061] Based on the above content, the embodiment of the present invention provides a voice automation test method, which can be implemented by an automation test tool located in a PC. Figure 1 , a voice automation testing method may include:

[0062] S11. Acquire attribute information of the vehicle machine under test, and determine a test category corresponding to the attribute information.

[0063] In actual applications, when testing the voice interaction function, it is achieved through interaction between the PC and the vehicle under test. First, after the vehicle under test and the PC device are connected, the automated testing tool automatically reads the vehicle model, system, version, chip, VIN code information and other attribute information and displays it on the visual interface. At the same time, it can load the attribute information filled in last time, so that when testing the vehicle that has been tested, there is no need to read the attribute information again. The user can select the vehicle under test on the visual interface, and when the attribute information of the vehicle is wrong or does not exist, the vehicle attribute information can be modified. In addition, the tester information and test information can also be modified.

[0064] In actual application, during the test, at least one vehicle under test can be connected and tested at the same time. Figure 2 .

[0065] The basic connection between the automated test tool and the vehicle under test is only an adb cable (Micro USB Android data cable), which is easy to move, easy to install, and can be flexibly used in bench and actual vehicle tests.

[0066] In the laboratory environment, a simple test bench can mount multiple car computers, and the car computers and large screens are connected to a 12V power supply module for power supply. A PC device equipped with an automated test tool is connected to the car computer via an adb line. The PC can be connected to 1-4 car computers, and can be used to read test cases and perform automated tests in batches, and generate test result reports. The adb command can be used to read the device information of the car computer, push service scripts such as voice test service scripts to the car computer, execute test cases, and obtain the test results of a single test case from the car computer in real time and save them to the PC device.

[0067] In the real vehicle environment, after the real vehicle is working, the PC device equipped with the automated testing tool can be connected to the vehicle computer via an adb line for testing.

[0068] When performing a voice function test on at least one vehicle machine under test, multiple voice function tests can be executed in parallel, and the process of each voice function test is similar. In this embodiment, performing a voice function test on a vehicle machine under test is taken as an example for introduction.

[0069] After obtaining the attribute information of the vehicle under test through the above steps, it is necessary to determine its corresponding test category.

[0070] Specifically, the database stores the test category of each vehicle under test. The test category and the test cases corresponding to the test category support user customization to improve test autonomy.

[0071] The test category can be obtained by querying the attribute information of the vehicle under test. In this embodiment, after obtaining the attribute information, the test category in the database is queried and displayed on the visual interface. The test category has a keyword description, such as:

[0072] “{'module':'navigation','test type':'functional test','test set':'generalization','corpus':'What is the traffic condition at location A'}”.

[0073] S12: Select a target test category from the test categories.

[0074] In actual applications, users can select a single / entire module / all corresponding test categories for testing on the visual interface.

[0075] Specifically, the test categories may be displayed on a display interface, and then the user selects a desired test category from the test categories displayed on the display interface, and the test category is the target test category.

[0076] It should be noted that the user does not have to select a test category, in which case all test categories are assumed to be target test categories.

[0077] S13: Determine the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category.

[0078] In practical applications, the test corpus is the data that the vehicle under test needs to receive. Generally speaking, the test corpus is in text form, which can save the process of voice wake-up and recognition required by the vehicle entertainment system during the test, thereby improving the test efficiency. In addition, it can also avoid the problem of low test accuracy caused by voice recognition errors of the vehicle entertainment system.

[0079] It should be noted that, in the present embodiment, when testing the voice interaction function, the main purpose is to determine whether the feedback result of the voice interaction function is accurate, so the test corpus in text form is directly transmitted to the vehicle under test, so that it can be directly parsed according to the test expectations to obtain the output result. This also avoids the problem of not being able to test only the parsing function during voice interaction due to inaccurate voice recognition.

[0080] It should be noted that if you want to test the speech recognition and analysis functions of the in-car entertainment system at the same time, you can configure the test corpus in audio format and input it into the in-car entertainment system to perform speech recognition and analysis to obtain the output results, thereby achieving the purpose of testing the speech recognition and analysis functions at the same time.

[0081] In actual applications, test cases can be divided into functional test cases and generalized test cases based on the content in the test set. Functional test cases correspond to the above-mentioned non-generalized test categories, and generalized test cases correspond to the above-mentioned generalized test categories.

[0082] Specifically, in the non-generalized test category, the content in the test set is "non-generalized", such as basic testing, online testing, etc. For example:

[0083] “{'module':'navigation','test type':'functional test','test set':'basic test','corpus':'what's the weather like today'}”

[0084] In the generalization test category, the content in the test set is "generalization", such as:

[0085] “{'_id':ObjectId('63be1fe36a1f0f68ec7c3deb'),'Module':'Navigation','Test Type':'Functional Test','Test Collection':'Generalization','Corpus':'Navigate to {POI}'}”

[0086] The main difference between generalization and non-generalization is whether the test case is a single test case or can be combined with the corpus data in the test case resources in the database to obtain different implementation methods. For example, "How is the weather today" is a single test case, and the test corpus is "How is the weather today".

[0087] 'Navigate to {POI}' can have various forms according to the location of the POI, such as location A, location B, location C, etc., so there are multiple implementation methods such as navigating to location A, navigating to location B, navigating to location C, etc., all of which can be tested. At this time, the test corpus is recorded as "Navigate to location A", "Navigate to location B", "Navigate to location C", etc.

[0088] In addition, in the present invention, it can be determined whether to obtain corresponding data from a local database or a network database based on the network connection status, such as whether the network connection to the network database can be established.

[0089] S14: Write the test corpus into a specified position in a test request command template to obtain a test request command.

[0090] In actual applications, the test request command template can test the command structure, which can be:

[0091] http: / / 127.0.0.1:9001 / input?speak={text}.

[0092] The specified position is the text position mentioned above. The text position needs to be replaced with the corresponding test corpus. For example, if it is replaced with "How is the weather today?", the final test request command is:

[0093] http: / / 127.0.0.1:9001 / input?speak={What is the weather like today}.

[0094] The test request command may be implemented in the form of a command command.

[0095] S15. Send the test request command to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

[0096] Specifically, it is necessary to push the written voice test service script to the vehicle computer in advance, start the test service through the command, and the service starts a bootstarp port to realize the interaction between the PC device and the vehicle computer under test through the port.

[0097] After obtaining the above test request command, a request command can be sent to the vehicle computer through a request request to implement the voice automation test execution of the vehicle computer entertainment system.

[0098] To sum up, the entire test process can refer to Figure 3 , on the automated testing tool side, load the database resources and parse them into the corresponding structure, which can be a test structure, and then execute the test case. Push the test service script, such as the voice test service script mentioned above, to the car computer, start the test script service, and connect to the test script service through the port. Parse the test corpus through the test structure, push the test corpus to the test service script of the car computer with a test request command, and call UiAutomator at the bottom layer of the car computer to operate the car computer, get the test result, and return the result to the automated testing tool. Among them, when returning the test result, each time the tested car computer executes a test case, it will be returned to the automated test test, and the automated testing equipment will record a test result and save it on the local PC device.

[0099] After obtaining the test results, the automated testing tool may generate a test report based on the target test cases corresponding to the target test category and the test results.

[0100] Specifically, when generating a test report, it can be achieved through the report module, which can collect the test results in real time and organize and output the final test result report.

[0101] In this embodiment, repeated and long-term testing is supported, as well as voice automation testing on test benches and real vehicles. Simultaneous testing of multiple vehicle computers is supported, and a test report is automatically generated after the test is completed.

[0102] In this embodiment, the test corpus corresponding to the target test category is first determined, and then the test corpus is written into a specified position in the test request command template to obtain a test request command, and the test request command is sent to the vehicle under test so that the vehicle under test performs a voice automation test operation based on the test request command. Since the test corpus is sent to the vehicle under test in the form of a command in the present invention, it is not affected by external environmental noise, and compared with the audio broadcast method, the accuracy of voice automation testing can be improved.

[0103] In addition, in the present invention, the test is directly performed through the command, which saves the process of voice reception, awakening and recognition, thereby improving the test efficiency and saving the test time. In addition, the test directly sends the tested command to the vehicle computer service, improving the test accuracy.

[0104] The above embodiment mentioned "determining the test corpus corresponding to the target test case based on the content in the test set in the target test case", and now the specific implementation process is introduced.

[0105] Reference Figure 4 “Determining the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category” may include:

[0106] S41, determine whether it is possible to connect to the network database through the network; if so, execute step S43; if not, execute step S42.

[0107] In this embodiment, two types of databases are supported, one is a network database that needs to be connected via the network. The other is a local database that does not require a network connection and can be accessed directly from the local computer, so it can be used when the network cannot be connected. The specific database to be used is configured as needed. Generally, it can be configured that when there is a network, if the network database can be connected, the test case resources in the network database are used, and if the network database cannot be connected, the test case resources in the local database are used. When there is no network, the test case resources in the local database are directly used.

[0108] Since the test case resources in the network database are the latest and most comprehensive test case resources, the test case resources in the network database are used first.

[0109] In this embodiment, it is first determined whether it is possible to connect to the network database through the network, and based on the determination result, a corresponding database is selected to read the test case resources.

[0110] Specifically, a request is initiated to the network database arranged on the LAN server. If the network database can be connected, it means that the network database connection is successful (whether the database connection is successful is only implemented in the software and is not displayed on the interface). At this time, the test case resources in the network database are obtained. If the request fails, the test case resources are obtained from the local database.

[0111] S42: Acquire test corpus in the target test case corresponding to the target test category from the local database.

[0112] Specifically, the test corpus in the target test case corresponding to the target test category is obtained from the local database.

[0113] When the network database cannot be connected, the test case resources are read from the local database. In actual applications, the local database has pre-configured test cases and test corpora. The test corpora are the corpora configured in the target test case corresponding to the target test category, which can be stored separately or extracted from the target test case.

[0114] Regardless of whether it is a generalization test or a non-generalization test, there is corresponding data in the local database. When it is a non-generalization test, the test corpus can be: "What is the weather like today?"

[0115] In the case of generalization test, the test corpus may be test corpus such as "navigate to location A", "navigate to location B", "navigate to location C", etc. In this embodiment, the test corpus in the generalization test has been pre-obtained based on the combination of the basic corpus and the corpus data.

[0116] In detail, when obtaining the test corpus in the target test case corresponding to the target test category from the local database, first obtain the target test case corresponding to the target test category from the local database, generate a test structure corresponding to the target test case, and obtain the test corpus in the test structure.

[0117] Specifically, the target test cases corresponding to the target test category are obtained and parsed into a test structure. The test structure may include: test corpus, test method, test environment, test type, etc. The test corpus is as described above, and the test method is generally a text injection method or an audio broadcast method. Generally, the functional test adopts the text injection method, and the performance test adopts the audio broadcast method. The voice instructions in the audio playback method can be converted from text to voice or directly use a recorded audio file. The test environment is generally a noisy environment or a quiet environment. If it is a noisy environment, the configured noise background sound can be played according to the specific test scenario. Generally, the functional test chooses a quiet environment. The test types are generally functional tests, performance tests, etc.

[0118] After parsing the test structure, you can get the test corpus.

[0119] In this embodiment, the test corpus may also be content that can be arbitrarily configured by the user, such as POI and music data.

[0120] S43: Based on the content in the test set in the target test category, obtain the test corpus corresponding to the target test category by interacting with the network database.

[0121] Specifically, the contents in the test set refer to the above description, and may be basic tests, online tests, generalized tests, etc.

[0122] In actual applications, when being able to connect to a network database, there are different implementation methods based on whether it is a generalization test, which are introduced below.

[0123] Step S43 may include:

[0124] 1) Obtaining content in a test set in the target test category, and determining whether the content is a generalization test.

[0125] Specifically, the contents in the test set refer to the above description, and may be basic tests, online tests, generalized tests, etc.

[0126] Since the test corpus corresponding to the generalization test is not single, the same basic corpus can have multiple implementation methods. For example, if the basic corpus is 'Navigate to {POI}', its implementation methods are test corpora such as 'Navigate to Location A', 'Navigate to Location B', 'Navigate to Location C', etc. The test corpus for non-generalization testing is single, which is only the basic corpus, such as 'What is the weather like today?'

[0127] In this embodiment, it is necessary to focus on determining whether it is a generalization test.

[0128] 2) If yes, then read the corpus data corresponding to the target test category from the network database, and combine the basic corpus in the target test category with the corpus data to obtain the test corpus in the target test case corresponding to the target test category.

[0129] In practical applications, generally speaking, the data in the network database can be updated in real time, so the corpus data in the network database is also the latest. When it is a generalization test, the test corpus used is composed of two parts, one is the basic corpus and the other is the corpus data. Generally speaking, the basic corpus comes from the target test category, such as 'navigation to {POI}', and the corpus data can come from the local database, or when it is a network database, when it is a local database, the local database stores the test corpus after the combination of the basic corpus and the corpus data. When it is a network database, it is necessary to obtain the corpus data from the network database and perform the combination operation. Since the corpus data in the network database is the latest, if it can be connected to the network database, the corpus data corresponding to the target test category can be read from the network database based on keywords, such as the corpus data corresponding to 'navigation to {POI}' can be a specific POI, such as location A, location B, location C, etc. Then the basic corpus in the target test category and the corpus data are combined to obtain the test corpus in the target test case corresponding to the target test category.

[0130] The target test categories are:

[0131] Take “{'_id':ObjectId('63be1fe36a1f0f68ec7c3deb'),'Module':'Navigation','Test Type':'Functional Test','Test Set':'Generalization','Corpus':'Navigate to {POI}'}” as an example. The basic corpus is “Navigate to {POI}”, and the corpus data includes location A, location B, location C, etc. The corpus data can be obtained by crawling the network database. By combining the two, we can get test corpora such as “Navigate to Location A”, “Navigate to Location B”, and “Navigate to Location C”.

[0132] After the test corpus is obtained, the corresponding test corpus in the local database may be updated so that the data in the local database is also the latest test corpus.

[0133] 3) Acquire the test corpus in the target test case corresponding to the target test category from the network database.

[0134] If it is not a generalization test, there is no need to perform the above-mentioned combination operation of the basic corpus and the corpus data, and the test corpus in the target test case corresponding to the target test category can be directly obtained from the network database.

[0135] It should be noted that the test corpus in this embodiment may be located in a target test case corresponding to a target test category, or may be stored separately, and may be retrieved based on a keyword search.

[0136] In this embodiment, different determination processes of the test corpus are provided based on whether the network database can be connected and whether it is a generalization test, so that the test corpus can be obtained in different scenarios to perform subsequent tests.

[0137] In addition, in the present invention, test case resources are obtained from the network database first, so that the test case resources are more comprehensive and rich.

[0138] In addition, by placing the test case resources in the database, the database data can be modified in the background to update the test case resources. Compared with placing the test case resources in the tool client, frequent updates of the tool client can be avoided.

[0139] In addition, the generalization test in this embodiment adopts a basic corpus and a large amount of corpus data generation mode obtained by web crawling to improve the test coverage.

[0140] In another embodiment of the present invention, the progress of the voice automation test can also be monitored so that the tester can understand the test progress in a timely manner and perform maintenance in a timely manner when the test is suspended or fails.

[0141] Specifically, the progress of the voice automation test is determined, and the test status corresponding to the progress of the voice automation test is displayed.

[0142] Reference Figure 5 After the user selects the test category, the user clicks on the visual interface to execute the automated test, and the system will start the test. At this time, the test status is Task Created. During the task running process, the test status is Task in Progress. After the task is completed, the test status is Task Completed. The user can also change the test task status. For example, if the user clicks the Terminate button while the task is in progress, the test status is Task Terminated.

[0143] After the test task is established, it can be run. During the task execution, it can be terminated. After the task is terminated, a test report will be generated.

[0144] In another implementation of the present invention, multiple models are configured to implement a voice automation test method in an embodiment of the present invention. Specifically, refer to Figure 6 .in,

[0145] The use case operation module 501 refers to reading the test category from the PC device and displaying it. The user can freely select the test category to be executed, including one or more of the test categories of function, response time, fluency, CPU memory usage, pressure, stability, monkey, voice and diagnosis.

[0146] The database module 502 mainly stores test cases and module data and audio data required for testing.

[0147] The task management module 503 can manage various tasks, create test tasks, and end test tasks.

[0148] The test service module 504 is started on the vehicle side and monitors the test instructions from the PC side.

[0149] The script operation module 505 can operate the script and generate corresponding test tasks according to user selection.

[0150] The execution module 506 performs automated testing by sending instructions to the vehicle equipment.

[0151] The log status module 507 displays the log of the software operation in a visual interface, such as clicking a button, etc.; reads the vehicle-side test log in real time through the adb line and saves the log required for the test; displays the overall status such as the current operation, pause status, test progress and the executed test cases, as well as detailed status such as the test results.

[0152] The reporting module 508 can collect the test results in real time, and organize and output the final test result report.

[0153] Through the interaction of the various modules in this embodiment, a voice automation test method in this embodiment is implemented, ensuring the reliability of the test.

[0154] In order to enable those skilled in the art to more clearly understand this solution, the entire process of this solution is now introduced. Figure 7 Steps S601-614 in .

[0155] S601, read the test category.

[0156] S602: Select a test category.

[0157] S603: Execute automated testing.

[0158] Specifically, the automated testing tool reads the test category and displays it so that the user can select the test category and start executing the automated testing.

[0159] S604, determine whether it is possible to connect to the network database; if so, execute step S605; if not, execute step S608.

[0160] Specifically, based on the judgment result of whether to connect to the network database, it is selected whether to read the test case from the local or the network database.

[0161] S605, determine whether it is a generalization test; if so, execute step S606; if not, execute step S607.

[0162] S606: Generate test cases based on the basic corpus and corresponding module corpus data.

[0163] S607: Read the test cases in the network database.

[0164] If it can be connected to the network database, it will further determine whether it is a generalization test. If so, it is necessary to generate test cases based on the basic corpus and the corresponding module corpus data. If it is not a generalization test, the test cases in the network database are directly read.

[0165] S608: Read local test cases.

[0166] If the network database cannot be connected, the test cases in the local database are read.

[0167] S609: Generate a test structure.

[0168] S610: Push the voice test service script to the vehicle computer and start the service.

[0169] Parse the test case to generate the test structure. Then push the voice test service script to the vehicle computer and start the test service.

[0170] S611. Send a test instruction to the vehicle computer service to execute the test.

[0171] S612: Read the vehicle computer response result from the vehicle computer.

[0172] Send a test command to the vehicle computer, such as the command command mentioned above, to make the vehicle computer perform the test. After sending the test command, read the vehicle computer response result from the vehicle computer to check whether the vehicle computer successfully receives the test command.

[0173] S613. Determine whether there are any unexecuted use cases; if so, return to step S611; if not, execute step S614.

[0174] S614: Generate test results.

[0175] If the vehicle computer successfully receives the test command, it will start the automated voice test to determine whether there are any unexecuted test cases. If not, it will generate the test results. If so, it will continue to send test commands to the vehicle computer until all test cases are executed.

[0176] Optionally, based on the above-mentioned embodiment of a voice automation test method, another embodiment of the present invention provides a voice automation test device, referring to Figure 8 , which may include:

[0177] The category determination module 11 is used to obtain the attribute information of the vehicle under test and determine the test category corresponding to the attribute information;

[0178] A category selection module 12, used to select a target test category from the test categories;

[0179] A corpus determination module 13, configured to determine the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category;

[0180] A command generation module 14 is used to write the test corpus into a specified position in a test request command template to obtain a test request command;

[0181] The test output module 15 is used to send the test request command to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

[0182] Furthermore, the category selection module is specifically used for:

[0183] The test category is displayed on a display interface, and a target test type selected by a user from the test categories displayed on the display interface is obtained.

[0184] Furthermore, the corpus determination module 13 is specifically used for:

[0185] Determine whether it is possible to connect to the network database through the network;

[0186] If not, obtaining the test corpus in the target test case corresponding to the target test category from the local database;

[0187] If so, based on the content in the test set in the target test category, the test corpus corresponding to the target test category is obtained through interaction with the network database.

[0188] Wherein, based on the content in the test set in the target test category, obtaining the test corpus corresponding to the target test category through interaction with the network database includes:

[0189] Obtaining content in a test set in the target test category, and determining whether the content is a generalization test;

[0190] If yes, then read the corpus data corresponding to the target test category from the network database, and combine the basic corpus in the target test category with the corpus data to obtain the test corpus in the target test case corresponding to the target test category;

[0191] If not, the test corpus in the target test case corresponding to the target test category is obtained from the network database.

[0192] Wherein, obtaining the test corpus in the target test case corresponding to the target test category from the local database includes:

[0193] Acquire a target test case corresponding to the target test category from a local database;

[0194] Generate a test structure corresponding to the target test case;

[0195] Get the test corpus in the test structure.

[0196] Furthermore, it also includes:

[0197] The report generation module is used to generate a test report based on the target test case corresponding to the target test category and the test result.

[0198] Furthermore, it also includes:

[0199] The progress determination module is used to determine the progress of the voice automation test and display the test status corresponding to the progress of the voice automation test.

[0200] In this embodiment, the test corpus corresponding to the target test category is first determined, and then the test corpus is written into a specified position in the test request command template to obtain a test request command, and the test request command is sent to the vehicle under test so that the vehicle under test performs a voice automation test operation based on the test request command. Since the test corpus is sent to the vehicle under test in the form of a command in the present invention, it is not affected by external environmental noise, and compared with the audio broadcast method, the accuracy of voice automation testing can be improved.

[0201] It should be noted that for the specific working process of each module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.

[0202] Optionally, based on the above-mentioned embodiment of a method and device for voice automation testing, another embodiment of the present invention provides an electronic device, including: a memory and a processor;

[0203] Wherein, the memory is used to store programs;

[0204] The processor calls the program and is used to execute the above-mentioned voice automation test method.

[0205] In this embodiment, the test corpus corresponding to the target test category is first determined, and then the test corpus is written into a specified position in the test request command template to obtain a test request command, and the test request command is sent to the vehicle under test so that the vehicle under test performs a voice automation test operation based on the test request command. Since the test corpus is sent to the vehicle under test in the form of a command in the present invention, it is not affected by external environmental noise, and compared with the audio broadcast method, the accuracy of voice automation testing can be improved.

[0206] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A voice automation testing method, characterized in that: include: Obtaining attribute information of the vehicle under test, and determining a test category corresponding to the attribute information; Selecting a target test category from the test categories; Determining the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category; Writing the test corpus into a specified position in a test request command template to obtain a test request command; The test request command is sent to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

2. The voice automation test method according to claim 1, characterized in that: Selecting a target test category from the test categories includes: Displaying the test category on a display interface; Obtain a target test type selected by a user from the test categories displayed on the display interface.

3. The voice automation test method according to claim 1, characterized in that: Determining the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category includes: Determine whether it is possible to connect to the network database through the network; If not, obtaining the test corpus in the target test case corresponding to the target test category from the local database; If so, based on the content in the test set in the target test category, the test corpus corresponding to the target test category is obtained through interaction with the network database.

4. The voice automation test method according to claim 3, characterized in that: Based on the content in the test set in the target test category, obtaining the test corpus corresponding to the target test category through interaction with the network database includes: Obtaining content in a test set in the target test category, and determining whether the content is a generalization test; If yes, then read the corpus data corresponding to the target test category from the network database, and combine the basic corpus in the target test category with the corpus data to obtain the test corpus in the target test case corresponding to the target test category; If not, the test corpus in the target test case corresponding to the target test category is obtained from the network database.

5. The voice automation test method according to claim 3, characterized in that: Acquiring the test corpus in the target test case corresponding to the target test category from the local database includes: Acquire a target test case corresponding to the target test category from a local database; Generate a test structure corresponding to the target test case; Get the test corpus in the test structure.

6. The voice automation test method according to claim 1, characterized in that: Also includes: A test report is generated based on the target test cases corresponding to the target test category and the test results.

7. The voice automation test method according to claim 1, characterized in that: Also includes: Determine the progress of the voice automation test and display the test status corresponding to the progress of the voice automation test.

8. A speech automation test device, characterized in that: include: A category determination module, used to obtain the attribute information of the vehicle under test and determine the test category corresponding to the attribute information; A category selection module, used to select a target test category from the test categories; A corpus determination module, configured to determine the test corpus corresponding to the target test category based on the network connection status and the content in the test set in the target test category; A command generation module, used for writing the test corpus into a specified position in a test request command template to obtain a test request command; The test output module is used to send the test request command to the vehicle machine under test, so that the vehicle machine under test performs a voice automation test operation based on the test request command to obtain a test result.

9. The speech automation test device according to claim 8, characterized in that: The category selection module is specifically used for: The test category is displayed on a display interface, and a target test type selected by a user from the test categories displayed on the display interface is obtained.

10. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor calls the program and is used to execute a voice automation testing method as described in any one of claims 1-7.