File Transfer Test Method, System and Storage Medium
By establishing communication between the equipment to be tested and the test machine, using the barrier-free mode and user interface testing framework mechanism, a designated database is generated and file transfer progress and results are automatically detected, and the problems of large adaptation workload and inaccurate file loss detection caused by the device interface in the prior art are solved, and efficient and accurate file transfer detection is achieved.
Patent Information
- Application Number
- CN202210050999.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-01-17
AI Technical Summary
In the prior art, file transfer testing relies on the device user interface, resulting in a large adaptation workload and the inability to effectively detect file missing during file transfer.
By establishing communication between the equipment to be tested and the test machine, using the accessibility mode and user interface testing framework mechanism, a designated database is generated, the transmission progress and file size are obtained, and the file transfer results are automatically detected.
It realizes automated file transfer detection without manual intervention, improves detection efficiency and accuracy, and promptly detects file missing problems.
Smart Images

Figure CN114428732B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a file transfer test method, system, and storage medium. Background Art
[0002] Common automated test technologies mostly adopt user interface (UI) testing, that is, simulating manual clicks at the user interface level. This technology mostly relies on the device user interface. However, there are obvious differences in the UI between different devices. It takes a lot of manpower to traverse and adapt to all models, and with version iteration, the adaptation workload is large. Moreover, conventional file transfer testing determines whether the file transfer is successful based on whether the transferred file exists in the target folder at the receiving end. However, there is a phenomenon of file loss during the file transfer process, so the file transfer process cannot be effectively detected.
[0003] Therefore, it is necessary to provide a new type of file transfer test method, system, storage medium, and terminal to solve the above problems existing in the prior art. Summary of the Invention
[0004] The purpose of the present invention is to provide a file transfer test method, system, and storage medium, which can perform automated detection of file transfer for a device under test and effectively improve the detection efficiency.
[0005] In a first aspect, to achieve the above object, the file transfer test method of the present invention includes:
[0006] After establishing communication between the device under test and the test machine, select a test case set in the test machine as the target file to be transferred;
[0007] After enabling the accessibility mode on the device under test, after completing the transfer confirmation process through the user interface test framework mechanism or the accessibility mode, the test machine starts the transfer process of the target file;
[0008] During the transfer process of the target file, call a communication application in the system through a built-in test application to generate a specified database, and obtain the data name information in the specified database through the framework layer;
[0009] After returning the transfer path according to the data name information, obtain the transfer progress of the target file according to the data name information, and obtain the size of the received file in the device under test according to the transfer progress;
[0010] Determine the transfer result of the target file according to the size of the received file and the size of the target file.
[0011] The beneficial effects of the file transfer test method of the present invention are as follows: After establishing communication between the device under test and the test machine, select a test case set in the test machine as the target file to be transferred to perform file transfer detection on the device under test. At the same time, the device under test completes the startup of the target file transfer process through the accessibility mode and the user interface test framework mechanism. Then, call the communication application through the built-in test application to generate a specified database, and obtain the transfer path and transfer progress through the specified database, so as to determine the transfer result of the target file according to the size of the received file and the size of the target file after the transfer is completed. The entire test process is automated without manual intervention, and it can timely detect file missing problems during the file transfer process, improving the accuracy of file transfer detection.
[0012] Optionally, after completing the transfer confirmation process through the user interface test framework mechanism or the accessibility mode, it includes:
[0013] The test machine selects the target file to send to the device under test, and the device under test generates a prompt window;
[0014] After determining that the accessibility mode takes effect, the device under test automatically clicks the prompt window in the accessibility mode to complete the transfer confirmation process;
[0015] After determining that the accessibility mode is invalid, the device under test simulates clicking the prompt window through the user interface test framework mechanism to complete the transfer confirmation process.
[0016] Optionally, obtaining the transfer progress of the target file according to the data name information, and obtaining the size of the received file in the device under test according to the transfer progress, includes:
[0017] The built-in test application reads the data name information and obtains the transfer progress of the target file in real time;
[0018] After determining that the transfer progress does not reach the preset target, continue to observe the transfer progress until the transfer progress reaches the preset target;
[0019] After determining that the transfer progress reaches the preset target, obtain the size of the received file in the device under test.
[0020] Optionally, determining the transfer result of the target file according to the size of the received file and the size of the target file, includes:
[0021] When the size of the received file is the same as the size of the target file, determine that the target file is transferred successfully;
[0022] When the size of the received file is not the same as the size of the target file, determine that the transmission of the target file is abnormal and obtain the log information of the transmission process.
[0023] Optionally, communication is established between the device under test and the testing machine via Bluetooth or Wi-Fi.
[0024] Optionally, before selecting the target file to be transmitted in the testing machine, the method further includes:
[0025] Sending a control command to the device under test and the testing machine through a controller to control the device under test and the testing machine to execute the control command.
[0026] Optionally, the test case set includes several test files. Selecting the test case set as the target file to be transmitted in the testing machine includes:
[0027] Selecting each of the test files as the target file to be transmitted in the testing machine;
[0028] Determining the transmission result of the target file according to the size of the received file and the size of the target file includes:
[0029] Determining the transmission result of each test file according to the size of the test file and the size of the received file in the device under test;
[0030] After obtaining the transmission result of each test file, generating a test report.
[0031] In a second aspect, the present invention also discloses a file transmission test system, including:
[0032] A selection module, configured to select a test case set as the target file to be transmitted in the testing machine after communication is established between the device under test and the testing machine;
[0033] A start module, configured to start the transmission process of the target file in the testing machine after the device under test enables the accessibility mode and after the transmission confirmation process is completed through the user interface test framework mechanism or the accessibility mode;
[0034] An acquisition module, configured to generate a specified database by calling a communication application in the system through a built-in test application during the transmission process of the target file, and obtain the data name information in the specified database through the framework layer;
[0035] A detection module, configured to obtain the transmission progress of the target file according to the data name information after returning the transmission path according to the data name information, and obtain the size of the received file in the device under test according to the transmission progress;
[0036] A result generation module, configured to determine a transmission result of the target file according to the size of the received file and the size of the target file.
[0037] The beneficial effects of the file transmission test system of the present invention are as follows: after establishing communication between the device under test and the test machine, the selection module selects a test case set in the test machine as the target file to be transmitted to perform file transmission detection on the device under test. At the same time, the startup module completes the startup of the target file transmission process through the accessibility mode and the user interface test framework mechanism. After that, the acquisition module generates a specified database by calling the communication application through the built-in test application. The detection module obtains the transmission path and transmission progress through the specified database, so that after the transmission is completed, the result generation module determines the transmission result of the target file according to the size of the received file and the size of the target file. The entire test process is automated without manual intervention, and it can timely detect file missing problems during the file transmission process, improving the accuracy of file transmission detection.
[0038] Optionally, the file transmission test system further includes a control module, and the control module is configured to send a control command to the device under test and the test machine through a controller to control the device under test and the test machine to execute the control command.
[0039] In a third aspect, the present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flowchart of the file transmission test method according to an embodiment of the present invention;
[0041] Figure 2 It is a schematic diagram of the file transmission process between the device under test, the test machine and the PC end in the file transmission test method according to an embodiment of the present invention;
[0042] Figure 3 It is a schematic diagram of the communication principle between the PC end and the intelligent device in the file transmission test method according to an embodiment of the present invention;
[0043] Figure 4 It is a schematic diagram of the file transmission process of the file transmission test method according to an embodiment of the present invention;
[0044] Figure 5 It is a schematic diagram of the test process of the file transmission test method according to an embodiment of the present invention;
[0045] Figure 6 It is a structural block diagram of the file transmission test system according to an embodiment of the present invention. Detailed implementation mode
[0046] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meanings understood by those of ordinary skill in the art to which the present invention pertains. The words such as "including" used herein mean that the elements or items appearing before the word cover the elements or items listed after the word and their equivalents, without excluding other elements or items.
[0047] In view of the problems existing in the prior art, an embodiment of the present invention provides a file transfer test method, as Figure 1 shown, the method includes the following steps:
[0048] S101. Send a control command to the device under test and the test machine through a controller to control the device under test and the test machine to execute the control command.
[0049] Send a control command to the device under test and the test machine through a controller to facilitate the device under test and the test machine to execute the control command to complete the file transfer test process.
[0050] In some embodiments, communication is established between the device under test and the test machine through Bluetooth or wireless network.
[0051] In some embodiments, both the device under test and the test machine include electronic communication devices such as smart phones and smart tablets. The device under test and the test machine communicate through a Bluetooth protocol based on OPP (Object Push Profile), an object storage specification, or a Wi-Fi protocol based on wireless communication technology (Wireless Fidelity) to complete the file transfer process.
[0052] Specifically, refer to Figure 2, the testing machine uses an Auxiliary Under Test (AUT). File transfer between the Device Under Test (DUT) and the auxiliary device is carried out via the Bluetooth protocol or the WIFI protocol. The file transfer formats include file formats such as MP3, MP4, JPG, PNG, TXT, WORD, PDF, EXCEL, APK... The controller uses a main control PC (personal computer). The main control PC establishes communication connections with the DUT and the AUT via Bluetooth or WIFI respectively to transmit control commands.
[0053] In some embodiments, the communication process between the controller and the DUT refers to Figure 3 , select the PC side as the controller, select the smart device side as the DUT or the testing machine. The PC side includes a first port, an automated execution script, and a PC listening process (Adb server). The smart device side includes a second port, a mobile phone listening process (APK--Framework), and an Adbd daemon process. The PC side listens to the first port through the PC listening process Adb server, and the PC side is connected to the first port through an intermediate interface socket, so as to facilitate sending control commands to the PC listening process through the first port. After the PC listening process receives the control commands sent from the first port, since the mobile phone listening process of the DUT is communicatively connected to the PC listening process Adb server through a USB data cable, after the Adbd daemon process obtains the control commands, since the mobile phone listening process APK--Framework is also connected to the second port through the intermediate interface socket, the Adbd daemon process sends the obtained commands to the mobile phone listening process APK--Framework through the second port, thus completing the transmission process of the control commands. Subsequently, it is convenient for the smart device side to complete the test process of file transfer as the DUT or the testing machine.
[0054] Furthermore, when the DUT and the testing machine obtain corresponding test results after the test, the DUT or the testing machine returns the test results to the Adbd daemon process, and the Adbd daemon process sends the test results to the PC listening process Adb server. Subsequently, the automated execution script on the PC side obtains the test results from the PC listening process Adb server through the first port, so as to facilitate the PC side to obtain accurate test results in a timely manner.
[0055] S102. After the DUT and the testing machine establish communication, select a test case set in the testing machine as the target file to be transmitted.
[0056] In some embodiments, when the test case set includes several test files, each of the test files is separately selected in the test machine as the target file to be transmitted, so as to facilitate the completion of the test process for the entire test case set.
[0057] Specifically, referring to Figure 4 , after the device under test and the test machine establish communication, after the test machine locates the target file according to the location of the selected target file, clicks to share the file, finds the device information of the device under test in the scan list, and selects the corresponding device under test, then the device under test observes whether it receives a file reception prompt window. If it does not receive it, it means that the file transmission fails this time. If it receives the prompt, proceed to the next step.
[0058] S103. After the accessibility mode is enabled on the device under test and the transmission confirmation process is completed through the user interface test framework mechanism or the accessibility mode, the test machine starts the transmission process of the target file.
[0059] In some embodiments, after the transmission confirmation process is completed through the user interface test framework mechanism or the accessibility mode, it includes:
[0060] The test machine selects the target file to be sent to the device under test, and the device under test generates a prompt window;
[0061] After determining that the accessibility mode takes effect, the device under test automatically clicks the prompt window in the accessibility mode to complete the transmission confirmation process;
[0062] After determining that the accessibility mode is invalid, the device under test simulates clicking the prompt window through the user interface test framework mechanism to complete the transmission confirmation process.
[0063] When the test machine selects the target file to send to the device under test and the device under test generates a prompt window, when the accessibility mode takes effect, the device under test automatically clicks the popped-up prompt window in the accessibility mode to complete the transmission confirmation process; when the accessibility mode does not take effect, the device under test simulates clicking the prompt window through the User InterfaceAutomator mechanism of the user interface test framework to complete the transmission confirmation process, so as to ensure that it can handle the prompt pop-up windows during the file transmission of different devices. Through the accessibility mode and the user interface test framework mechanism, it can be effectively applied to the file transmission of different devices without the need for interface operations, improving the processing efficiency.
[0064] Specifically, continue to refer to Figure 4, after the accessibility mode of the device under test is enabled, if the accessibility mode takes effect, the prompt window will be automatically clicked; if the accessibility mode does not take effect, the prompt window cannot be automatically clicked, and the built-in user interface test framework mechanism in the Android system is used to simulate a human click, so that the click process of the prompt window can be completed to start the file transfer process.
[0065] S104. During the transmission process of the target file, the built-in test application is used to call the communication application in the system to generate a specified database, and the data name information in the specified database is obtained through the framework layer.
[0066] Specifically, refer to Figure 4 , after the click process of the prompt window is completed to start the file transfer, the test machine continuously sends the target file to the device under test. During the transmission process, the device under test calls the communication application inside the system through the built-in test application, and the called communication application generates a specified database. At the same time, the framework layer of the built-in test application obtains the corresponding data name information Data_id in the specified database through the name address content_url. The data name information Data_id includes the file transfer path and the file transfer progress, so as to directly obtain the file transfer path and the file transfer progress subsequently.
[0067] Among them, the communication application includes any one of the Bluetooth application and the WIFI application.
[0068] S105. After returning the transmission path according to the data name information, obtain the transmission progress of the target file according to the data name information, and obtain the size of the received file in the device under test according to the transmission progress.
[0069] Among them, during the process of returning the transmission path according to the data name information, refer to Figure 4 , after the device under test obtains the file transfer path, return the storage path of the currently received file. If the currently returned transmission path is empty, it means that the reception of the target file fails; otherwise, it means that the file is being received.
[0070] In some embodiments, obtaining the transmission progress of the target file according to the data name information and obtaining the size of the received file in the device under test according to the transmission progress include:
[0071] The built-in test application reads the data name information and obtains the transmission progress of the target file in real time;
[0072] After determining that the transmission progress has not reached the preset target, continue to observe the transmission progress until the transmission progress reaches the preset target;
[0073] After determining that the transmission progress reaches the preset target, obtain the size of the received file in the device under test.
[0074] Specifically, refer to Figure 4 , after obtaining the data name information Data_id, the built-in test application in the device under test reads the data name information Data_id through the framework layer Framework to obtain the file transmission progress in real time, and determines whether the file transmission progress reaches 100%. If so, directly obtain the size of the received file in the device under test; if the file transmission progress does not reach 100%, continue to observe the transmission progress until the file transmission progress reaches 100%.
[0075] S106. Determine the transmission result of the target file according to the size of the received file and the size of the target file.
[0076] In some embodiments, the above process includes:
[0077] When the size of the received file is the same as the size of the target file, determine that the target file is successfully transmitted;
[0078] When the size of the received file is different from the size of the target file, determine that the target file transmission is abnormal, and obtain the log information of the transmission process.
[0079] Specifically, after the file transmission progress reaches 100%, refer to Figure 4 , the built-in test application of the device under test reads the data name information Data_id through the framework layer Framework to obtain the size of the received file, and compares it with the size of the target file. If the two sizes are the same, it means that the target file is successfully transmitted. If the sizes are different, it means that the target file transmission is abnormal. Then the device under test captures the log information of this transmission process for subsequent reporting.
[0080] In some other embodiments, when the test case set includes several test files, each of the test files is separately selected as the target file to be transmitted in the test machine. During the process of file transmission with each test file as the target file, determine the transmission result of each test file according to the size of the test file and the size of the received file in the device under test, so as to complete the test process of the entire test case set. And after obtaining the transmission result of each test file, generate a test report.
[0081] Specifically, refer to Figure 5After the PC side sends a control command to the intelligent device, the device under test and the test machine execute the control command. The test machine automatically transfers the test files in the test case set to the device under test in batches. At the same time, after the device under test and the test machine execute the control command, the test results are returned to the PC side, and the PC side performs a consistency comparison on the test results. If the test results show that the file transfer process is successful this time, the transfer results of this time are collected. If the test results show that the file transfer process is abnormal this time, the log information during this transfer process is collected, and the test results are collected.
[0082] After the test results of all test files are collected, the entire test case set is judged to determine whether all the test files in the test case set have completed the file transfer test process. If all the test files in the test case set have been executed, a test report is generated and the entire test ends. If there are test files in the test case set that have not been executed, the test machine and the device under test continue to execute the file transfer test on the test files that have not performed the file transfer test until the execution ends and a test report is generated, thus completing the automated monitoring of the file transfer process.
[0083] The present invention also provides a file transfer test system, refer to Figure 6 , including:
[0084] A selection module 601, configured to select a test case set in the test machine as the target file to be transferred after establishing communication between the device under test and the test machine;
[0085] A start module 602, configured to start the transfer process of the target file by the test machine after the device under test enables the accessibility mode and completes the transfer confirmation process through the user interface test framework mechanism or the accessibility mode;
[0086] An acquisition module 603, configured to generate a specified database by calling a communication application in the system through a built-in test application during the transfer process of the target file, and obtain data name information in the specified database through the framework layer;
[0087] A detection module 604, configured to obtain the transfer progress of the target file according to the data name information after returning the transfer path according to the data name information, and obtain the size of the received file in the device under test according to the transfer progress;
[0088] A result generation module 605, configured to determine the transfer result of the target file according to the size of the received file and the size of the target file.
[0089] In some embodiments, the system further includes a control module 606, which is configured to send control commands to the device under test and the testing machine through a controller, so as to control the device under test and the testing machine to execute the control commands.
[0090] It should be noted that the structure and principle of the above file transfer test system correspond to the steps in the above file transfer test method one by one, so they will not be elaborated here.
[0091] It should be noted that it should be understood that the division of each module of the above device is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the selection module can be a separately established processing element, or can be integrated in a certain chip of the above system. In addition, it can also be stored in the memory of the above system in the form of program code, and called and executed by a certain processing element of the above system to perform the functions of the above modules. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or can be independently implemented. Here, the processing element can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element in hardware or the instruction in software form.
[0092] For example, the above modules can be one or more integrated circuits configured to implement the above method, such as: one or more Application Specific Integrated Circuits (ASICs), or, one or more Digital Signal Processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
[0093] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the above method.
[0094] A computer program is stored on the storage medium of the present invention, and when the computer program is executed by a processor, the above-mentioned method is implemented. The storage medium includes various media that can store program codes, such as read-only memory (ROM), random access memory (RAM), magnetic disks, USB flash drives, memory cards, or optical discs.
[0095] In another embodiment disclosed by the present invention, the present invention further provides a chip system. The chip system is coupled to a memory and is used to read and execute program instructions stored in the memory to perform the steps of the above-mentioned method.
[0096] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0097] In each embodiment of the embodiments of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0098] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes various media that can store program codes, such as flash memory, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical discs.
[0099] As described above, this is only the specific implementation manner of the embodiments of the present application. However, the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
[0100] Although the embodiments of the present invention have been described in detail above, it is obvious to those skilled in the art that various modifications and changes can be made to these embodiments. However, it should be understood that such modifications and changes are all within the scope and spirit of the present invention described in the claims. Moreover, the present invention described herein may have other embodiments and can be implemented or realized in various ways.
Claims
1. A file transfer test method, characterized in that, The method includes: After establishing communication between the device under test and the test machine, select a test case set in the test machine as the target file to be transmitted; After enabling the accessibility mode on the device under test, after completing the transmission confirmation process through the user interface test framework mechanism or the accessibility mode, the test machine starts the transmission process of the target file, including: the test machine selects the target file to send to the device under test, and the device under test generates a prompt window; after determining that the accessibility mode takes effect, the device under test automatically clicks the prompt window in the accessibility mode to complete the transmission confirmation process; after determining that the accessibility mode is invalid, the device under test simulates clicking the prompt window through the user interface test framework mechanism to complete the transmission confirmation process; During the transmission process of the target file, an internal test application is used to call a communication application in the system to generate a specified database, and the data name information in the specified database is obtained through the framework layer; the data name information includes the file transmission path and the file transmission progress; After returning the transmission path according to the data name information, obtain the transmission progress of the target file according to the data name information, and obtain the size of the received file in the device under test according to the transmission progress; Determine the transmission result of the target file according to the size of the received file and the size of the target file.
2. The file transfer test method according to claim 1, wherein Obtaining the transmission progress of the target file according to the data name information, and obtaining the size of the received file in the device under test according to the transmission progress, includes: The internal test application reads the data name information to obtain the transmission progress of the target file in real time; After determining that the transmission progress does not reach the preset target, continue to observe the transmission progress until the transmission progress reaches the preset target; After determining that the transmission progress reaches the preset target, obtain the size of the received file in the device under test.
3. The file transfer test method according to claim 1, wherein Determining the transmission result of the target file according to the size of the received file and the size of the target file, includes: When the size of the received file is the same as the size of the target file, determine that the target file is transmitted successfully; When the size of the received file is different from the size of the target file, determine that the transmission of the target file is abnormal, and obtain the log information of the transmission process.
4. The file transfer test method according to claim 1, wherein Communication is established between the device under test and the test machine through Bluetooth or wireless network.
5. The file transfer test method according to claim 3, characterized in that Before selecting the target file to be transmitted in the test machine, the method further includes: Sending a control command to the device under test and the test machine through a controller to control the device under test and the test machine to execute the control command.
6. The file transfer test method according to claim 5, wherein The test case set includes several test files. Selecting the test case set in the test machine as the target file to be transmitted includes: Selecting each of the test files in the test machine as the target file to be transmitted; Determining the transmission result of the target file according to the size of the received file and the size of the target file, includes: Determine the transmission result of each of the test files according to the size of the test files and the size of the received files received in the device under test. After obtaining the transmission result of each of the test files, generate a test report.
7. A file transfer test system, characterized in that, Including: A selection module, configured to select a test case set in the test machine as the target file to be transmitted after establishing communication between the device under test and the test machine. A start module, configured to, after the device under test enables the accessibility mode, after completing the transmission confirmation process through the user interface test framework mechanism or the accessibility mode, the test machine starts the transmission process of the target file, including: the test machine selects the target file to send to the device under test, and the device under test generates a prompt window; after determining that the accessibility mode takes effect, the device under test automatically clicks the prompt window in the accessibility mode to complete the transmission confirmation process; after determining that the accessibility mode is invalid, the device under test simulates clicking the prompt window through the user interface test framework mechanism to complete the transmission confirmation process. An acquisition module, configured to, during the transmission process of the target file, generate a specified database by calling a communication application in the system through a built-in test application, and obtain data name information in the specified database through a framework layer; the data name information includes a file transmission path and a file transmission progress. A detection module, configured to, after returning a transmission path according to the data name information, obtain the transmission progress of the target file according to the data name information, and obtain the size of the received file in the device under test according to the transmission progress. A result generation module, configured to determine the transmission result of the target file according to the size of the received file and the size of the target file.
8. The file transfer test system according to claim 7, wherein, Further including a control module, which is configured to send a control command to the device under test and the test machine through a controller to control the device under test and the test machine to execute the control command.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
A method and device for achieving software automatic testing
CN102662828A
Software barrier-free automatic test system and test method thereof
CN113238951A