Test method of camera response time, electronic device and storage medium

CN123020769APending Publication Date: 2026-10-30江西天珑通讯科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611023328.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]然而,上述无侵入式测试方法依赖机械臂和高清相机,存在动作延迟与识别误差,且缺乏日志分析能力,导致测试精准度与测试效率较低;而侵入式测试方法对应用代码存在强依赖,适配不同版本或第三方相机应用时需重复开发,通用性极差

Benefits of technology

[0016]本申请的有益效果是:本申请提供一种相机响应时间的测试方法、电子设备与存储介质,通过根据待测试相机应用的类型确定对应的测试方法,并限定类型包括第一相机应用与第二相机应用,以及限定测试方法包括第一测试方法与第二测试方法,能够针对不同类型相机应用采用差异化的测试方法。通过基于确定的测试方法对相应类型的待测试相机应用进行响应时间测试,能够使测试流程与相机应用类型自动匹配,无需人工干预或重复开发,从而提升测试效率。进一步地,针对第一相机应用采用自动化操作配合日志分析,能够消除动作延迟与识别误差,以及从源头上提升测试结果的精准性;针对第二相机应用采用自动化操作配合打点标记,能够实现高精度时间戳采集,从而兼顾不同类型应用的测试精准度需求。本申请通过构建两套差异化测试方法进行协同互补,能够同时兼顾测试精准度、场景通用性与测试效率,从而实现精准且高效的相机响应时间测试。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020769A_ABST
    Figure CN123020769A_ABST
Patent Text Reader

Abstract

The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates to the technical field of camera testing. The application discloses a camera response time testing method, an electronic device and a storage medium, and relates
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated camera testing technology, and in particular to a method for testing camera response time, an electronic device, and a storage medium. Background Technology

[0002] With the increasing power of mobile device cameras, camera response time has become a core metric for evaluating the user's photography experience. Accurate and efficient camera response time testing is crucial for optimizing camera performance and improving user experience.

[0003] In related technologies, camera response time testing methods mainly include non-intrusive and invasive methods. Non-intrusive methods do not require modification of application code; they use a robotic arm to simulate manual user operations (such as pressing the shutter button or swiping to switch interfaces) and employ a high-definition camera to capture operation feedback points on the phone screen to test camera response time. Intrusive methods, on the other hand, embed dot markers in the application code to collect timestamp data at various performance points, achieving more precise response time testing.

[0004] However, the aforementioned non-intrusive testing methods rely on robotic arms and high-definition cameras, which suffer from motion delays and recognition errors, and lack log analysis capabilities, resulting in low testing accuracy and efficiency. Intrusive testing methods, on the other hand, have a strong dependency on application code, requiring repeated development when adapting to different versions or third-party camera applications, resulting in extremely poor versatility. Summary of the Invention

[0005] The main technical problem addressed by this application is to provide a method, electronic device, and storage medium for testing camera response time, which can solve the problem that related technologies are difficult to implement accurately and efficiently for testing camera response time.

[0006] To address the aforementioned technical problems, the first technical solution adopted in this application is to provide a method for testing camera response time, comprising: determining a corresponding test method based on the type of camera application to be tested; wherein the type includes a first camera application and a second camera application; the test method includes a first test method based on automated operation combined with log analysis for testing the first camera application, and a second test method based on automated operation combined with dot marking for testing the second camera application; and performing response time testing on the corresponding type of camera application to be tested based on the determined test method.

[0007] The steps for testing the response time of a camera application of a certain type based on a defined testing method include: If the camera application under test is a first camera application, perform automated testing on the first camera application based on a preset first test script, and synchronously collect logs to calculate the response time corresponding to each test operation based on the log timestamps; if the camera application under test is a second camera application, perform automated testing on the second camera application based on a preset second test script, and synchronously trigger the markers added within the second camera application to calculate the response time corresponding to each test operation based on the marker timestamps.

[0008] The steps of automating the testing of the first camera application based on a preset first test script and synchronously collecting logs to calculate the response time for each test operation based on the log timestamps include: controlling the first camera application to execute multiple corresponding test operations through the first test script and controlling the first camera application to synchronously collect logs corresponding to the automated testing process; after the test is completed, selecting the key event timestamps corresponding to each test operation from the logs to calculate the response time for each test operation based on the key event timestamps.

