WO2021036599A1 - Method and apparatus for testing set top box, set top box, and computer-readable storage medium - Google Patents

Method and apparatus for testing set top box, set top box, and computer-readable storage medium Download PDF

Info

Publication number
WO2021036599A1
WO2021036599A1 PCT/CN2020/103688 CN2020103688W WO2021036599A1 WO 2021036599 A1 WO2021036599 A1 WO 2021036599A1 CN 2020103688 W CN2020103688 W CN 2020103688W WO 2021036599 A1 WO2021036599 A1 WO 2021036599A1
Authority
WO
WIPO (PCT)
Prior art keywords
top box
page
access
access interface
identification information
Prior art date
Application number
PCT/CN2020/103688
Other languages
French (fr)
Chinese (zh)
Inventor
刘军
Original Assignee
南京中兴新软件有限责任公司
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 南京中兴新软件有限责任公司 filed Critical 南京中兴新软件有限责任公司
Publication of WO2021036599A1 publication Critical patent/WO2021036599A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure

Definitions

  • the present disclosure relates to the field of interactive network technology.
  • IPTV Internet Protocol Television
  • EPG Electronic Program Guide
  • Testers test a complete IPTV EPG environment. They need to traverse all the pages of the set-top box as much as possible, and operate different business scenarios on each page to determine whether there are abnormalities. At the same time, abnormal scenarios that occur during the test need to be carried out by the tester. Manually record.
  • the tester completed the test of a complete set of IPTV EPG environment (that is, a set of templates) of the set-top box, and the labor cost required was 4 people ⁇ days (that is, 32 people ⁇ hours).
  • the required testing manpower is N ⁇ 4 people ⁇ days.
  • One aspect of the embodiments of the present disclosure provides a method for testing a set-top box, which includes: executing an automatic operation test and recording the process of the automatic operation test; wherein, executing the automatic operation test includes: grabbing the information on each page of the set-top box connected to the network Each access interface, and access processing for each access interface, until all access interfaces of all pages have been accessed.
  • FIG. 1 is a schematic flowchart of a method for testing a set-top box provided by an embodiment of the disclosure.
  • the set-top box testing method may include step S101 and step S102.
  • the set-top box access network may include, but is not limited to, access to the EPG environment.
  • the set-top box testing method provided by the embodiments of the present disclosure is not limited to the set-top box that is applied to the network, and is also applicable to the test of the set-top box that is not connected to the network and is in an offline environment.
  • the simulated navigation keys may include, but are not limited to, the left, right, and up and down keys, and the left, right, and up and down keys can be used to control the focus to move on the page to select the corresponding access interface.
  • the display of the access interface currently selected by the focus on the page can also be flexibly set.
  • the access interface currently selected by the focus can be displayed in any display mode that can be distinguished from other unselected access interfaces; for example, it can be displayed with but not limited to light-up display, zoom-in display, floating display, or bold border Display etc.
  • the OK key can also be simulated, and when an access interface is selected by the focus, the access to the access interface can be realized by triggering the OK key.
  • FIG. 4 which is an example of sequentially selecting access interfaces on the page provided by the embodiment of the present disclosure.
  • the focus can be controlled from the upper left corner of the current page by simulating the navigation key, and the identification information of the currently selected access interface of the focus can be obtained in order from left to right, until the identification information of all access interfaces on the current page All are obtained, the formed picture database, and the picture database may include the correspondence table shown in Table 1.
  • the capture of images can be used but not limited to the use of a screenshot saving module
  • the matching of images can be used but not limited to the use of a picture matching module.
  • step S102 the process of automatically running the test is logged.
  • logging the process of automatically running the test may include: saving information about errors that occur in the process of automatically running the test and generating an error log; and generating The log can be actively uploaded or displayed according to needs, or uploaded or displayed after receiving the call instruction; and when uploading or displaying, the error log can be uploaded or displayed in a centralized or prioritized manner; and in some application scenarios, it can also be uploaded or displayed. Only the error log is uploaded or displayed, and other logs will not be uploaded or displayed.
  • the embodiments of the present disclosure also provide a set-top box testing device, which can be set in the set-top box, or set-top box testing equipment.
  • FIG. 6 it is a schematic structural diagram of a set-top box testing device provided by an embodiment of the disclosure.
  • the set-top box testing device may include an automatic test control module 601 and a recording module 602.
  • the automatic test control module 601 can be configured to automatically capture access interfaces on each page of a set-top box connected to the network, and automatically perform access processing on each access interface until all access interfaces of all pages have been accessed.
  • the automatic test operation process please refer to the related description of the set-top box test method in the embodiment of the present disclosure, which will not be repeated here.
  • the automatic test control module 601 may include, but is not limited to, a key simulation function module, a screenshot saving module, and/or a picture matching template.
  • the browser When the set-top box is connected to the EPG environment of IPTV, the browser can be triggered to parse and execute the page script logic by pressing the button to display the business.
  • the button simulation function module can be used to simulate the user's real button operation.
  • the key simulation function module can be provided with basic function outputs, for example, the menu key, the return key, the up, down, left, and right direction navigation keys, the OK key, etc.; at the same time, it can perform Log preservation.
  • the screen capture saving module can be configured to capture the image of the specified location and output and save it as a picture, or directly take a screenshot of the current display interface and save it as a picture.
  • the picture matching template can be configured to compare whether two pictures are the same, including comparing picture size, picture data content and other parameters, so as to determine whether a certain identification interface has been visited, or whether the identification information of a certain identification interface is already Extracted.
  • the recording module 602 can be configured to log the process of automatically running the test.
  • For the specific recording process please refer to the relevant description of the set-top box test method in the embodiment of the present disclosure, which will not be repeated here.
  • the recording module 602 may include a log output module, which may be configured to save set-top box logs, and/or record keystrokes, page script execution, page parsing, and other logs; at the same time, it can address errors that occur during operation.
  • the log output module can also record and generate error logs.
  • the set-top box test device can simulate the user to press the direction key of the remote control. As long as the key is pressed, the focus movement will definitely be triggered. In the browser, the coordinate position of the moved focus can be obtained, and the focus can be changed. Take a screenshot of the access interface corresponding to the coordinate position of, so that each page will generate its own picture database, and in the picture database of the page, each access interface has only one picture (also called the focus picture) corresponding to it; The focus image captured every time a button is pressed on the page is compared in the image database of the page to determine whether it is an access interface that has obtained identification information or whether it is an access interface that has been accessed.
  • FIG. 7 it is a schematic diagram of another flow chart of a set-top box testing method provided by an embodiment of the present disclosure.
  • the set-top box testing method may include steps S701 to S710.
  • step S701 after accessing the EPG environment of the IPTV from the set-top box, the page that is normally displayed and stays is obtained as the original home page, marked as URL_Home EPG, and the automated test is started from this page.
  • step S703 it is determined whether the current page URL1 is an accessed page, if yes, go to step S704; otherwise, go to step S705.
  • step S704 the focus pictures of all access interfaces on the current page URL1 are obtained and stored in association.
  • the key simulation function module can be used to trigger the up, down, left, and right direction keys to control the focus to traverse all the access interfaces of the current page URL1, obtain the focus image of each access interface, and mark it as unvisited to generate a data relationship : Page URL1---focus image---visit status (for example, not visited).
  • Get the focus pictures of all access interfaces of the current page URL1 by pressing the key An exemplary algorithm is described as follows: each time you press the arrow key, the focus will move and the page will be refreshed; for example, the refresh range can be composed of two smallest rectangles. One rectangle is the rectangle corresponding to the access interface where the focus was last time, and the second rectangle is the rectangle corresponding to the access interface where the focus was moved. The coordinates of the second rectangle are obtained, and the screen corresponding to the coordinates of the rectangle is intercepted to obtain the access interface. The picture of is recorded as the focus picture.
  • step S706 the OK button is triggered through the button module to trigger the business logic of the unvisited access interface, and the focus image corresponding to the access interface under URL1 of the page is marked as having been visited.
  • all pages can be accurately traversed without omissions, and the linked pages can be traversed by using JavaScript scripts. All pages can be traversed without manual maintenance and automatic operation, which saves test manpower and improves the efficiency of automatic test of set-top boxes.
  • each set-top box can directly enter the test mode when needed to complete the automatic test conveniently, quickly and accurately, so that ordinary users can also Complete the test of the set-top box when needed to further improve user experience satisfaction.
  • the computer-readable storage medium may be configured to store a computer program, and the computer program may be executed by a processor to implement at least one step of the set-top box testing method provided in the embodiment of the present disclosure.

Abstract

Provided in embodiments of the present disclosure are a method and apparatus for testing a set top box, a set top box, and a computer-readable storage medium. The method for testing a set top box comprises: executing an autorun test, and recording the process of the autorun test. Executing the autorun test comprises: capturing each access interface on each page of a set top box of an access network, and accessing each access interface until all of the access interfaces on all of the pages have been accessed.

Description

机顶盒测试方法及装置、机顶盒及计算机可读存储介质Set-top box testing method and device, set-top box and computer readable storage medium 技术领域Technical field
本公开涉及交互式网络技术领域。The present disclosure relates to the field of interactive network technology.
背景技术Background technique
在IPTV(Internet Protocol Television,交互式网络电视)环境下,智能机顶盒的软件版本制作出来后,需要接入EPG(Electronic Program Guide,电子节目指南)服务器进行测试,测试智能机顶盒展现EPG页面是否显示和逻辑操作正常。在相关技术中,该测试过程都是通过测试人员手动测试完成的。测试人员测试一套完整的IPTV的EPG环境,需要尽可能遍历机顶盒的所有页面,在各页面上操作相应不同的业务场景以判断是否存在异常,同时在测试过程中出现的异常场景需要测试人员进行手动记录。经试验,测试人员完成机顶盒的一套完整的IPTV的EPG环境(也即一套模板)的测试,需要投入人力成本是4人×天(也即32人×小时)。而部署在商用环境下的IPTV的EPG环境通常是N(N>=2)套,例如标清、高清等等,需要的测试人力就为N×4人×天。随着机顶盒中承载的商用模板个数增加,所需测试的内容以及所需测试人力也成倍增加,既存在测试周期长、测试人力成本高的问题,又存在容易漏测等因素导致测试结果不够准确的问题。In the IPTV (Internet Protocol Television) environment, after the software version of the smart set-top box is produced, it needs to be connected to the EPG (Electronic Program Guide) server for testing to test whether the smart set-top box displays the EPG page and The logic operation is normal. In related technologies, the testing process is all done manually by testers. Testers test a complete IPTV EPG environment. They need to traverse all the pages of the set-top box as much as possible, and operate different business scenarios on each page to determine whether there are abnormalities. At the same time, abnormal scenarios that occur during the test need to be carried out by the tester. Manually record. After the test, the tester completed the test of a complete set of IPTV EPG environment (that is, a set of templates) of the set-top box, and the labor cost required was 4 people × days (that is, 32 people × hours). The EPG environment of IPTV deployed in a commercial environment is usually N (N>=2) sets, such as standard definition, high definition, etc., and the required testing manpower is N×4 people×days. With the increase in the number of commercial templates carried in the set-top box, the required test content and the required test manpower have also increased exponentially. There are problems such as long test cycles and high test labor costs, as well as easy missed tests and other factors that lead to test results. The problem of insufficient accuracy.
发明内容Summary of the invention
本公开实施例的一个方面提供一种机顶盒测试方法,包括:执行自动运行测试,以及记录自动运行测试的过程;其中,执行自动运行测试,包括:抓取接入网络的机顶盒的各页面上的各访问接口,并对各访问接口进行访问处理,直到访问完所有页面的所有访问接口。One aspect of the embodiments of the present disclosure provides a method for testing a set-top box, which includes: executing an automatic operation test and recording the process of the automatic operation test; wherein, executing the automatic operation test includes: grabbing the information on each page of the set-top box connected to the network Each access interface, and access processing for each access interface, until all access interfaces of all pages have been accessed.
本公开实施例的另一方面提供一种机顶盒测试装置,包括:自动测试控制模块,被配置为执行自动运行测试;以及,记录模块,被配置为记录自动运行测试的过程;其中,自动测试控制模块,被配置 为抓取接入网络的机顶盒的各页面上的各访问接口,并对各访问接口进行访问处理,直到访问完所有页面的所有访问接口。Another aspect of the embodiments of the present disclosure provides a set-top box testing device, including: an automatic test control module configured to perform automatic running tests; and a recording module configured to record the process of automatic running tests; wherein, automatic test control The module is configured to grab each access interface on each page of the set-top box connected to the network, and perform access processing on each access interface until all access interfaces of all pages have been accessed.
本公开实施例的再一方面提供一种机顶盒,包括处理器、存储器和通信总线,其中:通信总线被配置为实现处理器和存储器的通信连接;以及,处理器被配置为执行存储器中存储的计算机程序,以实现上述机顶盒测试方法的至少一个步骤。Another aspect of the embodiments of the present disclosure provides a set-top box, including a processor, a memory, and a communication bus, wherein: the communication bus is configured to realize a communication connection between the processor and the memory; and the processor is configured to execute data stored in the memory A computer program to implement at least one step of the above-mentioned set-top box testing method.
本公开实施例的又一方面提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序可被处理器执行,以实现上述机顶盒测试方法的至少一个步骤。Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and the computer program can be executed by a processor to implement at least one step of the above-mentioned set-top box testing method.
本公开其它特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本公开说明书中的记载变的显而易见。Other features of the present disclosure and corresponding beneficial effects are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects will become apparent from the description in the specification of the present disclosure.
附图说明Description of the drawings
图1为本公开实施例提供的机顶盒测试方法的一种流程示意图。FIG. 1 is a schematic flowchart of a method for testing a set-top box provided by an embodiment of the disclosure.
图2为本公开实施例提供的在页面上显示访问接口的一种示意图。Fig. 2 is a schematic diagram of displaying an access interface on a page provided by an embodiment of the present disclosure.
图3为本公开实施例提供的在页面上显示访问接口的另一种示意图。FIG. 3 is another schematic diagram of displaying an access interface on a page provided by an embodiment of the disclosure.
图4为本公开实施例提供的在页面上顺序选择访问接口的一种示意图。Fig. 4 is a schematic diagram of sequentially selecting access interfaces on a page provided by an embodiment of the disclosure.
图5为本公开实施例提供的在页面上显示访问接口的再一种示意图。FIG. 5 is another schematic diagram of displaying an access interface on a page provided by an embodiment of the disclosure.
图6为本公开实施例提供的机顶盒测试装置的一种结构示意图。Fig. 6 is a schematic structural diagram of a set-top box testing device provided by an embodiment of the disclosure.
图7为本公开实施例提供的机顶盒测试方法的另一种流程示意图。FIG. 7 is a schematic diagram of another flow chart of a set-top box testing method provided by an embodiment of the disclosure.
图8为本公开实施例提供的机顶盒的一种结构示意图。FIG. 8 is a schematic structural diagram of a set-top box provided by an embodiment of the disclosure.
具体实施方式detailed description
为了使本公开的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本公开实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。In order to make the objectives, technical solutions, and advantages of the present disclosure clearer, the following further describes the embodiments of the present disclosure in detail through specific implementations in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present disclosure, but not used to limit the present disclosure.
针对相关技术中通过测试人员对机顶盒手动测试存在的测试周期长、测试人力成本高,以及测试结果不够准确的问题,本公开实施例提供一种可自动实现机顶盒测试的方法,包括自动运行测试,以及对自动运行测试的过程进行日志记录;其中自动运行测试主要可自动实现机顶盒各页面的自动切换以及各页面上的逻辑操作,并通过日志对自动运行测试过程进行日志记录,在需要时根据日志记录即可获取到精确的测试结果,整个测试过程可不需要人工干预,大大降低人力成本,提升测试效率,也能避免人工测试过程中因漏测等情况的发生,保证测试结果的精确性。Aiming at the problems of long test cycle, high test labor cost, and insufficient accuracy of test results in manual testing of set-top boxes by testers in related technologies, embodiments of the present disclosure provide a method for automatically implementing set-top box testing, including automatic running tests, And log the process of automatic running test; among them, the automatic running test can automatically realize the automatic switching of each page of the set-top box and the logical operation on each page, and log the automatic running test process through the log, according to the log when needed Accurate test results can be obtained by recording. The entire test process does not require manual intervention, which greatly reduces labor costs and improves test efficiency. It can also avoid the occurrence of missed tests during manual testing and ensure the accuracy of test results.
为了便于理解,本公开实施例下面以图1所示的本公开实施例提供的机顶盒测试方法的一种流程示意图为示例,对本公开实施例提供的机顶盒测试方法进行说明,如图1所示,该机顶盒测试方法可包括步骤S101和步骤S102。For ease of understanding, the following embodiments of the present disclosure take a flow diagram of the set-top box testing method provided by the embodiment of the present disclosure shown in FIG. 1 as an example to describe the set-top box testing method provided by the embodiment of the present disclosure, as shown in FIG. 1. The set-top box testing method may include step S101 and step S102.
在步骤S101中,对接入网络的机顶盒进行自动运行测试。In step S101, an automatic operation test is performed on the set-top box connected to the network.
对接入网络的机顶盒进行自动运行测试可具体包括:自动抓取接入网络的机顶盒各页面上的各访问接口,并自动对各访问接口进行访问处理,直到访问完所有页面的所有访问接口。The automatic operation test of the set-top box connected to the network may specifically include: automatically grabbing the access interfaces on each page of the set-top box connected to the network, and automatically accessing each access interface until all the access interfaces of all pages have been accessed.
根据本公开提供的实施例,机顶盒接入网络可包括但不限于接入EPG环境。本公开实施例提供的机顶盒测试方法并不限于应用于接入网络的机顶盒,也适用于未接入网络处于离线环境的机顶盒的测试。According to the embodiments provided in the present disclosure, the set-top box access network may include, but is not limited to, access to the EPG environment. The set-top box testing method provided by the embodiments of the present disclosure is not limited to the set-top box that is applied to the network, and is also applicable to the test of the set-top box that is not connected to the network and is in an offline environment.
根据本公开提供的实施例,页面上的访问接口可包括但不限于实现链接访问、实现相应功能(例如下载、设置、更新等功能)或实现页面链接或各种信息链接的各种访问接口。According to the embodiments provided in the present disclosure, the access interfaces on the page may include, but are not limited to, various access interfaces that implement link access, implement corresponding functions (for example, download, set, update, etc.), or implement page links or various information links.
在一些应用场景中,当需要对机顶盒指定功能或指定页面进行测时,在步骤S101中也可仅获取指定页面或指定访问接口进行自动测试,对于指定之外的页面或访问接口则不做测试。具体可根据需求 灵活配置,且应当理解的是,这种灵活测试配置也在本方案覆盖范围内。In some application scenarios, when it is necessary to test the specified function or specified page of the set-top box, in step S101, only the specified page or specified access interface can be obtained for automatic testing, and the test is not performed for pages or access interfaces other than those specified. . Specifically, it can be flexibly configured according to requirements, and it should be understood that this flexible test configuration is also within the coverage of this solution.
根据本公开提供的实施例,机顶盒在接入网络并启动后,正常显示并停留的首页页面,可称为机顶盒的原始首页页面。According to the embodiment provided by the present disclosure, after the set-top box is connected to the network and started, the home page that is normally displayed and stays can be referred to as the original home page of the set-top box.
根据本公开提供的实施例,在自动抓取接入网络的机顶盒各页面上的各访问接口时,可以在机顶盒每进入一个新页面时(也即之前未进入过的页面),就抓取该新页面上的各访问接口。也即,在机顶盒进入当前页面时,可确定当前页面是否为未进入过的页面;若是,则逐个抓取当前页面上的访问接口的识别信息,并将抓取的识别信息与当前页面的页面路径关联存储,并设置识别信息的访问状态为未访问。According to the embodiments provided in the present disclosure, when automatically grabbing access interfaces on each page of a set-top box connected to the network, each time the set-top box enters a new page (that is, a page that has not been entered before), it can be grabbed. Each access interface on the new page. That is, when the set-top box enters the current page, it can be determined whether the current page is a page that has not been entered; if it is, the identification information of the access interface on the current page is captured one by one, and the captured identification information is compared with the page of the current page The path is stored in association, and the access status of the identification information is set to not accessed.
例如,在一种示例中,逐个抓取当前页面上的访问接口的识别信息可包括但不限于:在机顶盒进入当前页面且确定当前页面为未进入过的页面时,通过模拟导航键控制焦点从当前页面的左上角开始,按照从左到右的顺序依次逐个选择访问接口,并获取焦点当前选择的访问接口的识别信息,直到当前页面上的所有访问接口的识别信息都被获取。For example, in an example, capturing the identification information of the access interface on the current page one by one may include but is not limited to: when the set-top box enters the current page and determines that the current page is a page that has not been entered, control the focus from Starting from the upper left corner of the current page, the access interfaces are selected one by one in order from left to right, and the identification information of the access interface currently selected by the focus is obtained, until the identification information of all the access interfaces on the current page is obtained.
根据本公开提供的实施例,模拟导航键可包括但不限于左、右键和上、下键,可通过左、右键和上、下键控制焦点在页面上移动以选择相应的访问接口。According to the embodiments provided in the present disclosure, the simulated navigation keys may include, but are not limited to, the left, right, and up and down keys, and the left, right, and up and down keys can be used to control the focus to move on the page to select the corresponding access interface.
根据本公开提供的实施例,焦点可类似传统鼠标的光标。According to the embodiments provided in the present disclosure, the focus can be similar to the cursor of a traditional mouse.
根据本公开提供的实施例,对于页面上焦点当前选择的访问接口的显示也可灵活设定。例如,一些示例中,焦点当前选择的访问接口可以采用任意能与其它未选中的访问接口区分开的显示方式进行显示;例如可采用但不限于点亮显示、放大显示、悬浮显示或边框加粗显示等。According to the embodiments provided in the present disclosure, the display of the access interface currently selected by the focus on the page can also be flexibly set. For example, in some examples, the access interface currently selected by the focus can be displayed in any display mode that can be distinguished from other unselected access interfaces; for example, it can be displayed with but not limited to light-up display, zoom-in display, floating display, or bold border Display etc.
例如,在一种应用场景中,如图2所示,其为本公开实施例提供的在页面上显示访问接口的一种示意图。假设机顶盒的某一个页面上存在访问接口A、访问接口B、访问接口C和访问接口D;当前焦点选择的是左边的访问接口A,访问接口A放大显示,以与访问接口 B、访问接口C和访问接口D区分开。For example, in an application scenario, as shown in FIG. 2, it is a schematic diagram of displaying an access interface on a page provided by an embodiment of the present disclosure. Assume that there are access interface A, access interface B, access interface C, and access interface D on a certain page of the set-top box; the current focus is the access interface A on the left, and access interface A is displayed in a magnified manner to compare with access interface B and access interface C. Separate from access interface D.
又如,在另一种应用场景中,如图3所示,其为本公开实施例提供的在页面上显示访问接口的另一种示意图。假设机顶盒的某一个页面上存在访问接口A、访问接口B、访问接口C和访问接口D;当前焦点选择的是访问接口B,访问接口B的边框区域加粗显示,以与访问接口A、访问接口C和访问接口D区分开。For another example, in another application scenario, as shown in FIG. 3, it is another schematic diagram of displaying an access interface on a page provided by an embodiment of the present disclosure. Assume that there are access interface A, access interface B, access interface C, and access interface D on a certain page of the set-top box; the current focus is on access interface B, and the border area of access interface B is displayed in bold to match the access interface A and access interface B. Interface C and access interface D are distinguished.
在一些应用场景中,还可模拟OK键,在焦点选择一个访问接口时,通过触发OK键实现对该访问接口的访问。In some application scenarios, the OK key can also be simulated, and when an access interface is selected by the focus, the access to the access interface can be realized by triggering the OK key.
根据本公开提供的实施例,抓取的访问接口的识别信息,可以是任意能将页面上的访问接口与其它各访问接口唯一区分开的识别信息。例如,在一种示例中,该识别信息可以包括但不限于访问接口的显示区域内的图像;获取页面上焦点当前选择的访问接口的识别信息可包括:截取页面上当前被焦点选中的访问接口当前的显示区域内的图像作为该访问接口的识别信息。According to the embodiments provided in the present disclosure, the identification information of the captured access interface may be any identification information that can uniquely distinguish the access interface on the page from other access interfaces. For example, in an example, the identification information may include but is not limited to the image in the display area of the access interface; acquiring the identification information of the access interface currently selected by the focus on the page may include: intercepting the access interface currently selected by the focus on the page The image in the current display area is used as the identification information of the access interface.
例如,如图2所示,此时截取访问接口A当前的显示区域(也即放大显示的区域)内的图像(可称之为焦点图片)作为该访问接口A的识别信息。又如,如图3所示,此时截取访问接口B当前的显示区域(也即加粗显示的区域)内的图像作为该访问接口B的识别信息。For example, as shown in FIG. 2, at this time, an image (which may be referred to as a focus picture) in the current display area (that is, the enlarged display area) of the access interface A is captured as the identification information of the access interface A. For another example, as shown in FIG. 3, at this time, the image in the current display area (that is, the area displayed in bold) of the access interface B is intercepted as the identification information of the access interface B.
在图2所示的应用场景中,当机顶盒首次进入图2所示的页面时,针对该页面,可如图4所示(其为本公开实施例提供的在页面上顺序选择访问接口的一种示意图),通过模拟导航键控制焦点可从当前页面的左上角开始,并按照从左到右的顺序依次获取焦点当前选择的访问接口的识别信息,直到当前页面上的所有访问接口的识别信息都被获取到,形成的图片数据库,并且图片数据库可包括如表1所示的对应关系表。In the application scenario shown in FIG. 2, when the set-top box enters the page shown in FIG. 2 for the first time, for the page, it can be shown in FIG. 4 (which is an example of sequentially selecting access interfaces on the page provided by the embodiment of the present disclosure). Schematic diagram), the focus can be controlled from the upper left corner of the current page by simulating the navigation key, and the identification information of the currently selected access interface of the focus can be obtained in order from left to right, until the identification information of all access interfaces on the current page All are obtained, the formed picture database, and the picture database may include the correspondence table shown in Table 1.
表1Table 1
Figure PCTCN2020103688-appb-000001
Figure PCTCN2020103688-appb-000001
Figure PCTCN2020103688-appb-000002
Figure PCTCN2020103688-appb-000002
根据本公开提供的实施例,对于页面上访问接口的选择顺序并不限于上述示例的顺序,可以根据需求灵活设置。例如,在一种示例中,如图5所示,其为本公开实施例提供的在页面上显示访问接口的再一种示意图。假设当前页面上存在访问接口A、B、C、D、E、F、G、H,按照从左到右的顺序依次获取焦点当前选择的访问接口的识别信息时,获取的顺序可依次为访问接口A→B→C→D→E→F→G→H。在另一些应用场景中,获取访问接口的顺序也可为访问接口A→B→C→D→H→G→F→E。在另一些应用场景中,也可采用随机顺序或其它顺序选择访问接口直到访问完所有访问接口。According to the embodiments provided in the present disclosure, the order of selecting the access interface on the page is not limited to the order of the above example, and can be flexibly set according to requirements. For example, in an example, as shown in FIG. 5, it is still another schematic diagram of displaying an access interface on a page provided by an embodiment of the present disclosure. Assuming that there are access interfaces A, B, C, D, E, F, G, and H on the current page, and the identification information of the currently selected access interface of the focus is acquired in order from left to right, the order of acquisition can be the order of access Interface A→B→C→D→E→F→G→H. In other application scenarios, the order of obtaining access interfaces can also be access interface A→B→C→D→H→G→F→E. In other application scenarios, the access interfaces can also be selected in a random order or other order until all access interfaces have been accessed.
根据本公开提供的实施例,对于确定页面上的某一个访问接口是否为已经获取过识别信息的访问接口的方式可包括但不限于:获取该访问接口的识别信息,并在该页面对应的图片数据库中查找是否存在相同的识别信息;若是,则表明该访问接口为已经获取过识别信息的访问接口;否则,表明该访问接口为该页面上未获取过识别信息的访问接口。According to the embodiments provided in the present disclosure, the method for determining whether a certain access interface on a page is an access interface for which identification information has been obtained may include, but is not limited to: obtaining identification information of the access interface, and displaying the corresponding picture on the page Look up in the database whether there is the same identification information; if it is, it indicates that the access interface is an access interface that has obtained identification information; otherwise, it indicates that the access interface is an access interface that has not obtained identification information on the page.
根据本公开提供的实施例,图像的截取可使用但不限于使用抓屏保存模块,图像的匹配可使用但不限于使用图片匹配模块。According to the embodiments provided in the present disclosure, the capture of images can be used but not limited to the use of a screenshot saving module, and the matching of images can be used but not limited to the use of a picture matching module.
根据本公开提供的实施例,对于导航键和OK键的模拟实现可通过但不限于通过按键模拟功能模块来实现。According to the embodiments provided in the present disclosure, the simulation of the navigation key and the OK key can be realized by, but not limited to, a key simulation function module.
根据本公开提供的实施例,自动对各访问接口进行访问处理,直到访问完所有页面的所有访问接口的一种示例性方式可包括:确定机顶盒当前所在页面所关联存储的识别信息中,存在访问状态为未访问的目标识别信息时,对该目标识别信息所对应的访问接口进行访问,并将该目标识别信息的访问状态更新为已访问;在确定机顶盒当前所在页面所关联存储的所有识别信息的访问状态都为已访问,且机顶盒当前所在页面不是原始首页页面时,则控制机顶盒进入当前所在页面的上一级页面,然后重复上述步骤;以及,在确定机顶盒当前所在页 面所关联存储的所有识别信息的访问状态都为已访问,且机顶盒当前所在页面为原始首页页面时,则表明已访问完所有页面的所有访问接口。According to the embodiments provided in the present disclosure, an exemplary way of automatically performing access processing on each access interface until all access interfaces of all pages are accessed may include: determining that there is access in the identification information associated with the page where the set-top box is currently located. When the status is the unvisited target identification information, the access interface corresponding to the target identification information is accessed, and the access status of the target identification information is updated to visited; all identification information stored in association with the page where the set-top box is currently located is determined When the access status of the set-top box is visited, and the current page of the set-top box is not the original home page, control the set-top box to enter the upper-level page of the current page, and then repeat the above steps; When the access status of the identification information is visited, and the current page of the set-top box is the original home page, it indicates that all access interfaces of all pages have been accessed.
在步骤S102中,对自动运行测试的过程进行日志记录。In step S102, the process of automatically running the test is logged.
根据本公开提供的实施例,可对上述自动运行测试过程中通过导航键控制焦点进行访问接口的选择过程进行日志记录,以及对访问接口访问过程中的页面脚本执行和/或页面解析等进行日志记录。According to the embodiments provided in the present disclosure, it is possible to log the process of selecting the access interface by controlling the focus by the navigation key during the automatic running test process, and log the page script execution and/or page analysis during the process of accessing the access interface. recording.
根据本公开提供的实施例,为了提升测试的针对性和准确性,对自动运行测试的过程进行日志记录可包括:对自动运行测试过程中出现的错误的信息进行保存并生成错误日志;且生成的日志可以根据需求主动上传或显示,或者在接收到的调用指令后再上传或显示;且上传或显示时,可以对错误日志进行集中或优先上传或显示;且在一些应用场景中,也可仅上传或显示错误日志,对于其它日志则不再上传或显示。According to the embodiments provided in the present disclosure, in order to improve the pertinence and accuracy of the test, logging the process of automatically running the test may include: saving information about errors that occur in the process of automatically running the test and generating an error log; and generating The log can be actively uploaded or displayed according to needs, or uploaded or displayed after receiving the call instruction; and when uploading or displaying, the error log can be uploaded or displayed in a centralized or prioritized manner; and in some application scenarios, it can also be uploaded or displayed. Only the error log is uploaded or displayed, and other logs will not be uploaded or displayed.
另外,为了进一步帮助错误定位和分析,根据本公开提供的实施例,机顶盒测试方法还可包括:截取自动运行测试过程中出现错误时的显示界面截图,并将获取的显示界面截图与该错误对应的错误日志关联存储;在上传或显示错误日志时,则可将该错误日志对应的显示界面截图一并上传或显示。这样在进行错误分析时,可结合日志信息和对应的显示界面截图进行综合分析,可提升错误分析的效率和准确性。In addition, in order to further assist error location and analysis, according to the embodiments provided in the present disclosure, the set-top box test method may further include: taking screenshots of the display interface when an error occurs during the automatic running test, and corresponding the obtained screenshot of the display interface to the error The error log is stored in association; when uploading or displaying the error log, you can upload or display the screenshot of the display interface corresponding to the error log. In this way, when performing error analysis, the log information and corresponding screenshots of the display interface can be combined for comprehensive analysis, which can improve the efficiency and accuracy of error analysis.
本公开实施例还提供一种机顶盒测试装置,该机顶盒测试装置可以设置于机顶盒内,也可设置于用于机顶盒测试的测试设备中。如图6所示,其为本公开实施例提供的机顶盒测试装置的一种结构示意图,该机顶盒测试装置可包括自动测试控制模块601和记录模块602。The embodiments of the present disclosure also provide a set-top box testing device, which can be set in the set-top box, or set-top box testing equipment. As shown in FIG. 6, it is a schematic structural diagram of a set-top box testing device provided by an embodiment of the disclosure. The set-top box testing device may include an automatic test control module 601 and a recording module 602.
自动测试控制模块601,可被配置为自动抓取接入网络的机顶盒各页面上的各访问接口,以及自动对各访问接口进行访问处理,直到访问完所有页面的所有访问接口。具体的自动测试运行过程请参见本公开实施例对机顶盒测试方法的相关描述,此处不再赘述。The automatic test control module 601 can be configured to automatically capture access interfaces on each page of a set-top box connected to the network, and automatically perform access processing on each access interface until all access interfaces of all pages have been accessed. For the specific automatic test operation process, please refer to the related description of the set-top box test method in the embodiment of the present disclosure, which will not be repeated here.
根据本公开提供的实施例,自动测试控制模块601可包括但不 限于按键模拟功能模块、抓屏保存模块,和/或图片匹配模板。According to the embodiments provided in the present disclosure, the automatic test control module 601 may include, but is not limited to, a key simulation function module, a screenshot saving module, and/or a picture matching template.
在机顶盒接入IPTV的EPG环境时,可通过按键来触发浏览器解析并执行页面脚本逻辑,来进行业务展示,此时可通过该按键模拟功能模块模拟用户真实的按键操作。When the set-top box is connected to the EPG environment of IPTV, the browser can be triggered to parse and execute the page script logic by pressing the button to display the business. At this time, the button simulation function module can be used to simulate the user's real button operation.
根据本公开提供的实施例,按键模拟功能模块可设置有基本的功能输出,例如,菜单键、返回键、上下左右方向导航键、OK按键等等;同时针对按键过程中出现的错误,可进行日志保存。According to the embodiments provided by the present disclosure, the key simulation function module can be provided with basic function outputs, for example, the menu key, the return key, the up, down, left, and right direction navigation keys, the OK key, etc.; at the same time, it can perform Log preservation.
抓屏保存模块可被配置为抓取指定位置大小的图像输出并保存为图片,或直接截图当前显示界面并保存为图片。The screen capture saving module can be configured to capture the image of the specified location and output and save it as a picture, or directly take a screenshot of the current display interface and save it as a picture.
图片匹配模板可被配置为比较两个图片是否一样,包括比较图片大小、图片数据内容等参数,从而可确定某个识别接口是否为已访问过的,或某个识别接口的识别信息是否为已提取过的。The picture matching template can be configured to compare whether two pictures are the same, including comparing picture size, picture data content and other parameters, so as to determine whether a certain identification interface has been visited, or whether the identification information of a certain identification interface is already Extracted.
记录模块602,可被配置为对自动运行测试的过程进行日志记录,具体的记录过程请参见本公开实施例对机顶盒测试方法的相关描述,此处不再赘述。The recording module 602 can be configured to log the process of automatically running the test. For the specific recording process, please refer to the relevant description of the set-top box test method in the embodiment of the present disclosure, which will not be repeated here.
根据本公开提供的实施例,记录模块602可包括日志输出模块,其可被配置为保存机顶盒日志,和/或记录按键过程、页面脚本执行、页面解析等日志;同时针对运行过程中出现的错误,日志输出模块也可进行记录并生成错误日志。According to the embodiments provided in the present disclosure, the recording module 602 may include a log output module, which may be configured to save set-top box logs, and/or record keystrokes, page script execution, page parsing, and other logs; at the same time, it can address errors that occur during operation. , The log output module can also record and generate error logs.
本公开实施例提供的机顶盒测试装置,可通过模拟用户按遥控器的方向键,只要按键,肯定会触发焦点移动,在浏览器里面,可以实现获取移动后的焦点的坐标位置,并可以将焦点的坐标位置对应的访问接口截图出来,这样每个页面会生成自己的图片数据库,且页面的图片数据库中,每个访问接口只有一张图片(也可称之为焦点图片)与之对应;将在页面上每按一次按键抓取的焦点图片在该页面的图片数据库中比对确定是否为已经获取过识别信息的访问接口或是否为已经访问过的访问接口,通过这样的逻辑判断,即可获取到各页面中的所有访问接口,并且针对所有访问接口进行逐一访问,可实现遍历整套模板,并且在整个过程中,再配合日志抓取操作,完成机顶盒的测试。The set-top box test device provided by the embodiment of the present disclosure can simulate the user to press the direction key of the remote control. As long as the key is pressed, the focus movement will definitely be triggered. In the browser, the coordinate position of the moved focus can be obtained, and the focus can be changed. Take a screenshot of the access interface corresponding to the coordinate position of, so that each page will generate its own picture database, and in the picture database of the page, each access interface has only one picture (also called the focus picture) corresponding to it; The focus image captured every time a button is pressed on the page is compared in the image database of the page to determine whether it is an access interface that has obtained identification information or whether it is an access interface that has been accessed. Through such logical judgments, you can Get all the access interfaces in each page, and access all the access interfaces one by one, which can realize the traversal of the entire set of templates, and in the whole process, cooperate with the log capture operation to complete the test of the set-top box.
为了便于理解,下面以一种具体应用场景为示例,对本公开实施例提供的机顶盒测试方法进行说明。如图7所示,其为本公开实施例提供的机顶盒测试方法的另一种流程示意图,该机顶盒测试方法可包括步骤S701~步骤S710。For ease of understanding, a specific application scenario is used as an example to describe the set-top box test method provided in the embodiment of the present disclosure. As shown in FIG. 7, it is a schematic diagram of another flow chart of a set-top box testing method provided by an embodiment of the present disclosure. The set-top box testing method may include steps S701 to S710.
在步骤S701中,从机顶盒接入IPTV的EPG环境后,获取正常显示并停留的页面作为原始首页页面,标记为URL_Home EPG,并从这个页面开始进行自动化测试。In step S701, after accessing the EPG environment of the IPTV from the set-top box, the page that is normally displayed and stays is obtained as the original home page, marked as URL_Home EPG, and the automated test is started from this page.
在步骤S702中,获取机顶盒所处的当前页面,设当前页面为URL1。In step S702, the current page where the set-top box is located is obtained, and the current page is set to URL1.
在步骤S703中,确定当前页面URL1是否为进入过的页面,如是,转至步骤S704;否则,转至步骤S705。In step S703, it is determined whether the current page URL1 is an accessed page, if yes, go to step S704; otherwise, go to step S705.
在步骤S704中,获取当前页面URL1上所有访问接口的焦点图片进行关联存储。In step S704, the focus pictures of all access interfaces on the current page URL1 are obtained and stored in association.
在本示例中,可通过按键模拟功能模块触发上下左右方向键,控制焦点遍历该当前页面URL1的所有访问接口,获取每个访问接口的焦点图片,并标记为未访问过,生成一种数据关系:页面URL1---焦点图片---访问状态(如,未访问)。In this example, the key simulation function module can be used to trigger the up, down, left, and right direction keys to control the focus to traverse all the access interfaces of the current page URL1, obtain the focus image of each access interface, and mark it as unvisited to generate a data relationship : Page URL1---focus image---visit status (for example, not visited).
同时,针对方向键遍历页面所有访问接口的时候,针对错误的日志,可进行日志保存。At the same time, when the arrow keys traverse all the access interfaces of the page, the log of the error can be saved.
通过按键获取当前页面URL1所有访问接口的焦点图片,一种示例性的算法描述如下:每次按方向键,会产生焦点移动,会产生页面刷新;例如,刷新的范围可由两个最小矩形组成,一个矩形是上次焦点所在位置的访问接口对应的矩形,第二个矩形是焦点移动后所在的访问接口对应的矩形,得出第二个矩形坐标,截取矩形坐标对应的屏幕,得到该访问接口的图片,记为焦点图片。Get the focus pictures of all access interfaces of the current page URL1 by pressing the key. An exemplary algorithm is described as follows: each time you press the arrow key, the focus will move and the page will be refreshed; for example, the refresh range can be composed of two smallest rectangles. One rectangle is the rectangle corresponding to the access interface where the focus was last time, and the second rectangle is the rectangle corresponding to the access interface where the focus was moved. The coordinates of the second rectangle are obtained, and the screen corresponding to the coordinates of the rectangle is intercepted to obtain the access interface. The picture of is recorded as the focus picture.
通过按键遍历页面所有访问接口,类似“逐行扫描”方式,描述如下:在步骤A)中,首次进入当前页面,通过按键将焦点移动至最左上角(通过“左”方向键和“上”方向键来实现,例如先按“左”方向键,直至不会产生新的焦点刷新,然后再按“上”方向键,直至不会产生新的焦点刷新),获取焦点当前所选择的访问接口的焦点图 片,并记录该页面路径和焦点图片的对应关系,并标记为未访问,说明该焦点图片只属于该页面路径;转入步骤B);在步骤B)中,按“右”方向键,会抓取到焦点向右移后所选择的新访问接口的焦点图片,比较当前焦点图片在该页面的图像数据库中是否已经保存过:如果该焦点图片已经保存过,说明该“右”方向键上的焦点都已经遍历过了,需要将焦点回退至最左的焦点,下一步需要进入下一行,进行焦点遍历,进入步骤C);如果该焦点图片是新图片,保存该焦点图片,步骤转入B);在步骤C)中,按“下”方向键,判断是否抓取到新的焦点图片,主要是判断“下”方向键是否有发生焦点变动,如存在则判断抓取的焦点图片是否为新焦点图片:如果没有焦点变动,或者新焦点图片已经保存过,说明“下”方向键已经没焦点了,“逐行扫描”方式完成,结束;如果焦点有变动,同时截取焦点图片是新图片,保存该焦点图片,转入步骤B)。Traverse all the access interfaces of the page by pressing the button, similar to the "line by line scan" method, described as follows: In step A), enter the current page for the first time, and move the focus to the upper left corner by pressing the button (by pressing the "left" arrow key and "up") Use the arrow keys to achieve, for example, first press the "left" arrow key until no new focus refresh occurs, and then press the "up" arrow key until no new focus refresh occurs) to get the focus of the currently selected access interface And record the corresponding relationship between the page path and the focus picture, and mark it as not visited, indicating that the focus picture belongs to the page path; go to step B); in step B), press the "right" arrow key , Will grab the focus picture of the new access interface selected after the focus is moved to the right, and compare whether the current focus picture has been saved in the image database of the page: if the focus picture has been saved, it means the "right" direction The focus on the key has been traversed, you need to return the focus to the leftmost focus, the next step is to go to the next line, focus traversal, and go to step C); if the focus picture is a new picture, save the focus picture, Steps go to B); in step C), press the "down" direction key to determine whether a new focus image is captured, mainly to determine whether the "down" direction key has a focus change, and if it exists, determine the captured image Whether the focus picture is a new focus picture: If there is no focus change, or the new focus picture has been saved, it means that the "down" arrow key has no focus, and the "progressive scan" method is completed and ends; if the focus changes, the focus will be captured at the same time The picture is a new picture, save the focus picture, and go to step B).
在步骤S705中,查询该当前页面URL1上是否还存在访问状态为未访问的焦点图片(也即未访问的访问接口),若是,转至步骤S706;否则,转至S707。In step S705, it is queried whether there is still an unvisited focus picture (that is, an unvisited access interface) on the current page URL1, if yes, go to step S706; otherwise, go to S707.
在步骤S706中,通过按键模块触发OK按键,触发该未访问的访问接口的业务逻辑,同时标记该页面URL1下的该访问接口对应的焦点图片为已访问过。In step S706, the OK button is triggered through the button module to trigger the business logic of the unvisited access interface, and the focus image corresponding to the access interface under URL1 of the page is marked as having been visited.
在步骤S707中,是否发生页面跳转,若是,转至步骤S702;否则,转至步骤S705。In step S707, whether a page jump occurs, if yes, go to step S702; otherwise, go to step S705.
触发OK按键触发焦点的业务逻辑,可包括但不限于以下有两种结果:第一种是只执行JavaScript或者空逻辑,不发生页面跳转;第二种触发了页面跳转到新的URL,设定跳转新的URL为URL2。针对第一种,仍然标记该页面的该焦点为访问过,转至步骤S705;针对第二种,将针对新页面URL2执行步骤S702。The business logic that triggers the OK button to trigger the focus can include but is not limited to the following two results: the first is to execute only JavaScript or empty logic, and no page jump occurs; the second triggers the page to jump to a new URL, Set the new URL to be redirected to URL2. For the first type, the focus of the page is still marked as visited, and go to step S705; for the second type, step S702 will be executed for the new page URL2.
在步骤S708中,在当前页面URL1中,该页面所有焦点对应的页面已经遍历过。判断当前页面URL1是否为原始首页页面URL_Home EPG,若是,转至步骤S710;否则,转至步骤S709。In step S708, in the current page URL1, all the pages corresponding to the focus of the page have been traversed. It is judged whether the current page URL1 is the original home page URL_Home EPG, if yes, go to step S710; otherwise, go to step S709.
在步骤S709中,退回到当前页面URL1的上一级页面(标记为 URL0),然后转至步骤S702。In step S709, return to the upper level page of the current page URL1 (marked as URL0), and then go to step S702.
在步骤S710中,机顶盒的所有页面(在本示例中为所有EPG页面)遍历完成,测试结束。后续用户或开发人员可根据日志、保存的图片,进行问题现象回溯和定位等处理。In step S710, all pages of the set-top box (in this example, all EPG pages) are traversed, and the test ends. Follow-up users or developers can follow the logs and saved pictures to process the problem phenomenon backtracking and positioning.
根据本公开提供的实施例,对机顶盒测试除了采用图7所示的测试流程外,也可采用逐级页面测试的方式,也即逐个对一个级别页面上的各页面上的所有访问接口进行访问测试完之后,再逐个进入该级别页面之下的各页面进行测试,以此类推,直到测试完最低级别的各页面上的各访问接口。According to the embodiments provided by the present disclosure, in addition to the test process shown in FIG. 7 for the set-top box test, a step-by-step page test method can also be used, that is, to access all the access interfaces on each page on a level page one by one. After the test is completed, enter each page under the page of the level one by one to test, and so on, until the access interface on each page of the lowest level is tested.
根据本公开实施例提供的机顶盒测试方法和装置,与相关技术中通过人工测试相比,可精确的遍历所有页面,做到无遗漏,并且可以遍历到采用JavaScript脚本拼接的链接页面,达到了既可以遍历所有页面,又不需要人工维护,自动运行,节省了测试人力,提高了机顶盒自动测试效率等效果。According to the set-top box testing method and device provided by the embodiments of the present disclosure, compared with manual testing in the related art, all pages can be accurately traversed without omissions, and the linked pages can be traversed by using JavaScript scripts. All pages can be traversed without manual maintenance and automatic operation, which saves test manpower and improves the efficiency of automatic test of set-top boxes.
本公开实施例还提供了一种机顶盒,如图8所示,其为本公开实施例提供的机顶盒的一种结构示意图,该机顶盒可包括处理器801、存储器802以及通信总线803。The embodiment of the present disclosure also provides a set-top box, as shown in FIG. 8, which is a schematic structural diagram of the set-top box provided by the embodiment of the present disclosure. The set-top box may include a processor 801, a memory 802, and a communication bus 803.
通信总线803可被配置为实现处理器801与存储器802之间的通信连接。The communication bus 803 may be configured to implement a communication connection between the processor 801 and the memory 802.
根据本公开提供的实施例,处理器801可被配置为执行存储器802中存储的计算机程序,以实现本公开实施例提供的机顶盒测试方法的至少一个步骤。According to the embodiments provided in the present disclosure, the processor 801 may be configured to execute a computer program stored in the memory 802 to implement at least one step of the set-top box testing method provided in the embodiment of the present disclosure.
根据本公开提供的实施例,由于机顶盒本身可设置有实现上述机顶盒测试方法的计算机程序,因此各机顶盒在需要时都可直接进入测试模式方便而快速、准确的完成自动测试,使得普通用户也可在需要时完成机顶盒的检测,进一步提升用户体验满意度。According to the embodiments provided in the present disclosure, since the set-top box itself can be provided with a computer program that implements the above-mentioned set-top box testing method, each set-top box can directly enter the test mode when needed to complete the automatic test conveniently, quickly and accurately, so that ordinary users can also Complete the test of the set-top box when needed to further improve user experience satisfaction.
本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其它数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质可包括但不 限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically Erasable Programmable Read Only Memory,带电可擦可编程只读存储器)、闪存或其它存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。The embodiments of the present disclosure also provide a computer-readable storage medium, which may be included in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Volatile or non-volatile, removable or non-removable media implemented in the Computer-readable storage media may include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable Read Only Memory, charged Erasable Programmable Read-Only Memory) Memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices Or any other medium that can be used to store desired information and can be accessed by a computer.
根据本公开提供的实施例,计算机可读存储介质可被配置为存储计算机程序,该计算机程序可被处理器执行,以实现本公开实施例提供的机顶盒测试方法的至少一个步骤。According to the embodiments provided in the present disclosure, the computer-readable storage medium may be configured to store a computer program, and the computer program may be executed by a processor to implement at least one step of the set-top box testing method provided in the embodiment of the present disclosure.
本公开实施例还提供了一种计算机程序(或称计算机软件),该计算机程序可以分布在计算机可读介质上,由可计算装置来执行,以实现本公开实施例提供的机顶盒测试方法的至少一个步骤;并且在某些情况下,可以采用不同于上述实施例所描述的顺序执行所示出或描述的至少一个步骤。The embodiment of the present disclosure also provides a computer program (or computer software). The computer program can be distributed on a computer-readable medium and executed by a computable device to implement at least the set-top box test method provided by the embodiment of the present disclosure. One step; and in some cases, at least one step shown or described can be performed in an order different from that described in the foregoing embodiment.
本公开实施例还提供了一种计算机程序产品,包括计算机可读装置,该计算机可读装置上存储有如上所述的任一计算机程序。根据本公开提供的实施例,该计算机可读装置可包括如上所述的计算机可读存储介质。The embodiment of the present disclosure also provides a computer program product, including a computer readable device, and any computer program as described above is stored on the computer readable device. According to the embodiments provided in the present disclosure, the computer-readable device may include the computer-readable storage medium as described above.
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。It can be seen that those skilled in the art should understand that all or some of the steps, functional modules/units in the system, and devices in the methods disclosed above can be implemented as software (which can be implemented by computer program code executable by a computing device). ), firmware, hardware and their appropriate combination. In the hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其它传输机 制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。所以,本公开不限制于任何特定的硬件和软件结合。In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery medium. Therefore, the present disclosure is not limited to any specific combination of hardware and software.
以上内容是结合具体的实施方式对本公开实施例所作的进一步详细说明,不能认定本公开的具体实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保护范围。The above content is a further detailed description of the embodiments of the present disclosure in conjunction with specific implementations, and it cannot be considered that the specific implementations of the present disclosure are limited to these descriptions. For those of ordinary skill in the technical field to which the present disclosure belongs, several simple deductions or substitutions can be made without departing from the concept of the present disclosure, which should be regarded as falling within the protection scope of the present disclosure.

