Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, and a device for testing playing of a multimedia file, so as to automatically test whether a published media resource file can be played.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a multimedia file playing test method is applied to a multimedia file playing test system, and comprises the following steps:
the playing test system acquires a media asset identifier of a newly issued multimedia file; the media asset identifier is provided by a multimedia server;
the playing test system sends a playing command to a playing application deployed in the intelligent terminal; the media asset identifier carried in the playing command is a target media asset identifier; the playing command is used for triggering the playing application to jump to a playing page of the target media asset identifier; the target media asset identification is one of the media asset identifications of the newly issued multimedia file; the multimedia file corresponding to the target media asset identifier is a target multimedia file;
the playing test system acquires User Interface (UI) information of the playing page; if the playing page is a playing failure page, the UI information comprises a playing failure characteristic value;
the playing test system detects whether the target multimedia file is played successfully or not based on the UI information to obtain a first detection result; the first detection result at least comprises information representing the playing failure or success.
Optionally, before performing the test, the method further includes: applying a newly added jump logic function to the playing; the jump logic function is to perform: after receiving the playing command, jumping to a playing page of the media asset identifier carried in the playing command; configuring UI (user interface) embedded points of a playing failure page and a playing success page of the playing application; wherein, the UI embedded points corresponding to the failed playing page at least include: playing the failure characteristic value.
Optionally, if the playing page is a successfully played page, the UI information includes: at least one of the media asset name information, the media asset playing total duration information and the version information; the method further comprises the following steps: and if the target multimedia file is successfully played, the playing test system detects whether the target multimedia file is issued by the multimedia server or not based on the UI information to obtain a second detection result.
Optionally, the media asset name information includes a media asset name attribute and a corresponding attribute value; the total duration information of the media asset playing comprises: the media asset playing total duration attribute and the corresponding attribute value; the version information comprises version attributes and corresponding attribute values; the UI of the playing success page is buried: at least one of a media asset name attribute, a media asset playing total duration attribute and a version attribute; and the playing application puts the corresponding attribute value to a playing success page when jumping.
Optionally, the system includes: a playing test server and playing test equipment; the playing test equipment is used for acquiring a media asset identifier of a newly issued multimedia file, sending a playing command and acquiring UI information; the playing test server or the playing test equipment is used for detecting whether the target multimedia file is played successfully or not based on the UI information; the playing test server or the playing test device is used for detecting whether the target multimedia file is issued by the multimedia server.
A multimedia file playing test system, comprising:
the acquisition unit is used for acquiring the media asset identifier of the newly issued multimedia file; the media asset identifier is provided by a multimedia server;
the sending unit is used for sending a playing command to a playing application deployed in the intelligent terminal; the media asset identifier carried in the playing command is a target media asset identifier; the playing command is used for triggering the playing application to jump to a playing page of the target media asset identifier; the target media asset identification is one of the media asset identifications of the newly issued multimedia file; the multimedia file corresponding to the target media asset identifier is a target multimedia file;
a UI information acquisition unit, configured to acquire UI information of a user interface of the play page; if the playing page is a playing failure page, the UI information comprises a playing failure characteristic value;
the first detection unit is used for detecting whether the target multimedia file is played successfully or not based on the UI information to obtain a first detection result; the first detection result at least comprises information representing the playing failure or success.
Optionally, the UI embedded point corresponding to the failed playing page at least includes: playing the failure characteristic value.
Optionally, if the playing page is a successfully played page, the UI information includes: at least one of the media asset name information, the media asset playing total duration information and the version information; the system further comprises: a second detection unit for: and if the target multimedia file is successfully played, the playing test system detects whether the target multimedia file is issued by the multimedia server or not based on the UI information to obtain a second detection result.
Optionally, the system includes: a playing test server and playing test equipment; the acquisition unit, the sending unit and the UI information acquisition unit belong to the playing test equipment; the first detection unit belongs to the playing test server or the playing test equipment; the second detection unit belongs to the play test server or the play test device.
A play test apparatus comprising:
the acquisition unit is used for acquiring the media asset identifier of the newly issued multimedia file; the target media asset identifier is provided by a multimedia server;
the sending unit is used for sending a playing command to a playing application deployed in the intelligent terminal; the media asset identifier carried in the playing command is a target media asset identifier; the playing command is used for triggering the playing application to jump to a playing page of the target media asset identifier; the target media asset identification is one of the media asset identifications of the newly issued multimedia file; the multimedia file corresponding to the target media asset identifier is a target multimedia file;
a UI information acquisition unit, configured to acquire UI information of a user interface of the play page; if the playing page is a playing failure page, the UI information comprises a playing failure characteristic value;
the first detection unit is used for detecting whether the target multimedia file is played successfully or not based on the UI information to obtain a first detection result; the first detection result at least comprises information representing the playing failure or success.
It can be seen that, in the embodiment of the present invention, after the play test system obtains the asset identifier, a play command (carrying the target asset identifier) is sent to the play application to trigger the play application to jump to the play page of the target asset identifier, thereby implementing automatic play of the multimedia file, and detecting whether the play is successful according to the UI information of the play page, because when the play page is a play-failed page, the UI information includes a play-failed characteristic value, otherwise, the UI information does not include a play-failed characteristic value, and by searching the UI information, it can be determined whether the play-failed characteristic value is included, thereby determining that the multimedia file is successfully played.
Detailed Description
The media resource file may be published by a multimedia server (web server), and the video playing application deployed on the intelligent terminal may access the media resource file on the web server.
Related staff of media resource operation often need to publish some video media resource files on a server, and then manually click each media resource file in a play application to verify whether the media resource file can be played, which all needs to consume a large amount of manpower.
In view of this, embodiments of the present invention provide a method, a system, and a device for testing playing of a multimedia file, so as to automatically test whether a published media resource file can be played.
Fig. 1 shows an exemplary structure of a multimedia file playing test system (playing test system for short), which at least includes: anacquisition unit 1, atransmission unit 2, a UIinformation acquisition unit 3, afirst detection unit 4, and the like.
In some other embodiments, the system may further comprise asecond detection unit 5, etc.
The units can belong to the same equipment or belong to different equipment. For example, FIG. 2 illustrates exemplary devices included in a multimedia file playback testing system: the playing test server and the playing test equipment.
The web server and the playing test server can be used as components of the same server or can be independent servers.
The playing test device may be deployed in the computer in the form of software, and at this time, it may also be referred to as a test playing module or a test playing module.
In one example, the above-describedacquisition unit 1,transmission unit 2, and UIinformation acquisition unit 3 may belong to a playback test apparatus, and thefirst detection unit 4 may belong to a playback test server.
In another example, the above-describedacquisition unit 1,transmission unit 2, UIinformation acquisition unit 3, andfirst detection unit 4 may belong to a playback test apparatus, and thesecond detection unit 5 may belong to a playback test server.
The functions of each device and each unit will be further described later in this document in conjunction with a multimedia file playing test method.
Fig. 3 shows an exemplary flow of the multimedia file playing test method, which includes:
s1: the playing test system acquires a media asset identifier of a newly issued multimedia file;
in one example, referring to fig. 4, the asset identifier may be provided by a multimedia server. The server side in fig. 4 includes a multimedia server and a play test server.
The multimedia server will assign each multimedia file a unique asset Identification (ID) number, such as ID number 32019121109140773348379601615750 for showing my and my home movies.
In one example, information such as a media asset ID sent from a multimedia server may be received by the obtainingunit 1 in the playing test system (playing test device/playing test module) in real time.
More specifically, the play test equipment/play test module may periodically (e.g., every 1 second) request the newly issued asset ID from the multimedia server via an http request. The multimedia server finds that the media assets are updated, and sends the media assets to the broadcast testing module. When there are multiple multimedia files updated, multiple media asset IDs are sent to the obtainingunit 1.
S2: and the playing test system sends a playing command to a playing application deployed in the intelligent terminal.
In one example, step S2 may be performed by the sendingunit 2 in the play test system (play test device/play test module).
The playing command may carry a resource identifier (referred to as a target resource identifier), where the target resource identifier is one of the resource identifiers of the newly issued multimedia files.
For example, assuming that themultimedia server issues 3 asset IDs, the sendingunit 2 will automatically play and test the 3 asset IDs.
More specifically, in the case of using one intelligent terminal, the sendingunit 2 sends play commands to the play applications deployed in the intelligent terminal one by one, and each play command carries one ID of the 3 asset IDs; if a plurality of intelligent terminals are used, the sendingunit 2 can simultaneously send playing commands to the playing applications in different intelligent terminals, so that the plurality of intelligent terminals simultaneously perform corresponding operations according to the playing commands, and the media asset IDs carried in each playing command can be different.
The playing command can be used for triggering the playing application to jump to a playing page of the target media asset identifier, at the moment, the media asset is in a playing state and is consistent with a playing page which is entered after the user directly clicks the media asset, and therefore the video is automatically played.
In one example, taking an intelligent terminal device deploying an Android operating system (Android) as an example, the target asset identifier may be carried by an adb command.
S3: the playing test system acquires User Interface (UI) information of a playing page.
The playing page may be a failed playing page or a successful playing page.
If the playing page is a playing failure page, the corresponding UI information comprises a playing failure characteristic value.
Taking an intelligent terminal device with an Android operating system deployed as an example, the UI information is an XML (eXtensible Markup Language) file.
Technically, the Android main interface is a Window (Window) type, the Window type is an XML (extensible markup language) file essentially, and the Android terminal can automatically parse the XML file, so that a visible interface is displayed for a user.
In one example, the UIinformation obtaining unit 3 in the playing test system (playing test device/playing test module) may obtain the XML file through the adb command, so as to parse the relevant information therein.
Fig. 4a shows an example of an XML file acquired by the UIinformation acquisition unit 3 when the playback page is a playback failure page, and fig. 4b shows an example of an XML file acquired by the UIinformation acquisition unit 3 when the playback page is a playback success page.
The "data request failed, please try again later" in fig. 4a is the play failure characteristic value. Those skilled in the art can flexibly design the playback failure characteristic value according to the requirement, which is not described herein.
S4: the playing test system detects whether the target multimedia file is played successfully or not based on the UI information to obtain a first detection result.
The target multimedia file is a multimedia file corresponding to the target media asset identifier.
Step S4 may be performed by thefirst detection unit 4 in the play test system.
It should be noted that the first detectingunit 4 may belong to a playing test server or a playing test device, and when belonging to the playing test server, the playing test device may send the obtained UI information to the playing test server, and the first detectingunit 4 in the playing test server detects whether the target multimedia file is successfully played based on the UI information to obtain a first detection result.
The first detection result at least comprises information representing the playing failure or success.
Taking the XML file of the playing page shown in fig. 4a and 4b as an example, the UIinformation obtaining unit 3 obtains the XML file through the adb command, and analyzes the related information therein.
When there is a playback failure feature value (e.g., "data request failed, please try again later") in the XML file, thefirst detection unit 4 obtains information that characterizes playback failure, otherwise obtains information that characterizes playback success.
Specifically, different numerical values, characters, character strings and the like can be used for representing the playing failure or success.
It can be seen that, in the embodiment of the present invention, after the play test system obtains the asset identifier, a play command (carrying the target asset identifier) is sent to the play application to trigger the play application to jump to the play page of the target asset identifier, thereby implementing automatic play of the multimedia file, and detecting whether the play is successful according to the UI information of the play page, because when the play page is a play-failed page, the UI information includes a play-failed characteristic value, otherwise, the UI information does not include a play-failed characteristic value, and by searching the UI information, it can be determined whether the play-failed characteristic value is included, thereby determining that the multimedia file is successfully played.
In another embodiment of the present invention, referring to fig. 5, the multimedia file playing test method further includes the following steps:
s5: and if the target multimedia file is successfully played, the playing test system detects whether the target multimedia file is issued by the multimedia server based on the UI information to obtain a second detection result.
The second detection result at least comprises information representing whether the target multimedia file is issued by the multimedia server.
Step S4 may be performed by thesecond detection unit 5 in the play test system.
It should be noted that, if the target multimedia file is successfully played, that is, the playing page is a successfully played page, the UI information obtained in step S3 includes: at least one of the media asset name information, the media asset playing total duration information and the version information.
Wherein the media asset name information further comprises: media name attribute and corresponding attribute value;
the total duration information of the media asset playing further comprises: the media asset playing total duration attribute and the corresponding attribute value;
the version information further includes: version attributes and corresponding attribute values.
Taking the UI information including the name information of the asset, the total playing duration information of the asset and the version information as an example, the second detectingunit 5 may compare the name information of the asset, the total playing duration information of the asset and the version information pre-associated with the target asset ID with the obtained name information of the asset, the total playing duration information of the asset and the version information, respectively, and determine that the target multimedia file is published by the multimedia server if the three are all consistent, otherwise, determine that the target multimedia file is not published by the multimedia server.
If the user wants to obtain the UI information, the user needs to customize and develop the playing application, configure UI embedded points for a UI design file (the UI design file is an XML file, information is preset in the UI design file, and the playing application puts the preset information into the XML file), and also need to logically customize the playing application.
Taking the case that the playing test system includes the playing test server and the playing test device, fig. 6 shows an exemplary flow of the multimedia file playing test method:
s61: adding a jump logic function to the playing application;
the jump logic function is to perform: and after receiving the playing command, jumping to a playing page of the media asset identifier carried in the playing command.
S62: and configuring UI (user interface) embedded points of a playing failure page and a playing success page of the playing application.
Specifically, UI buried points may be configured in the UI design file.
Wherein, the UI that the playing failure page corresponds to buries the point and includes at least: playing the failure characteristic value. When the playing application jumps to the failed playing page, the playing failure feature value is put into (the XML file of) the failed playing page.
And UI burial points for successfully played pages may include: at least one of a media asset name attribute, a media asset playing total duration attribute and a version attribute. When the playing application jumps to the successfully played page, the corresponding attribute value is put into the (XML file of the) successfully played page.
S63: and the playing test equipment/the testing playing module receives the media asset ID issued by the web server.
The playing test module is a program running on a computer, and the operation logic of the playing test module can comprise logic for receiving media asset ID logic issued by a web server, logic for sending an adb command, logic for analyzing UI information of a playing page and logic for uploading data to a playing test server.
It should be noted that, in this embodiment, the web server may implement the function of the play test server.
S64: and the playing test equipment/the test playing module sends a playing command to a playing application deployed in the intelligent terminal.
For example, for a media ID: 32019121109140773348379601615750, the corresponding adb command can be adb shell am start-n com, hunantv, operator/com, fonsvew, mangotv, gateway activity, es viewType 0, es contentId 32019121109140773348379601615750, and the media ID in the adb command is set according to the media ID issued by the server.
The asset ID contained in the play command may be referred to as a target asset ID.
S65: and the playing test equipment/the playing test module acquires UI information of the playing page.
More specifically, the UI information may be acquired by an adb command (adb shell/system/bin/UI automaker dump-compressed/data/local/tmp/uidump. xml).
The UI information includes UI location information.
S66: the playing test equipment/the playing test module analyzes the UI information, obtains UI embedded point information (such as information of whether playing failure characteristic values, media asset name information, total media asset playing time length, version information and the like exist or not) in the UI information, and then uploads the UI embedded point information to the web server through the network.
Of course, the UI information can also be directly uploaded to the web server, and the web server automatically analyzes and obtains the UI buried point information.
S67: the web server detects whether the target multimedia file is played successfully or not based on the UI information to obtain a first detection result.
The first detection result at least comprises information representing the playing failure or success.
That is, after receiving the above information, the web server first determines whether the target multimedia file can be successfully played. For details, see step S4 described above.
S68: and if the playing is successful, comparing the UI embedded point information with the related information pre-associated with the target media asset ID to obtain a second detection result.
In this embodiment, the second detection result is used to characterize whether the two are consistent.
If the media asset ID is consistent with the media asset ID, the media asset ID is considered to be successfully played in the playing application and is the media asset issued by the server.
Taking the UI embedded point information including the media asset name information, the media asset playing total duration information, and the version information as an example, the media asset name information, the media asset playing total duration information, and the version information pre-associated with the target media asset ID may be compared with the acquired media asset name information, the media asset playing total duration information, and the version information, respectively, and the three are all consistent, it is determined that the target multimedia file is published by the multimedia server, otherwise, it is determined that the target multimedia file is not published by the multimedia server.
S69: and the Web server stores the detection result into the database and then displays the detection result through a Web page.
Therefore, related staff of the media resource operation class can acquire a conclusion from the web page in real time, so that a full-flow closed loop from the media resource issuing of the server to the verification of whether the playing can be performed is formed, manual participation is not needed, and the method is simple and convenient.
The detection result may include the first detection result, or the first detection result and the second detection result.
The overall module flow may be as shown in fig. 7.
Turning now to the playback test apparatus, FIG. 8 shows an exemplary configuration of a playback test apparatus, including:
an obtainingunit 81, configured to obtain a media asset identifier of a newly issued multimedia file; the target media asset identifier is provided by the multimedia server;
a sendingunit 82, configured to send a play command to a play application deployed in the intelligent terminal; wherein, the media asset identification carried in the playing command is a target media asset identification; the playing command is used for triggering the playing application to jump to a playing page of the target media asset identifier; the target media asset identifier is one of the media asset identifiers of the newly issued multimedia files; the multimedia file corresponding to the target media asset identifier is a target multimedia file;
a UIinformation acquisition unit 83 for acquiring UI information of a user interface of a playback page; if the playing page is a playing failure page, the UI information comprises a playing failure characteristic value;
a first detectingunit 84, configured to detect whether the target multimedia file is successfully played based on the UI information, so as to obtain a first detection result; the first detection result at least comprises information representing the playing failure or success.
For details, please refer to the above description, which is not repeated herein.
In other embodiments, the first detectingunit 84 may belong to the play test server.
In other embodiments of the present invention, the apparatus may further include a second detecting unit, configured to: and if the target multimedia file is successfully played, detecting whether the target multimedia file is issued by the multimedia server or not based on the UI information to obtain a second detection result.
For details, please refer to the above description, which is not repeated herein.
Before testing, a jump logic function needs to be added to the playing application, and UI nodes of a playing failure page and a playing success page of the playing application need to be configured.
Wherein the jump logic function is to perform: and after receiving the playing command, jumping to a playing page of the media asset identifier carried in the playing command.
As for UI buried points, UI buried points corresponding to the playing failure page at least include: playing the failure characteristic value. And UI burial points for successfully played pages may include: at least one of a media asset name attribute, a media asset playing total duration attribute and a version attribute.
During specific implementation, the UI embedded point can be configured in the UI design file, and when the playing page is jumped to, the playing application can put the UI embedded point information preset in the UI design file into the XML file corresponding to the playing page.
For example, when the playback application jumps to the playback failure page, the playback application will put the playback failure feature value into (the XML file of) the playback failure page; when the page is jumped to the page with successful playing, the attribute values of the name attribute, the total playing duration attribute and the version attribute of the media asset are put into (the XML file of) the page with successful playing.
Those of skill would further appreciate that the various illustrative components and model steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. A skilled artisan may use different PFs for each particular application to implement the described functionality, but such implementation should not be considered beyond the scope of the present invention.
The steps of a PF or model described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, WD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.