Test record generation method and device and electronic equipment

By automatically recording and uploading video files of the target device in the test application, and using pattern recognition technology to identify key video clips and generate test records, the problem of missing key steps during the test process is solved, and testing efficiency and enterprise stability are improved.

CN119537197APending Publication Date: 2025-02-28吉林亿联银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311083677.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-25
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When testing an application, due to the tester's personal subjective opinions, the test process lacks test records of key steps, which leads to problems with the application, making it difficult to locate the cause of the problem based on the test record.

Method used

When the target device receives the recording request for the target test case, it checks the target device according to the recording start rule, records the display screen of the target device, stops recording when the end recording condition is detected, generates an initial video file, and uses pattern recognition technology to identify key video clips in the video file to generate a test record of the target test case.

Benefits of technology

It realizes automatic recording and uploading of video files for target devices to execute target test cases, avoiding the lack of key information in test records caused by manual recording and uploading, improving the work efficiency of testers, and reducing information interference in non-business operation processes by removing redundant data in video files, improving enterprise stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537197A_ABST
    Figure CN119537197A_ABST
Patent Text Reader

Abstract

The invention discloses a test record generation method and device and electronic device.The method is applied to the financial science and technology field or other fields and comprises the steps that when a recording request of a target test case is received, target equipment is checked according to a recording starting rule, and a checking result is obtained; recording a display screen connected with the target equipment under the condition that the inspection is passed; when it is detected that the target device meets the recording ending condition, recording of the display screen is stopped, and an initial video file is obtained; identifying a video clip containing the test object in the initial video file to obtain a target video file; and generating a test record of the target test case according to the target video file. Through the application, the problem that the reason of the problem is difficult to locate according to the test record when the application has the problem due to the lack of the test record of the key step in the test process due to the personal subjective opinion of the tester when the application is tested in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology or other fields, and specifically, to a method, device and electronic device for generating test records. Background Art

[0002] At present, when testers execute test cases, they generally take screenshots of the execution steps of the test cases during the execution process to record the test process, and then save the screenshots as test records locally and upload them to the test management platform of the testers. For test cases that have passed the execution, traditional test management platforms require testers to submit the test records of the test cases by manually uploading attachments. For example, in the management interface of the test case that has passed the execution, the execution status of the test case is updated to "passed", and the test record attachment of the test case is uploaded. For test cases that have not passed the execution, in addition to requiring testers to manually upload the test records of the test case, traditional test management platforms also require testers to create new defect information and upload the test records of the test case again. For example, in the management interface of the test case that has not passed the execution, the execution status of the test case is updated to "failed", and defect information is added in the defect management module, and then the test records of the test case are uploaded.

[0003] However, due to the subjective opinions of testers or differences in understanding, the test records of the test cases uploaded by the testers may be missing screenshots of key steps, making it impossible to trace the actual situation of the test phase when production problems occur in the test object, which in turn requires testers or developers to spend more time locating problems, reducing the work efficiency of testers. In addition, since testers need to upload test records multiple times when the test case execution fails, testers have to perform repetitive work, reducing their work efficiency.

[0004] In view of the problem in related technologies that when testing applications, due to the personal subjective opinions of testers, the test process lacks test records of key steps, resulting in difficulty in locating the cause of the problem based on the test records when problems occur in the application, no effective solution has been proposed yet. Summary of the invention

[0005] The main purpose of the present application is to provide a method, device and electronic device for generating a test record, so as to solve the problem in the related art that when testing an application, due to the personal subjective opinions of the tester, the test process lacks test records of key steps, resulting in difficulty in locating the cause of the problem based on the test record when a problem occurs in the application.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for generating a test record is provided, the method comprising: when a target device receives a recording request for a target test case, checking the target device according to a recording start rule to obtain an inspection result, wherein the target test case is used to test a test object; when the inspection result is that the inspection passes, recording a display screen connected to the target device; when it is detected that the target device meets a condition for ending recording, stopping recording the display screen to obtain an initial video file; identifying a video clip containing the test object in the initial video file by pattern recognition technology to obtain a target video file; and generating a test record of the target test case based on the target video file.

[0007] Furthermore, the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain a target video file, including: determining the video clip in which the test object appears in the initial video file by a target detection model to obtain a first video clip, wherein the target detection model is used to detect whether the test object exists in image data or video data; obtaining the moment when the test object changes in the first video clip by an intelligent recognition algorithm to obtain a target moment; and determining the target video file in the first video clip based on the target moment.

[0008] Furthermore, before inspecting the target device according to the recording start rule and obtaining the inspection result, the method includes: determining the environmental configuration information of the target business system tested by the target test case to obtain preset configuration information; determining the trigger condition for recording the test process of the target test case according to the target test case to obtain the recording start condition; determining the recording start rule according to the preset configuration information and the recording start condition.

[0009] Furthermore, the target device is checked according to the recording start rule, and the inspection result obtained includes: acquiring the business system related to the target test case to obtain business system information; judging whether the business system information belongs to the preset configuration information; if the business system information belongs to the preset configuration information, connecting the target business system according to the preset configuration information; if the target device is successfully connected to the target business system, checking the target device through the pattern recognition technology and the recording start condition to obtain the inspection result.