Claims (10)

  1. 一种机顶盒测试方法,包括:A set-top box testing method, including:
    执行自动运行测试;以及Perform automated running tests; and
    记录所述自动运行测试的过程;Record the process of automatically running the test;
    其中,执行所述自动运行测试,包括:Wherein, executing the automatic running test includes:
    抓取接入网络的机顶盒的各页面上的各访问接口,并对所述各访问接口进行访问处理,直到访问完所有页面的所有访问接口。Grab each access interface on each page of the set-top box connected to the network, and perform access processing on each access interface until all the access interfaces of all pages have been accessed.
  2. 如权利要求1所述的机顶盒测试方法,其中,抓取所述机顶盒的各页面上的各访问接口,包括:The method for testing a set-top box according to claim 1, wherein capturing each access interface on each page of the set-top box comprises:
    在所述机顶盒进入当前页面且确定所述当前页面为未进入过的页面时,逐个抓取所述当前页面上的访问接口的识别信息;When the set-top box enters the current page and it is determined that the current page is a page that has not been entered, grab the identification information of the access interface on the current page one by one;
    其中,针对抓取到的所述当前页面上的任一访问接口的识别信息,将所述任一访问接口的识别信息与所述当前页面的页面路径关联存储,并设置所述任一访问接口的识别信息的访问状态为未访问。Wherein, for the captured identification information of any access interface on the current page, the identification information of any access interface is stored in association with the page path of the current page, and the any access interface is set The access status of the identification information is not visited.
  3. 如权利要求2所述的机顶盒测试方法,其中,逐个抓取所述当前页面上的访问接口的识别信息,包括:The method for testing a set-top box according to claim 2, wherein capturing the identification information of the access interface on the current page one by one includes:
    在所述机顶盒进入所述当前页面且确定所述当前页面为未进入过的页面时,通过模拟导航键控制焦点从所述当前页面的左上角开始,按照从左到右的顺序依次逐个选择访问接口,并获取选择的访问接口的识别信息,直到所述当前页面上的所有访问接口的识别信息都被获取。When the set-top box enters the current page and it is determined that the current page is a page that has not been entered, the focus is controlled by the simulated navigation key to start from the upper left corner of the current page, and select one by one in order from left to right. Interface, and obtain the identification information of the selected access interface until the identification information of all the access interfaces on the current page is obtained.
  4. 如权利要求3所述的机顶盒测试方法,其中,获取所述选择的访问接口的识别信息,包括:The method for testing a set-top box according to claim 3, wherein acquiring the identification information of the selected access interface comprises:
    截取所述选择的访问接口当前在设定显示区域内显示的图像作为所述选择的访问接口的识别信息。The image currently displayed in the set display area of the selected access interface is intercepted as the identification information of the selected access interface.
  5. 如权利要求2-4任一项所述的机顶盒测试方法,其中,对所述各访问接口进行访问处理,直到访问完所有页面的所有访问接口,包括:The method for testing a set-top box according to any one of claims 2-4, wherein the access processing is performed on each access interface until all access interfaces of all pages have been accessed, including:
    响应于确定与所述当前页面的页面路径关联存储的识别信息中,存在访问状态为未访问的目标识别信息,对所述目标识别信息所对应 的访问接口进行访问,并将该目标识别信息的访问状态更新为已访问;In response to determining that in the identification information stored in association with the page path of the current page, there is target identification information whose access status is unvisited, access the access interface corresponding to the target identification information, and compare the target identification information The visit status is updated to visited;
    响应于确定与所述当前页面的页面路径关联存储的所有识别信息的访问状态都为已访问,且所述当前页面不是原始首页页面,控制所述机顶盒进入所述当前页面的上一级页面;In response to determining that the access status of all identification information stored in association with the page path of the current page is visited, and the current page is not the original home page, controlling the set-top box to enter the upper-level page of the current page;
    响应于确定与所述当前页面的页面路径关联存储的所有识别信息的访问状态都为已访问,且所述当前页面为原始首页页面,确定已访问完所有页面的所有访问接口;In response to determining that the access status of all identification information stored in association with the page path of the current page is visited, and the current page is the original home page, determining that all access interfaces of all pages have been accessed;
    其中,所述原始首页页面为所述机顶盒在接入网络并启动后,正常显示并停留的首页页面。Wherein, the original home page is the home page that is normally displayed and stayed on after the set-top box is connected to the network and started up.
  6. 如权利要求1-5任一项所述的机顶盒测试方法,其中,记录所述自动运行测试的过程,包括:5. The method for testing a set-top box according to any one of claims 1 to 5, wherein recording the process of the automatic running test comprises:
    对所述自动运行测试过程中出现的错误的信息进行保存,并生成错误日志。The information about the errors that occurred during the automatic running test is saved, and an error log is generated.
  7. 如权利要求6所述的机顶盒测试方法,还包括:The method for testing a set-top box according to claim 6, further comprising:
    截取出现所述错误时的显示界面的截图;以及Take a screenshot of the display interface when the error occurs; and
    将所述显示界面的截图与所述错误对应的错误日志关联存储。The screenshot of the display interface and the error log corresponding to the error are stored in association.
  8. 一种机顶盒测试装置,包括:A set-top box testing device, including:
    自动测试控制模块,被配置为执行自动运行测试;以及The automatic test control module is configured to perform automatic running tests; and
    记录模块,被配置为记录所述自动运行测试的过程;The recording module is configured to record the process of the automatic running test;
    其中,所述自动测试控制模块,被配置为抓取接入网络的机顶盒的各页面上的各访问接口,并对所述各访问接口进行访问处理,直到访问完所有页面的所有访问接口。Wherein, the automatic test control module is configured to grab each access interface on each page of the set-top box connected to the network, and perform access processing on each access interface until all the access interfaces of all pages have been accessed.
  9. 一种机顶盒,包括处理器、存储器和通信总线,其中:A set-top box, including a processor, a memory, and a communication bus, in which:
    所述通信总线被配置为实现所述处理器和所述存储器的通信连接;以及The communication bus is configured to implement a communication connection between the processor and the memory; and
    所述处理器被配置为执行所述存储器中存储的计算机程序,以实现如权利要求1-7任一项所述的机顶盒测试方法的至少一个步骤。The processor is configured to execute a computer program stored in the memory to implement at least one step of the set-top box testing method according to any one of claims 1-7.
  10. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序可被处理器执行,以实现如权利要求1-7任一项所述的机顶盒测试方法的至少一个步骤。A computer-readable storage medium having a computer program stored thereon, and the computer program can be executed by a processor to implement at least one step of the set-top box testing method according to any one of claims 1-7.