[0009] The steps before determining the corresponding test method based on the type of camera application to be tested include: deploying an automated testing framework and log analysis tools; generating a first test script based on the automated testing framework; and controlling the first camera application to execute multiple corresponding test operations through the first test script, and controlling the first camera application to synchronously collect logs corresponding to the automated testing process. These steps include: calling the automated testing framework through the first test script to control the first camera application to execute multiple corresponding test operations through the automated testing framework, and controlling the first camera application to synchronously collect logs corresponding to the automated testing process through the automated testing framework.

[0010] The step of filtering out the key event timestamps corresponding to each test operation from the logs after the test is completed, and calculating the response time of each test operation based on the key event timestamps, includes: after the test is completed, pulling the logs to the local machine, filtering out the start and end timestamps corresponding to each test operation from the logs using a log analysis tool; and calculating the response time of each test operation based on the corresponding start and end timestamps.

[0011] The steps of automating the testing of the second camera application based on a preset second test script and synchronously triggering the dot markers added within the second camera application to calculate the response time for each test operation based on the dot timestamps include: controlling the second camera application to execute multiple corresponding test operations through the second test script and controlling the second camera application to synchronously collect logs corresponding to the automated testing process; synchronously triggering the corresponding dot markers within the second camera application during the execution of each test operation to automatically obtain the dot timestamps corresponding to the test operations from the logs based on the dot markers; and calculating the response time for each test operation based on the corresponding dot timestamps after the test is completed.

[0012] The steps include: when executing each test operation, synchronously triggering the corresponding dot marker within the second camera application to automatically obtain the corresponding test operation's timestamp from the log based on the dot marker; and after the test is completed, calculating the response time for each test operation based on the corresponding timestamp, which includes: sorting the collected timestamps and calculating the corresponding response time based on the start and end timestamps for each test operation.

[0013] Before determining the corresponding test method based on the type of camera application to be tested, the steps include: adding dot markers corresponding to each test operation in the second camera application.

[0014] To solve the above-mentioned technical problems, the second technical solution adopted in this application is to provide an electronic device, including: a memory for storing program data, wherein when the program data is executed, the steps in the camera response time testing method described above are implemented; and a processor for executing the program data stored in the memory to implement the steps in the camera response time testing method described above.

[0015] To solve the above-mentioned technical problems, the third technical solution adopted in this application is to provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the camera response time testing method as described in any of the above claims.

[0016] The beneficial effects of this application are as follows: This application provides a camera response time testing method, electronic device, and storage medium. By determining the corresponding testing method based on the type of camera application under test, and limiting the types to include a first camera application and a second camera application, and limiting the testing methods to include a first testing method and a second testing method, differentiated testing methods can be adopted for different types of camera applications. By performing response time testing on the corresponding type of camera application under test based on the determined testing method, the testing process can be automatically matched with the camera application type, without manual intervention or repeated development, thereby improving testing efficiency. Furthermore, for the first camera application, the use of automated operation combined with log analysis can eliminate action delay and recognition error, and improve the accuracy of test results from the source; for the second camera application, the use of automated operation combined with point marking can achieve high-precision timestamp collection, thereby taking into account the testing accuracy requirements of different types of applications. This application, by constructing two sets of differentiated testing methods for synergy and complementarity, can simultaneously take into account testing accuracy, scenario universality, and testing efficiency, thereby achieving accurate and efficient camera response time testing. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the first embodiment of the camera response time testing method of this application; Figure 2 This is a flowchart illustrating the second embodiment of the camera response time testing method of this application; Figure 3 This is a flowchart illustrating the third embodiment of the camera response time testing method of this application; Figure 4 This is a flowchart of the application scenario for the test method of camera response time in this application; Figure 5 This is a schematic diagram of the structure of one embodiment of the electronic device of this application; Figure 6 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless otherwise clearly indicated above. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.

[0021] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0022] It should be understood that the terms "comprising," "including," or any other variations used herein are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0023] In related technologies, camera response time testing methods mainly include non-intrusive and invasive methods. Non-intrusive methods do not require modification of application code; they use a robotic arm to simulate manual user operations (such as pressing the shutter button or swiping to switch interfaces) and employ a high-definition camera to capture operation feedback points on the phone screen to test camera response time. Intrusive methods, on the other hand, embed dot markers in the application code to collect timestamp data at various performance points, achieving more precise response time testing.

