Test method, device, equipment, medium and product

The proposed method and system improve OS testing efficiency by enabling parallel testing across multiple OS instances within the SOC system, addressing the inefficiencies of sequential testing and OS interaction challenges through automated testing service components and socket-based communication.

CN119718936APending Publication Date: 2025-03-28FIBOCOM AUTO INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411834254.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Current OS testing methods are inefficient as they can only perform sequential testing on a single OS, unable to test multiple OS simultaneously, leading to low testing efficiency and inability to handle OS interactions effectively.

Method used

A method and system that utilize an automated testing service component within the SOC system to parse and distribute test cases across multiple OS instances, enabling parallel testing by creating socket clients to communicate between OS management servers and executing test cases in parallel, thereby improving testing efficiency.

Benefits of technology

This approach allows for simultaneous testing of multiple OS instances, enhancing testing efficiency and addressing the limitations of sequential testing, including handling OS interactions and reducing the need for individual USB connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718936A_ABST
    Figure CN119718936A_ABST
Patent Text Reader

Abstract

The invention discloses a test method, device and equipment, a medium and a product, and relates to the technical field of integrated chips, the method is applied to an SOC system, the SOC system comprises an automatic test service component and at least one operating system, and the method comprises the following steps: responding to a case set and an automatic test service instruction sent by an upper computer; notifying the automatic test service component to start a test task according to the automatic test service instruction; analyzing the use case set through the automatic test service component to obtain an analyzed use case, and distributing the analyzed use case to at least one corresponding operating system for execution to obtain test data; and sending the test data to the upper computer, and by integrating the automatic test service component in the SOC system, the upper computer does not need to send single cases one by one, so that the parallel test of at least one operating system is realized, and the test efficiency of the operating system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of integrated chip technology, and in particular to a testing method, device, equipment, medium and product. Background Art

[0002] OS (Operating System) testing is the key to ensuring the quality, performance, security and stability of operating system software. It involves a series of testing activities to find and fix errors in the operating system and verify whether the operating system meets the design requirements and user needs.

[0003] The OS testing process in the prior art mainly involves the host computer connecting to the SOC (System on Chip) system via USB and using adb commands to execute the corresponding use case script to complete a single use case test. This testing method can only perform sequential testing on a single OS and cannot test multiple OSes at the same time, resulting in low testing efficiency.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a testing method, device, equipment, medium and product, aiming to improve the testing efficiency of the operating system.

[0006] To achieve the above object, the present application provides a testing method, which is applied to a SOC system, wherein the SOC system includes an automated testing service component and at least one operating system, and the method includes: In response to receiving the use case set and the automated testing service instruction sent by the host computer, notifying the automated testing service component to start the test task according to the automated testing service instruction; Parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to at least one corresponding operating system for execution to obtain test data; The test data is sent to the host computer.

[0007] In one embodiment, the automated testing service component includes a test instruction tool and at least one test management server, the at least one operating system includes a first operating system, a second operating system, and a third operating system, and the step of notifying the automated testing service component to start a test task according to the automated testing service instruction includes: The test instruction tool creates a socket client according to the automated test service instruction; Notifying the at least one test management server to start a test task through the socket client; Among them, the at least one test management server includes a first test management server, a second test management server and a third test management server, the first test management server is integrated in the first operating system, the second test management server is integrated in the second operating system, and the third test management server is integrated in the third operating system.

[0008] In one embodiment, the step of parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to at least one corresponding operating system for execution includes: Performing identification resolution on the use case set by the first test management server to obtain resolved use cases; If the parsed use cases include a first use case corresponding to the first operating system, saving the first use case to a message queue corresponding to the first test management server so that the first operating system can execute the first use case; If the parsed use case includes a second use case corresponding to the second operating system, sending the second use case to the second operating system through the socket client, so that the second operating system executes the second use case; If the parsed use case includes a third use case corresponding to the third operating system, the third use case is sent to the third operating system through the socket client so that the third operating system executes the third use case.

[0009] In one embodiment, the step of the first operating system executing the first use case includes: The first operating system takes out the first use case from the message queue corresponding to the first test management server, parses the content of the first use case, and obtains the use case type, preconditions, execution script, and expected results; Create a file directory recording the execution process of the first use case; Calling the execution function to execute the precondition and the execution script, and saving the generated execution process record to the execution process record file directory; Identify whether the expected result is consistent with the execution process record; If the expected result is consistent with the execution process record, then the passing file is saved in the execution process record file directory; If the expected result is inconsistent with the execution process record, the failure file is saved in the execution process record file directory.

[0010] In one embodiment, the step of the second operating system executing the second use case includes: The second operating system takes out the second use case from the message queue corresponding to the second test management server, parses the content of the second use case, and obtains the use case type, preconditions, execution script, and expected results; If the precondition includes the identifier of the first operating system, a precondition instruction is sent to the first operating system through the socket client, so that the first operating system performs an interactive test with the second operating system according to the precondition instruction.

[0011] In one embodiment, the step of the first operating system performing an interactive test with the second operating system according to the precondition instruction includes: The first operating system identifies whether the precondition instruction is mutually exclusive with the current execution case; If the first operating system determines that the precondition instruction is mutually exclusive with the current execution case, the first operating system continues to execute the current case and sends a wait notification to the second operating system, and when the current case is completed, executes the precondition instruction, and sends the execution result of the precondition instruction to the second operating system; The second operating system executes the execution script according to the execution result to obtain the execution process record of the second use case, and saves the execution process record to the execution process record file directory of the second use case.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a testing device, which is applied to a SOC system, wherein the SOC system includes an automated testing service component and at least one operating system, and the device includes: A response module, configured to respond to receiving a use case set and an automated test service instruction sent by a host computer, and notify the automated test service component to start a test task according to the automated test service instruction; An execution module, used to parse the use case set through the automated testing service component to obtain parsed use cases, and distribute the parsed use cases to at least one corresponding operating system for execution to obtain test data; A sending module is used to send the test data to the host computer.

[0013] In addition, to achieve the above objectives, the present application also proposes a testing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the testing method described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test method described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the testing method described above are implemented.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: A testing method is applied to a SOC system, wherein the SOC system includes an automated testing service component and at least one operating system. The method includes: in response to receiving a use case set and an automated testing service instruction sent by a host computer, notifying the automated testing service component to start a test task according to the automated testing service instruction; parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to the corresponding at least one operating system for execution to obtain test data; sending the test data to the host computer. By integrating the automated testing service component in the SOC system, there is no need to send individual use cases one by one through the host computer, thereby achieving parallel testing of at least one operating system and improving the testing efficiency of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 It is a schematic diagram of the principle of the testing method in the prior art; Figure 2 A schematic diagram of a process flow provided for Example 1 of the test method of this application; Figure 3 It is a schematic diagram of the overall test process according to the first embodiment of the present application; Figure 4 A schematic diagram of the process provided for Example 2 of the testing method of this application; Figure 5 A schematic diagram of the process provided for Example 3 of the test method of this application; Figure 6 This is a schematic diagram of the module structure of the test device according to the embodiment of the present application; Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the test method in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of the embodiment of the present application is: applying the testing method to the SOC system, the SOC system includes an automated testing service component and at least one operating system, the method includes: in response to receiving a use case set and an automated testing service instruction sent by a host computer, notifying the automated testing service component to start a test task according to the automated testing service instruction; parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to the corresponding at least one operating system for execution to obtain test data; sending the test data to the host computer, and by integrating the automated testing service component in the SOC system, there is no need to send individual use cases one by one through the host computer, thereby achieving parallel testing of at least one operating system and improving the testing efficiency of the operating system.

[0024] In this embodiment, for the convenience of description, the following description is made with the test device as the execution subject.

[0025] Technical terms involved in the embodiments of this application: SOC (System on Chip) refers to a hardware device that integrates the functions of multiple electronic systems into a single chip. Therefore, SOC is a hardware concept, mainly including processors (such as MCU or CPU), memory (RAM, ROM, etc.), peripherals (such as ADC, GPIO, I / O controller) and other subsystems (such as graphics processing unit, wireless module, etc.), all of which are integrated on a single silicon chip.

