CN111309632A - Application program testing method and device, computer equipment and storage medium - Google Patents

Application program testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111309632A
CN111309632A CN202010202680.0A CN202010202680A CN111309632A CN 111309632 A CN111309632 A CN 111309632A CN 202010202680 A CN202010202680 A CN 202010202680A CN 111309632 A CN111309632 A CN 111309632A
Authority
CN
China
Prior art keywords
test
video
test data
data
video clip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010202680.0A
Other languages
Chinese (zh)
Other versions
CN111309632B (en
Inventor
南刚雷
邵国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Reach Best Technology Co Ltd
Original Assignee
Reach Best Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN202010202680.0A priority Critical patent/CN111309632B/en
Publication of CN111309632A publication Critical patent/CN111309632A/en
Application granted granted Critical
Publication of CN111309632B publication Critical patent/CN111309632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to an application program testing method, an application program testing device, computer equipment and a storage medium, and relates to the technical field of computers. Verifying the test data of the target application program; responding to the verification failure of the test data, and intercepting a video clip from the test video based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records the running scene of the test data which generates the verification failure; the test data is tested based on the video clip. By applying the technical scheme, when the test data is wrong, only the video clip needs to be played back, the data acquisition scene does not need to be manually reproduced, time and labor are saved, and the problem troubleshooting efficiency in the test process is improved.

Description

Application program testing method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing an application program, a computer device, and a storage medium.
Background
With the development of computer technology, the functions of application programs are more and more diversified. In the testing process of the application program, in order to count the use condition of each function, a developer usually sets a buried point in the application program, that is, relevant statistical codes are implanted into the tested function, when the developer uses each function, the implanted statistical codes can be triggered to collect buried point data of each buried point, then the buried point data is stored in a server, the developer can check the buried point data, and whether the use condition of each function in the application program is normal is judged according to the check result.
In the above process, when the verification result of the data of the buried point is verification failure, a developer often needs to trigger the function corresponding to the data buried point for many times, that is, to repeat the scene of data acquisition for many times, so that the problem can be located, and the method is time-consuming, labor-consuming and low in efficiency. Therefore, how to improve the efficiency of problem location in the application program testing process is an important research direction.
Disclosure of Invention
The disclosure provides an application program testing method, an application program testing device, computer equipment and a storage medium, so as to improve the efficiency of problem location in the testing process. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an application program testing method, including:
verifying the test data of the target application program;
responding to the test data verification failure, determining a video clip from the test video based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records the running scene of the test data generating the verification failure;
the test data is tested based on the video clip.
In one possible implementation, the testing the test data based on the video segment includes:
and providing the video clip and the verification result of the test data for a terminal, wherein the terminal is used for testing based on the playing of the video clip and the display of the verification result.
In one possible implementation, before the verifying the test data of the target application, the method further includes:
and determining the test data from the candidate data based on the creation time of the test video and the generation time of the candidate data in the test data set, wherein the uploading equipment of the candidate data is the same as the uploading equipment of the test video, and the running scene of the test data is generated and recorded in the test video.
In one possible implementation, the determining the test data from the candidate data in the test data set based on the creation time of the test video and the generation time of the candidate data in the test data set includes:
decoding the test video to determine the video duration of the test video;
determining a recording time period of the test video based on the video duration and the creation time;
and acquiring the candidate data with the generation time within the recording time period from the test data set as the test data.
In one possible implementation, the determining a video clip from the test video based on the generation time of the test data and the creation time of the test video includes:
and when any time in the recording time period is the same as the generation time of the test data, determining the video in the target time length before and after the any time in the test video as the video clip.
In one possible implementation, after determining the video segment from the test video based on the generation time of the test data and the creation time of the test video, the method further includes:
storing the video clip to obtain the address information of the video clip;
and associating the address information of the video clip, the test data and the verification result of the test data.
In one possible implementation, after associating the address information of the video segment, the test data, and the verification result of the test data, the method further includes:
and responding to the test result viewing instruction, playing the video clip on the target page, and displaying the verification result of the test data.
According to a second aspect of the embodiments of the present disclosure, there is provided an application program testing method, including:
responding to a test result viewing instruction, acquiring a video clip of a target application program, wherein the video clip is obtained by intercepting from the test video by a server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video is used for recording a test process of the target application program;
acquiring a verification result of the test data associated with the video clip, and generating a running scene of the test data to be recorded in the video clip;
and displaying the verification result of the test data in the process of playing the video clip.
In one possible implementation manner, the displaying the verification result of the test data during the playing of the video segment includes:
acquiring a timestamp corresponding to the current video frame based on the playing progress of the video clip;
and when the generation time of the test data is matched with the time stamp, displaying the verification result of the test data.
According to a third aspect of the embodiments of the present disclosure, there is provided an application testing apparatus including:
the verification unit is configured to verify the test data of the target application program;
the video clip determining unit is configured to determine a video clip from the test video in response to the test data failure, based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records an operation scene of the test data which has failed to generate the verification;
a testing unit configured to test the test data based on the video segment.
In one possible implementation, the test unit is configured to:
and providing the video clip and the verification result of the test data for a terminal, wherein the terminal is used for testing based on the playing of the video clip and the display of the verification result.
In one possible implementation, the apparatus further includes:
and the test data determining unit is configured to determine the test data from the candidate data based on the creation time of the test video and the generation time of the candidate data in the test data set, wherein the uploading equipment of the candidate data is the same as the uploading equipment of the test video, and the operation scene for generating the test data is recorded in the test video.
In one possible implementation, the test data determination unit is configured to:
decoding the test video to determine the video duration of the test video;
determining a recording time period of the test video based on the video duration and the creation time;
and acquiring the candidate data with the generation time within the recording time period from the test data set as the test data.
In one possible implementation, the video segment determination unit is configured to:
and when any time in the recording time period is the same as the generation time of the test data, determining the video in the target time length before and after the any time in the test video as the video clip.
In one possible implementation, the apparatus further includes:
the address acquisition unit is configured to store the video clip to obtain the address information of the video clip;
and the data association unit is configured to associate the address information of the video clip, the test data and the verification result of the test data.
In one possible implementation, the apparatus further includes:
and the display unit is configured to respond to the test result viewing instruction, play the video clip on the target page and display the verification result of the test data.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an application testing apparatus, including:
the video acquisition unit is used for responding to a test result viewing instruction and acquiring a video clip of a target application program, wherein the video clip is obtained by intercepting the test video by a server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video is used for recording a test process of the target application program;
the verification result acquisition unit is used for acquiring the verification result of the test data associated with the video clip, and generating an operation scene of the test data to be recorded in the video clip;
and the display unit is used for displaying the verification result of the test data in the process of playing the video clip.
In one possible implementation, the display unit is configured to:
acquiring a timestamp corresponding to the current video frame based on the playing progress of the video clip;
and when the generation time of the test data is matched with the time stamp, displaying the verification result of the test data.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the application testing method as any one of the above.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of a computer device, enable the computer device to perform the application testing method of any one of the above.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising executable instructions that, when executed by a processor of a computer device, enable the computer device to perform the application testing method of any one of the above.
According to the technical scheme provided by the embodiment of the disclosure, the test data of the target application program is verified; responding to the verification failure of the test data, and intercepting a video clip from the test video based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records the running scene of the test data which generates the verification failure; the test data is tested based on the video clip. By applying the technical scheme, when the test data is wrong, only the test video needs to be played back, the data acquisition scene does not need to be manually reproduced, time and labor are saved, and the problem troubleshooting efficiency in the test process is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of application testing in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of application testing in accordance with an exemplary embodiment;
FIG. 3 is a schematic diagram of an implementation environment for a method of test data processing according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a particular implementation of a method for application testing, according to an exemplary embodiment;
FIG. 5 is a schematic diagram of an application test process provided by an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a particular implementation of a method for application testing, according to an exemplary embodiment;
FIG. 7 is a schematic diagram illustrating a test result display provided by an embodiment of the present disclosure;
FIG. 8 is a block diagram illustrating an application testing device in accordance with an exemplary embodiment;
FIG. 9 is a block diagram illustrating an application testing device in accordance with an exemplary embodiment;
FIG. 10 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
FIG. 1 is a flow chart illustrating an application testing method, as shown in FIG. 1, for use in a computer device, according to an exemplary embodiment, including the steps of:
in step 101, the test data of the target application is verified.
In step 102, in response to the verification failure of the test data, a video segment is determined from the test video based on the generation time of the test data and the creation time of the test video, where the test video is obtained by recording a display interface when the target application program runs, and the video segment records an operation scene of the test data that generates the verification failure.
In step 103, the test data is tested based on the video segment.
According to the technical scheme provided by the embodiment of the disclosure, the test data of the target application program is verified; in response to the test data verification failure, based on the generation time of the test data and the creation time of a test video, intercepting a video clip from the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records an operation scene for generating the test data; the test data is tested based on the video clip. By applying the technical scheme, when the test data is wrong, only the test video needs to be played back, the data acquisition scene does not need to be manually reproduced, time and labor are saved, and the problem troubleshooting efficiency in the test process is improved.
In one possible implementation, the testing the test data based on the video segment includes:
and providing the video clip and the verification result of the test data for a terminal, wherein the terminal is used for testing based on the playing of the video clip and the display of the verification result.
In one possible implementation, before the verifying the test data of the target application, the method further includes:
and determining the test data from the candidate data based on the creation time of the test video and the generation time of the candidate data in the test data set, wherein the uploading equipment of the candidate data is the same as the uploading equipment of the test video, and the running scene of the test data is generated and recorded in the test video.
In one possible implementation, the determining the test data from the candidate data in the test data set based on the creation time of the test video and the generation time of the candidate data in the test data set includes:
decoding the test video to determine the video duration of the test video;
determining a recording time period of the test video based on the video duration and the creation time;
and acquiring the candidate data with the generation time within the recording time period from the test data set as the test data.
In one possible implementation, the determining a video clip from the test video based on the generation time of the test data and the creation time of the test video includes:
and when any time in the recording time period is the same as the generation time of the test data, determining the video in the target time length before and after the any time in the test video as the video clip.
In one possible implementation, after determining the video segment from the test video based on the generation time of the test data and the creation time of the test video, the method further includes:
storing the video clip to obtain the address information of the video clip;
and associating the address information of the video clip, the test data and the verification result of the test data.
In one possible implementation, after associating the address information of the video segment, the test data, and the verification result of the test data, the method further includes:
and responding to the test result viewing instruction, playing the video clip on the target page, and displaying the verification result of the test data.
FIG. 2 is a flow chart illustrating an application testing method, as shown in FIG. 2, for use in a computer device, according to an exemplary embodiment, including the steps of:
in step 201, in response to the test result viewing instruction, a video clip of the target application program is obtained, where the video clip is intercepted from the test video by the server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video is used for recording a test process of the target application program.
In step 202, a verification result of the test data associated with the video segment is obtained, and a running scene of the test data is generated and recorded in the video segment.
In step 203, during the playing of the video segment, the verification result of the test data is displayed.
In one possible implementation manner, the displaying the verification result of the test data during the playing of the video segment includes:
acquiring a timestamp corresponding to the current video frame based on the playing progress of the video clip;
and when the generation time of the test data is matched with the time stamp, displaying the verification result of the test data.
The above-described embodiments are merely a brief introduction to embodiments of the disclosure and a brief introduction to various possible implementations.
Fig. 3 is a schematic diagram of an implementation environment of a test data processing method according to an exemplary embodiment, and as shown in fig. 3, the implementation environment may include a terminal 301 and a server 302. The terminal 301 may be installed and run with a target application to be tested, and the target application may be any type of application, for example, a short video application, a social application, and the like, which is not limited in this disclosure. The terminal 301 may be a terminal used by a developer, and the terminal 301 may be a smart phone, a tablet pc, an e-book reader, an MP3(Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3) player, an MP4(Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4) player, a laptop portable computer, a desktop computer, and the like. The server 302 may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center, and the server 302 may be configured to provide the test data processing service for the target application, for example, the server 302 may obtain test data of the target application, parse, store, and the like the test data.
Each terminal and the server can be connected through a wired network or a wireless network, so that data interaction can be carried out between each terminal and the server.
Those skilled in the art will appreciate that the number of terminals described above may be greater or fewer. For example, the number of the terminals may be only one, or several tens or hundreds of the terminals, or more. The number of terminals and the type of the device are not limited in the embodiments of the present disclosure.
Fig. 4 is a flowchart illustrating a specific implementation of a method for testing an application program, which may be applied in the implementation environment shown in fig. 3, according to an exemplary embodiment, and referring to fig. 4, the method may specifically include the following steps:
in step 401, the server obtains a test video and test data of a target application.
The target application may be a test version of the application, and the target application may be installed and run in a terminal used by a developer. For example, a plurality of embedded points may be set in the target application program of the test version, that is, relevant statistical codes are implanted in the target application program, and when a developer uses a certain function in the target application program to trigger the embedded point corresponding to the function, the terminal may obtain the embedded point data and report the embedded point data to the server. The server may provide a buried point data processing service for the target application program, for example, the buried point data may be analyzed and checked, and in the embodiment of the present disclosure, the server may further provide a video analysis service to process the acquired test video.
In the embodiment of the present disclosure, the test video is obtained by recording the display interface when the target application program runs. When testing the target application program, a developer can record a screen in the testing process and record the change condition of a display interface triggered by operating the target application program in the testing process in a video form. That is, in the process of testing each function of the target application program and acquiring the test data, the test video is obtained in a screen recording mode, and the acquisition scene of each test data is recorded. For example, a buried point is set in a video playing control of the target application program, in a testing process, when a terminal receives a screen recording instruction, screen recording is started, when it is detected that a user triggers the video playing control, the terminal can execute video playing and other steps based on user operation and acquire buried point data corresponding to the buried point, the buried point data is reported to a server, and the terminal records an acquisition scene of the test data through the screen recording, that is, display interface change information of the target application program when the video playing control is triggered. And when the terminal receives a screen recording ending instruction, stopping screen recording to obtain a section of screen recording video, namely the test video of the target application program, and sending the test video to the server by the terminal.
In the embodiment of the present disclosure, after the server may obtain the test video, the server determines the test data from the candidate data in the test data set based on the creation time of the test video and the generation time of the candidate data in the test data set, and records the operation scene for generating the test data in the test video, that is, the generation scene of the test data is recorded in the test video. The test data set may store buried point data uploaded by the terminal, and of course, may also store other data generated in the target application program test process, and the uploading device of the candidate data in the test data set is the same as the uploading device of the test video. In a possible implementation manner, the determining, by the server, the test data side process may specifically include the following steps:
step one, the server decodes the test video and determines the video duration of the test video.
For example, the server may decode the test video through FFmpeg (Fast Forward Mpeg) to obtain the video duration of the test video. It should be noted that, the embodiment of the present disclosure does not limit the specific method for decoding the test video.
And step two, the server can determine the recording time period of the test video based on the video time length and the creation time.
In a possible implementation manner, when the terminal sends the test video to the server, the terminal may carry creation time, and the server may obtain the creation time, and determine the start recording time and the end recording time of the test video based on the creation time and the video duration, that is, may determine the recording time period of the test video. Of course, the test video may also carry other time information, for example, the test video may carry a recording end time of the test video, and the server determines the recording time period based on the recording end time and the video duration; or, the server may obtain the time stamp of each video frame in the video decoding process, and determine the recording time period based on the time stamp of each video frame and the video duration. It should be noted that the above description of the method for determining the recording time period of the test video is only an exemplary description, and the embodiment of the present disclosure does not limit which method is specifically used to determine the recording time period of the test video. The embodiment of the present disclosure does not limit what kind of time information is specifically carried by the test video.
And step three, the server acquires candidate data with the generation time within the recording time period from the test data set as the test data.
In a possible implementation manner, when the test data set stores data uploaded by a plurality of terminals, the server may filter the data in the test data set, and use data identical to the data of the test video uploading device as candidate data. For example, the buried point data and the test video uploaded by each terminal may carry an equipment identifier, and the equipment identifier may be used to uniquely indicate one terminal. Taking the example that the server acquires the device identifier carried by the test video, the server may acquire a UA (User Agent) of a standard http request header when the test video is uploaded, and query a corresponding relationship table between the UA and the device identifier, thereby determining the device identifier of the test video uploading device. The server may compare the device identifier carried by each piece of test data in the test data set with the device identifier carried by the test video, and use the data carrying the same device identifier as the test video as candidate data.
In the embodiment of the disclosure, the server may obtain a generation time of the candidate data, match the generation time with a recording time period of the test video, and determine the candidate data as the test data when the generation time is within the recording time period.
In step 402, the server verifies the test data of the target application.
In a possible implementation manner, the server may analyze the test data to obtain plaintext data corresponding to the test data, and then verify the plaintext data to obtain a verification result. Specifically, when the terminal uploads the test data corresponding to each embedded point, the test data may be converted into a format convenient for storage and transmission based on Protocol Buffers (e.g., a format of a proto file may be transmitted, and the server may parse the proto file to obtain plaintext data corresponding to each embedded point. The server may verify the plaintext data based on a buried point data requirement document, where specific content of the buried point data requirement document may be set by a developer, and the embodiment of the disclosure does not limit this, for example, the buried point data requirement document may include standard data corresponding to each buried point, and when plaintext data corresponding to any buried point does not match the standard data of the buried point, the server determines that verification of the plaintext data corresponding to the buried point fails, that is, verification of test data fails. Of course, the server may also apply other methods to check the test data, and this is not particularly limited in this disclosure.
It should be noted that the server for performing test data verification and test video decoding may be the same server or different servers, and this is not limited in the embodiment of the present disclosure.
In step 403, the server determines a video clip from the test video based on the generation time of the test data and the creation time of the test video in response to the test data verification failure.
In a possible implementation manner, the server may establish an association relationship between the test data and the operation scene in the test video, where the test data is generated, based on the recording time period of the test video and the generation time of the test data, and when the test data fails to be verified, the server may intercept a video segment from the test video, that is, when any time in the recording time period is the same as the generation time of the test data, determine the video segment from videos in the target duration around the any time in the test video. The video clip records an operation scene for generating the test data, namely a generation scene of the test data, and the generation scene of the test data is used for determining the reason of the verification failure of the test data. The target duration may be set by a developer, which is not limited in this disclosure, for example, video segments of 1 second before and after the test data generation time may be intercepted.
In a possible implementation manner, after the server acquires the video clip, the server may store the video clip to obtain address information of the video clip, for example, the server may generate a Uniform Resource Locator (URL) address including a Universally Unique Identifier (UUID), and allocate the URL address to the video clip. The server may associate the address information of the video segment, the test data, and the verification result of the test data, and store the associated address information of the video segment, the test data, and the verification result of the test data in a database, and certainly, may also associate the address information of the test video with the test data, and the like, which is not limited in this embodiment of the application. In a possible implementation manner, the server may further convert the video clip into data in other formats for storage, for example, the video clip may be converted into a dynamic picture in gif format, which is not limited by the embodiment of the present disclosure.
In step 404, the server tests the test data based on the video clip.
In this embodiment, the server may provide the video clip and the verification result of the test data to a terminal, and the terminal is configured to perform a test based on the playing of the video clip and the displaying of the verification result.
In a possible implementation manner, the server may send the video clip and the verification result of the test data to the terminal, the terminal plays the video clip and displays the verification result of the test data, and a developer may locate the reason of the test data verification failure based on an operation scene presented by the video clip, that is, a generation scene of the test data, and complete the test on the test data. By applying the technical scheme, when the test data which fails to be verified is tested, only the video clip corresponding to the test data can be played without playing the complete test video, so that the test efficiency is improved.
In a possible implementation manner, the server may further process the video segment, a trained target recognition model may be deployed in the server, and the target recognition model may perform character recognition on each video frame image in the video segment to obtain at least one keyword corresponding to the video segment. The video clip, the at least one keyword and the verification result of the test data are sent to a terminal, the terminal can compare the at least one keyword with standard data corresponding to the test data in the buried point data requirement document, if the at least one keyword does not include the standard data, a test result with errors in an application program operation scene generating the test data is obtained, and the terminal can display the at least one keyword, the test result and the verification result of the test data when the video clip is played. For example, a certain buried point is arranged in a link of completing data sharing, in a buried point requirement document, standard data corresponding to the buried point can be set as sharing success, in the running process of an application program, after the data sharing is completed, prompt information of the sharing success can be displayed, when a server performs character recognition on a video clip through a target recognition model, if the keyword of the sharing success is recognized, the prompt information of the sharing success is determined to be displayed in the video clip, when a terminal tests test data, an application program running scene generating the test data can be obtained, namely a test result with a correct scene is generated on the test data side; if the keyword of 'successful sharing' is not identified, it is determined that the video clip does not include prompt information of successful sharing, and the terminal can obtain an application program running scene generating the test data, namely a test result with a wrong scene generated at the test data side. By applying the scheme, whether the generation scene of the test data is wrong or not is judged through keyword identification and keyword comparison, the labor cost in the test process can be reduced, the workload of developers in the test process is reduced, and the developers can perform further problem troubleshooting based on the test result displayed by the terminal.
It should be noted that the above description of the method for testing the test data is only an exemplary description of one possible implementation manner, and the embodiment of the present disclosure does not limit which test method is specifically adopted.
According to the technical scheme provided by the embodiment of the disclosure, the test data of the target application program is verified; when the test data fails to be verified, based on the generation time of the test data and the creation time of a test video, intercepting a video clip from the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records an operation scene of the test data which fails to be verified; the test data is tested based on the video clip. By applying the technical scheme, when the test data is wrong, only the test video needs to be played back, the data acquisition scene does not need to be manually reproduced, time and labor are saved, and the problem troubleshooting efficiency in the test process is improved.
Fig. 5 is a schematic diagram of an application testing process provided in an embodiment of the present disclosure, referring to fig. 5, a terminal 501 records a screen in the testing process, when a detected buried point is triggered, Protocol Buffers corresponding to the buried point are reported to a server 502, the server 502 performs data analysis to obtain plaintext data corresponding to the buried point, after the test is completed, the terminal uploads the recorded test video to a server 503, the server 503 can associate each buried point data with a generation scene of the buried point data in the test video, the plaintext data of the buried point is verified by a buried point verification service to obtain a buried point verification result, for the buried point data failed in verification, the server 503 can intercept a video segment corresponding to the generation scene of the buried point data from the test video, convert the video segment into a gif format dynamic picture, and establish an association relationship between the buried point and the gif format dynamic picture, and storing information such as plaintext data of the embedded points and addresses of gif dynamic pictures in the database 504, and when receiving a test result viewing instruction, sending the data to the terminal 505 for display. In the process, for the places with the abnormal buried point verification, the buried point scene does not need to be triggered again, and only the dynamic picture and the verification result when the scene is triggered are sent to a developer for confirmation.
The foregoing embodiments mainly describe a process of determining, at a server, a video segment based on a test video and test data, and detecting the test data based on the video segment. In the embodiment of the application, the terminal can acquire the video clip or the test video corresponding to the test data from the server to play, and display the verification result of the test data in the playing process.
In a possible implementation manner, the terminal may obtain a video clip corresponding to the test data to play, and display a test data verification result, which may specifically include the following steps:
first, the terminal may obtain a video clip of the target application in response to the test result viewing instruction. The video clip can be intercepted from the test video by the server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video can be used for recording a test process of the target application program. The process of acquiring the video segment is the same as the process of determining the video segment in step 303, and is not described herein again.
Then, the terminal may acquire a verification result of test data associated with the video clip in which a generation scene of the test data is recorded. In the embodiment of the application, the video clip and information such as a verification result of the test data can be stored in an associated manner, and after the terminal acquires the video clip, the test data, the verification result of the test data and the like associated with the video clip can be acquired.
Finally, the terminal can display the verification result of the test data in the process of playing the video clip. A terminal can obtain a timestamp corresponding to a current video frame based on the playing progress of the video clip; and when the generation time of the test data is matched with the time stamp, displaying the verification result of the test data. The above description of the display method of the verification result of the test data is only an exemplary description, and the embodiment of the present application does not limit which display method is specifically adopted.
By applying the technical scheme, when the test result is checked, only the video clip corresponding to the test data can be played, the generation scene of the test data can be accurately positioned, and the problem of the test data can be conveniently checked.
In a possible implementation manner, when test results of all embedded points in a test process need to be checked, the terminal can acquire a complete test video of the test from the server to play, and in the playing process, information such as a verification result of the test data is displayed in real time. Fig. 6 is a flowchart illustrating a specific implementation of an application testing method according to an exemplary embodiment, and referring to fig. 6, the method may specifically include the following steps:
in step 601, the terminal responds to the test result viewing instruction, and plays a test video of the target application program, wherein the test video is used for recording a test process of the target application program.
In a possible implementation manner, one test may correspond to one test identifier, the test result viewing instruction may carry the test identifier, and when the server receives the test result viewing instruction, the server may obtain a test video corresponding to the current test based on the test identifier, and play the video on a target page. In a possible implementation manner, the terminal may display a test directory page, where the test directory page may include at least one connection of test videos, a user may start a test result viewing instruction by clicking on any connection of a test video, and the terminal obtains any test video from the server in response to the test result viewing instruction. It should be noted that the above description of the test video acquisition method is only an exemplary description, and the embodiment of the present application does not limit the specific acquisition method of the test video.
The target page may be a test result viewing page, and the target page may be implemented by vue.js (User Interface construction framework) technology and Element UI (Element User Interface) technology.
In a possible implementation manner, the terminal may obtain the playing speed of the test video based on the playing speed adjusting instruction, and play the test video based on the playing speed. For example, the test video can be played at different multiple speeds of 0.5 times, 0.75 times, 1.5 times, 2 times, and the like by an vue-video-player (multimedia player).
In step 602, the terminal acquires test data associated with the test video and address information of a video clip associated with the test data.
And recording the running scene for generating the test data in the video clip, wherein the video clip is obtained by intercepting the test video by the server based on the generation time of the test data and the creation time of the test video.
In the embodiment of the disclosure, in the application program testing process, the server may associate the test video, the test data, the video clip, and the like, store the associated data in the database, and when the terminal acquires the test video, the terminal may acquire the test data, the test data verification result, the address information of the video clip, and the like associated with the test video. It should be noted that, the method for acquiring a video segment and the method for associating data are the same as the above steps 401 to 403, and are not described herein again.
In step 603, the terminal displays the verification result of the test data and the address information of the video clip based on the playing progress of the test video and the generation time of the test data.
In the embodiment of the present disclosure, the terminal may obtain a timestamp corresponding to the current video frame based on the playing progress of the test video, and display the verification result of the test data and the address information of the video segment when the generation time of the test data matches the timestamp. In a possible implementation manner, the verification result of the test data and the address information of the video segment may be displayed in the form of an online test report, and of course, the generation time of the test data, the embedded point identifier of the embedded point corresponding to the test data, and the like may also be displayed, which is not limited in this disclosure. Referring to fig. 7, fig. 7 is a schematic diagram illustrating a test result display provided by an embodiment of the present disclosure, where a test video may be displayed in a first area 702 of a test result display interface 701, and an online test report may be displayed in a second area 703, where specific positions of the first area and the second area may be set by a developer, which is not limited in the embodiment of the present disclosure. Of course, the test video and the test packet may also be displayed in different interfaces, which is not limited by the embodiment of the present disclosure.
In a possible implementation manner, when the terminal plays the test video, the terminal may further label a video segment included in the test video. For example, in the process of playing a test video, when a certain video segment is played, a prompt message that the video segment has arrived may be displayed, and of course, the terminal may mark the start time, the end time, and the like of the video segment in a progress bar of playing the test video, which is not limited in this disclosure.
By applying the technical scheme, in the test process, only the embedded point scene needs to be triggered without paying attention to the accuracy of reporting of the embedded point data, and the accuracy of the reporting time of the embedded point data, the reporting field and the reporting check result can be uniformly checked in the test report. In the embodiment of the application, when the test video is played, information such as a verification result of the test data is displayed in real time based on the playing progress of the video, developers can accurately position a running scene of a generation application program generating the test data, namely the generation scene of the test data, for the test data with problems, video clips corresponding to the test data can be independently checked based on the video clip addresses displayed in the test report, the generation scene of the test data does not need to be reproduced by manually operating a target application program, and the efficiency of problem troubleshooting in the test process is improved.
FIG. 8 is a block diagram illustrating an application testing device in accordance with an exemplary embodiment. Referring to fig. 8, the apparatus includes a verification unit 801, a video clip determination unit 802, and a test unit 803.
A verification unit 801 configured to verify test data of the target application program;
a video segment determining unit 802, configured to determine, in response to the test data failure, a video segment from the test video based on the generation time of the test data and the creation time of the test video, where the test video is obtained by recording a display interface when the target application program runs, and the video segment records an operation scene of the test data that has failed to generate the verification;
a testing unit 803 configured to test the test data based on the video segment.
In one possible implementation, the test unit 803 is configured to:
and providing the video clip and the verification result of the test data for a terminal, wherein the terminal is used for testing based on the playing of the video clip and the display of the verification result.
In one possible implementation, the apparatus further includes:
and the test data determining unit is configured to determine the test data from the candidate data based on the creation time of the test video and the generation time of the candidate data in the test data set, wherein the uploading equipment of the candidate data is the same as the uploading equipment of the test video, and the operation scene for generating the test data is recorded in the test video.
In one possible implementation, the test data determination unit is configured to:
decoding the test video to determine the video duration of the test video;
determining a recording time period of the test video based on the video duration and the creation time;
and acquiring the candidate data with the generation time within the recording time period from the test data set as the test data.
In one possible implementation, the video segment determining unit 802 is configured to:
and when any time in the recording time period is the same as the generation time of the test data, determining the video in the target time length before and after the any time in the test video as the video clip.
In one possible implementation, the apparatus further includes:
the address acquisition unit is configured to store the video clip to obtain the address information of the video clip;
and the data association unit is configured to associate the address information of the video clip, the test data and the verification result of the test data.
In one possible implementation, the apparatus further includes:
and the display unit is configured to respond to the test result viewing instruction, play the video clip on the target page and display the verification result of the test data.
The device provided by the embodiment of the disclosure checks the test data of the target application program; responding to the verification failure of the test data, and intercepting a video clip from the test video based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records the running scene of the test data which generates the verification failure; the test data is tested based on the video clip. By applying the device, when the test data is wrong, only the test video needs to be played back, the data acquisition scene does not need to be manually reproduced, time and labor are saved, and the problem troubleshooting efficiency in the test process is improved.
FIG. 9 is a block diagram illustrating an application testing device in accordance with an exemplary embodiment. Referring to fig. 9, the apparatus includes a video acquisition unit 901, a verification result acquisition unit 902, and a display unit 903.
A video obtaining unit 901, configured to, in response to a test result viewing instruction, obtain a video clip of a target application, where the video clip is obtained by a server by intercepting from a test video based on a generation time of test data of the target application and a creation time of the test video of the target application, and the test video is used to record a test process of the target application;
a verification result obtaining unit 902, configured to obtain a verification result of the test data associated with the video segment, and generate an operation scene of the test data to be recorded in the video segment;
a display unit 903, configured to display a verification result of the test data in the process of playing the video clip.
In one possible implementation, the display unit 903 is configured to:
acquiring a timestamp corresponding to the current video frame based on the playing progress of the video clip;
and when the generation time of the test data is matched with the time stamp, displaying the verification result of the test data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 10 is a block diagram illustrating a computer device according to an example embodiment. The computer device 1000 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1001 and one or more memories 1002, where the memory 1002 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 1001 to implement the application test method provided by the above-mentioned method embodiments. Certainly, the computer device may further have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the computer device may further include other components for implementing the functions of the device, which is not described herein again.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of a computer device to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An application testing method, comprising:
verifying the test data of the target application program;
responding to the test data verification failure, and determining a video clip from the test video based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program operates, and the video clip records an operation scene of the test data which generates the verification failure;
and testing the test data based on the video clip.
2. The application testing method of claim 1, wherein the testing the test data based on the video clip comprises:
and providing a verification result of the video clip and the test data for a terminal, wherein the terminal is used for testing based on the playing of the video clip and the display of the verification result.
3. The application testing method of claim 1, wherein before verifying the test data of the target application, the method further comprises:
determining the test data from the candidate data based on the creation time of the test video and the generation time of the candidate data in the test data set, wherein the uploading equipment of the candidate data is the same as the uploading equipment of the test video, and the running scene of the test data is generated and recorded in the test video.
4. The application testing method of claim 3, wherein determining the test data from the candidate data in the test data set based on a creation time of the test video and a generation time of the candidate data in the test data set comprises:
decoding the test video to determine the video duration of the test video;
determining a recording time period of the test video based on the video duration and the creation time;
and acquiring the candidate data with the generation time within the recording time period from the test data set as the test data.
5. The application testing method of claim 1, wherein after determining a video clip from the test video based on the generation time of the test data and the creation time of the test video, the method further comprises:
storing the video clip to obtain the address information of the video clip;
and associating the address information of the video clip, the test data and the verification result of the test data.
6. An application testing method, comprising:
responding to a test result viewing instruction, acquiring a video clip of a target application program, wherein the video clip is obtained by intercepting from the test video by a server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video is used for recording a test process of the target application program;
acquiring a verification result of test data associated with the video clip, and generating a running scene of the test data to be recorded in the video clip;
and displaying the verification result of the test data in the process of playing the video clip.
7. An application testing apparatus, comprising:
the verification unit is configured to verify the test data of the target application program;
the video clip determining unit is configured to determine a video clip from the test video in response to the test data failure, based on the generation time of the test data and the creation time of the test video, wherein the test video is obtained by recording a display interface when the target application program runs, and the video clip records an operation scene of the test data which has failed to generate the verification;
a testing unit configured to test the test data based on the video clip.
8. An application testing apparatus, comprising:
the video acquisition unit is used for responding to a test result viewing instruction and acquiring a video clip of a target application program, wherein the video clip is obtained by intercepting the test video by a server based on the generation time of the test data of the target application program and the creation time of the test video of the target application program, and the test video is used for recording a test process of the target application program;
the verification result acquisition unit is used for acquiring the verification result of the test data associated with the video clip, and generating an operation scene of the test data to be recorded in the video clip;
and the display unit is used for displaying the verification result of the test data in the process of playing the video clip.
9. A computer device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the application testing method of any of claims 1 to 6.
10. A computer-readable storage medium in which instructions, when executed by a processor of a computer device, enable the computer device to perform the application testing method of any of claims 1 to 6.
CN202010202680.0A 2020-03-20 2020-03-20 Application program testing method and device, computer equipment and storage medium Active CN111309632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010202680.0A CN111309632B (en) 2020-03-20 2020-03-20 Application program testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010202680.0A CN111309632B (en) 2020-03-20 2020-03-20 Application program testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111309632A true CN111309632A (en) 2020-06-19
CN111309632B CN111309632B (en) 2023-08-18

Family

ID=71157276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010202680.0A Active CN111309632B (en) 2020-03-20 2020-03-20 Application program testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111309632B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708522A (en) * 2020-06-23 2020-09-25 西安雷风电子科技有限公司 Video playing component development method and device
CN111857914A (en) * 2020-07-06 2020-10-30 上海意略明数字科技股份有限公司 Method and device for acquiring operation information of application program on terminal, storage medium and terminal
CN112580467A (en) * 2020-12-08 2021-03-30 平安国际智慧城市科技股份有限公司 Video regression testing method and device, computer equipment and storage medium
CN112653921A (en) * 2020-12-24 2021-04-13 广州市公安局花都区分局 Application program network behavior data analysis method, computer device and storage medium
CN112988580A (en) * 2021-03-11 2021-06-18 挂号网(杭州)科技有限公司 Test process reproduction method, device, equipment and storage medium
CN113111200A (en) * 2021-04-09 2021-07-13 百度在线网络技术(北京)有限公司 Method and device for auditing picture file, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9348727B1 (en) * 2015-11-18 2016-05-24 International Business Machines Corporation Enhancing GUI automation testing using video
CN110287101A (en) * 2019-05-22 2019-09-27 深圳壹账通智能科技有限公司 User interface automated testing method, device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9348727B1 (en) * 2015-11-18 2016-05-24 International Business Machines Corporation Enhancing GUI automation testing using video
CN110287101A (en) * 2019-05-22 2019-09-27 深圳壹账通智能科技有限公司 User interface automated testing method, device, computer equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708522A (en) * 2020-06-23 2020-09-25 西安雷风电子科技有限公司 Video playing component development method and device
CN111857914A (en) * 2020-07-06 2020-10-30 上海意略明数字科技股份有限公司 Method and device for acquiring operation information of application program on terminal, storage medium and terminal
CN111857914B (en) * 2020-07-06 2021-10-01 上海意略明数字科技股份有限公司 Method and device for acquiring operation information of application program on terminal, storage medium and terminal
CN112580467A (en) * 2020-12-08 2021-03-30 平安国际智慧城市科技股份有限公司 Video regression testing method and device, computer equipment and storage medium
CN112653921A (en) * 2020-12-24 2021-04-13 广州市公安局花都区分局 Application program network behavior data analysis method, computer device and storage medium
CN112988580A (en) * 2021-03-11 2021-06-18 挂号网(杭州)科技有限公司 Test process reproduction method, device, equipment and storage medium
CN113111200A (en) * 2021-04-09 2021-07-13 百度在线网络技术(北京)有限公司 Method and device for auditing picture file, electronic equipment and storage medium
CN113111200B (en) * 2021-04-09 2024-05-24 百度在线网络技术(北京)有限公司 Method, device, electronic equipment and storage medium for auditing picture files

Also Published As

Publication number Publication date
CN111309632B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN111309632B (en) Application program testing method and device, computer equipment and storage medium
US20220362666A1 (en) Interaction scene starting method and apparatus, storage medium, client, and server
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
KR20170117021A (en) System and Method for Testing and Certification of Media Devices for Use within a Connected Media Environment
CN106776323B (en) Application testing method and device
US20200366967A1 (en) Method and system for monitoring quality of streaming media
CN112612690A (en) User interface information processing method and device, electronic equipment and storage medium
CN113824987B (en) Method, medium, device and computing equipment for determining time consumption of first frame of live broadcasting room
CN110674023B (en) Interface testing method and device
CN105592169A (en) Terminal identification method and terminal identification device
CN117499287A (en) Web testing method, device, storage medium and proxy server
CN111143650B (en) Method, device, medium and electronic equipment for acquiring page data
CN110460884B (en) Advertisement delivery monitoring method and device
CN112653921B (en) Application program network behavior data analysis method, computer device and storage medium
CN112601129A (en) Video interaction system, method and receiving end
CN113297065A (en) Data processing method, game-based processing method and device and electronic equipment
CN112685306A (en) Test method, test device, user terminal and storage medium
CN114443453A (en) Test data recording method, device, equipment and computer storage medium
CN112445697A (en) Method and apparatus for testing applications
CN110968817A (en) Page content detection method, device and system
US20230370687A1 (en) Method and system for creating video heat maps
WO2018018572A1 (en) Sample data collection method, device and system
CN114827674B (en) Network resource display method, device and system
CN113835995B (en) Method and device for generating test cases
CN112256561A (en) Push information testing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant