CN116153345A - Playing test method and device, storage medium and electronic device - Google Patents

Playing test method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116153345A
CN116153345A CN202211649527.8A CN202211649527A CN116153345A CN 116153345 A CN116153345 A CN 116153345A CN 202211649527 A CN202211649527 A CN 202211649527A CN 116153345 A CN116153345 A CN 116153345A
Authority
CN
China
Prior art keywords
music
playing
link
list
piece
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.)
Pending
Application number
CN202211649527.8A
Other languages
Chinese (zh)
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211649527.8A priority Critical patent/CN116153345A/en
Publication of CN116153345A publication Critical patent/CN116153345A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The application discloses a play test method and device, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the play test method comprises the following steps: calling a play test interface of target equipment, and acquiring a target file returned by the play test interface; determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index; and verifying the music list and the playing links of each piece of music, and determining a playing test result according to the verification result. By adopting the technical scheme, the problem that the test efficiency is low due to the fact that the equipment is subjected to music test in an artificial mode is solved.

Description

Playing test method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart families, in particular to a playing test method and device, a storage medium and an electronic device.
Background
In general, a certain number of music links are required to be built in the device, and then before the device leaves the factory, a music test is required to be performed on the device to determine whether the number of the built-in music links in the device meets the requirement, and whether the device can normally play music according to the built-in music links. The existing playing test method adopts a manual method to test, specifically, a tester speaks to play music firstly, after the music is played, the tester speaks to play another song, the tester speaks to play the next song, and the device continues to switch the song playing, so as to determine whether the number of music links reaches the requirement and whether the music can be played normally according to the built-in music links. However, this method requires the tester to constantly say the next, and is a waste of manpower and time.
Aiming at the problem that in the related art, a manual mode is adopted to carry out music test on equipment, so that the test efficiency is low, no effective solution is proposed at present.
Accordingly, there is a need for improvements in the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the invention provides a playing test method and device, a storage medium and an electronic device, which at least solve the problem of lower test efficiency caused by manually testing equipment.
According to an aspect of the embodiment of the present invention, there is provided a play test method, including: calling a play test interface of target equipment, and acquiring a target file returned by the play test interface; determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index; and verifying the music list and the playing links of each piece of music, and determining a playing test result according to the verification result.
In an exemplary embodiment, verifying the music list and each play link includes: acquiring the list length of the music list, and determining whether the list length is greater than or equal to a preset length; and sending a target request to a server through the playing link of each piece of music, and determining whether the playing link of each piece of music meets a preset condition according to a return result sent by the server in response to the target request.
In an exemplary embodiment, sending the target request to the server through the play link of each piece of music includes: determining whether the playing link of each piece of music meets a preset format; and under the condition that the playing link of each piece of music meets the preset format, sending a target request to a server through the playing link of each piece of music.
In an exemplary embodiment, determining whether the play link of each piece of music satisfies a preset format includes: determining whether a first character and a second character exist in a playing link of each piece of music; and determining that each music link meets the preset format under the condition that the first character exists in each music link and the second character does not exist in each music link.
In an exemplary embodiment, determining whether the play link of each piece of music satisfies a preset condition according to a return result sent by the server in response to the target request includes: determining the return time of a return result corresponding to the playing link of each piece of music, and analyzing the return result to obtain a return code, a return head and a return body; and under the condition that the return time is smaller than the preset time, the return code is a target return code, the format of the return head indicating music is a target format, and the size of the return body indicating music is in a target range, determining that the playing link of each piece of music meets the preset condition.
In one exemplary embodiment, determining the play test result based on the verification result includes: determining that the target equipment playing test is successful when the verification result indicates that the list length of the music list is greater than or equal to a preset length and the playing link of each piece of music in the music list meets the preset condition; and determining that the playing test of the target equipment fails under the condition that the verification result indicates that the list length of the music list is smaller than the preset length or that the playing link of one piece of music in the music list does not meet the preset condition.
In an exemplary embodiment, after determining that the target device play test fails, the method further comprises: determining the reason of the failure of the playing test of the target equipment; adding music information of a plurality of pieces of music to the music list under the condition that the list length of the music list is smaller than a preset length, so that the list length of the music list is the preset length, wherein the music information at least comprises a play link, and the play link meets the preset condition; and/or replacing the playing links of the target quantity of music in the music list with the playing links meeting the preset condition under the condition that the playing links of the target quantity of music in the music list do not meet the preset condition.
According to another aspect of the embodiment of the present invention, there is also provided a play test device, including: the acquisition module is used for calling a playing test interface of the target equipment and acquiring a target file returned by the playing test interface; the first determining module is used for determining a music list to be tested from the target file according to a first index and extracting a playing link of each piece of music from the music list according to a second index; and the second determining module is used for verifying the music list and the playing links of each piece of music and determining a playing test result according to the verification result.
In an exemplary embodiment, the second determining module is further configured to obtain a list length of the music list, and determine whether the list length is greater than or equal to a preset length; and sending a target request to a server through the playing link of each piece of music, and determining whether the playing link of each piece of music meets a preset condition according to a return result sent by the server in response to the target request.
In an exemplary embodiment, the second determining module is further configured to determine whether the play link of each piece of music meets a preset format; and under the condition that the playing link of each piece of music meets the preset format, sending a target request to a server through the playing link of each piece of music.
In an exemplary embodiment, the second determining module is further configured to determine whether a first character and a second character exist in the play link of each piece of music; and determining that each music link meets the preset format under the condition that the first character exists in each music link and the second character does not exist in each music link.
In an exemplary embodiment, the second determining module is further configured to determine a return time of a return result corresponding to the play link of each piece of music, and parse the return result to obtain a return code, a return header, and a return body; and under the condition that the return time is smaller than the preset time, the return code is a target return code, the format of the return head indicating music is a target format, and the size of the return body indicating music is in a target range, determining that the playing link of each piece of music meets the preset condition.
In an exemplary embodiment, the second determining module is further configured to determine that the target device playing test is successful when the verification result indicates that the list length of the music list is greater than or equal to a preset length, and the playing link of each piece of music in the music list meets the preset condition; and determining that the playing test of the target equipment fails under the condition that the verification result indicates that the list length of the music list is smaller than the preset length or that the playing link of one piece of music in the music list does not meet the preset condition.
In an exemplary embodiment, the apparatus further comprises: the processing module is used for determining the reason of the playing test failure of the target equipment after determining the playing test failure of the target equipment; adding music information of a plurality of pieces of music to the music list under the condition that the list length of the music list is smaller than a preset length, so that the list length of the music list is the preset length, wherein the music information at least comprises a play link, and the play link meets the preset condition; and/or replacing the playing links of the target quantity of music in the music list with the playing links meeting the preset condition under the condition that the playing links of the target quantity of music in the music list do not meet the preset condition.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described play test method when run.
According to still another aspect of the embodiments of the present invention, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the play test method through the computer program.
According to the invention, the target file returned by the playing test interface is obtained, the music list to be tested and the playing link of each piece of music are determined from the target file, the music list and the playing link of each piece of music are further verified, and the playing test result is determined according to the verification result. Because music is tested on the equipment in a machine mode, the testing efficiency is improved, the labor cost is saved, and the problem that the testing efficiency is lower due to the fact that the music is tested on the equipment in a manual mode is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a play test method according to an embodiment of the present application;
FIG. 2 is a flow chart (one) of a play test method according to an embodiment of the invention;
FIG. 3 is a flow chart (II) of a play test method according to an embodiment of the invention;
FIG. 4 is a block diagram (I) of a play test apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram (two) of a play test apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a play test method is provided. The playing test method is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (intelligent house) ecology and the like. Alternatively, in the present embodiment, the above-described play test method may be applied to a hardware environment constituted by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
In order to solve the above-mentioned problem, in this embodiment, a play test method is provided, including but not limited to application in an automated test script, and fig. 2 is a flowchart (one) of the play test method according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, calling a play test interface of target equipment, and acquiring a target file returned by the play test interface;
as an alternative example, the target device includes the terminal device 102 described above.
Step S204, determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index;
note that, music information having a plurality of pieces of music in the music list includes, but is not limited to: music name, singer, play link, etc.
As an alternative example, the formats of the object file include, but are not limited to, JSON format, dictionary format. When the format of the target file is dictionary format, the first index is the "key" corresponding to the target file dictionary, and the music list is the "value" corresponding to the target file dictionary. Illustratively, the first index is a data-skilresult-list.
As an alternative example, the format of the music information in the music list is a dictionary format, the second index is a "key" corresponding to the music information dictionary, the play link is a "value" corresponding to the music information dictionary, and the second index is url.
As an alternative example, the playing link of each piece of music may also be directly determined from the target file according to a third index, which is exemplified by data-skilresult-list [ ] -url.
In this embodiment, by adopting the above manner, the music list to be tested in the target device and the music link of each piece of music in the music list can be quickly and accurately acquired.
Step S206, verifying the music list and the playing links of each piece of music, and determining a playing test result according to the verification result.
In an exemplary embodiment, the verification of the music list and the play link of each music may be achieved by the following steps S11-S12:
step S11: acquiring the list length of the music list, and determining whether the list length is greater than or equal to a preset length;
it should be noted that, the list length of the music list may be obtained through an objective function, where the objective function is a function for calculating the length of the list.
Step S12: and sending a target request to a server through the playing link of each piece of music, and determining whether the playing link of each piece of music meets a preset condition according to a return result sent by the server in response to the target request.
It should be noted that, the steps S11 and S12 are not performed in the order.
In one exemplary embodiment, it is necessary to determine whether the play link of each music satisfies a preset format; and sending a target request to a server through the play link of each piece of music under the condition that the play link of each piece of music is determined to meet the preset format.
It should be noted that, if the playing link of the music does not meet the preset format, it may be directly determined that the playing link of the music does not meet the preset condition, and then the target request is not required to be sent to the server through the playing link of the music.
By the steps, the situation that the playing link of the music does not meet the preset format can be avoided, and whether the preset condition is met or not can be verified by sending the target request to the server through the music link.
In an exemplary embodiment, it may be determined whether the play link of each music satisfies a preset format by: determining whether a first character and a second character exist in a playing link of each piece of music; and under the condition that the first character exists in the playing link of each piece of music and the second character does not exist in the playing link of each piece of music, determining that the playing link of each piece of music meets the preset format.
Note that the first character includes: keywords of a channel provider providing music; the second character includes: illegal characters. If the first character does not exist in the music link or the second character exists in the music link, the music link does not satisfy the preset format.
In an exemplary embodiment, determining whether the play link of each piece of music satisfies the preset condition according to the returned result sent by the server in response to the target request may be implemented by the following steps S21-S22:
step S21: determining the return time of a return result corresponding to the playing link of each piece of music, and analyzing the return result to obtain a return code, a return head and a return body;
note that, the return result includes: return code, return header, return body.
The return time is used to indicate the response time of the server, that is, the return time is equal to the time when the return result sent by the server is obtained minus the time when the target request is sent to the server.
Step S22: and under the condition that the return time is smaller than the preset time, the return code is a target return code, the format of the return head indication music is a target format, and the size of the return body indication music is in a target range, determining that the playing link of each piece of music meets the preset condition.
It should be noted that if the return time is greater than or equal to the preset time, the response of the server is overtime, and the playing link of the music does not meet the preset condition; if the format of the music is not the target format, the music cannot be played, and the playing link of the music does not meet the preset condition; if the size of the music is not within the target range, it is indicated that the music is too small or too large, and the play link of the music does not satisfy the preset condition.
As an alternative example, the target return code is 200, the target format is mp4 format, and the target range is 1-10MB.
In one exemplary embodiment, determining the play test result based on the verification result includes: determining that the target equipment playing test is successful when the verification result indicates that the list length of the music list is greater than or equal to a preset length and the playing link of each piece of music in the music list meets the preset condition; and determining that the playing test of the target equipment fails under the condition that the verification result indicates that the list length of the music list is smaller than the preset length or that the playing link of one piece of music in the music list does not meet the preset condition.
As an alternative example, the preset length may be 20.
Through the steps, the target file returned by the playing test interface is obtained, the music list to be tested and the playing link of each piece of music are determined from the target file, the music list and the playing link of each piece of music are further verified, and the playing test result is determined according to the verification result. Because music is tested on the equipment in a machine mode, the testing efficiency is improved, the labor cost is saved, and the problem that the testing efficiency is lower due to the fact that the music is tested on the equipment in a manual mode is solved.
In an exemplary embodiment, after determining that the target device play test fails, the method further has the following steps S31-S33:
step S31: determining the reason of the failure of the playing test of the target equipment;
step S32: adding music information of a plurality of pieces of music to the music list under the condition that the list length of the music list is smaller than a preset length, so that the list length of the music list is the preset length, wherein the music information at least comprises a play link, and the play link meets the preset condition; and/or
Step S33: and under the condition that the playing links of the target quantity of music in the music list do not meet the preset condition, replacing the playing links of the target quantity of music in the music list with the playing links meeting the preset condition.
In this embodiment, when the target device does not pass the play test, the music list is actively modified, so that the target device can pass the play test when the music list is modified, thereby avoiding the subsequent modification of the music list by operation and maintenance personnel and saving time and labor cost.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the invention. For better understanding of the above method, the following description will explain the above process with reference to the examples, but is not intended to limit the technical solution of the embodiments of the present invention, specifically:
in an alternative embodiment, the automated test concept of the present application is: the interface is called to test the corpus of playing music, a music list is obtained, assertion rules are compiled, whether the length of the music list meets the requirements or not is checked, and whether a music link is effective or not is checked. Specifically, fig. 3 is a flowchart (two) of a play test method according to an embodiment of the present invention, which includes the following steps:
step S302: starting;
step S304: sending a request for playing music;
step S306: obtaining a return result of the interface;
it should be noted that, the obtained returned result of the interface includes: a target file;
step S308: extracting a music list according to the hierarchy;
it should be noted that the hierarchy includes the first index described above, for example, data-skilresult-list.
Step S310: checking whether the format of the music list is correct, if so, executing step S314, otherwise executing step S312;
it should be noted that if the format of the acquired music list is a list format, the format is correct, otherwise the format is wrong.
Step S312: determining that the returned format is wrong, and the test is not passed;
step S314: checking whether the length of the music list is greater than or equal to the expected value (corresponding to the preset length), if yes, executing step S318, otherwise executing step S316;
it should be noted that, whether the length of the music list is greater than or equal to the expected value can be checked by 'data-skilresult-list': [ 'length > =', 20 ]; wherein 'data-skilresult-list' represents an extraction level of the interface return result, and a music list is extracted according to the level; [ 'length > =', 20] means that the length of the music list to be checked is greater than or equal to 20 songs.
Step S316: determining that the number of music is insufficient and the test is not passed;
step S318: extracting all music links in the music list according to the hierarchy;
step S320: traversing all the music links, checking whether the music links are valid, and executing step S324 if the music links are valid, otherwise executing step S322;
it should be noted that, whether the music links are valid can be verified by ' data-skilresult-list [. Times ] -url ': [ ' judgeurl ', ' ], where ' data-skilresult-list [. Times ] -url ' represents the extraction level of the interface return result, and all the music links in the music list are extracted according to the level. [ 'judgeurl', "] indicates that it is necessary to check whether all music links are valid.
As an alternative example, check if the link is valid contains the following:
1) Checking whether the link contains illegal characters (corresponding to the second characters) according to the agreed characters, and if the link contains the illegal characters, judging that the link is messy, namely that the link is invalid;
2) It is checked whether the link contains a channel key (corresponding to the first character) and if the channel key is not included, it is determined that the link is invalid.
3) Sending a request to request the URL (i.e. playing link of music) and obtaining a return result of the server;
if the maximum response time is exceeded and the return result is not obtained, judging that the time is overtime, and if the time is overtime, the link is abnormal; if the return code in the return result is not 200, requesting exception, namely link exception; if the return format is not a playable format (e.g., mp 4) according to the return header check in the return result, the link is abnormal; if the returned file size is determined to exceed the maximum threshold or to be smaller than the minimum threshold according to the returned body in the returned result, the invalid song is judged, namely the link is invalid.
Step S322: determining that the music link is invalid and the test is not passed;
step S324: the test is determined to pass.
That is, in the present embodiment, whether the music list is normal can be tested by way of an automated script by writing a general assertion rule. The automatic script can cover various main control equipment, such as a sound box, a refrigerator, a water heater, an air conditioner and the like, and has the advantages of high execution speed, no influence of a test environment, accurate test result and labor time cost saving.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present invention.
In this embodiment, a play test device is further provided, and the play test device is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Fig. 4 is a block diagram (a) of a play test apparatus according to an embodiment of the present invention, the apparatus including:
the obtaining module 42 is configured to call a play test interface of a target device, and obtain a target file returned by the play test interface;
a first determining module 44, configured to determine a music list to be tested from the target file according to a first index, and extract a play link of each piece of music from the music list according to a second index;
the second determining module 46 is configured to verify the music list and the play link of each piece of music, and determine a play test result according to the verification result.
Through the device, the target file returned by the playing test interface is obtained, the music list to be tested and the playing link of each piece of music are determined from the target file, the music list and the playing link of each piece of music are further verified, and the playing test result is determined according to the verification result. Because music is tested on the equipment in a machine mode, the testing efficiency is improved, the labor cost is saved, and the problem that the testing efficiency is lower due to the fact that the music is tested on the equipment in a manual mode is solved.
In an exemplary embodiment, the second determining module 46 is further configured to obtain a list length of the music list, and determine whether the list length is greater than or equal to a preset length; and sending a target request to a server through the playing link of each piece of music, and determining whether the playing link of each piece of music meets a preset condition according to a return result sent by the server in response to the target request.
In an exemplary embodiment, the second determining module 46 is further configured to determine whether the play link of each piece of music meets a preset format; and under the condition that the playing link of each piece of music meets the preset format, sending a target request to a server through the playing link of each piece of music.
In an exemplary embodiment, the second determining module 46 is further configured to determine whether the first character and the second character exist in the play link of each piece of music; and determining that each music link meets the preset format under the condition that the first character exists in each music link and the second character does not exist in each music link.
In an exemplary embodiment, the second determining module 46 is further configured to determine a return time of a return result corresponding to the play link of each piece of music, and parse the return result to obtain a return code, a return header, and a return body; and under the condition that the return time is smaller than the preset time, the return code is a target return code, the format of the return head indicating music is a target format, and the size of the return body indicating music is in a target range, determining that the playing link of each piece of music meets the preset condition.
In an exemplary embodiment, the second determining module 46 is further configured to determine that the target device playing test is successful when the verification result indicates that the list length of the music list is greater than or equal to a preset length, and the playing link of each piece of music in the music list meets the preset condition; and determining that the playing test of the target equipment fails under the condition that the verification result indicates that the list length of the music list is smaller than the preset length or that the playing link of one piece of music in the music list does not meet the preset condition.
In an exemplary embodiment, fig. 5 is a block diagram (two) of a play test apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus further includes: a processing module 48, configured to determine a cause of the failure of the playing test of the target device after determining that the playing test of the target device fails; adding music information of a plurality of pieces of music to the music list under the condition that the list length of the music list is smaller than a preset length, so that the list length of the music list is the preset length, wherein the music information at least comprises a play link, and the play link meets the preset condition; and/or replacing the playing links of the target quantity of music in the music list with the playing links meeting the preset condition under the condition that the playing links of the target quantity of music in the music list do not meet the preset condition.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, calling a play test interface of target equipment, and acquiring a target file returned by the play test interface;
s2, determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index;
and S3, verifying the music list and the playing links of each piece of music, and determining a playing test result according to the verification result.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, calling a play test interface of target equipment, and acquiring a target file returned by the play test interface;
s2, determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index;
and S3, verifying the music list and the playing links of each piece of music, and determining a playing test result according to the verification result.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. A play test method, comprising:
calling a play test interface of target equipment, and acquiring a target file returned by the play test interface; determining a music list to be tested from the target file according to a first index, and extracting a playing link of each piece of music from the music list according to a second index;
and verifying the music list and the playing links of each piece of music, and determining a playing test result of the target equipment according to the verification result.
2. The method of claim 1, wherein verifying the music list and each play link comprises:
acquiring the list length of the music list, and determining whether the list length is greater than or equal to a preset length; and
and sending a target request to a server through the playing link of each piece of music, and determining whether the playing link of each piece of music meets a preset condition according to a return result sent by the server in response to the target request.
3. The method of claim 2, wherein sending the target request to the server via the play link of each piece of music comprises:
determining whether the playing link of each piece of music meets a preset format;
and under the condition that the playing link of each piece of music meets the preset format, sending a target request to a server through the playing link of each piece of music.
4. A method according to claim 3, wherein determining whether the play link of each piece of music satisfies a preset format comprises:
determining whether a first character and a second character exist in a playing link of each piece of music;
and determining that each music link meets the preset format under the condition that the first character exists in each music link and the second character does not exist in each music link.
5. The method according to claim 2, wherein determining whether the play link of each piece of music satisfies a preset condition according to a return result transmitted by the server in response to the target request, comprises:
determining the return time of a return result corresponding to the playing link of each piece of music, and analyzing the return result to obtain a return code, a return head and a return body;
and under the condition that the return time is smaller than the preset time, the return code is a target return code, the format of the return head indicating music is a target format, and the size of the return body indicating music is in a target range, determining that the playing link of each piece of music meets the preset condition.
6. The method according to any one of claims 1 to 5, wherein determining a play test result of the target device according to the verification result comprises:
determining that the target equipment playing test is successful when the verification result indicates that the list length of the music list is greater than or equal to a preset length and the playing link of each piece of music in the music list meets the preset condition;
and determining that the playing test of the target equipment fails under the condition that the verification result indicates that the list length of the music list is smaller than the preset length or that the playing link of one piece of music in the music list does not meet the preset condition.
7. The method of claim 6, wherein after determining that the target device play test failed, the method further comprises:
determining the reason of the failure of the playing test of the target equipment;
adding music information of a plurality of pieces of music to the music list under the condition that the list length of the music list is smaller than a preset length, so that the list length of the music list is the preset length, wherein the music information at least comprises a play link, and the play link meets the preset condition; and/or
And under the condition that the playing links of the target quantity of music in the music list do not meet the preset condition, replacing the playing links of the target quantity of music in the music list with the playing links meeting the preset condition.
8. A play test device, comprising:
the acquisition module is used for calling a playing test interface of the target equipment and acquiring a target file returned by the playing test interface;
the first determining module is used for determining a music list to be tested from the target file according to a first index and extracting a playing link of each piece of music from the music list according to a second index;
and the second determining module is used for verifying the music list and the playing links of each piece of music and determining a playing test result according to the verification result.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202211649527.8A 2022-12-21 2022-12-21 Playing test method and device, storage medium and electronic device Pending CN116153345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211649527.8A CN116153345A (en) 2022-12-21 2022-12-21 Playing test method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211649527.8A CN116153345A (en) 2022-12-21 2022-12-21 Playing test method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116153345A true CN116153345A (en) 2023-05-23