[0026] Hypervisor, also known as virtual machine monitor (VMM), is software, firmware or hardware used to create and execute virtual machines.

[0027] Android: An operating system developed by Google, translated into Chinese as Android, commonly used in mobile phones, tablets, and car cockpit operating systems.

[0028] vSocket (virtual Socket interface): enables CS communication between different OS.

[0029] Reference Figure 1 , Figure 1 It is a schematic diagram of the principle of the test method in the prior art, such as Figure 1 As shown, the basic condition Android system starts three OS systems based on Hypervisor, among which the three OA systems include SOS, IVI and TBOX. SOS manages the UOS system as the main system, IVI is the UOS system responsible for the interaction of Android app UI, and TBOX is the UOS system responsible for providing network and making calls. In the existing test method, the host computer obtains the web-side test case and downloads the test case script to the local; the host computer parses the test case to generate a test case set; the host computer connects to the SOC system through USB and uses adb instructions to execute the corresponding test case script to complete a single test case test; the SOC system returns the test result to the host computer, the host computer parses the execution result and saves the log in the module; the host computer saves the log of the test steps; the host computer reports the test result to the Web for Web to synchronize UI display.

[0030] It can be seen that the existing testing scheme has the following defects: Defect 1: Only a single OS can be tested sequentially, and multiple OSes cannot be tested simultaneously, resulting in low testing efficiency; Defect 2: Unable to handle test cases of interaction between two OSs; Defect 3: Use cases involving disconnecting USB cannot be executed; Defect 4: The test executed by adb command has root privileges, and the test case is not rigorous enough; Defect 5: The test log is not fully captured. It involves OS interaction scenarios and cannot be saved together with other OS logs in the same period.

[0031] The present application proposes an automated testing solution for starting multiple OSs based on a hypervisor in a SOC system, which can solve the multi-OS interactive testing scenarios and test efficiency and stability in automated testing.

[0032] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a test device, etc. The following takes the test device as an example to illustrate this embodiment and the following embodiments.

[0033] Based on this, the present application embodiment provides a testing method, referring to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the testing method of the present application.

[0034] In this embodiment, the test method is applied to a SOC system, the SOC system includes an automated test service component and at least one operating system, and the test method includes steps S10 to S30: Step S10, in response to receiving the use case set and the automated testing service instruction sent by the host computer, notifying the automated testing service component to start the test task according to the automated testing service instruction; Exemplarily, before executing the test, SOC version integration is first performed in the embodiment of the present application. During the SOC version integration stage, the demo file is preset into the flash firmware, and the automated test case script issues are involved in the compilation of each OS firmware and stored in the read-only partition of each system; an automated test service component for executing the test is added, wherein the automated test service component includes a test instruction tool amttest and at least one test management server amtServer.

[0035] Exemplarily, the at least one operating system includes a first operating system (e.g., an SOS system), a second operating system (e.g., an IVI system), and a third operating system (e.g., a TBOX system), and the at least one test management server includes a first test management server, a second test management server, and a third test management server, the first test management server is integrated in the first operating system, the second test management server is integrated in the second operating system, and the third test management server is integrated in the third operating system.

[0036] For example, amttest is integrated in SOS and is responsible for passing instructions to amtServer, such as the execution environment, execution type, and test cases. amtServer needs to be integrated in SOS, IVI, and TBOX. SOS is responsible for executing test cases in SOS, distributing test cases to amtServer in TBOX and IVI, and reporting the execution results of each test case. IVI is responsible for executing test cases in IVI. TBOX is responsible for executing test cases in TBOX. AMTest.apk also needs to be integrated in IVI to be responsible for test cases of Android native interfaces, such as screen, camera, Bluetooth, wifi, bt, etc.

[0037] For example, after the automated test service component is added successfully, the selinux permission configuration of the automated test service and script files needs to be added. In the project source code, configure a separate selinuxtestdomain for the added service and executable file, and configure the complete permission configuration for the executable file, device node, app, socket, and attribute value in the domain. The reason for adding a separate domain is that the permissions required for the script files in the use case are different. It is more complicated to configure when adding scripts one by one. Unified configuration in a separate testdomain improves the efficiency of adding new scripts and the portability of different projects.