PCT/CN2020/103688 2019-08-27 2020-07-23 Method and apparatus for testing set top box, set top box, and computer-readable storage medium WO2021036599A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910797509.6A CN112532966A (en) 2019-08-27 2019-08-27 Set top box testing method and device, set top box and computer readable storage medium
CN201910797509.6 2019-08-27

Publications (1)

Publication Number Publication Date
WO2021036599A1 true WO2021036599A1 (en) 2021-03-04

Family

ID=74684884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103688 WO2021036599A1 (en) 2019-08-27 2020-07-23 Method and apparatus for testing set top box, set top box, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN112532966A (en)
WO (1) WO2021036599A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291595A (en) * 2011-07-08 2011-12-21 深圳创维数字技术股份有限公司 Testing method and device
CN102665093A (en) * 2012-03-13 2012-09-12 深圳市九洲电器有限公司 Test method for set top box and test system thereof
CN103997641A (en) * 2014-05-23 2014-08-20 深圳创维数字技术股份有限公司 Interface detection device and method
CN105718370A (en) * 2016-01-21 2016-06-29 上海斐讯数据通信技术有限公司 Android equipment test method and test device
US20170017566A1 (en) * 2015-07-17 2017-01-19 Magine Holding AB Modular plug-and-play system for continuous model driven testing

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448172A (en) * 2007-11-27 2009-06-03 上海未来宽带技术及应用工程研究中心有限公司 Method for automatically testing stability of set-top box in batches
GB2483499A (en) * 2010-09-10 2012-03-14 S3 Res & Dev Ltd Diagnostics and Analysis of a Set Top Box
CN104918043B (en) * 2014-03-12 2017-06-16 北京市博汇科技股份有限公司 Program dial testing method and device
CN104780407A (en) * 2015-01-09 2015-07-15 康佳集团股份有限公司 Automatic testing method and automatic testing system for set top box
CN106033393B (en) * 2015-03-13 2019-08-23 展讯通信(天津)有限公司 A kind of applied program testing method and system and mobile terminal
CN104915290B (en) * 2015-05-28 2018-07-31 小米科技有限责任公司 Application testing method and device
CN107402877B (en) * 2016-05-19 2020-08-18 福建天晴数码有限公司 Android-terminal-based APP test method and system
CN107515821B (en) * 2016-06-17 2021-08-31 百度在线网络技术(北京)有限公司 Control testing method and device
CN107622008B (en) * 2016-07-14 2021-07-23 阿里巴巴集团控股有限公司 Traversal method and device for application page
CN108009078B (en) * 2016-11-01 2021-04-27 腾讯科技(深圳)有限公司 Application interface traversal method, system and test equipment
CN107222739B (en) * 2017-07-10 2019-04-05 中邮科通信技术股份有限公司 A kind of IPTV service quality dial testing method based on crawler technology
CN109710506A (en) * 2017-10-25 2019-05-03 卓望数码技术(深圳)有限公司 A kind of terminal APP spreadability test method and device based on tree traversal
CN109739764A (en) * 2018-12-29 2019-05-10 中国联合网络通信集团有限公司 A kind of applied program testing method and device
CN109862427A (en) * 2019-01-23 2019-06-07 上海艾策通讯科技股份有限公司 Testing script automatic generation method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291595A (en) * 2011-07-08 2011-12-21 深圳创维数字技术股份有限公司 Testing method and device
CN102665093A (en) * 2012-03-13 2012-09-12 深圳市九洲电器有限公司 Test method for set top box and test system thereof
CN103997641A (en) * 2014-05-23 2014-08-20 深圳创维数字技术股份有限公司 Interface detection device and method
US20170017566A1 (en) * 2015-07-17 2017-01-19 Magine Holding AB Modular plug-and-play system for continuous model driven testing
CN105718370A (en) * 2016-01-21 2016-06-29 上海斐讯数据通信技术有限公司 Android equipment test method and test device