[0010] Furthermore, the target device is inspected by means of the pattern recognition technology and the recording start condition, and the inspection result obtained includes: identifying the test data contained in the target test case by means of the pattern recognition technology to obtain the target test data; checking whether the preset database corresponding to the target business system contains the target test data; and when the preset database contains the target test data, determining that the inspection result is inspection passed.

[0011] Furthermore, after checking the target device according to the recording start rules and obtaining the inspection result, the method also includes: when the inspection result is that the inspection fails, generating an error prompt information based on the target device and the recording start rules; sending the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0012] Furthermore, before recording the display screen connected to the target device, the method also includes: configuring the pause recording condition, the continue recording condition and the end recording condition of the target device according to the target test case; after recording the display screen connected to the target device, the method also includes: after detecting that the target device meets the pause recording condition, pausing the recording of the display screen; after detecting that the target device meets the continue recording condition, continuing the recording of the display screen.

[0013] Furthermore, after generating a test record of the target test case based on the target video file, the method also includes: determining a test result of the target test case based on the test record of the target test case; generating defect information of the test object when the test result is inconsistent with a preset result indicated by the target test case; and uploading the defect information to a test management platform, wherein the test management platform is used to process the defect information.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a test record generation device is provided, which includes: an inspection unit, which is used to inspect the target device according to a recording start rule when the target device receives a recording request for a target test case, and obtain an inspection result, wherein the target test case is used to test a test object; a first control unit, which is used to record a display screen connected to the target device when the inspection result is that the inspection passes; a second control unit, which is used to stop recording the display screen when it is detected that the target device meets a recording end condition, and obtain an initial video file; an identification unit, which is used to identify the video clip containing the test object in the initial video file through pattern recognition technology, and obtain a target video file; a first generation unit, which is used to generate a test record of the target test case based on the target video file.

[0015] Furthermore, the recognition unit includes: a first determination subunit, used to determine the video segment in which the test object appears in the initial video file through a target detection model to obtain a first video segment, wherein the target detection model is used to detect whether the test object exists in image data or video data; an acquisition subunit, used to acquire the moment when the test object changes in the first video segment through an intelligent recognition algorithm to obtain a target moment; and a second determination subunit, used to determine the target video file in the first video segment based on the target moment.

[0016] Furthermore, the device includes: an inspection subunit, which is used to determine the environmental configuration information of the target business system tested by the target test case before inspecting the target device according to the recording start rule and obtaining the inspection result, and obtain the preset configuration information; a third determination subunit, which is used to determine the trigger condition for recording the test process of the target test case according to the target test case, and obtain the recording start condition; and a fourth determination subunit, which is used to determine the recording start rule based on the preset configuration information and the recording start condition.

[0017] Furthermore, the inspection subunit includes: an acquisition module, used to acquire the business system related to the target test case and obtain business system information; a judgment module, used to judge whether the business system information belongs to the preset configuration information; a processing module, used to connect the target business system according to the preset configuration information when the business system information belongs to the preset configuration information; an inspection module, used to inspect the target device through the pattern recognition technology and the recording start condition to obtain the inspection result when the target device is successfully connected to the target business system.

[0018] Furthermore, the inspection module includes: an identification submodule, which is used to identify the test data contained in the target test case through pattern recognition technology to obtain target test data; an inspection submodule, which is used to check whether the preset database corresponding to the target business system contains the target test data; and a determination submodule, which is used to determine that the inspection result is passed when the preset database contains the target test data.

[0019] Furthermore, the device also includes: a second generating unit, which is used to check the target device according to the recording start rule, and after obtaining the inspection result, when the inspection result is that the inspection fails, generate an error prompt information based on the target device and the recording start rule; a sending unit, which is used to send the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0020] Furthermore, the device also includes: a configuration unit, which is used to configure the pause recording condition, the continue recording condition and the end recording condition of the target device according to the target test case before recording the display screen connected to the target device; the device also includes: a third control unit, which is used to pause the recording of the display screen after detecting that the target device meets the pause recording condition after recording the display screen connected to the target device; and continue the recording of the display screen after detecting that the target device meets the continue recording condition.

[0021] Furthermore, the device also includes: a determination unit, which is used to determine the test result of the target test case based on the test record of the target test case after generating the test record of the target test case based on the target video file; a third generation unit, which is used to generate defect information of the test object when the test result is inconsistent with the preset result indicated by the target test case; and a processing unit, which is used to upload the defect information to a test management platform, wherein the test management platform is used to process the defect information.

[0022] In order to achieve the above-mentioned purpose, according to one aspect of the present application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned methods for generating test records.

[0023] Through the present application, the following steps are adopted: when the target device receives a recording request for a target test case, the target device is checked according to the recording start rule to obtain an inspection result, wherein the target test case is used to test the test object; when the inspection result is that the inspection is passed, the display screen connected to the target device is recorded; when it is detected that the target device meets the end recording condition, the recording of the display screen is stopped to obtain an initial video file; the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain a target video file; and a test record of the target test case is generated according to the target video file, which solves the problem in the related art that when testing an application, due to the personal subjective opinions of the tester, the test record of the key steps of the test process is missing, resulting in difficulty in locating the cause of the problem based on the test record when a problem occurs in the application. By configuring the recording start rules and end recording conditions, the function of automatically recording and uploading the video file of the target device executing the target test case is realized, avoiding the problem of test records lacking key information and reducing the work efficiency of testers due to manual recording and uploading of test records. At the same time, pattern recognition technology is used to remove redundant data in video files, reducing information interference from non-business operation processes during the test process, thereby improving the work efficiency of testers and further improving the stability of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 is a flowchart of a method for generating a test record according to Embodiment 1 of the present application;