[0038] Exemplarily, the step of notifying the automated testing service component to start a test task according to the automated testing service instruction includes: The test instruction tool creates a socket client according to the automated test service instruction; The socket client notifies the at least one test management server to start a test task.

[0039] Exemplarily, in the SOC startup phase, after the SOS system is started, the amtServer (SOS) service is started and a vSocket server is created; after the IVI system is started, the amtServer (IVI) service is started and a vSocket client is created to connect to the amtServer (SOS); AMTest.apk is started and waits for instructions to start the test item; after the TBOX system is started, the amtServer (TBOX) service is started and a vSocket client is created to connect to the amtServer (SOS).

[0040] Step S20, parsing the use case set through the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to at least one corresponding operating system for execution to obtain test data; Furthermore, after informing the automated testing service component to start the test task according to the automated testing service instruction, the automated testing service component can parse the use case set to obtain parsed use cases, and distribute the parsed use cases to at least one corresponding operating system for execution to obtain test data.

[0041] For example, in the embodiment of the present application, the host computer obtains the web-side test case, downloads the test case script to the local computer, parses the test case to generate a test case set, connects the USB and UART of the SOC system to send the test case set to the SOS system, and sends the amtest command through adb. amtest creates a socket client and notifies amtServer to start the test task.

[0042] For example, amtServer (SOS) parses the use case entry. If it is an SOS use case, a testMessage object is created for the single use case and saved in the message queue (Messagequeue) of amtServer (SOS). If it is a TBOX or IVI, the use case is sent to the corresponding OS through vSocket and saved in the corresponding message queue. The execution process and results of the amtServer single use case in each OS will be output to the specified file, and a log file storage path will be created for each use case to save the OS system record (log) during the use case execution process.

[0043] Step S30, sending the test data to the host computer.

[0044] Furthermore, the use case set is parsed through the automated testing service component to obtain parsed use cases, and the parsed use cases are distributed to at least one corresponding operating system for execution. After the test data is obtained, the test data can be sent to the host computer.

[0045] Reference Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an overall test process according to the first embodiment of the present application. Figure 3 As shown in the figure, during the test, the host computer can obtain the test progress and test results through UART. After the test is completed, the host computer exports the execution process files and test log files in each OS through adb. The host computer saves the test log and reports the test results to the web end. After the test is completed, the host computer can shut down the startup of amtServer in each OS by sending amtest.

[0046] For example, in the embodiments of the present application, it is not necessary for a single instruction to be connected through a USB, and the use case scenarios that require disconnecting the USB do not require special processing by the host computer; the test cases execute execution logic that conforms to the actual business in each OS, and perform system permission checks as a criterion for judging the test results.

[0047] This embodiment adopts the above scheme, specifically by applying the test method to the SOC system, the SOC system includes an automated test service component and at least one operating system, the method includes: in response to receiving a use case set and an automated test service instruction sent by a host computer, notifying the automated test service component to start a test task according to the automated test service instruction; parsing the use case set by the automated test service component to obtain parsed use cases, and distributing the parsed use cases to the corresponding at least one operating system for execution to obtain test data; sending the test data to the host computer, and by integrating the automated test service component in the SOC system, there is no need to send individual use cases one by one through the host computer, thereby realizing parallel testing of at least one operating system and improving the testing efficiency of the operating system.

[0048] Based on the first embodiment of the present application, the second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later. Figure 4 , step S20 includes steps S201 to S204: Step S201: performing identification resolution on the use case set through the first test management server to obtain resolved use cases; Step S202: If the parsed use cases include a first use case corresponding to the first operating system, the first use case is saved to a message queue corresponding to the first test management server, so that the first operating system can execute the first use case; Step S203: If the parsed use case includes a second use case corresponding to the second operating system, the second use case is sent to the second operating system through the socket client, so that the second operating system executes the second use case; Step S204: If the parsed use case includes a third use case corresponding to the third operating system, the third use case is sent to the third operating system via the socket client so that the third operating system executes the third use case.