[0024] However, while the aforementioned non-intrusive automated testing solutions do not require modification of application code, they lack system-level log analysis capabilities and cannot obtain log data at the hardware and system service levels, making it difficult to pinpoint deep performance bottlenecks. Furthermore, the robotic arms and high-definition cameras they rely on are not only costly to deploy, but also suffer from decreased test accuracy due to robotic arm movement delays and image recognition errors. Intrusive testing methods, while improving test accuracy, are heavily dependent on application code. Adapting to different versions or third-party camera applications requires repeated development of logging code, resulting in extremely poor versatility and an inability to support large-scale testing and continuous integration requirements.

[0025] Based on the above, this application provides a method, electronic device, and storage medium for testing camera response time, which can solve the problem that related technologies are difficult to implement accurate and efficient camera response time testing.

[0026] Specifically, please refer to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the camera response time testing method of this application. In this embodiment, the camera response time testing method includes: S11: Determine the corresponding test method based on the type of camera application to be tested; wherein, the type includes a first camera application and a second camera application; the test method includes a first test method based on automated operation and log analysis for testing the first camera application, and a second test method based on automated operation and dot marking for testing the second camera application.

[0027] In this embodiment, the camera application to be tested refers to the camera application that needs to be tested for response time.

[0028] In this embodiment, the first camera application refers to a third-party camera application without source code, whose application code cannot be modified. The second camera application refers to a self-developed camera application with source code, whose application code can be modified.

[0029] In this embodiment, the first testing method is a non-intrusive testing method based on automated operation and log analysis. It controls the camera application to perform core operations through automated scripts and records system logs synchronously. The response time is calculated by analyzing the key event timestamps in the logs.

[0030] In this embodiment, the second testing method is an intrusive testing method based on automated operation and dot marking. By adding dot markings to the core performance nodes of the camera application, core operations are triggered by automated scripts and the timestamp data of the dot markings are collected in real time to calculate the response time of each core operation.

[0031] The core operations include camera startup (or camera service initialization), preview startup (or preview stream startup), shutter exposure, and image saving.

[0032] In this embodiment, automated operation refers to simulating user operations using pure software automation scripts.

[0033] In some implementations, automated operation can autonomously complete the procedures for triggering core camera operations, collecting test data, and performing automated analysis, thereby achieving unattended testing.

[0034] Understandably, replacing manual operation with automated operation or simulation operation using robotic arms and high-definition cameras can eliminate human reaction delays, timing deviations, robotic arm movement delays, and image recognition errors, thereby improving testing accuracy.

[0035] In this embodiment, log analysis refers to analyzing system-level logs and filtering out key event timestamps in the camera response process in order to locate system-level performance bottlenecks.

[0036] In some implementations, the system-level log is called the Trace log, which is a system-level operation record file generated by the device system. It contains accurate timestamp information of key links such as hardware modules, application processes, and system services, and is the core basis for locating performance bottlenecks.

[0037] Among them, the dot markers refer to performance markers embedded in the camera application code, which are used to record the start and end timestamps of multiple core performance nodes of the camera.

[0038] Among them, the core performance node is the node corresponding to the core operation.

[0039] Understandably, the first testing method is suitable for non-intrusive testing of third-party camera applications and system-level bottleneck localization, without requiring access to the application source code, and has stronger adaptability.

[0040] Understandably, the second testing method is suitable for large-scale batch testing of self-developed camera applications and continuous processes in the R&D process, with higher accuracy and adaptability to rapid iteration requirements.

[0041] Understandably, by determining the corresponding testing method based on the type of camera application being tested, differentiated testing methods can be adopted for different camera applications to achieve comprehensive coverage of different types of camera applications, thereby balancing test accuracy and scenario universality.

[0042] S12: Based on the determined testing method, perform response time testing on the corresponding type of camera application to be tested.

[0043] In this embodiment, response time testing refers to measuring the time required for the camera to complete core operations such as taking a picture and saving it from startup, including the time consumed by each stage such as camera startup time, preview startup time, shutter response time, and image saving time.