[0026] Figure 2 is a schematic diagram of an optional test record generation method provided according to Embodiment 1 of the present application;

[0027] Figure 3 is a schematic diagram of a test record generation device provided in Embodiment 2 of the present application;

[0028] Figure 4 This is a schematic diagram of an electronic device for generating test records provided in Example 5 of the present application. DETAILED DESCRIPTION

[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] It should be noted that the methods and devices determined by the processing methods, devices, processors and electronic devices of the present application documents can be used in the field of financial technology when testers execute test cases, thereby improving the work efficiency of testers. They can also be used in any field other than the field of financial technology. The application fields of the methods and devices determined by the processing methods, devices, processors and electronic devices of the present application documents are not limited.

[0031] It should be noted that the user information (including but not limited to user device information, user personal information, user information used in test cases, user information contained in any database, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, tested data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a method for generating a test record according to the first embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0036] Step S101, when a target device receives a recording request for a target test case, the target device is checked according to a recording start rule to obtain a check result, wherein the target test case is used to test a test object.

[0037] In the first embodiment, the target device is a device that executes the above-mentioned target test case, such as a computer, a laptop, a desktop computer, a mobile device, a smart mobile device, a tablet, etc. The target test case refers to a specific test step for testing a test object in the target device. The test object refers to an object to be tested, such as a web management system, an application, software, an Android application, an input box or a chart in an application, etc.

[0038] It should be noted that the test record generation method of the present solution can be applied to the test management platform, which allows testers to pre-configure recording start rules to decide when to start the recording function. The recording start rule refers to the triggering condition for the target device to record the test process of the target test case. Specifically, the recording start rule can be that the target device receives a specific URL request, or the target device detects that a specific page is loaded, or the target device detects that a preset user role logs in to the business system being tested, or a pre-set time is reached. When the target device meets the recording start rule, the recording function in the target device is triggered to start.

[0039] In an optional embodiment, a WebSocket connection or a persistent connection can be established between the business system under test and the test management platform to achieve real-time communication between the business system under test and the test management platform. Specifically, the recording request of the target test case is passed to the test management platform, and then the test management platform can check whether the target device can log in to the tested business system through the WebSocket connection or the persistent connection to obtain the inspection result.

[0040] After checking the target device, an inspection result is obtained, wherein the inspection result may be a pass or a fail. A pass means that the target device can immediately start recording the target device, and a fail means that the current target device cannot start recording.

[0041] Step S102: When the inspection result is that the inspection is passed, the display screen connected to the target device is recorded.

[0042] In the first embodiment, when the target device satisfies the recording start rule (ie, the above-mentioned inspection result is inspection passed), the recording of the target device can be started.

[0043] In addition to detecting that the target device meets the recording start rules to trigger the recording operation, the recording operation can also be triggered by a preset recording instruction initiated by the tester. After the target device receives the preset recording instruction, it no longer needs to be checked according to the recording start rules, and the recording of the target device can be started directly.

[0044] Step S103, when it is detected that the target device meets the recording end condition, stop recording the display screen to obtain an initial video file.

[0045] In the first embodiment of the present invention, the tester can pre-configure the end recording condition on the test management platform, and then start recording on the target device, and when the target device meets the end recording condition, end the recording of the target device to obtain the recorded video file (i.e., the above-mentioned initial video file). The end recording condition refers to the condition under which the target device stops recording, for example, a pop-up window appears on the business system being tested in the target device, or the business system being tested is closed, or a preset button of the target device is triggered.

[0046] Specifically, the test management platform supports ending the recording of the target device by triggering a custom keyboard shortcut or a preset button mark of the tested business system. For example, when the tester presses a custom shortcut key or clicks a preset button mark, the recording of the target device ends.

[0047] In addition, in addition to detecting that the target device meets the end recording conditions to trigger the end recording operation, the end recording operation can also be triggered by a preset end instruction initiated by the tester. After the target device receives the preset end instruction, it is no longer necessary to detect according to the end recording conditions to end the recording of the target device.

[0048] Step S104: Recognize the video clip containing the test object in the initial video file by pattern recognition technology to obtain a target video file.

[0049] In the first embodiment of the present invention, in order to avoid the file capacity of the video file of the target test case execution process being large and occupying too much storage space, it is necessary to use pattern recognition technology and intelligent algorithms to identify the video clips related to the key operation steps of the target test case in the initial video file, delete the video clips that are not related to the key operation steps, and obtain the target video file.

[0050] Step S105, generating a test record of a target test case according to the target video file.

[0051] In the first embodiment, after obtaining the target video file, the target video file needs to be transferred to the test management platform, and the target video file is associated with the target test case. In addition, in order to ensure the accuracy of the target video file, after uploading the target test file, the auditor of the test management platform can be notified to review it to avoid test record errors.