[0049] Exemplarily, the step of the first operating system executing the first use case includes: The first operating system takes out the first use case from the message queue corresponding to the first test management server, parses the content of the first use case, and obtains the use case type, preconditions, execution script, and expected results; Create a file directory recording the execution process of the first use case; Calling the execution function to execute the precondition and the execution script, and saving the generated execution process record to the execution process record file directory; Identify whether the expected result is consistent with the execution process record; If the expected result is consistent with the execution process record, then the passing file is saved in the execution process record file directory; If the expected result is inconsistent with the execution process record, the failure file is saved in the execution process record file directory.

[0050] For example, amtServer (SOS) parses the use case entry. If it is an SOS use case, it creates a testMessage object for the single use case and saves it to the message queue (Messagequeue) of amtServer (SOS). If it is TBOX or IVI, it sends the use case to the corresponding OS through vSocket and saves it to the corresponding message queue. After amtServer (SOS) parses the use case, it takes the use case out of the message queue for testing and sends the vSokcet command to amtServer in TBOX and IVI to start the test.

[0051] Exemplarily, the verification of the use case execution in SOS includes: amtServer parses the use case ID header as SOS, puts it into the execution queue, takes out a use case from the execution queue, parses the type, precondition, specific execution script, and expected result. Creates a log file directory for the execution process of the use case, with the same directory name as the use case ID. Calls the execution function (popen) to execute the precondition and script instructions and saves the process log to a file. Obtains the expected execution result and compares it with the use case. If they are consistent, saves a pass (PASS) file in the use case log directory. If they are inconsistent, saves a fail (Fail) file in the use case log directory.

[0052] This embodiment uses the above scheme, specifically, by performing identity resolution on the use case set through the first test management server to obtain resolved use cases; if the resolved use cases include the first use case corresponding to the first operating system, the first use case is saved to the message queue corresponding to the first test management server, so that the first operating system can execute the first use case; if the resolved use cases include the second use case corresponding to the second operating system, the second use case is sent to the second operating system through the socket client, so that the second operating system can execute the second use case; if the resolved use cases include the third use case corresponding to the third operating system, the third use case is sent to the third operating system through the socket client, so that the third operating system can execute the third use case. Each operating system can execute test cases in parallel through amtServer, thereby improving test efficiency and shortening the time of the entire automated test.

[0053] Based on any of the foregoing embodiments of the present application, a third embodiment of the present application is proposed. In the third embodiment of the present application, the same or similar contents as any of the foregoing embodiments can be referred to the above introduction and will not be described in detail later. Figure 5 The second operating system executes the second use case in steps S2031-S2032: Step S2031: the second operating system takes out the second use case from the message queue corresponding to the second test management server, parses the content of the second use case, and obtains the use case type, preconditions, execution script, and expected results; Step S2032: If the precondition includes the identifier of the first operating system, a precondition instruction is sent to the first operating system through the socket client, so that the first operating system performs an interactive test with the second operating system according to the precondition instruction.

[0054] Exemplarily, the step of the first operating system performing an interactive test with the second operating system according to the precondition instruction includes: The first operating system identifies whether the precondition instruction is mutually exclusive with the current execution case; If the first operating system determines that the precondition instruction is mutually exclusive with the current execution case, the first operating system continues to execute the current case and sends a wait notification to the second operating system, and when the current case is completed, executes the precondition instruction, and sends the execution result of the precondition instruction to the second operating system; The second operating system executes the execution script according to the execution result to obtain the execution process record of the second use case, and saves the execution process record to the execution process record file directory of the second use case.

[0055] For example, SOS is required to verify the precondition instruction in IVI. If the use case ID header is IVI, the parsed use case is put into the execution queue. Take a use case from the execution queue, parse out the type, precondition, specific execution script, expected result, and mutually exclusive use case. If the precondition contains the SOS header, it is sent to amtServer (SOS) through vSocket. After receiving the instruction, amtServer (SOS) creates a thread to encapsulate the instruction and put it into the queue. amtServer (SOS) determines whether the current SOS and the precondition to be executed are mutually exclusive. If they are mutually exclusive, the SOS use case will be executed first and amtServer (IVI) will be notified to wait. After SOS executes the use case, it executes the precondition of IVI and returns the result to amtServer (IVI). IVI continues to execute the script and saves the execution result.