[0044] In this embodiment, for the first camera application (a third-party camera application), a first testing method based on automated operation and log analysis is adopted. This method enables automated testing without obtaining the application's source code, eliminating not only human reaction delays and timing deviations but also avoiding additional errors caused by robotic arm movement delays and image recognition errors. Furthermore, because it also possesses system-level log analysis capabilities, it can pinpoint system-level performance bottlenecks, thereby improving the accuracy of test results from the root cause.

[0045] In this embodiment, for the second camera application (self-developed camera application), a second testing method based on automated operation and dot marking is adopted. By adding dot markings to the core performance nodes, high-precision timestamp acquisition can be achieved.

[0046] Furthermore, since neither the first nor the second testing method requires the purchase, debugging, or maintenance of expensive hardware such as robotic arms and high-definition cameras, hardware costs can be reduced at the source. Moreover, because both methods are automated, repetitive work by testing personnel can be reduced, resulting in savings in both labor and hardware costs.

[0047] Unlike related technologies, this implementation determines the corresponding test method based on the type of camera application under test, limiting the types to include a first camera application and a second camera application, and limiting the test methods to include a first test method and a second test method. This allows for differentiated test methods to be used for different types of camera applications. By performing response time tests on the corresponding types of camera applications under test based on the determined test methods, the test process can be automatically matched with the camera application type, eliminating the need for manual intervention or repetitive development, thereby improving test efficiency. Furthermore, for the first camera application, automated operation combined with log analysis can eliminate action delays and recognition errors, and improve the accuracy of test results from the source; for the second camera application, automated operation combined with point marking can achieve high-precision timestamp collection, thus taking into account the test accuracy requirements of different types of applications. This application constructs two sets of differentiated test methods for synergistic complementarity, which can simultaneously take into account test accuracy, scenario universality, and test efficiency, thereby achieving accurate and efficient camera response time testing.

[0048] Please see Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the camera response time testing method of this application. In this embodiment, the camera response time testing method includes: S21: Determine the corresponding test method according to the type of camera application to be tested; wherein, the type includes a first camera application and a second camera application; the test method includes a first test method based on automated operation and log analysis for testing the first camera application, and a second test method based on automated operation and dot marking for testing the second camera application.

[0049] Please refer to the description in S11 for the specific process, which will not be repeated here.

[0050] S22: In response to the fact that the camera application to be tested is the first camera application, perform automated testing on the first camera application based on the preset first test script, and collect logs synchronously to calculate the response time corresponding to each test operation based on the log timestamp.

[0051] In this embodiment, the first test script refers to an automated test script preset for the first camera application (a third-party camera application), which is used to control the first camera application to perform test operations and synchronously control the recording of logs.

[0052] Among them, the test operation refers to the core operation in the camera response time test, including operations such as camera startup, preview startup, shutter exposure, and image saving.

[0053] In this embodiment, synchronous log collection refers to starting system log recording simultaneously while performing automated testing operations, so as to ensure that log recording and testing operations are synchronized in time.

[0054] In this embodiment, the log timestamp refers to the time stamp recorded in the system log when each event (i.e., operation) occurs. By filtering the start and end timestamps of key events, the response time of each stage can be calculated.

[0055] Among these, key events are also known as core operations.

[0056] In some implementations, key events include camera application startup completion, first frame rendering of the preview stream, shutter triggering, and image saving completion.

[0057] Understandably, using purely automated software scripts to replace manual operation and the simulation method of robotic arms and high-definition cameras can completely eliminate human reaction delays and timing deviations, as well as avoid additional errors caused by robotic arm movement delays and image recognition errors. Furthermore, by synchronously collecting logs and calculating response times based on log timestamps, accurate time data can be obtained at the system level. This data can then be used to pinpoint system-level performance bottlenecks, fundamentally improving the reliability and accuracy of test results. This allows for non-intrusive and precise testing of the response time of third-party camera applications.

[0058] S23: In response to the fact that the camera application under test is a second camera application, perform automated testing on the second camera application based on the preset second test script, and synchronously trigger the dot markers added in the second camera application to calculate the response time corresponding to each test operation based on the marker timestamp.