[0052] In summary, the test record generation method provided in the first embodiment of the present application obtains an inspection result by inspecting the target device according to the recording start rules when the target device receives a recording request for the target test case, wherein the target test case is used to test the test object; when the inspection result is that the inspection is passed, the display screen connected to the target device is recorded; when it is detected that the target device meets the conditions for ending recording, the recording of the display screen is stopped to obtain an initial video file; the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain the target video file; and a test record of the target test case is generated based on the target video file, which solves the problem in the related technology that when testing an application, due to the personal subjective opinions of the testers, the test records of key steps in the test process are missing, resulting in difficulty in locating the cause of the problem based on the test records when problems occur in the application. By configuring the recording start rules and end recording conditions, the function of automatically recording and uploading the video file of the target device executing the target test case is realized, avoiding the problem of test records lacking key information and reducing the work efficiency of testers due to manual recording and uploading of test records. At the same time, pattern recognition technology is used to remove redundant data in video files, reducing information interference from non-business operation processes during the test process, thereby improving the work efficiency of testers and further improving the stability of the enterprise.

[0053] Optionally, in the test record generation method provided in Example 1 of the present application, the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain the target video file, including: determining the video clip in which the test object appears in the initial video file by a target detection model to obtain a first video clip, wherein the target detection model is used to detect whether the test object exists in the image data or video data; obtaining the moment when the test object changes in the first video clip by an intelligent recognition algorithm to obtain the target moment; and determining the target video file in the first video clip based on the target moment.

[0054] In the first embodiment of the present invention, the target detection model refers to a model obtained by pre-training with screenshot data of the test object in the business system. Specifically, screenshots of different modules or areas in the business system can be taken to obtain image data, and then the image data can be annotated to obtain a sample data set, and then the classification model (for example, AlexNet model, VGGNet model, ResNet model, etc.) or detection model (for example, Faster R-CNN model, YOLO (You Only Look Once) model, SSD (Single Shot MultiBox Detector) model, etc.) is trained with the sample data set to obtain the target detection model.

[0055] In order to remove redundant information irrelevant to business operations in the initial video file, a pre-trained target detection model can be used to identify video clips related to the test object in the initial video file, and the video clips can be intercepted to obtain the first video clip. Then, an intelligent recognition algorithm is used to identify the moment or video clip when the test object changes, and finally the target video file is determined based on the moment or video clip when the change occurs.

[0056] In an optional embodiment, Figure 2 This is a flowchart of the execution process of recording the target test case in this solution. Figure 2 As shown, step 201, the target test case is identified by text recognition technology to obtain the test object; step 202, the first frame image of the initial video file is captured, and the test object in the first frame image is identified by the target detection model to obtain the initial state of the test object. If the first frame image of the initial video file does not contain the test object, the target image in which the test object appears in the initial video file is identified by the target detection model, and the target image is used as the first frame image; step 203, the test object is tracked in the initial video file by the target tracking model, and a screenshot of the test object is taken to obtain a screenshot file, and the test object is tracked. If the test object disappears, no screenshot will be taken until the test object appears again, and the screenshot will continue to be taken, and the current state of the target object is determined through the screenshot file; step 204, every preset time period, the target detection model is used to identify whether the current state of the test object in the screenshot file is different from the initial state of the test object; step 205, when the screenshot file is inconsistent with the initial state of the test object, the current moment is determined as the target moment; step 206, configure the second preset time period, capture the video segment from the second preset time period before the target moment to the second preset time period after the target moment in the initial video file, and obtain the target video file.

[0057] By comparing the image data or video data of the test object before and after the execution of the target test case, it is possible to identify the video clips of the key steps in the execution of the target test case and delete the video data irrelevant to the business operation in the video file, thus avoiding the problem of large file capacity of the video file occupying more storage space. At the same time, automatic processing through pattern recognition technology improves the work efficiency of testers.

[0058] Optionally, in the test record generation method provided in Example 1 of the present application, before inspecting the target device according to the recording start rules and obtaining the inspection results, the above method includes: determining the environmental configuration information of the target business system tested by the target test case to obtain preset configuration information; determining the trigger conditions for recording the test process of the target test case according to the target test case to obtain the recording start conditions; determining the recording start rules based on the preset configuration information and the recording start conditions.

[0059] In the first embodiment, the test management platform can provide a user interface for the tester to set the environment configuration information of the target business system (i.e., the preset configuration information mentioned above). The environment configuration information is used to connect to the target business system, and the environment configuration information can be the address, port number, authentication information, etc. of the target business system. The target business system refers to the business system being tested in the target test case, i.e., the business system being tested mentioned above.

[0060] In addition, the recording start rule includes not only the environment configuration information of the target business system, but also the recording start condition, which is determined according to the prerequisites for executing the target test case. Specifically, if the target test case is used to detect the permissions of user role A, the recording start condition can be set as user role A logging into the business system being tested.

[0061] By configuring preset configuration information and recording start conditions, it is possible to automatically connect to the target business system and trigger the target device to record, reducing the workload of testers and improving their work efficiency.

[0062] Optionally, in the test record generation method provided in Example 1 of the present application, the target device is checked according to the recording start rule, and the inspection result obtained includes: obtaining a business system related to the target test case to obtain business system information; determining whether the business system information belongs to the preset configuration information; when the business system information belongs to the preset configuration information, connecting to the target business system according to the preset configuration information; when the target device is successfully connected to the target business system, checking the target device through pattern recognition technology and recording start conditions to obtain an inspection result.