Also Published As

Publication number Publication date
CN112532966A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
WO2020233053A1 (en) Method, apparatus, device, and storage medium for making test page script
CN109086203B (en) Page detection method and device
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
WO2018010552A1 (en) Test method and device
US9459994B2 (en) Mobile application testing systems and methods
JP2023027785A (en) Device and computer program
CN110837474A (en) Script recording method, device, terminal and storage medium
RU2611961C2 (en) Method and system of regression testing of web page functionality, machine-readable data storage media
CN111966580A (en) Automatic testing method, device, equipment and storage medium based on artificial intelligence
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN114546881B (en) Application software testing method, electronic device and computer readable storage medium
CN111694550A (en) Page display control method, device and system
US11106571B2 (en) Identification of input object in a graphical user interface
CN111522749B (en) Page testing method and device, readable storage medium and electronic equipment
WO2017095362A1 (en) Generating application flow entities
WO2021036599A1 (en) Method and apparatus for testing set top box, set top box, and computer-readable storage medium
US10169216B2 (en) Simulating sensors
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN113485689A (en) Buried point processing method and device
CN112948267A (en) Webpage testing method, webpage testing system, storage medium and electronic equipment
CN113722203A (en) Program testing method and device, electronic device and computer readable storage medium
CN112036441A (en) Feedback marking method and device for machine learning object detection result and storage medium
US20230196009A1 (en) Systems and methods for browser rendering
US11907111B2 (en) Database troubleshooting with automated functionality
CN117472738A (en) Test script generation method and device, readable storage medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20857346

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20857346

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20857346

Country of ref document: EP

Kind code of ref document: A1