[0059] In this embodiment, the second test script refers to the pre-set automated test script for the second camera application (self-developed camera application), which is used to control the second camera application to perform test operations and to monitor and collect the timestamp data of the dotted marks in real time.

[0060] Among them, the test operation refers to the core operation in the camera response time test, including operations such as camera startup, preview startup, shutter exposure, and image saving.

[0061] In this embodiment, the dot markers refer to performance markers embedded in the second camera application code.

[0062] In some implementations, the dot markings include markers for multiple nodes such as the start and end of camera service initialization, the start and first frame callback of preview stream startup, shutter exposure triggering, image capture completion, image encoding start and end, and image saving to storage medium completion.

[0063] In this embodiment, synchronously triggering the markers added in the second camera application means that when each test operation is performed, the preset markers in the application code of the second camera application are triggered synchronously, so that the markers automatically record the start and end timestamps corresponding to the operation.

[0064] In this embodiment, the timestamp refers to the time stamp automatically recorded by dot marking, including the start and end timestamps corresponding to each test operation, which can be directly used to calculate the response time.

[0065] Understandably, by adding markers to core performance nodes such as camera service initialization, preview stream startup, shutter exposure, and image saving, and synchronously triggering the corresponding markers when each test operation is performed, the start and end markers for each test operation can be automatically obtained without having to sift through massive logs. This can achieve high-precision timestamp collection while significantly improving data processing efficiency, thereby enabling invasive, high-precision testing of the response time of self-developed camera applications.

[0066] Unlike related technologies, this implementation method determines the corresponding testing method based on the type of camera application under test. This allows for differentiated testing methods for different applications, achieving comprehensive coverage of various camera application types while balancing test accuracy and scenario versatility. Furthermore, when the camera application under test is a first-type camera application, automated testing via a first test script, along with synchronous log collection and response time calculation based on log timestamps, eliminates various errors caused by manual and robotic arm operations. It also obtains accurate time data at the system level and pinpoints system-level performance bottlenecks based on this data, fundamentally improving the reliability and accuracy of test results. This enables non-intrusive and precise testing of the response time of third-party camera applications. When the camera application under test is a second-type camera application, automated testing via a second test script, along with synchronous triggering of markers, automatically acquires the start and end markers for each test operation. This eliminates the need to sift through massive amounts of logs, significantly improving data processing efficiency and achieving high-precision timestamp collection. This enables invasive and high-precision testing of the response time of self-developed camera applications.

[0067] Please see Figure 3 , Figure 3 This is a flowchart illustrating a third embodiment of the camera response time testing method of this application. In this embodiment, the camera response time testing method includes: S31: Determine the corresponding test method according to the type of camera application to be tested; wherein, the type includes a first camera application and a second camera application; the test method includes a first test method based on automated operation and log analysis for testing the first camera application, and a second test method based on automated operation and dot marking for testing the second camera application.

[0068] Please refer to the description in S11 for the specific process, which will not be repeated here.

[0069] S32: In response to the camera application under test being the first camera application, the first camera application is controlled to perform multiple corresponding test operations through the first test script, and the first camera application is controlled to synchronously collect logs corresponding to the automated test process.

[0070] In this embodiment, before determining the corresponding test method based on the type of camera application to be tested, it is necessary to deploy an automated testing framework and log analysis tools to build a testing and analysis environment for the first camera application.

[0071] In this embodiment, the first test script calls the automated test framework to control the first camera application to perform multiple corresponding test operations, and the automated test framework controls the first camera application to synchronously collect logs corresponding to the automated test process.

[0072] Among them, the automated testing framework refers to a software framework used to simulate user operations, which can automatically execute core operations such as camera startup, preview, shutter, and saving.

[0073] In some implementations, automated testing frameworks include testing frameworks such as Appium or UiAutomator2.

[0074] Log analysis tools refer to tools used to analyze system logs, which can filter key event timestamps and calculate the response time of each stage.

[0075] In some implementations, log analysis tools include trace log analysis tools such as Perfetto and Trace Viewer.

[0076] S33: After the test is completed, filter out the key event timestamps corresponding to each test operation from the log, and calculate the response time corresponding to each test operation based on the key event timestamps.

[0077] In this embodiment, the key event timestamp corresponding to each test operation refers to the start timestamp and end timestamp corresponding to each test operation.