[0063] In the first embodiment of the present invention, in order to record the execution process of the target test case, it is necessary to check the status of the target business system in the target device. Specifically, first, it can be checked whether the target business system tested by the target test case belongs to the preset configuration information. If the preset configuration information does not contain the target business system, the check result is determined to be a check failure; then the target business system can be connected according to the preset configuration information, and it can be checked whether the status of the target business system meets the recording start condition. If the status of the target business system meets the recording start condition, the check result is determined to be a check pass. If the status of the target business system does not meet the recording start condition, the check result is determined to be a check failure.

[0064] In addition, the test management platform also supports the target test case to execute the cross-system test process. When the target test case involves multiple business systems, multiple target business systems can be accessed through WebSocket connection or long connection communication. If the multiple target business systems accessed are not within the scope of the preset configuration information, the check result is determined to be failed.

[0065] By checking the status of the target business system in the target device through preset configuration information and recording start conditions, the smooth execution of the target test case is ensured, avoiding the process of recording the target test case not being able to be executed smoothly, resulting in low work efficiency of the tester.

[0066] Optionally, in the test record generation method provided in Example 1 of the present application, the target device is inspected through pattern recognition technology and recording start conditions, and the inspection result obtained includes: identifying the test data contained in the target test case through pattern recognition technology to obtain the target test data; checking whether the preset database corresponding to the target business system contains the target test data; when the preset database contains the target test data, determining that the inspection result is passed.

[0067] In the first embodiment of the present invention, in order to ensure the smooth execution of the target test case, the test case data in the target test case can be detected by the text recognition technology in the pattern recognition technology, and the current data in the preset database corresponding to the target business system can be obtained, and then it is determined whether the current data is consistent with the test case data. If the current data is consistent with the test case data, the target test case can continue to be executed, and the inspection result is determined to be passed; if the current data is inconsistent with the test case data, the inspection result is determined to be failed.

[0068] By checking whether the data of the target business system is consistent with the test case data of the target test case before recording, the smooth execution of the target test case can be guaranteed, avoiding the interruption of the execution process of the target test case, which causes the tester to be unable to continue to execute the target test case, thereby improving the work efficiency of the tester.

[0069] Optionally, in the test record generation method provided in Example 1 of the present application, after checking the target device according to the recording start rules and obtaining the inspection result, the above method also includes: when the inspection result is that the inspection failed, generating an error prompt information based on the target device and the recording start rules; sending the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0070] In the first embodiment of the present invention, when the inspection result is that the inspection failed, the reason why the target business system in the target device does not comply with the recording startup rules can be determined according to the recording startup rules, and an error prompt message can be generated. The error prompt message is then returned to the administrator or tester of the test management platform (i.e., the target object mentioned above) through a WebSocket connection or a long connection, indicating that the target device or target business system does not comply with the recording startup rules and cannot automatically record the execution process of the target test case, so that the target object can make adjustments or manually send preset recording instructions.

[0071] By recording the startup rules to generate error prompt information and sending the generated error prompt information to the target object, the target object can be notified in time to perform corresponding processing, ensuring the smooth execution of the target test case.

[0072] Optionally, in the test record generation method provided in Example 1 of the present application, before recording the display screen connected to the target device, the method further includes: configuring the pause recording condition, continue recording condition and end recording condition of the target device according to the target test case; after recording the display screen connected to the target device, the method further includes: after detecting that the target device meets the pause recording condition, pausing the recording of the display screen; after detecting that the target device meets the continue recording condition, continuing the recording of the display screen.

[0073] In the first embodiment of the present invention, the test management platform supports pre-configuration of recording pause conditions, recording continuation conditions, and recording end conditions, so that after recording starts, the recording process for the target device can be paused according to the recording pause conditions, or the recording process for the target device can be continued according to the recording continuation conditions, or the recording process for the target device can be ended according to the recording end conditions.

[0074] Specifically, the recording pause condition may be when an error message appears on the target device or the duration of staying on the same page exceeds a second preset duration. For example, an error message such as 404 appears on the page, or the page stays for more than 30 minutes. In addition, a preset pause instruction may be configured on the test management platform, and the preset pause instruction issued by the tester is not limited by the recording pause condition. For example, the tester may issue a preset pause instruction to pause the recording of the target device before executing a key step, or when troubleshooting, or when sensitive information needs to be protected.

[0075] The condition for continuing recording may be a preset key in the target device, such as a left alt key. In addition, a preset continuing instruction may be configured on the test management platform, and the preset continuing instruction issued by the tester is not limited by the condition for continuing recording.

[0076] By configuring the conditions for pausing recording, continuing recording, and ending recording, the target device can be flexibly controlled for recording, so that the recording process can be adjusted according to the actual production situation, avoiding the problem of testers repeatedly recording the execution process of target test cases due to external reasons, thereby improving the work efficiency of testers.

[0077] Optionally, in the test record generation method provided in Example 1 of the present application, after generating the test record of the target test case based on the target video file, the above method also includes: determining the test result of the target test case based on the test record of the target test case; when the test result is inconsistent with the preset result indicated by the target test case, generating defect information of the test object; uploading the defect information to the test management platform, wherein the test management platform is used to process the defect information.