[0056] Illustratively, in the embodiment of the present application, test verification can be performed in the three OSes at the same time: after the host computer sends the amtest command to start the test, a check is performed in the debugging serial port through the console of each OS, the log in each OS is checked, the execution status of the amtServer query is retrieved, the use case result directory specified in each OS is checked, and whether the execution result file of the use case contains all the process information is checked, and whether the result file of the executed use case is saved.

[0057] For example, if the test fails in TBOX, SOS and IVI need to save the log for verification. amtServer will create a fixed cache size to save the system log when executing the use case. A new secondary directory tbox will be created in the use case result directory in TBOX to save the system log information of TBOX OS. If a use case script is executed in amtServer (TBOX) and the result is judged as failure, amtServer (TBOX) will send the instruction to save the log to SOS and IVI through vSokcet. SOS and IVI will create directories with the same TBOX use case ID, and create secondary directories sos and ivi to save the system log information. After the test is completed, the upper computer will merge the log files of the same use case when exporting the log, and the logs of the three OSs of the failed use case will be obtained at the same time.

[0058] Through the above scheme, this embodiment specifically takes out the second use case from the message queue corresponding to the second test management server through the second operating system, parses the content of the second use case, and obtains the use case type, preconditions, execution script and expected results; if the preconditions contain the identifier of the first operating system, the precondition instructions are sent to the first operating system through the socket client, so that the first operating system performs interactive testing with the second operating system according to the precondition instructions. Each OS can execute the use case preconditions through amtServer communication, thereby solving the scenario of OS interaction during use case execution or preconditions in other OSes.

[0059] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the testing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0060] This application also provides a testing device, please refer to Figure 6 , the device is applied to a SOC system, the SOC system includes an automated testing service component and at least one operating system, and the testing device includes: A response module 10 is used to respond to receiving a use case set and an automated test service instruction sent by a host computer, and notify the automated test service component to start a test task according to the automated test service instruction; An execution module 20, configured to parse the use case set through the automated testing service component to obtain parsed use cases, and distribute the parsed use cases to at least one corresponding operating system for execution to obtain test data; The sending module 30 is used to send the test data to the host computer.

[0061] The test device provided by the present application adopts the test method in the above embodiment to solve the technical problem of the test. Compared with the prior art, the beneficial effects of the test device provided by the present application are the same as the beneficial effects of the test method provided by the above embodiment, and the other technical features in the test device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0062] The present application provides a testing device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the testing method in the above-mentioned embodiment one.

[0063] Reference below Figure 7 , which shows a schematic diagram of the structure of a test device suitable for implementing the embodiment of the present application. The test device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The test device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0064] like Figure 7As shown, the test equipment may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the test equipment are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the test device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a test device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0065] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0066] The test equipment provided by the present application adopts the test method in the above embodiment to solve the technical problem of the test. Compared with the prior art, the beneficial effects of the test equipment provided by the present application are the same as the beneficial effects of the test method provided by the above embodiment, and the other technical features in the test equipment are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0067] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0068] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0069] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the testing method in the above-mentioned embodiment.

[0070] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0071] The computer-readable storage medium may be included in the test device, or may exist independently without being assembled into the test device.

[0072] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the test device, the test device: responds to receiving a use case set and an automated test service instruction sent by a host computer, and notifies the automated test service component to start a test task according to the automated test service instruction; parses the use case set through the automated test service component to obtain parsed use cases, and distributes the parsed use cases to at least one corresponding operating system for execution to obtain test data; sends the test data to the host computer. By integrating the automated test service component in the SOC system, there is no need to send individual use cases one by one through the host computer, thereby realizing parallel testing of at least one operating system and improving the testing efficiency of the operating system.

[0073] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0074] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0075] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0076] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned test method, and can solve the technical problems of the test. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the test method provided in the above-mentioned embodiment, and will not be elaborated here.

[0077] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned testing method when executed by a processor.

[0078] The computer program product provided by the present application can solve the technical problem of testing. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the testing method provided by the above embodiment, which will not be described in detail here.

[0079] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A testing method, characterized in that: The method is applied to a SOC system, the SOC system including an automated testing service component and at least one operating system, and the method includes: In response to receiving the use case set and the automated testing service instruction sent by the host computer, notifying the automated testing service component to start the test task according to the automated testing service instruction; Parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to at least one corresponding operating system for execution to obtain test data; The test data is sent to the host computer.

2. The method according to claim 1, characterized in that The automated testing service component includes a test instruction tool and at least one test management server, the at least one operating system includes a first operating system, a second operating system, and a third operating system, and the step of notifying the automated testing service component to start a test task according to the automated testing service instruction includes: The test instruction tool creates a socket client according to the automated test service instruction; Notifying the at least one test management server to start a test task through the socket client; Among them, the at least one test management server includes a first test management server, a second test management server and a third test management server, the first test management server is integrated in the first operating system, the second test management server is integrated in the second operating system, and the third test management server is integrated in the third operating system.

3. The method according to claim 2, characterized in that The step of parsing the use case set by the automated testing service component to obtain parsed use cases, and distributing the parsed use cases to at least one corresponding operating system for execution includes: Performing identification resolution on the use case set by the first test management server to obtain resolved use cases; If the parsed use cases include a first use case corresponding to the first operating system, saving the first use case to a message queue corresponding to the first test management server so that the first operating system can execute the first use case; If the parsed use case includes a second use case corresponding to the second operating system, sending the second use case to the second operating system through the socket client, so that the second operating system executes the second use case; If the parsed use case includes a third use case corresponding to the third operating system, the third use case is sent to the third operating system through the socket client so that the third operating system executes the third use case.

4. The method according to claim 3, characterized in that The step of the first operating system executing the first use case includes: The first operating system takes out the first use case from the message queue corresponding to the first test management server, parses the content of the first use case, and obtains the use case type, preconditions, execution script, and expected results; Create a file directory recording the execution process of the first use case; Calling the execution function to execute the precondition and the execution script, and saving the generated execution process record to the execution process record file directory; Identify whether the expected result is consistent with the execution process record; If the expected result is consistent with the execution process record, then the passing file is saved in the execution process record file directory; If the expected result is inconsistent with the execution process record, the failure file is saved in the execution process record file directory.

5. The method according to claim 3, characterized in that The step of the second operating system executing the second use case includes: The second operating system takes out the second use case from the message queue corresponding to the second test management server, parses the content of the second use case, and obtains the use case type, preconditions, execution script, and expected results; If the precondition includes the identifier of the first operating system, a precondition instruction is sent to the first operating system through the socket client, so that the first operating system performs an interactive test with the second operating system according to the precondition instruction.

6. The method according to claim 5, characterized in that The step of the first operating system performing an interactive test with the second operating system according to the precondition instruction comprises: The first operating system identifies whether the precondition instruction is mutually exclusive with the current execution case; If the first operating system determines that the precondition instruction is mutually exclusive with the current execution case, the first operating system continues to execute the current case and sends a wait notification to the second operating system, and when the current case is completed, executes the precondition instruction, and sends the execution result of the precondition instruction to the second operating system; The second operating system executes the execution script according to the execution result to obtain the execution process record of the second use case, and saves the execution process record to the execution process record file directory of the second use case.

7. A testing device, characterized in that: The device is applied to a SOC system, the SOC system includes an automated testing service component and at least one operating system, and the device includes: A response module, configured to respond to receiving a use case set and an automated test service instruction sent by a host computer, and notify the automated test service component to start a test task according to the automated test service instruction; An execution module, used to parse the use case set through the automated testing service component to obtain parsed use cases, and distribute the parsed use cases to at least one corresponding operating system for execution to obtain test data; A sending module is used to send the test data to the host computer.

8. A testing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the testing method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the testing method according to any one of claims 1 to 6 are implemented.