Family

ID=86339942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211649527.8A Pending CN116153345A (en) 2022-12-21 2022-12-21 Playing test method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116153345A (en)

Similar Documents

Publication Publication Date Title
CN109150569B (en) Network video service fault positioning analysis method, device and system
CN108366274B (en) Method and device for detecting brushing playing amount
CN116153345A (en) Playing test method and device, storage medium and electronic device
CN110826583A (en) Fault determination method and device, storage medium and electronic device
CN110598797B (en) Fault detection method and device, storage medium and electronic device
CN115934523A (en) Target test data generation method and device, storage medium and electronic device
CN115358395A (en) Knowledge graph updating method and device, storage medium and electronic device
CN113110730B (en) Energy-saving method and device for operating equipment and electronic equipment
CN113326046B (en) Method and device for acquiring compiling time length
CN115826553A (en) Fault removing method and electronic device
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN110519102B (en) Server fault identification method and device and storage medium
CN115269943A (en) Information screening method and device, storage medium and electronic device
CN113593549A (en) Method and device for determining awakening rate of voice equipment
CN114676043A (en) Testing method and device of intelligent voice module, storage medium and electronic device
CN112102837B (en) Household electrical appliance and pickup detection method and device thereof
CN115358296A (en) Log clustering method and device, storage medium and electronic device
CN112051078A (en) Target device fault detection method and device, storage medium and electronic device
CN117573522A (en) Method and device for determining starting duration, storage medium and electronic device
CN115691552A (en) Method and device for determining response time, storage medium and electronic device
CN115296977B (en) Fault information processing method and device, storage medium and electronic device
CN111580839B (en) Upgrading method and device for electrical equipment
CN116521673A (en) Database operation method and device, storage medium and electronic device
CN115484116B (en) Processing method and device of equipment data, storage medium and electronic device
CN112312517B (en) Household appliance and network access method and device thereof

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