[0078] In the first embodiment, the test management platform supports adding defect information according to the target test case, and uploads the recorded test record to the test management platform and associates it with the defect information. The defect information indicates the information of the test result caused by the code defect after the target device executes the target test case.

[0079] Specifically, when the test result of the target test case is inconsistent with the preset result indicated by the target test case, the target object can set the execution status of the target test case to "execution failed" and click the New Defect button. The test management platform generates defect information based on the test result of the target test case, and then automatically compresses the test record and associates the compressed file with the defect information, so that developers can locate the cause of the code defect based on the test record, avoiding the tester from uploading the test record twice during the test execution phase and the defect information generation phase, saving the tester's time and achieving the effect of improving the tester's work efficiency.

[0080] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0081] Embodiment 2

[0082] The second embodiment of the present application also provides a test record generation device. It should be noted that the test record generation device of the second embodiment of the present application can be used to execute the test record generation method provided in the first embodiment of the present application. The test record generation device provided in the second embodiment of the present application is introduced below.

[0083] Figure 3 Schematic diagram of a test record generation device according to Embodiment 2 of the present application. Figure 3 As shown, the device includes: an inspection unit 301, a first control unit 302, a second control unit 303, an identification unit 304 and a first generation unit 305.

[0084] Specifically, the checking unit 301 is used to check the target device according to the recording start rule to obtain the checking result when the target device receives the recording request of the target test case, wherein the target test case is used to test the test object.

[0085] The first control unit 302 is configured to record the display screen connected to the target device when the inspection result is that the inspection is passed.

[0086] The second control unit 303 is used to stop recording the display screen and obtain an initial video file when it is detected that the target device meets the recording end condition.

[0087] The recognition unit 304 is used to recognize the video segment containing the test object in the initial video file by using a pattern recognition technology to obtain a target video file.

[0088] The first generating unit 305 is used to generate a test record of a target test case according to the target video file.

[0089] The test record generation device provided in the second embodiment of the present application is configured to, through an inspection unit, inspect the target device according to a recording start rule when the target device receives a recording request for a target test case, and obtain an inspection result, wherein the target test case is used to test the test object; a first control unit is configured to record the display screen connected to the target device when the inspection result is that the inspection is passed; a second control unit is configured to stop recording the display screen when it is detected that the target device meets the recording end condition, and obtain an initial video file; an identification unit is configured to identify the video clip containing the test object in the initial video file through a pattern recognition technology, and obtain a target video file; a first generation unit is configured to generate a test record of the target test case based on the target video file, which solves the problem in the related art that when testing an application, due to the personal subjective opinions of the tester, the test record of the key steps of the test process is missing, resulting in difficulty in locating the cause of the problem based on the test record when a problem occurs in the application. By configuring the recording start rules and end recording conditions, the function of automatically recording and uploading the video file of the target device executing the target test case is realized, avoiding the problem of test records lacking key information and reducing the work efficiency of testers due to manual recording and uploading of test records. At the same time, pattern recognition technology is used to remove redundant data in video files, reducing information interference from non-business operation processes during the test process, thereby improving the work efficiency of testers and further improving the stability of the enterprise.

[0090] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned identification unit 304 includes: a first determination subunit, used to determine the video segment in which the test object appears in the initial video file through a target detection model to obtain a first video segment, wherein the target detection model is used to detect whether the test object exists in the image data or the video data; an acquisition subunit, used to obtain the moment when the test object changes in the first video segment through an intelligent recognition algorithm to obtain the target moment; and a second determination subunit, used to determine the target video file in the first video segment based on the target moment.

[0091] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned device includes: an inspection subunit, which is used to inspect the target device according to the recording start rule and determine the environmental configuration information of the target business system tested by the target test case before obtaining the inspection result, and obtain the preset configuration information; a third determination subunit, which is used to determine the trigger condition for recording the test process of the target test case according to the target test case, and obtain the recording start condition; and a fourth determination subunit, which is used to determine the recording start rule based on the preset configuration information and the recording start condition.

[0092] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned inspection sub-unit includes: an acquisition module, used to acquire a business system related to a target test case to obtain business system information; a judgment module, used to judge whether the business system information belongs to preset configuration information; a processing module, used to connect the target business system according to the preset configuration information when the business system information belongs to the preset configuration information; an inspection module, used to inspect the target device through pattern recognition technology and recording start conditions to obtain an inspection result when the target device is successfully connected to the target business system.

[0093] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned inspection module includes: an identification sub-module, used to identify the test data contained in the target test case through pattern recognition technology to obtain target test data; an inspection sub-module, used to check whether the preset database corresponding to the target business system contains the target test data; a determination sub-module, used to determine that the inspection result is passed when the preset database contains the target test data.

[0094] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned device also includes: a second generation unit, which is used to check the target device according to the recording start rule, and after obtaining the inspection result, when the inspection result is that the inspection fails, generate an error prompt information based on the target device and the recording start rule; a sending unit, which is used to send the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0095] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned device also includes: a configuration unit, which is used to configure the pause recording condition, continue recording condition and end recording condition of the target device according to the target test case before recording the display screen connected to the target device; the device also includes: a third control unit, which is used to pause recording of the display screen after detecting that the target device meets the pause recording condition after recording the display screen connected to the target device; and continue recording the display screen after detecting that the target device meets the continue recording condition.