[0078] The start timestamp refers to the time stamp corresponding to the start time of each test operation, and the end timestamp refers to the time stamp corresponding to the completion time of each test operation.

[0079] In this implementation, after the test is completed, the logs are pulled to the local machine, and the start and end timestamps corresponding to each test operation are extracted from the logs using a log analysis tool. Then, based on the corresponding start and end timestamps, the response time for each test operation is calculated.

[0080] In this context, "local" refers to the computer on which the first test script is running.

[0081] Pulling logs to local storage refers to pulling the logs recorded in the first camera application (device side) to the computer running the first test script.

[0082] The response time for each test operation can be determined by calculating the difference between the start and end timestamps.

[0083] In some implementations, a standardized test report containing core test data can be automatically generated after the test is completed.

[0084] Understandably, generating test reports can provide intuitive and reliable quantitative data for optimizing the performance of the first camera application, making it easier for users to quickly understand the test results and performance bottlenecks of the first camera application, thereby enabling them to quickly locate and resolve performance issues.

[0085] S34: In response to the camera application under test being a second camera application, control the second camera application to execute multiple corresponding test operations through the second test script, and control the second camera application to synchronously collect logs corresponding to the automated test process.

[0086] In this embodiment, before determining the corresponding test method based on the type of camera application to be tested, it is necessary to add a dot marker corresponding to each test operation in the second camera application.

[0087] In some implementations, it is necessary to pre-develop custom code based on the second camera application, and add markers to core performance nodes such as camera service initialization, preview stream startup, shutter exposure, and image saving, and configure data output channels (such as Logcat or a custom interface) to output the timestamp data of each marker. Then, based on the custom code, a fully automated script (i.e., the second test script) is developed to realize the automatic installation, startup, core operation triggering, and real-time monitoring and collection of timestamp data of each marker for the self-developed camera application.

[0088] S35: When performing each test operation, the corresponding dot marker in the second camera application is triggered synchronously to automatically obtain the mark timestamp corresponding to the test operation from the log based on the dot marker.

[0089] In this embodiment, the timestamp refers to the timestamp data obtained by dot marking, including the start mark and the end mark.

[0090] In this embodiment, when each test operation is performed, the corresponding dot marker in the second camera application is triggered synchronously, and the start marker and end marker corresponding to the test operation are automatically obtained from the log based on the dot marker.

[0091] The start marker stamp refers to the time stamp that automatically records the start time of each test operation through dot marking.

[0092] Among them, the end marker stamp refers to the time stamp of each test operation completed automatically by marking dots.

[0093] Understandably, by monitoring the data output channel in real time through the second test script, the dot markers are triggered synchronously when the test operation is executed, and the start and end markers corresponding to each test operation are automatically collected, eliminating the need to filter from massive logs later.

[0094] S36: After the test is completed, calculate the response time for each test operation based on the corresponding timestamp.

[0095] In this embodiment, after the test is completed, the collected multiple timestamps are sorted, and the corresponding response time is calculated based on the start and end timestamps of each test operation.

[0096] The sorting of the collected timestamps refers to arranging the collected timestamps in chronological order to correctly match the start and end timestamps of each test operation.

[0097] The response time for each test operation can be determined by calculating the difference between the start and end markers.

[0098] In some implementations, the second testing method also supports parallel testing across multiple devices.

[0099] Understandably, by supporting parallel testing on multiple devices, it is possible to support large-scale batch testing, thereby significantly shortening the testing cycle and thus greatly improving testing efficiency.

[0100] In some implementations, the second test script and data processing module can also be embedded in the R&D continuous integration pipeline.

[0101] Understandably, by embedding the second test script and the data processing module into the R&D continuous integration pipeline, tests can be automatically triggered after the configuration code is committed, thereby achieving a seamless connection between automated testing and the development process.

[0102] In some implementations, a test report can be automatically generated and pushed to the R&D platform after the test is completed, so that R&D personnel can understand the test results in a timely manner.

[0103] Understandably, generating test reports can provide intuitive and reliable quantitative data for performance optimization of second camera applications, making it easier for users to quickly understand the test results and performance bottlenecks of second camera applications, which is conducive to quickly locating and solving performance problems, thereby meeting the needs of rapid iteration.

