[go: up one dir, main page]

CN103167076B - The method of testing of the function of test electronic installation and test device - Google Patents

The method of testing of the function of test electronic installation and test device Download PDF

Info

Publication number
CN103167076B
CN103167076B CN201110409085.5A CN201110409085A CN103167076B CN 103167076 B CN103167076 B CN 103167076B CN 201110409085 A CN201110409085 A CN 201110409085A CN 103167076 B CN103167076 B CN 103167076B
Authority
CN
China
Prior art keywords
function
test
testing
user interface
software
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.)
Expired - Fee Related
Application number
CN201110409085.5A
Other languages
Chinese (zh)
Other versions
CN103167076A (en
Inventor
林益丞
林圣斌
谢其璋
高伟峻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MSTAR SEMICONDUCTOR CO Ltd
MStar Software R&D Shenzhen Ltd
Original Assignee
MSTAR SEMICONDUCTOR CO Ltd
MStar Software R&D Shenzhen 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 MSTAR SEMICONDUCTOR CO Ltd, MStar Software R&D Shenzhen Ltd filed Critical MSTAR SEMICONDUCTOR CO Ltd
Priority to CN201110409085.5A priority Critical patent/CN103167076B/en
Publication of CN103167076A publication Critical patent/CN103167076A/en
Application granted granted Critical
Publication of CN103167076B publication Critical patent/CN103167076B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to a kind of method of testing, in order to test the function in an electronic installation, comprise: (a) finds the corresponding position to be tested this function;B () is transmitted an instruction according to this position and is performed this function;And for the response of this instruction, (c) judges that this function is the most wrong according to this function.

Description

测试电子装置的功能的测试方法以及测试装置Test method and test device for testing functions of electronic device

技术领域 technical field

本发明有关于测试方法和测试系统,特别有关于可适用于不同的使用者介面以及不同的硬件状态的测试方法和测试系统。 The present invention relates to a testing method and a testing system, in particular to a testing method and a testing system applicable to different user interfaces and different hardware states.

背景技术 Background technique

随着技术的进步,电子装置具有越来越多的功能,因此精确的测试这些众多的功能以确保其正确性变成制造商一个相当重要的工作。一般而言,都是利用测试程序(通常称为测试脚本、test script)来进行测试。举例来说,若欲测试打电话的功能,则会发出一指令给欲测试的电子装置,命令其拨出一电话(也有可能并未真的拨出,只是模拟拨出动作),电子装置会根据被测试的功能执行状况发出一回应,然后测试装置会根据其回应来判断此功能有没有办法正确执行。 With the advancement of technology, electronic devices have more and more functions, so it has become a very important task for manufacturers to accurately test these numerous functions to ensure their correctness. Generally speaking, a test program (usually referred to as a test script, test script) is used for testing. For example, if you want to test the function of making a phone call, you will send an instruction to the electronic device to be tested, ordering it to dial out a call (it may not actually dial out, but just simulate the dialing action), and the electronic device will A response is sent out according to the execution status of the function being tested, and then the testing device judges whether the function can be executed correctly according to the response.

然而,现今的测试方法通常都仅能使用在固定的使用者介面上。请参照图1,其绘示了一手机上的使用者介面的示意图。如图1所示,手机100的屏幕101显示了一使用者介面,此使用者介面上图符(icon)103、105、107以及109分别代表了讯息、行事历、照片以及工具的功能。 However, today's testing methods are usually only applicable to fixed user interfaces. Please refer to FIG. 1 , which shows a schematic diagram of a user interface on a mobile phone. As shown in FIG. 1 , the screen 101 of the mobile phone 100 displays a user interface. Icons 103 , 105 , 107 and 109 on the user interface represent the functions of message, calendar, photo and tool respectively.

图1所示的使用者介面及其所包含的功能可以可延伸标记式语言(Extensible Markup Language,XML)或相类似的标记式语言描述。如图2所示,其绘示了一待测程序如何使用可延伸标记式语言描述一使用者介面及此使用者介面所包含的功能。每一视窗皆具有一专属的Window ID,用以判断有那些功能被定义在此视窗中,并可描述现今视窗是那一类视窗。举例来说,若为电话簿的视窗,则可能具有”依群组分类的电话簿功能“、”依SIM卡分类的电话簿功能等等。程序区块200中的程序语言描述了此视窗中的功能列表,亦即此视窗中具有哪些功能,而程序区块201描述了此视窗中各功能的动作。图2中的其他详细内容为熟知此项技艺者所知悉,故在此不再赘述。 The user interface shown in FIG. 1 and the functions included therein can be described in Extensible Markup Language (XML) or a similar markup language. As shown in FIG. 2 , it illustrates how a program under test uses XML to describe a user interface and the functions included in the user interface. Each window has a unique Window ID, which is used to determine which functions are defined in this window, and can describe the type of window that the current window is. For example, if it is a window of the phone book, it may have "phone book function classified by group", "phone book function classified by SIM card, etc. The program language in the program block 200 describes the window in this window. The list of functions, that is, which functions are in this window, and the program block 201 describes the action of each function in this window.Other details in Fig. 2 are known to those skilled in the art, so no more details here .

在测试过程中,每一个功能都有相对应的测试程序。然而,于已知的测试方 法中,为了图1所示的介面所写的测试程序,由于无法动态得知该介面上各功能对应的图符的正确位置,仅能静态地应用于图1所示的介面。举例来说,图符103代表了讯息的功能,图符109代表了工具的功能,若图符103和图符109的位置对调,则测试讯息和测试工具的测试程序必须要相对应的做修改,否则测试时会出现错误。 During the test, each function has a corresponding test procedure. However, in the known test method, the test program written for the interface shown in Figure 1 can only be statically applied to the interface shown in Figure 1 because it cannot dynamically know the correct position of the icon corresponding to each function on the interface. displayed interface. For example, the icon 103 represents the function of the message, and the icon 109 represents the function of the tool. If the positions of the icon 103 and the icon 109 are reversed, the test message and the test program of the test tool must be modified accordingly. , otherwise an error will occur during the test.

另一方面,已知的测试方法通常没有考虑到动态的硬件状态。图3绘示了已知技术中一待测程序如何运用可延伸标记式语言描述被测试的电子装置的硬件状态的示意图。程序区块300表示了被测试的电子装置的硬件状态,而且在测试过程中可动态更新。举例来说,Touch_screen若为“Yes”,则代表被测试的电子装置有触控功能,而Key_Pad若为“Yes”,则代表被测试的电子装置有键盘功能。此外,连接至手机的配件或周边配备如移动电话用户识别(Subscriber Identity Module,SIM)卡,存储卡、耳机等,亦可藉由程序区块300来定义其状态。 On the other hand, known testing methods generally do not take into account dynamic hardware states. FIG. 3 is a schematic diagram of how a program under test uses XML to describe the hardware state of the electronic device under test in the prior art. The program block 300 represents the hardware state of the electronic device under test, and can be updated dynamically during the test process. For example, if Touch_screen is “Yes”, it means that the tested electronic device has a touch function, and if Key_Pad is “Yes”, it means that the tested electronic device has a keyboard function. In addition, the status of accessories or peripheral devices connected to the mobile phone, such as mobile phone Subscriber Identity Module (SIM) card, memory card, earphone, etc., can also be defined by the program block 300 .

然而,已知的测试方法通常没有考虑到硬件状态,因而经常产生不必要的错误。以图1的手机为例,其通常可以插入一些额外的硬件如移动电话用户识别卡或存储卡等,因此测试者可能需要对手机对于硬件的存取或其他功能亦做一些测试。然而,若在这些硬件不存在于内的情况下,仍发出测试指令,可能会因为一直得不到回应而产生错误讯息,甚至造成测试装置的停滞或当机。此外,储存装置如存储卡等,其内档案的分布状况或资料夹的分布变动相当大,因此已知的测试方法可能需要逐次针对这些不同的档案或资料夹分布来变动测试程序。 However, known testing methods generally do not take into account the state of the hardware and thus often generate unnecessary errors. Take the mobile phone in Figure 1 as an example, it can usually insert some additional hardware such as mobile phone subscriber identification card or memory card, so the tester may need to do some tests on the mobile phone's access to hardware or other functions. However, if these hardwares do not exist in the device, if the test command is still issued, an error message may be generated because the response has not been received, and even the test device may be stalled or crashed. In addition, the distribution of files or folders in a storage device such as a memory card varies considerably, so known testing methods may need to change the test program successively for these different file or folder distributions.

综上所述,习知的测试方法和测试装置在使用者介面或硬件状态常变动的状况下会需要不断的更改测试程序,因此会浪费相当多的时间或成本。 To sum up, the conventional testing method and testing device need to change the testing program continuously when the user interface or the hardware state is constantly changing, so a lot of time or cost will be wasted.

发明内容 Contents of the invention

因此,本发明的一目的为提供一种测试方法以及一种测试装置,可运用在不同的使用者介面以及不同的硬件状态的测试上。 Therefore, an object of the present invention is to provide a testing method and a testing device, which can be used in testing different user interfaces and different hardware states.

本发明的一实施例揭示了一种测试方法,用以测试一电子装置中一程序包含的一功能,该程序使该功能对应于一使用者介面的一图符,该测试方法包含:(a)寻找欲测试该功能于该程序的一位置;(b)根据该位置传送一指令来执行该功能;以及(c)根据该功能对于该指令的回应来判断该功能是否有误。其中,该指令包含对 应于一使用者于该使用者介面移至该图符的一子指令。 An embodiment of the present invention discloses a test method for testing a function included in a program in an electronic device, the program makes the function correspond to an icon of a user interface, the test method includes: (a ) Find a location in the program where the function is to be tested; (b) Send a command to execute the function according to the location; and (c) Determine whether the function is wrong according to the response of the function to the command. Wherein, the instruction includes a sub-instruction corresponding to a user moving to the icon in the user interface.

本发明的另一实施例揭示了一种测试方法,用以测试一电子装置中一程序所包含的一功能,该测试方法包含:(a)自该电子装置取得一使用者介面中所有功能的一索引资讯;(b)根据该索引资讯取得欲测试该功能的一位置,并传送一指令以执行该功能;以及(c)根据该功能对于该指令的回应来判断该功能是否有误。 Another embodiment of the present invention discloses a testing method for testing a function contained in a program in an electronic device, the testing method comprising: (a) acquiring all functions in a user interface from the electronic device (1) index information; (b) obtaining a position to test the function according to the index information, and sending an instruction to execute the function; and (c) judging whether the function is wrong according to the response of the function to the instruction.

本发明的另一实施例揭示了一种测试装置,用以测试一电子装置中一程序所包含的一功能,该程序使该功能对应于一使用者介面的一图符,该测试装置包含:一储存装置,储存有一测试程序;一控制单元,用以执行该测试程序来执行上列的测试方法。 Another embodiment of the present invention discloses a test device for testing a function included in a program in an electronic device, the program makes the function correspond to an icon of a user interface, the test device includes: A storage device stores a test program; a control unit is used to execute the test program to execute the above test method.

根据前述的实施例,可以不用不断的更改测试程序来配合不同的使用者介面和硬件状态,且可以实行自动化的测试而不用人工不断的控制。 According to the foregoing embodiments, it is not necessary to continuously change the test program to match different user interfaces and hardware states, and it is possible to implement automated testing without manual continuous control.

附图说明 Description of drawings

图1绘示了一手机上的使用者介面的示意图。 FIG. 1 shows a schematic diagram of a user interface on a mobile phone.

图2绘示了已知技术中一待测程序如何使用可延伸标记式语言描述一使用者介面及此使用者介面所包含的功能的示意图。 FIG. 2 shows a schematic diagram of how a program under test uses XML to describe a user interface and the functions contained in the user interface in the prior art.

图3绘示了已知技术中一待测程序如何运用可延伸标记式语言描述被测试的电子装置的硬件状态的示意图。 FIG. 3 is a schematic diagram of how a program under test uses XML to describe the hardware state of the electronic device under test in the prior art.

图4绘示了根据本发明的一实施例的测试装置的方块图。 FIG. 4 is a block diagram of a test device according to an embodiment of the present invention.

图5绘示了根据本发明的一实施例的测试程序运作方式。 FIG. 5 illustrates the operation of the test program according to an embodiment of the present invention.

图6(a)和图6(b)绘示了当硬件不存在或无法使用时,不显示或改变其显示方式的示意图。 FIG. 6( a ) and FIG. 6( b ) are schematic diagrams of not displaying or changing the display mode when the hardware does not exist or cannot be used.

图7绘示了根据本发明的实施例的动态指令的示意图。 FIG. 7 is a schematic diagram of a dynamic instruction according to an embodiment of the present invention.

图8揭示了如何取得电子装置的索引资讯的部份程序码。 FIG. 8 discloses part of the program code of how to obtain the index information of the electronic device.

图9揭示了根据本发明的实施例的测试方法的流程图。 FIG. 9 discloses a flowchart of a testing method according to an embodiment of the present invention.

主要元件符号说明 Description of main component symbols

100手机 100 mobile phones

101屏幕 101 screen

103、105、107、109、203图符 103, 105, 107, 109, 203 icons

200、201、300、301、500、501、700程序区块 200, 201, 300, 301, 500, 501, 700 program blocks

401测试装置 401 test device

402控制单元 402 control unit

403测试程序 403 test procedure

406储存装置 406 storage device

405电子装置 405 Electronic devices

407测试回应程序 407 test response procedure

具体实施方式 detailed description

在说明书及后续的申请专利范围当中使用了某些词汇来指称特定的元件。所属领域中具有通常知识者应可理解,硬件制造商可能会用不同的名词来称呼同一个元件。本说明书及后续的申请专利范围并不以名称的差异来作为区分元件的方式,而是以元件在功能上的差异来作为区分的准则。在通篇说明书及后续的权利要求书中所提及的“包含”为一开放式的用语,故应解释成“包含但不限定于”。此外,“耦接”一词在此包含任何直接及间接的电气连接手段。因此,若文中描述一第一装置耦接于一第二装置,则代表该第一装置可直接电气连接于该第二装置,或透过其他装置或连接手段间接地电气连接至该第二装置。 Certain terms are used in the specification and subsequent claims to refer to particular elements. It should be understood by those skilled in the art that hardware manufacturers may use different terms to refer to the same element. This description and subsequent patent applications do not use the difference in name as a way to distinguish components, but use the difference in function of components as a criterion for distinguishing. "Includes" mentioned throughout the specification and the following claims is an open-ended term, so it should be interpreted as "including but not limited to". In addition, the term "coupled" herein includes any direct and indirect means of electrical connection. Therefore, if it is described in the text that a first device is coupled to a second device, it means that the first device may be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices or connection means. .

图4绘示了根据本发明的一实施例的测试装置的方块图。如图4所示,测试装置401具有一测试程序403,会发出一指令给电子装置405来测试欲测试的功能。测试程序403可储存于一储存装置406中。电子装置405具有一测试回应程序407,会根据被测试的功能对指令的反应来送出一回应给测试装置401,然后测试程序403会根据此回应判断被测试的功能是否正常。测试程序403分别具有程序区块500、501以及700,这些程序区块的内容将于底下分别说明。须留意的是,底下虽以可延伸标记式语言档案做例子来说明,但其他功能性档案亦可运用于本发明所揭露的内容。测试装置401具有一控制单元402来执行测试程序403。控制单元402可由固件搭配硬件如处理器等,或是单独的硬件来实现。测试装置401和电子装置405藉由传输介面409来沟通,传输介面409可以是无线或有线的介面。 FIG. 4 is a block diagram of a testing device according to an embodiment of the present invention. As shown in FIG. 4 , the test device 401 has a test program 403 that sends an instruction to the electronic device 405 to test the function to be tested. The test program 403 can be stored in a storage device 406 . The electronic device 405 has a test response program 407, which sends a response to the test device 401 according to the response of the tested function to the command, and then the test program 403 judges whether the tested function is normal according to the response. The test program 403 has program blocks 500 , 501 and 700 respectively, and the contents of these program blocks will be described below. It should be noted that although the XML file is used as an example below for illustration, other functional files can also be applied to the content disclosed in the present invention. The test device 401 has a control unit 402 for executing a test program 403 . The control unit 402 can be implemented by firmware combined with hardware such as a processor, or by independent hardware. The test device 401 and the electronic device 405 communicate through the transmission interface 409, and the transmission interface 409 can be a wireless or wired interface.

图5绘示了根据本发明的一实施例的测试程序运作方式。图5中的程序区块 500定义了其需要的硬件,若此硬件状态不符合程序区块300所定义的状态,则停止测试欲测试的功能。举例来说,若欲测试SIM1卡中读取电话簿的功能,会需要SIM1卡的存在,因此若程序区块300中SIM1卡的状态并非”Yes”,也就是SIM1卡并不存在于被测试的电子装置之中,则会停止测试SIM1卡中读取电话簿的功能。若有任何会造成无法测试欲测试的功能的状况,例如SIM1卡存在于电子装置中,但与SIM1卡接触的接面有所损毁,则一样会停止SIM1卡相关功能。也就是说,本发明利用一待测的程序原有的被测试的电子装置的硬件状态,在测试过程中动态决定是否停止该硬件相关的功能测试。此外,于一实施例中,当检测到欲测试的功能相对应的一硬件不在电子装置中,则不显示与硬件相对应的该图符。如图6中的图6(a),与图2相较起来,便没有显示代表SIM1卡的图符203。此外,若检测到欲测试该功能相对应的一硬件不在该电子装置中,亦可用和其他该些图符不同的格式显示与硬件相对应的该图符。如图6中的图6(b),其便以虚线来显示SIM1卡。 FIG. 5 illustrates the operation of the test program according to an embodiment of the present invention. The program block 500 in FIG. 5 defines the required hardware, and if the state of the hardware does not conform to the state defined by the program block 300, then stop testing the function to be tested. For example, if you want to test the function of reading the phonebook in the SIM1 card, you need the presence of the SIM1 card, so if the status of the SIM1 card in the program block 300 is not "Yes", that is, the SIM1 card does not exist in the tested In the electronic device, it will stop testing the function of reading the phone book in the SIM1 card. If there is any situation that will cause the function to be tested to be unable to be tested, for example, the SIM1 card exists in the electronic device, but the interface contacting the SIM1 card is damaged, the related functions of the SIM1 card will also be stopped. That is to say, the present invention utilizes the original hardware state of the tested electronic device of a program to be tested, and dynamically determines whether to stop the hardware-related function test during the testing process. In addition, in one embodiment, when it is detected that a piece of hardware corresponding to the function to be tested is not in the electronic device, the icon corresponding to the hardware is not displayed. As shown in FIG. 6( a ) in FIG. 6 , compared with FIG. 2 , the icon 203 representing the SIM1 card is not displayed. In addition, if it is detected that a piece of hardware corresponding to the function to be tested is not in the electronic device, the icon corresponding to the hardware may also be displayed in a format different from the other icons. As shown in Fig. 6(b) in Fig. 6, the SIM1 card is displayed with a dotted line.

图5的程序区块501描述了在本发明的实施例中,测试程序中的测试指令如何运作,其主要的内容为:于此视窗所对应的待测程序中寻找欲测试该功能的一位置;然后根据该位置传送一指令来执行欲测试功能。举例来说,当要测试图2所示的待测程序中SIM1卡的电话簿功能时,测试程序会去寻找该电话簿功能在待测程序中相对应的位置,然后根据该位置送出一指令以于图2中所定义的使用者介面中,先往右移两次,再读取SIM1卡的电话簿。应注意的是,由于可延伸标记式语言档案具有可同时描述使用者介面及此使用者介面所包含的功能的性质,其可将某些功能关连于使用者介面上的特定图符。据此,当测试程序于待测程序中找出待测功能的位置时,即可同时得知该待测功能于使用者介面上对应的图符位置。当测试程序取得图符位置时,即可于测试指令中加上实质相同于一使用者操作该使用者介面时,自现今位置移动至该图符位置的一子指令。也就是说,该测试指令除了实际测试该待测功能外,尚包含利用子指令模拟使用者移动至该图符位置并点选该图符的行为。 The program block 501 of Fig. 5 has described in the embodiment of the present invention, how the test command in the test program works, and its main content is: find a position that wants to test this function in the program to be tested corresponding to this window ; Then send a command to execute the function to be tested according to the position. For example, when the phonebook function of the SIM1 card in the program to be tested shown in Figure 2 is to be tested, the test program will find the corresponding position of the phonebook function in the program to be tested, and then send an instruction according to the location In the user interface defined in Figure 2, first move to the right twice, and then read the phonebook of the SIM1 card. It should be noted that, due to the nature of the XML file that can describe both the user interface and the functions included in the user interface, it can associate certain functions with specific icons on the user interface. Accordingly, when the test program finds the position of the function to be tested in the program to be tested, it can simultaneously know the position of the icon corresponding to the function to be tested on the user interface. When the test program obtains the position of the icon, a sub-command that is substantially the same as moving from the current position to the position of the icon when a user operates the user interface can be added to the test command. That is to say, in addition to actually testing the function to be tested, the test command also includes using sub-commands to simulate the behavior of the user moving to the position of the icon and clicking the icon.

本发明所揭示的测试程序除了可供测试位于可静态描述的使用者介面的一般指令外,另可供测试位于会变动的使用者介面的功能,例如:位于储存装置中功能的一动态指令。如前所述,在一些储存装置中其资料的排列变动会相当大,因此测试同一个功能时,可能每一次该功能所位的阶层及视窗都会不一样,故在此称为动 态指令。图7绘示了根据本发明一实施例的动态指令的示意图。请再参考图4,在本发明的一实施例中,由于电子装置中的储存装置没办法利用可延伸标记式语言来编写,因此会利用包含在测试回应程序407中的程序码让电子装置405,将位于电子装置405的一储存装置(例如存储卡)所有功能的索引资讯传送给测试装置401。藉此,测试装置401便可得知欲测试功能的位置。以图7为例,若欲测试读取电子装置中存储卡的影像程序的功能,则先让电子装置405将存储卡的索引资讯告知测试装置401,如此便可得知其位于某画面的第三层,因此当要测试此功能时,便传送一指令在某一画面中往下移三次来执行此功能。程序区块700则表示了动态指令如何运作。应注意的是,动态指令并不限于位于电子装置外的储存装置中的指令,而泛指所有无法以可延伸标记式语言档案等功能档案静态描述,而会随着当时电子装置的状态,动态地改变该功能相对应的图符的位置者。举例而言,手机通讯录中的功能选单,会随着通讯录内有无资料,而有所变动。因此,该功能选单中的指令即为动态指令。此即为位于电子装置内部的动态指令的一适例。 The test program disclosed by the present invention can be used for testing not only the general commands on the user interface that can be described statically, but also the function on the user interface that can be changed, such as a dynamic command on the function in the storage device. As mentioned above, the arrangement of data in some storage devices will change quite a lot, so when testing the same function, the layer and window of the function may be different every time, so it is called dynamic command here. FIG. 7 is a schematic diagram of a dynamic command according to an embodiment of the invention. Please refer to FIG. 4 again. In one embodiment of the present invention, since the storage device in the electronic device cannot be written in an extensible markup language, the electronic device 405 will be made , sending index information of all functions of a storage device (such as a memory card) located in the electronic device 405 to the test device 401 . In this way, the testing device 401 can know the location of the function to be tested. Taking Fig. 7 as an example, if it is desired to test the function of reading the image program of the memory card in the electronic device, first let the electronic device 405 inform the test device 401 of the index information of the memory card, so that it can be known that it is located at the first position of a certain screen. Three layers, so when this function is to be tested, a command is sent to move down three times in a certain screen to execute this function. Program block 700 shows how dynamic instructions work. It should be noted that the dynamic command is not limited to the command located in the storage device outside the electronic device, but generally refers to all functions that cannot be statically described by extensible markup language files, but will be dynamically changed according to the state of the electronic device at that time. Change the position of the icon corresponding to the function accordingly. For example, the function menu in the mobile phone address book will change according to whether there is data in the address book. Therefore, the commands in this function menu are dynamic commands. This is an example of a dynamic command inside an electronic device.

图8揭示了测试程序内如何取得电子装置的索引资讯的部份程序码。须注意的是,图8中仅揭示了一部份的程序,而且这些测试程序程序码仅用以举例,并非用以限制本发明,熟悉本技术领域者当可任意修改部份程序码来达成相同的效果,其亦应在本发明的范围之内。图8中A部份的程序码表示”取得该使用者介面中的项目的数目”,而B部份的程序表示”分析该些项目的相关资讯”,在分析完后会将这些资讯传回给测试装置401,因此测试装置401便可得知欲测试功能的位置。 FIG. 8 reveals part of the program code of how to obtain the index information of the electronic device in the test program. It should be noted that only a part of the program is disclosed in FIG. 8 , and these test program codes are only used as examples, not to limit the present invention. Those skilled in the art can arbitrarily modify part of the program codes to achieve The same effect should also be within the scope of the present invention. The program code in part A in Figure 8 means "get the number of items in the user interface", and the program in part B means "analyze the relevant information of these items", and return the information after the analysis For the test device 401, the test device 401 can know the location of the function to be tested.

图9揭示了根据本发明的实施例的测试方法的流程图,其包含了下列步骤: Figure 9 discloses a flow chart of a testing method according to an embodiment of the present invention, which includes the following steps:

步骤901 Step 901

开始。 start.

步骤903 Step 903

取得已定义好的一待测程序。此步骤还可包含取得一画面(Window ID),如前所述,特定视窗可相对应于特定的功能,因此取得Window ID有助于传送指令的正确性。举例来说,若判断欲测试功能不符合电子装置现今视窗该有的功能,则不传送指令。 Obtain a defined program to be tested. This step may also include obtaining a frame (Window ID). As mentioned above, a specific window may correspond to a specific function, so obtaining the Window ID is helpful for the correctness of the instruction. For example, if it is determined that the function to be tested does not conform to the function that the current window of the electronic device should have, the command is not sent.

步骤905 Step 905

开始执行根据本发明的测试方法,其可为自动执行,但不限定。 Start to execute the testing method according to the present invention, which can be executed automatically, but not limited.

步骤907 Step 907

判断本行待测程序是否为一动态指令?若是则到步骤923,若否则到步骤909。 Judging whether the program to be tested in the bank is a dynamic instruction? If yes, go to step 923; otherwise, go to step 909.

步骤909 Step 909

寻找欲测试功能的位置。 Find the location of the function you want to test.

步骤911 Step 911

根据该欲测试功能的位置传送相关的指令。 Send relevant instructions according to the position of the function to be tested.

步骤913 Step 913

测试回应程序传送回应。 The test responder sends a response.

步骤915 Step 915

测试程序比对所接收到的回应和预期的回应。 The test program compares the received responses with the expected responses.

步骤917 Step 917

比较结果是否正确?若否则表示被测试的功能有问题,到步骤929结束测试流程,亦可让测试装置显示一错误讯息。若是则表示被测试的功能正常,到步骤919。 Is the comparison correct? If otherwise, it indicates that there is a problem with the tested function, and the test process is ended in step 929, and an error message can also be displayed on the testing device. If so, it means that the tested function is normal, go to step 919.

步骤919 Step 919

执行下一指令?若是则回到步骤907,若否则到步骤921。 Execute the next command? If yes, go back to step 907; otherwise, go to step 921.

步骤921 Step 921

结束。 Finish.

步骤923 Step 923

让电子装置传送索引资讯给测试装置。 Allow the electronic device to send index information to the test device.

步骤925 Step 925

根据索引资讯取得欲测试功能的位置。 Obtain the position of the function to be tested according to the index information.

步骤927 Step 927

是否取得正确的位置?若是,则回到步骤911,若否,则到步骤929结束测试方法。 Did you get the correct position? If yes, go back to step 911, if not, go to step 929 to end the testing method.

根据前述的实施例,可以不用不断的更改测试程序来配合不同的使用者介面和硬件状态,且可以实行自动化的测试而不用人工不断的监控。 According to the aforementioned embodiments, it is not necessary to continuously change the test program to match different user interfaces and hardware states, and it is possible to implement automated testing without manual continuous monitoring.

以上所述仅为本发明的较佳实施例,凡依本发明申请专利范围所做的均等变化与修饰,皆应属本发明的涵盖范围。 The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.

Claims (19)

1. a method of testing, in order to test the function that a software in an electronic installation is comprised, this software will This function is relevant to an icon of a user interface, and this method of testing comprises:
A () is found and is intended to test this function in a position of this software;
B () is transmitted an instruction according to this position and is performed this function;And
C for the response of this instruction, () judges that this function is the most wrong according to this function;
Wherein, this instruction comprises the sub-instructions moving to this icon corresponding to a user in this user interface,
Wherein, this step (a) comprises:
(a1) extensible making type language whether is utilized according to the storage device corresponding to this function in this electronic installation Write and judge whether this function corresponds to a dynamic instruction, to produce a judged result;
(a2) if this judged result is yes, the index of all functions in this user interface is obtained from this electronic installation Information, and this position of this function is obtained according to this index information;
(a3) if this judged result is no, this position of this function is obtained according to software under testing.
2. method of testing as claimed in claim 1, it is characterised in that this step (a) also comprises this merit of detection The hardware state that energy is corresponding, and when this hardware state occurs an erroneous condition, stop testing this function.
3. method of testing as claimed in claim 2, it is characterised in that fill in this electronics when this software is performed Putting this icon of display, this method of testing further includes:
When this hardware state occurs this erroneous condition, the most do not show this corresponding icon.
4. method of testing as claimed in claim 2, it is characterised in that comprise:
When this erroneous condition be the corresponding hardware of this function not in this electronic installation, the most do not show hard with this The icon that part is corresponding.
5. method of testing as claimed in claim 2, it is characterised in that comprise:
When this erroneous condition be the corresponding hardware of this function not in this electronic installation, then with different lattice Formula shows an icon corresponding with this hardware.
6. method of testing as claimed in claim 1, it is characterised in that this software is an extensible making type language Speech archives.
7. method of testing as claimed in claim 1, it is characterised in that this index information is by being relevant to this electronics One storage device of device provides.
8. method of testing as claimed in claim 1, it is characterised in that should (a2) step comprise:
(d1) number of multiple projects in this user interface is obtained;
(d2) many relevent informations of the plurality of project are analyzed;
(d3) according to this number and described many relevent informations, this position of this function is obtained.
9. method of testing as claimed in claim 1, it is characterised in that should (b) step also comprise:
Judge the function that this user interface is corresponding, if this function is not belonging to this user interface, then stop passing Give this instruction.
10. a method of testing, in order to test the function that a software in an electronic installation is comprised, this test Method comprises:
A whether () utilize extensible making type language according to the storage device corresponding to this function in this electronic installation Write and judge whether this function corresponds to a dynamic instruction, to produce a judged result, if this judged result is yes, An index information of all functions in a user interface is obtained from this electronic installation;
B () obtains according to this index information and is intended to test a position of this function, if this judged result is no, according to treating Survey software and obtain this position of this function, and transmit an instruction to perform this function;And
C for the response of this instruction, () judges that this function is the most wrong according to this function.
11. method of testings as claimed in claim 10, it is characterised in that this index information is by being relevant to this electricity One storage device of sub-device provides.
12. method of testings as claimed in claim 10, it is characterised in that should (a) step comprise:
(a1) number of multiple projects in this user interface is obtained;And
(a2) many relevent informations of the plurality of project are analyzed;
Wherein should (b) step according to should this number of obtaining of (a1) step and should described many of (a2) step relevant Information, obtains this position of this function.
13. 1 kinds of test devices, in order to test the function that a software in an electronic installation is comprised, this software Making this function corresponding to an icon of a user interface, this test device comprises:
One storage device;
One control unit, described control unit be configured to perform the following step:
A () is found and is intended to test this function in a position of this software;
B () is transmitted an instruction according to this position and is performed this function;And
C for the response of this instruction, () judges that this function is the most wrong according to this function;
Wherein, this instruction comprises the sub-instructions moving to this icon corresponding to a user in this user interface,
Wherein this control unit is configured to look for this function when this position of this software, performs the following step:
(a1) extensible making type language whether is utilized according to the storage device corresponding to this function in this electronic installation Write and judge whether this function corresponds to a dynamic instruction, to produce a judged result;
(a2) if this judged result is yes, the index of all functions in this user interface is obtained from this electronic installation Information, and this position of this function is obtained according to this index information;
(a3) if this judged result is no, this position of this function is obtained according to this software.
14. test device as claimed in claim 13, it is characterised in that this control unit is more configured to detection The hardware state that this function is corresponding, and when this hardware state occurs an erroneous condition, stop testing this function.
15. test device as claimed in claim 14, it is characterised in that in this electronics when this software is performed Showing this icon on device, this control unit is configured to perform:
When this hardware state occurs this erroneous condition, the most do not show this corresponding icon.
16. test device as claimed in claim 14, it is characterised in that this control unit is configured to perform:
When this erroneous condition be the corresponding hardware of this function not in this electronic installation, then with different lattice Formula shows this icon corresponding with this hardware.
17. test device as claimed in claim 13, it is characterised in that this software is an extensible making type Language archives.
18. test device as claimed in claim 13, it is characterised in that should (a2) step comprise:
(d1) number of multiple projects in this user interface is obtained;And
(d2) many relevent informations of the plurality of project are analyzed;
(d3) according to this number and described many relevent informations, this position of this function is obtained.
19. test device as claimed in claim 13, it is characterised in that should (b) step also comprise:
Judge the function that this user interface is corresponding, if this function is not belonging to this user interface, then stop passing Give this instruction.
CN201110409085.5A 2011-12-09 2011-12-09 The method of testing of the function of test electronic installation and test device Expired - Fee Related CN103167076B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110409085.5A CN103167076B (en) 2011-12-09 2011-12-09 The method of testing of the function of test electronic installation and test device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110409085.5A CN103167076B (en) 2011-12-09 2011-12-09 The method of testing of the function of test electronic installation and test device

Publications (2)

Publication Number Publication Date
CN103167076A CN103167076A (en) 2013-06-19
CN103167076B true CN103167076B (en) 2016-09-14

Family

ID=48589808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110409085.5A Expired - Fee Related CN103167076B (en) 2011-12-09 2011-12-09 The method of testing of the function of test electronic installation and test device

Country Status (1)

Country Link
CN (1) CN103167076B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746760B (en) * 2014-01-21 2015-07-29 加弘科技咨询(上海)有限公司 A kind of universal testing method of data communication products and production method
CN105138456A (en) * 2015-08-28 2015-12-09 上海斐讯数据通信技术有限公司 Testing method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731353A (en) * 2004-08-04 2006-02-08 英业达股份有限公司 A method capable of immediately proposing a solution to an error condition of a computer device
CN101506765A (en) * 2006-11-10 2009-08-12 松下电器产业株式会社 Destination estimation device and destination estimation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101509245B1 (en) * 2008-07-31 2015-04-08 삼성전자주식회사 User interface apparatus and method using pattern recognition in portable terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731353A (en) * 2004-08-04 2006-02-08 英业达股份有限公司 A method capable of immediately proposing a solution to an error condition of a computer device
CN101506765A (en) * 2006-11-10 2009-08-12 松下电器产业株式会社 Destination estimation device and destination estimation method

Also Published As

Publication number Publication date
CN103167076A (en) 2013-06-19

Similar Documents

Publication Publication Date Title
US10853232B2 (en) Adaptive system for mobile device testing
TWI476587B (en) Testing method and testing apparatus for testing function of electronic apparatus
US9317413B2 (en) Testing device and testing method thereof
AU2013394952B2 (en) Automated generation of scripted and manual test cases
US9280451B2 (en) Testing device
CN106126424B (en) A kind of visual automated testing method of script, device and mobile terminal
CN110334007A (en) Function interface call verification method and device, electronic equipment and storage medium
CN105302722B (en) CTS automatic testing method and device
CN113094251B (en) Method and device for testing embedded system, computer equipment and storage medium
CN103984626A (en) Method and device for generating test-case script
CN110659197B (en) Application test case generation method and device and software test system
US9298594B2 (en) Testing apparatus and testing method
US10846206B2 (en) Adaptive software testing
US20100312541A1 (en) Program test device and program
CN110162463A (en) Method for testing software, device and electronic equipment based on automated test tool
CN103167076B (en) The method of testing of the function of test electronic installation and test device
CN107783867A (en) Gesture method of testing, device, computer equipment and storage medium
CN114496053A (en) Data anomaly detection method, device and equipment and computer readable storage medium
CN107979690A (en) A kind of mobile terminal and its method and system for skipping start guide
CN106708705B (en) Terminal background process monitoring method and system
CN117192343B (en) Chip testing method based on auxiliary system, electronic equipment and medium
CN112711495A (en) Display screen fault diagnosis method and device and computer readable storage medium
JP2014092881A (en) Test system and program
CN112231207A (en) Multi-machine testing method for application program testing, computer readable storage medium and testing platform
CN113609002B (en) Automated testing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160914

Termination date: 20191209