[0096] Optionally, in the test record generation device provided in Example 2 of the present application, the above-mentioned device also includes: a determination unit, which is used to determine the test result of the target test case based on the test record of the target test case after generating the test record of the target test case based on the target video file; a third generation unit, which is used to generate defect information of the test object when the test result is inconsistent with the preset result indicated by the target test case; and a processing unit, which is used to upload the defect information to a test management platform, wherein the test management platform is used to process the defect information.

[0097] The test record generating device includes a processor and a memory. The above-mentioned inspection unit 301, first control unit 302, second control unit 303, identification unit 304 and first generating unit 305 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0098] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the work efficiency of the tester can be improved by adjusting the kernel parameters.

[0099] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0100] Embodiment 3 of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, a method for generating a test record is implemented.

[0101] A fourth embodiment of the present invention provides a processor, which is used to run a program, wherein a method for generating a test record is executed when the program is running.

[0102] like Figure 4 As shown, embodiment 5 of the present invention provides an electronic device, the device includes a processor, a memory and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: when the target device receives a recording request for a target test case, the target device is checked according to a recording start rule to obtain an inspection result, wherein the target test case is used to test a test object; when the inspection result is that the inspection passes, the display screen connected to the target device is recorded; when it is detected that the target device meets a condition for ending recording, the display screen is stopped to obtain an initial video file; the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain a target video file; and a test record of the target test case is generated according to the target video file.

[0103] When the processor executes the program, the following steps are also implemented: the video clip containing the test object in the initial video file is identified through pattern recognition technology to obtain a target video file, including: determining the video clip in which the test object appears in the initial video file through a target detection model to obtain a first video clip, wherein the target detection model is used to detect whether the test object exists in the image data or video data; obtaining the moment when the test object changes in the first video clip through an intelligent recognition algorithm to obtain a target moment; and determining the target video file in the first video clip based on the target moment.

[0104] When the processor executes the program, the following steps are also implemented: before checking the target device according to the recording start rule and obtaining the inspection result, the above method includes: determining the environmental configuration information of the target business system tested by the target test case to obtain the preset configuration information; determining the trigger condition for recording the test process of the target test case according to the target test case to obtain the recording start condition; determining the recording start rule according to the preset configuration information and the recording start condition.

[0105] When the processor executes the program, the following steps are also implemented: the target device is checked according to the recording start rule, and the inspection results include: obtaining the business system related to the target test case and obtaining the business system information; judging whether the business system information belongs to the preset configuration information; when the business system information belongs to the preset configuration information, connecting to the target business system according to the preset configuration information; when the target device is successfully connected to the target business system, the target device is checked through pattern recognition technology and recording start conditions to obtain the inspection results.

[0106] When the processor executes the program, the following steps are also implemented: the target device is inspected through pattern recognition technology and recording start conditions, and the inspection results obtained include: the test data contained in the target test case is identified through pattern recognition technology to obtain target test data; whether the preset database corresponding to the target business system contains the target test data; if the preset database contains the target test data, determining that the inspection result is passed.

[0107] When the processor executes the program, the following steps are also implemented: after checking the target device according to the recording start rules and obtaining the inspection result, the above method also includes: when the inspection result is that the inspection fails, generating an error prompt information based on the target device and the recording start rules; sending the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0108] When the processor executes the program, the following steps are also implemented: before recording the display screen connected to the target device, the above method also includes: configuring the target device's pause recording conditions, continue recording conditions and end recording conditions according to the target test case; after recording the display screen connected to the target device, the above method also includes: after detecting that the target device meets the pause recording conditions, pausing the recording of the display screen; after detecting that the target device meets the continue recording conditions, continuing the recording of the display screen.

[0109] When the processor executes the program, the following steps are also implemented: after generating a test record of the target test case based on the target video file, the above method also includes: determining the test result of the target test case based on the test record of the target test case; when the test result is inconsistent with the preset result indicated by the target test case, generating defect information of the test object; uploading the defect information to the test management platform, wherein the test management platform is used to process the defect information.

[0110] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0111] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: when the target device receives a recording request for a target test case, the target device is checked according to a recording start rule to obtain an inspection result, wherein the target test case is used to test a test object; when the inspection result is that the inspection passes, the display screen connected to the target device is recorded; when it is detected that the target device meets the conditions for ending recording, the display screen is stopped to obtain an initial video file; the video clip containing the test object in the initial video file is identified by pattern recognition technology to obtain a target video file; and a test record of the target test case is generated based on the target video file.

[0112] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: identifying a video segment containing a test object in an initial video file by pattern recognition technology to obtain a target video file, including: determining a video segment in which a test object appears in the initial video file by a target detection model to obtain a first video segment, wherein the target detection model is used to detect whether a test object exists in image data or video data; obtaining a moment when the test object changes in the first video segment by an intelligent recognition algorithm to obtain a target moment; and determining a target video file in the first video segment based on the target moment.

[0113] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: before checking the target device according to the recording start rule and obtaining the inspection result, the above method includes: determining the environmental configuration information of the target business system tested by the target test case to obtain the preset configuration information; determining the trigger condition for recording the test process of the target test case according to the target test case to obtain the recording start condition; determining the recording start rule according to the preset configuration information and the recording start condition.