[0104] Unlike related technologies, this implementation method determines the corresponding testing method based on the type of camera application being tested. This allows for differentiated testing methods for different applications, achieving comprehensive coverage of various camera application types while maintaining both testing accuracy and scenario versatility. Furthermore, a non-intrusive testing method is used for the first camera application (a third-party application). Through purely automated software operation combined with system log analysis, various human and mechanical errors are eliminated, fundamentally improving the reliability and accuracy of test results. This enables non-intrusive and accurate testing of the response time of third-party camera applications. An intrusive testing method is used for the second camera application (a self-developed application). Start and end timestamps are automatically obtained through in-application tagging, eliminating the need to sift through massive amounts of logs. This significantly improves data processing efficiency and achieves high-precision timestamp collection, enabling intrusive and high-precision testing of the response time of self-developed camera applications. Furthermore, by combining the second test script with automated data processing modules and continuous integration links, high-precision, high-efficiency, and scalable batch testing can be achieved, meeting the needs of rapid iteration.

[0105] Please see Figure 4 , Figure 4 This is a flowchart illustrating the application scenario of the test method for camera response time in this application.

[0106] In this embodiment, the corresponding testing method is determined based on the type of camera application to be tested. The types include a first camera application and a second camera application. The testing methods include a first testing method based on automated operation and log analysis for testing the first camera application, and a second testing method based on automated operation and point marking for testing the second camera application. Responding to the camera application under test being the first camera application, a first test script controls the first camera application to execute multiple corresponding test operations and synchronously collects logs corresponding to the automated testing process. Then, after the test is completed, the key event timestamps corresponding to each test operation are filtered from the logs to calculate the response time for each test operation based on the key event timestamps. Responding to the camera application under test being the second camera application, a second test script controls the second camera application to execute multiple corresponding test operations and synchronously collects logs corresponding to the automated testing process. Then, during the execution of each test operation, corresponding point marking within the second camera application is synchronously triggered to automatically obtain the corresponding mark timestamp from the logs based on the mark timestamp. Finally, after the test is completed, the response time for each test operation is calculated based on the corresponding mark timestamp.

[0107] Unlike related technologies, this application constructs two sets of differentiated testing methods to complement each other, which can simultaneously take into account testing accuracy, scenario universality and testing efficiency, thereby achieving accurate and efficient camera response time testing.

[0108] Correspondingly, this application provides an electronic device.

[0109] Please see Figure 5 , Figure 5 This is a schematic diagram of one embodiment of the electronic device of this application. For example... Figure 5 As shown, in this embodiment, the electronic device 50 includes a memory 51 and a processor 52.

[0110] In this embodiment, memory 51 is used to store program data, which, when executed, implements the steps in the camera response time testing method described above. Processor 52 is used to execute the program instructions stored in memory 51 to implement the steps in the camera response time testing method described above.

[0111] Specifically, processor 52 controls itself and memory 51 to implement the steps in the camera response time testing method described above. Processor 52 can also be called a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 52 can be implemented using multiple integrated circuit chips.

[0112] Unlike related technologies, this embodiment uses processor 52 to determine the corresponding test method based on the type of the camera application under test, limiting the types to include a first camera application and a second camera application, and limiting the test methods to include a first test method and a second test method. This allows for differentiated test methods to be used for different types of camera applications. By performing response time tests on the corresponding types of camera applications under test based on the determined test methods, the test process can be automatically matched with the camera application type, eliminating the need for manual intervention or repetitive development, thereby improving test efficiency. Furthermore, for the first camera application, automated operation combined with log analysis can eliminate action delays and recognition errors, and improve the accuracy of test results from the source; for the second camera application, automated operation combined with point marking can achieve high-precision timestamp collection, thus taking into account the test accuracy requirements of different types of applications. This application constructs two sets of differentiated test methods for synergistic complementarity, which can simultaneously take into account test accuracy, scenario universality, and test efficiency, thereby achieving accurate and efficient camera response time testing.

[0113] Correspondingly, this application provides a computer-readable storage medium.

[0114] Please see Figure 6 , Figure 6 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention.

[0115] The computer-readable storage medium 60 includes a computer program 601 stored on it. When executed by the aforementioned processor, the computer program 601 implements the steps in the camera response time testing method described above. Specifically, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium 60. Based on this understanding, the technical solution of this 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. This computer software product is stored in a computer-readable storage medium 60 and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned computer-readable storage medium 60 includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0120] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for testing camera response time, characterized in that, include: The corresponding test method is determined according to the type of camera application to be tested; wherein, the type includes a first camera application and a second camera application; the test method includes a first test method for testing the first camera application based on automated operation and log analysis, and a second test method for testing the second camera application based on automated operation and dot marking. Based on the determined testing method, the response time of the corresponding type of camera application under test is tested.

2. The test method according to claim 1, characterized in that, The step of performing response time testing on the corresponding type of camera application under test based on the determined test method includes: In response to the fact that the camera application to be tested is the first camera application, the first camera application is automatically tested based on a preset first test script, and logs are collected synchronously to calculate the response time corresponding to each test operation based on the log timestamp. In response to the fact that the camera application to be tested is the second camera application, the second camera application is automatically tested based on a preset second test script, and the dot markers added in the second camera application are triggered synchronously to calculate the response time corresponding to each test operation based on the marker timestamp.

3. The test method according to claim 2, characterized in that, The step of automating the testing of the first camera application based on a preset first test script and synchronously collecting logs to calculate the response time for each test operation based on the log timestamps includes: The first test script controls the first camera application to execute multiple corresponding test operations and controls the first camera application to synchronously collect the logs corresponding to the automated test process. After the test is completed, the key event timestamps corresponding to each test operation are filtered out from the log, and the response time corresponding to each test operation is calculated based on the key event timestamps.

4. The test method according to claim 3, characterized in that, Before the step of determining the corresponding test method based on the type of camera application to be tested, the following steps are included: Deploy automated testing frameworks and log analysis tools; The first test script is generated based on the automated testing framework; The step of controlling the first camera application to execute multiple corresponding test operations through the first test script, and controlling the first camera application to synchronously collect the logs corresponding to the automated test process, includes: The first test script calls the automated testing framework to control the first camera application to perform multiple corresponding test operations, and the automated testing framework controls the first camera application to synchronously collect the logs corresponding to the automated testing process.

5. The test method according to claim 4, characterized in that, The step of filtering out key event timestamps corresponding to each test operation from the log after the test is completed, and calculating the response time corresponding to each test operation based on the key event timestamps, includes: After the test is completed, the logs are pulled to the local machine, and the start and end timestamps corresponding to each test operation are filtered out from the logs using the log analysis tool. Based on the corresponding start timestamp and end timestamp, the response time corresponding to each test operation is calculated.

6. The test method according to claim 2, characterized in that, The step of automating the testing of the second camera application based on a preset second test script, and synchronously triggering the added markers within the second camera application to calculate the response time for each test operation based on the marker timestamps, includes: The second test script controls the second camera application to execute multiple corresponding test operations and controls the second camera application to synchronously collect the logs corresponding to the automated test process. When each test operation is executed, the corresponding dot marker in the second camera application is triggered synchronously, so as to automatically obtain the corresponding mark timestamp of the test operation from the log based on the dot marker; After the test is completed, the response time for each test operation is calculated based on the corresponding timestamp.

7. The test method according to claim 6, characterized in that, The step of synchronously triggering the corresponding dot marker within the second camera application during the execution of each test operation, so as to automatically obtain the corresponding marker timestamp of the test operation from the log based on the dot marker, includes: Based on the dot markings, the corresponding start and end markers for the test operation are automatically obtained from the log. The step of calculating the response time for each test operation based on the corresponding timestamp after the test is completed includes: The collected timestamps are sorted, and the corresponding response time is calculated based on the start and end timestamps for each test operation.

8. The test method according to claim 7, characterized in that, Before the step of determining the corresponding test method based on the type of camera application to be tested, the following steps are included: Add the dot marker corresponding to each of the test operations in the second camera application.

9. An electronic device, characterized in that, include: A memory for storing program data, which, when executed, implements the steps in the camera response time testing method as described in any one of claims 1 to 8; A processor for executing the program data stored in the memory to implement the steps in the camera response time testing method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the camera response time testing method as described in any one of claims 1 to 8.