[0114] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: checking the target device according to the recording start rule, and obtaining the inspection results including: obtaining the business system related to the target test case and obtaining the business system information; judging whether the business system information belongs to the preset configuration information; when the business system information belongs to the preset configuration information, connecting the target business system according to the preset configuration information; when the target device is successfully connected to the target business system, checking the target device through pattern recognition technology and recording start conditions to obtain the inspection results.

[0115] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: inspecting the target device through pattern recognition technology and recording start conditions, and obtaining inspection results including: identifying the test data contained in the target test case through pattern recognition technology to obtain target test data; checking whether the preset database corresponding to the target business system contains the target test data; and determining that the inspection result is passed when the preset database contains the target test data.

[0116] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: after checking the target device according to the recording start rules and obtaining the inspection result, the above method also includes: when the inspection result is that the inspection fails, generating an error prompt information based on the target device and the recording start rules; sending the error prompt information to the target object, wherein the target object processes the recording request according to the error prompt information.

[0117] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: before recording the display screen connected to the target device, the above method also includes: configuring the target device's pause recording conditions, continue recording conditions and end recording conditions according to the target test case; after recording the display screen connected to the target device, the above method also includes: after detecting that the target device meets the pause recording conditions, pausing the recording of the display screen; after detecting that the target device meets the continue recording conditions, continuing the recording of the display screen.

[0118] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: after generating a test record of a target test case based on a target video file, the above method also includes: determining a test result of the target test case based on the test record of the target test case; when the test result is inconsistent with a preset result indicated by the target test case, generating defect information of the test object; uploading the defect information to a test management platform, wherein the test management platform is used to process the defect information.

[0119] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0124] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0128] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for generating a test record, characterized in that: include: When the target device receives a recording request for a target test case, the target device is checked according to the recording start rule to obtain a check result, wherein the target test case is used to test the test object; If the inspection result is that the inspection is passed, recording the display screen connected to the target device; When it is detected that the target device meets the recording end condition, stop recording the display screen to obtain an initial video file; Identify the video clip containing the test object in the initial video file by pattern recognition technology to obtain a target video file; A test record of the target test case is generated according to the target video file.

2. The method according to claim 1, characterized in that The video clip containing the test object in the initial video file is identified by pattern recognition technology, and the target video file is obtained including: Determine, by means of a target detection model, a video segment in which the test object appears in the initial video file to obtain a first video segment, wherein the target detection model is used to detect whether the test object exists in image data or video data; Acquire the moment when the test object changes in the first video clip by using an intelligent recognition algorithm to obtain a target moment; The target video file is determined in the first video segment according to the target time.

3. The method according to claim 1, characterized in that Before checking the target device according to the recording start rule and obtaining the checking result, the method includes: Determine the environment configuration information of the target business system tested by the target test case, and obtain preset configuration information; Determine a trigger condition for recording a test process of the target test case according to the target test case, and obtain a recording start condition; The recording start rule is determined according to the preset configuration information and the recording start condition.

4. The method according to claim 3, characterized in that The target device is checked according to the recording start rule, and the check results include: Acquire the business system related to the target test case and obtain business system information; Determining whether the business system information belongs to the preset configuration information; In the case where the business system information belongs to the preset configuration information, connecting to the target business system according to the preset configuration information; When the target device is successfully connected to the target business system, the target device is checked by using the pattern recognition technology and the recording start condition to obtain the check result.

5. The method according to claim 4, characterized in that The target device is inspected by using the pattern recognition technology and the recording start condition to obtain the inspection result including: Identify the test data contained in the target test case by pattern recognition technology to obtain target test data; Check whether the preset database corresponding to the target business system contains the target test data; In a case where the preset database includes the target test data, the inspection result is determined to be inspection passed.

6. The method according to claim 1, characterized in that After checking the target device according to the recording start rule and obtaining the checking result, the method further includes: When the inspection result is that the inspection fails, generating an error prompt message according to the target device and the recording start rule; The error prompt information is sent to a target object, wherein the target object processes the recording request according to the error prompt information.

7. The method according to claim 1, characterized in that Before recording the display screen connected to the target device, the method further includes: configuring the pause recording condition, the continue recording condition and the end recording condition of the target device according to the target test case; After recording the display screen connected to the target device, the method further includes: pausing the recording of the display screen after detecting that the target device meets the pause recording condition; and continuing the recording of the display screen after detecting that the target device meets the continue recording condition.

8. The method according to claim 1, characterized in that After generating a test record of the target test case according to the target video file, the method further includes: Determining the test result of the target test case according to the test record of the target test case; In the event that the test result is inconsistent with a preset result indicated by the target test case, generating defect information of the test object; The defect information is uploaded to a test management platform, wherein the test management platform is used to process the defect information.

9. A device for generating a test record, characterized in that: include: An inspection unit, configured to inspect the target device according to a recording start rule to obtain an inspection result when the target device receives a recording request for a target test case, wherein the target test case is used to test the test object; A first control unit, configured to record a display screen connected to the target device if the inspection result is that the inspection is passed; A second control unit is used to stop recording the display screen when detecting that the target device meets the recording end condition, and obtain an initial video file; An identification unit, configured to identify the video clip containing the test object in the initial video file by using a pattern recognition technology to obtain a target video file; The first generating unit is used to generate a test record of the target test case according to the target video file.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the test record generation method described in any one of claims 1 to 8.