Test device, test device control method, and program
The test device autonomously identifies and operates on target objects to ensure all test items are completed, addressing the need for user intervention in mismatched results.
Patent Information
- Application Number
- JP2020190945
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-10-07
- Estimated Expiration
- 2040-11-17
AI Technical Summary
Existing test devices require user intervention to continue testing when a mismatched test result is encountered, preventing the completion of all test items.
A test device and method that automatically identify and operate on target objects within a predetermined range or with similar characteristics to specification objects, allowing the test to continue without user interaction.
Enables the completion of all test items even when initial test results do not match specifications, improving test efficiency and implementation rates.
Smart Images

Figure 0007562381000001 
Figure 0007562381000002 
Figure 0007562381000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a test device, a control method for the test device, and a program. [Background technology]
[0002] There is known a test device that verifies whether a program to be tested operates normally (for example, Patent Document 1). The test device described in Patent Document 1 acquires a first image displayed on a display means in response to execution of a target program to be tested. Then, based on first identification information included in the first image and identifying a partial image corresponding to a correct image, the test device extracts a partial image from the first image as a target image, determines whether the target image matches the correct image, and displays the determination result. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2016-224868 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the test device described in Patent Document 1, if it is determined that the target image does not match the correct image in a specific test item among all test items, the test cannot be continued unless the user performs some operation on the test device. Therefore, if the user is not present, there is a problem that the unexecuted test items cannot be tested.
[0005] The problem that the present invention aims to solve is to provide a test device, a control method for the test device, and a program that can test unperformed test items, regardless of whether a user is present or not, when a test result is obtained for a specified test item that does not match the equipment specifications. [Means for solving the problem]
[0006] The present invention performs a test of the device according to a test flow including the test items of the device and the operation procedures of the objects displayed on the display device by the device, and when a test result that does not match the specifications of the device is obtained for a given test item, To A second object is searched for as an object corresponding to a first object, which is an object according to the specifications of the device, from an image displayed on the display device. When you do , determining whether an object is present within a predetermined first range from the first position, and when it is determined that the object is present within the first range, identifying the object within the first range as a second object; Second Object Objects identified as The above problem is solved by manipulating the above. Effect of the Invention
[0007] According to the present invention, if a test result is obtained for a specified test item that does not match the specifications of the equipment, the test can be continued in accordance with the test flow by operating the second object, so that unperformed test items can be tested regardless of whether a user is present or not. [Brief description of the drawings]
[0008] [Figure 1] 1 is a block diagram showing a test system to which a test device, a control method for a test device, and a program of the present invention are applied; [Diagram 2] FIG. 2 is an explanatory diagram of an object displayed on a display. [Diagram 3] FIG. 13 is an explanatory diagram of target objects that are acceptable as objects in terms of specifications, based on the object positions. [Figure 4] FIG. 11 is an explanatory diagram of target objects that are acceptable as objects based on the specifications, based on character strings and icons displayed within the objects. [Diagram 5] 4 is a flowchart showing a test flow executed by the test system according to the present embodiment. [Figure 6] 6 is a flowchart showing a subroutine executed in step S105 of FIG. 5. [Figure 7] 7 is a flowchart showing a subroutine executed in step S206 of FIG. 6. [Figure 8] 8 is a flowchart showing a subroutine executed in step S312 of FIG. 7. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0010] This embodiment relates to a test system to which the test device, the control method for the test device, and the program according to the present invention are applied. The test system according to this embodiment is a system that tests equipment according to a test flow including test items for the equipment and operation procedures for objects displayed on a display device by the equipment. The test system according to this embodiment is a system that automatically executes equipment tests without requiring user operation. Equipment testing refers to evaluating the operation of the equipment against the specifications of the equipment in order to evaluate the completeness of the equipment.
[0011] FIG. 1 is a block diagram showing a test system 100 according to the present embodiment. The test system 100 according to the present embodiment includes a device 1 to be tested, a display control device 2 that displays an image on a display 3 in response to an image signal output from the device 1, and a test device 10 that tests the device 1. The device 1 and the display control device 2 are connected by a communication network of a specified standard, and information (also called data or signals) can be exchanged between the devices. The test device 10 is also connected by a communication network of a specified standard to the device 1 and the display control device 2, and information (also called data or signals) can be exchanged between the test device 10 and the device 1, and between the test device 10 and the display control device 2.
[0012] The device 1 is a device to be tested in the test system 100. In the sense of being a test target, the device 1 is also referred to as a unit under test (UUT). The device 1 has an image generating function for generating an image to be displayed on the display 3. In this embodiment, the form, operation characteristics, and the like of the device 1 are not particularly limited. In the following description, an ECU (Electronic Control Unit) for car navigation will be taken as an example of the device 1, but the device 1 is not particularly limited. The device 1 outputs an image signal of an image to be displayed on the display 3 to the display control device 2. In addition, an operation signal indicating an operation on an object is input from the display control device 2 to the device 1. The object will be described later. In this embodiment, the device 1 and the display control device 2 will be described separately, but the device 1 may include the display control device 2 described later. That is, the device 1 may be configured to include the display control device 2 shown in FIG. 1.
[0013] The display control device 2 is a control device that reproduces an image according to an image signal from the device 1 and displays the reproduced image on the display 3. The display 3 is a display device that has a display function for displaying an image and an input function for inputting information. For example, the display 3 is an electronic component that combines a liquid crystal panel and a position input device such as a touch pad. The display 3 functions as a display device that displays an image on the liquid crystal panel. The display 3 also functions as an input device that allows a user to operate the device 1 by operating the display on the screen of the liquid crystal panel. In the following explanation, the display on the screen of the display 3 that can be operated by the user will be referred to as an object. The display 3 may not be a touch panel type display, but may be a display on which objects can be operated by a device such as a mouse.
[0014] Here, the operation of the device 1 and the display control device 2 when the screen of the display 3 is switched will be described by taking a car navigation system as an example. In a scene where a plurality of vehicle routes are presented to the user via the display 3, a case where the user selects a specific route from the presented plurality of routes will be taken as an example. In this example, first, the device 1 outputs an image signal of an image showing the plurality of routes to the display control device 2 in order to have the user select a route. The display control device 2 reproduces an image showing the plurality of routes in response to the image signal, and causes the reproduced image to be displayed on the display 3. The user presses an object (also called a button) showing a specific route from among the plurality of routes displayed on the display 3. When the object is pressed by the user, the display control device 2 detects that the user has pressed the object, and outputs an operation signal indicating the user's operation on the object to the device 1. The device 1 generates a new image showing only the specific route in response to the user's operation signal input from the display control device 2, and outputs an image signal of the generated image to the display control device 2. As a result, the screen of the display 3 is switched from a screen showing the plurality of routes to a screen showing only the route selected by the user.
[0015] In this way, the operation of device 1 is output on the screen of display 3, so that test device 10, which will be described later, tests the operation of device 1 by evaluating the screen of display 3. In addition, the operation of device 1 changes when an object displayed on display 3 is operated, so that test device 10 evaluates the screen including the object displayed on display 3.
[0016] Fig. 2 is an explanatory diagram for explaining objects in the specifications of device 1. Fig. 2(A) is an explanatory diagram for explaining the configuration of objects, and Fig. 2(B) is an explanatory diagram for explaining the position of objects displayed on display 3. Note that in the following explanation, for convenience, objects displayed on display 3 that match the specifications of device 1, that is, objects that satisfy the specifications of device 1, will be referred to as specification objects.
[0017] The specification object 20 shown in Fig. 2(A) is an object indicating a destination. In the example of Fig. 2(A), the shape of the specification object 20 is indicated by a rectangular outer frame 20c having a predetermined size. In the outer frame 20c of the specification object 20, an icon 20a indicating the destination and a character string 20b of "destination" are displayed side by side from the left side of Fig. 2(A). The icon 20a is composed of a figure, a symbol, or a combination of these.
[0018] In the specifications of the device 1, the specification object 20 is prescribed with respect to the shape of the specification object 20, the character string to be displayed within the specification object 20, the position at which the character string is displayed within the specification object 20, the icon to be displayed within the specification object 20, and the position at which the icon is displayed within the specification object 20. Note that the example of Fig. 2(A) is an example of a specification object displayed on the display 3, and does not limit the shape and size of the object, the display content within the object, or the display position of the display content within the object.
[0019] The specifications of the device 1 also stipulate the position at which the specification object 20 is displayed on the display 3. As shown in Fig. 2(B), the specification object 20 is displayed at a position stipulated by the specifications of the device 1 in the image displayed on the display 3. In the example of Fig. 2(B), the position of the specification object 20 is stipulated by coordinate axes (X axis, Y axis) on the plane of the display 3. Note that there is no particular limitation on how the position of the specification object is stipulated, and it does not have to be stipulated by coordinates.
[0020] Returning to FIG. 1, the configuration of the test system 100 will be described again. The test device 10 is composed of a ROM (Read Only Memory) storing a program for testing the device 1, a CPU (Central Processing Unit) for executing the program stored in the ROM, and a RAM (Random Access Memory) that functions as an accessible storage device. As the operating circuit, a MPU (Micro Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), etc. can be used instead of or in addition to the CPU. Hereinafter, the program executed by the test device 10 will be described as a program stored in the ROM, but the program may be stored outside the test device 10. For example, the program executed by the test device 10 may be stored in a computer-readable recording medium. In this case, the recording medium and the test device 10 are connected using a predetermined standard, so that the test device 10 can execute the program recorded in the recording medium. Although not shown in FIG. 1, the test device 10 may be a part of a test facility for testing the device 1.
[0021] As shown in FIG. 1, the test device 10 includes a test execution unit 11, a memory unit 12, a search unit 13, an operation unit 14, a restart unit 15, a judgment unit 16, and a test omission unit 17, and these blocks realize each function described below by a program stored in ROM.
[0022] The test execution unit 11 creates a test flow for testing the device 1, and executes the test of the device 1 according to the created test flow. The test flow includes at least test items for the device 1 and operating procedures for objects displayed on the display 3. The test flow may include a test pattern required for operating the device 1 for each test item.
[0023] The object operation procedure refers to the order in which objects displayed on the display 3 are operated. For example, the test execution unit 11 generates a plurality of test items for testing the operation of the device 1 based on the specifications of the device 1, and generates the order of each test item, the object operation procedure for testing, and the object operation procedure for switching the test items. Note that the test execution unit 11 can apply a technology for automatically generating a test flow, such as an automatic test scenario generation technology, that was known at the time of filing the present application.
[0024] In addition, when the test execution unit 11 executes a test of the device 1, it judges whether the operation of the device 1 matches the operation in the specifications of the device 1. The test execution unit 11 judges whether the device 1 operates to satisfy the specifications of the device 1 for each test item according to the test flow. For example, the test execution unit 1 inputs a test pattern to the device 1 to operate the device 1. The device 1 executes an operation according to the test pattern and displays an image on the display 3. The test execution unit 11 acquires an image displayed on the display 3 and compares the acquired image with an expected image, which is an image in the specifications of the device 1, to judge whether the operation of the device 1 matches the specifications. The test execution unit 11 inputs a test pattern to the device 1 for each test item and compares the image displayed on the display 3 with the expected image, thereby being able to execute a test according to the test flow. Note that the test execution unit 11 can apply a technology for automatically executing a test known at the time of filing of the present application, such as a test script automatic generation technology and a test program automatic generation technology.
[0025] Here, a problem that may occur when the test execution unit 11 determines that the operation of the device 1 does not match the operation in the specifications of the device 1 will be described. In the case where the device 1 is an ECU for car navigation, for example, if the device 1 is not well-developed, the image displayed on the display 3 may not match the image in the specifications of the device 1. One of the reasons for the mismatch between the image displayed on the display 3 and the image in the specifications of the device 1 is that the object displayed on the display 3 does not match the specification object of the device 1. In this case, the test execution unit 11 determines that the operation of the device 1 does not match the operation in the specifications of the device 1 for a predetermined test item. In the test flow, an object operation procedure is predefined for the case where the test item is determined to be negative. The test execution unit 11 tries to operate the object according to the object operation procedure defined in the test flow. However, for example, if the position of the object displayed on the display 3 is different from the position of the specification object, there is a problem that the test execution unit 11 cannot operate the object and cannot continue the test flow. The state in which the test flow cannot be continued is also called a state in which the test of the device 1 is substantially stopped. In the test device 10 of this embodiment, as described above, since the object displayed on the display 3 is different from the specification object, even in a situation where processing according to the test flow cannot be executed, the test flow can be continued by searching for and operating an object corresponding to the specification object.
[0026] The storage unit 12 is a memory that stores information related to testing of the device 1. The storage unit 12 may be, for example, a non-volatile memory such as a ROM or a hard disk (HDD), or may be a volatile memory such as a dynamic memory (DRAM) or a static memory (SRAM). In this embodiment, the characteristics and type of the storage unit 12 are not particularly limited.
[0027] The storage unit 12 stores an expected image, which is an image based on the specifications of the device 1, for each test item. The expected image includes a specification object displayed in the image. The storage unit 12 stores information about the specification object for each test item. The storage unit 12 also stores test environment information for testing the device 1 for each test item. The test environment information includes information about external devices that can be connected to the device 1 by wire or wirelessly, and a test pattern for the device 1. When the device 1 is an ECU for car navigation, examples of the external devices include a DVD media medium used in a car navigation system, an ETC on-board device, and a smartphone. The test pattern for the device 1 is stored in the storage unit 12 by the test execution unit 11.
[0028] When a test result that does not match the specifications of the device 1 is obtained for a specific test item among all test items included in the test flow, the search unit 13 searches for a target object as an object that corresponds to the specification object from the image displayed on the display 3. An object that corresponds to a specification object is an object that is different from the specification object but is acceptable as a specification object. In other words, an object that corresponds to a specification object is an object that does not completely match the specification object but partially matches the specification object with respect to a specific element of the object.
[0029] The search unit 13 searches for a target object from the image displayed on the display 3 based on a predetermined element of the object. The predetermined element of the object includes at least one of the position of the object on the image displayed on the display 3, characters displayed in the object, and an icon displayed in the object. The search unit 13 accepts, as a specification object, an object that partially matches the specification object in the predetermined element of the object, among the objects displayed on the display 3. The search unit 13 identifies the accepted object as a target object corresponding to the specification object.
[0030] For example, the search unit 13 identifies, as the target object, an object located within a predetermined range with respect to the position of the specification object on the image displayed on the display 3. FIG. 3 is an explanatory diagram of a target object that is acceptable as an object on the specification from the position of the object. FIG. 3(A) is an example of a range in which the search unit 13 searches for an object. The specification object 20 (dotted line portion) shown in FIG. 3(A) corresponds to the specification object 20 shown in FIG. 2(B). Note that in FIG. 3(A), the specification object 20 is not actually displayed on the display 3, and for convenience, the specification object 20 that should be displayed is shown.
[0031] 3(A), the search unit 13 sets a search range R centered on the originally assumed position of the specification object 20, and searches for the object within the search range R. The search range R is an area larger than the area occupied by the specification object 20 on the display 3, and smaller than the entire area of the image displayed on the display 3.
[0032] For example, as shown in Fig. 3(B), when the object 21 exists within the search range R, the search unit 13 identifies the object 21 as a target object corresponding to the specification object 20. In this case, the search unit 13 determines that the object exists in the vicinity of the position on the specifications. On the other hand, unlike Fig. 3(B), when the object does not exist within the search range R, the search unit 13 determines that the object does not exist in the vicinity of the position on the specifications.
[0033] Also, for example, as shown in FIG. 3(C), when the object 22 is outside the search range R and exists within the screen of the display 3, the search unit 13 determines that the object exists within the screen of the display 3. In this case, unlike the example of FIG. 3(B), the search unit 13 does not specify the object 22 as a target object corresponding to the specification object 20. This is based on the viewpoint that since the object 22 is outside the search range R, it is difficult to accept it as the specification object 20 in terms of the object position. On the other hand, unlike FIG. 3(C), when the object does not exist within the screen of the display 3, the search unit 13 determines that the object does not exist within the screen of the display 3.
[0034] In addition, in FIGS. 3B and 3C, the object 21 and the object 22 are shown as objects that match the specification object 20 in appearance, but they may be objects that differ in appearance from the specification object 20.
[0035] For example, if the specification object includes a character string, the search unit 13 identifies an object including a character string that matches or is similar to the character string in the specification object as the target object. For example, if the specification object includes an icon, the search unit 13 identifies an object including an icon that matches or is similar to the icon in the specification object as the target object.
[0036] Fig. 4 is an explanatory diagram of target objects that are acceptable as specification objects based on character strings and icons displayed within the object. Fig. 4(A) to Fig. 4(C) are examples of target objects that are acceptable as specification objects based on character strings displayed within the object.
[0037] When the string in the object is a translated string of the string in the specification object, the search unit 13 identifies the object as the target object. This is based on the perspective of allowing differences due to language. For example, as shown in FIG. 4(A), in the specification object 20, where the string 20b is displayed as "destination" (see FIG. 2(A)), in the object 31, the string 31b is displayed as "Destination", which is the English translation of "destination". In this case, the search unit 13 identifies the object 31 as the target object corresponding to the specification object 20 shown in FIG. 2(A).
[0038] Also, when the string in the object is a string in which one character has been converted from the string in the specification object, the search unit 13 identifies the object as the target object. This is based on the perspective of allowing differences such as miswriting or spelling mistakes. For example, as shown in FIG. 4(B), in the specification object 20, where the string 20b is displayed as "destination" (see FIG. 2(A)), in the object 32, the string 32b is displayed as "目的 地" (destination with one character converted). In this case, the search unit 13 identifies the object 32 as the target object corresponding to the specification object 20.
[0039] Also, when the string in the object is a synonym string of the string in the specification object, when the string in the object is a similar meaning string of the string in the specification object, or when the string in the object is an antonym string of the string in the specification object, the search unit 13 identifies the object as the target object. This is based on the perspective of allowing differences such as recognition differences or notation mistakes. For example, as shown in FIG. 4(C), in the specification object 20, where the string 20b is displayed as "destination" (see FIG. 2(A)), in the object 33, the string 33b is displayed as "到着地" (arrival place), which is the antonym of "destination". In this case, the search unit 13 identifies the object 33 as the target object corresponding to the specification object 20.
[0040] 4(A) to 4(C), the search unit 13 can determine whether a character string in a specification object is a translated character string, whether a character string in which one character has been converted, whether a character string of an antonym, etc., by referring to dictionary information stored in a database external to the storage unit 12 or the test device 10. The dictionary information referred to by the test device 10 includes translations, synonyms, and learning data.
[0041] 4(D) to 4(E) are examples of target objects that are acceptable as specification objects based on icons displayed within the objects.
[0042] When an icon in an object is similar to an icon in a specification object, the search unit 13 identifies the object as a target object. This is based on the viewpoint that differences in size are allowed because the shapes match. For example, as shown in FIG. 4(D), in the specification object 20, an icon 21a is displayed at a predetermined size (see FIG. 2(A)), whereas in the object 34, an icon 34a is displayed that is the same in shape as the icon 21a but is a different size. In this case, the search unit 13 identifies the object 34 as a target object corresponding to the specification object 20.
[0043] Furthermore, when the position of an icon in an object is within a predetermined range from the position of the icon in a specification object, the search unit 13 identifies the object as a target object. This is based on the viewpoint that differences in display positions within an object are permitted. For example, as shown in FIG. 4(E), in a specification object 20, an icon 21a is displayed at a predetermined position within the specification object 20 (see FIG. 2(A)), but the position of an icon 35a within an object 35 is different from the position of the icon 21a within the specification object 20. In this case, the search unit 13 identifies the object 35 as a target object corresponding to the specification object 20.
[0044] Furthermore, when an icon in an object is a different color from an icon in a specification object, the search unit 13 identifies the object as a target object. This is based on the viewpoint that the difference in color is acceptable because the shapes match. For example, as shown in FIG. 4(F), in the specification object 20, an icon 21a is displayed in a predetermined color (see FIG. 2(A)), whereas in the object 36, an icon 36a is displayed that is the same in shape and size as the icon 21a but in a different color. In this case, the search unit 13 identifies the object 36 as a target object corresponding to the specification object 20.
[0045] In the example described using Figures 4(D) to 4(F), the search unit 13 can refer to icon information stored in the memory unit 12 or a database external to the test device 10 to determine whether the icons in the specification object are similar icons, whether they are located in different positions within the object, or whether they are different colors.
[0046] Returning to FIG. 1, the blocks of the test device 10 will be described. The operation unit 14 operates the target object searched for by the search unit 13. The operation unit 14 executes the same operation process for the target object as the operation of the object by the user. For example, when an object that can be pressed by the user is searched for as the target object by the search unit 13, the operation unit 14 executes the operation process of pressing the target object. Note that the operation process for the target object is determined according to the type of object, etc., and the operation unit 14 can operate the target object according to the type of object.
[0047] The restart unit 15 restarts the device 1 when the test is not continued after the target object is operated by the operation unit 14 a predetermined number of times or more. The test is not continued includes a case where the image on the display 3 is not changed even if the target object is operated by the operation unit 14. The restart unit 15 counts up the number of operations every time the operation unit 14 operates the target object. When the number of operations is a predetermined number of times or more, the restart unit 15 determines that the device 1 is in a state where it stops and does not accept input information, that is, a so-called frozen state. When the restart unit 15 determines that the device 1 is frozen, it restarts the device 1. Examples of methods for restarting the device 1 include a forced command process for forcibly restarting the device 1, and a power control process for turning off the power for driving the device 1 and then turning on the power, but the method for restarting the device 1 is not particularly limited in this embodiment.
[0048] When the target object is operated by the operation unit 14 and the test is continued, the judgment unit 16 judges whether the continuation of the test is correct or not. As described above, since the target object does not completely match the specification object, even if the target object is operated, the test may not be able to continue as originally intended. In preparation for such a case, the judgment unit 16 judges whether the continued test is correct or not. For example, the judgment unit 16 judges whether the image displayed on the display 3 after the target object is operated matches an image defined in the test flow, thereby judging whether the continuation of the test is correct or not.
[0049] When a predetermined condition is satisfied, the test omission unit 17 tests the device 1 from a test item following the test item in the test flow in which the test execution unit 11 has determined that the operation of the device 1 does not match the operation in the specifications of the device 1. In this embodiment, the predetermined condition includes a case in which the determination unit 16 has determined that the continuation of the test is incorrect and a case in which the search unit 13 has not found the target object from the image displayed on the display 3. For example, when a predetermined condition is satisfied, the test omission unit 17 operates an object displayed on the display 3 or inputs a new test pattern into the device 1. As a result, the test is continued from the test item following the test item in which the test execution unit 11 has determined that the operation of the device 1 does not match the operation in the specifications of the device 1.
[0050] Next, a test flow executed by the test system 100 will be described with reference to the flowcharts shown in Fig. 5 to Fig. 8. Fig. 5 is a flowchart showing the test flow executed by the test system 100. The process according to the flowchart shown in Fig. 5 is executed by the test device 10.
[0051] In step S101, information regarding the specifications of the device 1 is input to the test device 10. In this step, the test device 10 determines what kind of image the device 1 will display on the display 3 when an object displayed on the display 3 is operated.
[0052] In step S102, based on the specification information of the device 1 input in step S101, the test device 10 determines an operation procedure for an object displayed on the display 3. Examples of object operations include pressing an object, inputting predetermined information for an object, scrolling an object, and the like.
[0053] In step S103, the test device 10 creates a test script for testing the device 1 based on the specification information of the device 1 input in step S101 and the operation procedure of the object determined in step S102.
[0054] In step S104, the test equipment 10 sets up the equipment 1 in order to execute a test on the equipment 1. For example, the test equipment 10 controls the power supply of the equipment 1 to turn on the power supply to the equipment 1, and checks the communication state between the equipment 1 and an external device required for the test.
[0055] In step S105, the test device 10 executes the test script created in step S103. When the process proceeds to step S105, the process proceeds to the subroutine flowchart shown in Fig. 6. When the process exits the subroutine shown in Fig. 6, the execution of the test script by the test device 10 ends, and the test flow by the test system 100 shown in Fig. 5 ends.
[0056] Fig. 6 is a flowchart showing a subroutine executed in step S105 shown in Fig. 5. In step S201, the test device 10 stores the test environment information in a predetermined storage device. In this embodiment, the test device 10 stores the test environment information in the storage unit 12. Note that the storage destination of the test environment information is not limited to within the test device 10, and may be a storage device separate from the test device 10.
[0057] In step S202, the test device 10 executes a test for a predetermined test item on the device 1. For example, the test device 10 inputs a test pattern for the predetermined test item to the device 1 so that the device 1 displays an image on the display 3.
[0058] In step S203, the test device 10 judges the result of the test executed in step S202. For example, the test device 10 acquires the image that the device 1 displays on the display 3 in step S202, and compares the acquired image with an expected image to judge whether the operation of the device 1 matches the operation in the specifications. If the image displayed on the display 3 matches the expected image, the test device 10 judges that the operation of the device 1 matches the operation in the specifications. If the test device 10 makes a positive judgment, the process proceeds to step S204.
[0059] On the other hand, if the image displayed on the display 3 does not match the expected image, the test device 10 determines that the operation of the device 1 does not match the operation in the specifications. If the test device 10 makes a negative determination, the process proceeds to step S206. When the process proceeds to step S206, the process proceeds to the subroutine flowchart shown in Fig. 7. When the subroutine shown in Fig. 7 is exited, the process proceeds to step S204.
[0060] If the test device 10 makes a positive determination in step S203, or when the process in step S206 ends, the process proceeds to step S204. In step S204, the test device 10 reads out test environment information for the next test item. The next test item is the test item positioned next to the test items targeted in steps S201 to S203 and step S206.
[0061] In step S205, the test device 10 judges whether or not all the test items have been completed. If the test device 10 judges that all the test items included in the test script have been completed, the subroutine shown in Fig. 6 is exited, and the test flow by the test system 100 shown in Fig. 5 is terminated.
[0062] On the other hand, if the test device 10 determines that all test items included in the test script have not been completed, the process returns to step S201. In this case, the test device 10 repeatedly executes the processes from step S201 onwards until a positive determination is made in step S205.
[0063] Fig. 7 is a flowchart showing a subroutine executed in step S206 shown in Fig. 6. In step S301, the test device 10 identifies a specification object to be operated in the test item of the test executed in step S202 shown in Fig. 6. Since the test script created in step S103 in Fig. 5 is based on the operation procedure of the object determined in step S102, the test device 10 can identify the specification object to be operated from the test script being executed.
[0064] In step S302, the test device 10 judges whether or not the object displayed on the display 3 completely matches the specification object identified in step S301. The test device 10 compares the object displayed on the display 3 with the specification object identified in step S301 with respect to the elements of the object, that is, the position of the object on the image displayed on the display 3, the characters displayed within the object, and the icons displayed within the object.
[0065] When there are multiple objects displayed on the display 3, the test device 10 identifies, as a comparison target, an object whose position on the image displayed on the display 3 is closest to the position of the specification object. In this case, the test device 10 compares the identified object with the specification object to determine whether they match or do not match.
[0066] If the object displayed on the display 3 matches the specification object for all elements of the object, the test device 10 determines that the object displayed on the display 3 completely matches the specification object identified in step S301. If the test device 10 makes a positive determination, the process proceeds to step S303.
[0067] On the other hand, if the object displayed on the display 3 does not match the specification object for any of the elements of the object, the test device 10 determines that the object displayed on the display 3 does not completely match the specification object identified in step S301. If the test device 10 makes a negative determination, the process proceeds to step S306.
[0068] If the determination in step S302 is affirmative, the process proceeds to step S303. In step S303, the test device 10 operates an object. The object that the test device 10 operates varies depending on which step the test device 10 has proceeded to this step from.
[0069] For example, when the process proceeds from step S302 to step S303, the test device 10 operates the object determined to be completely identical to the specification object in step S302. Also, when the process proceeds from step S306, step S308, or step S309 to be described later to step S303, the test device 10 operates the target object identified in each step.
[0070] In step S304, the test device 10 determines whether or not the screen display of the display 3 has changed due to the operation of the object in step S303. A change in the screen display means that the image displayed on the display 3 has changed from the image displayed on the display 3 in step S301. For example, the test device 10 can determine whether or not the screen display of the display 3 has changed by comparing the image displayed on the display 3 in step S301 with the image displayed on the display 3 after the object is operated in step S303. If the test device 10 makes a positive determination, the process proceeds to step S305.
[0071] On the other hand, if the test device 10 makes a negative determination, the process proceeds to step S312. When the process proceeds to step S312, the process proceeds to the subroutine flowchart shown in Fig. 8. When the subroutine shown in Fig. 8 is exited, the subroutine shown in Fig. 7 is also exited.
[0072] If the determination in step S304 is affirmative, the process proceeds to step S305. In step S305, the test device 10 determines whether the screen display of the display 3 changed by the object operation in step S303 is correct or not. For example, the test device 10 determines whether the screen display of the display 3 is correct or not by determining whether the title displayed on the display 3 is correct or not. If the test device 10 determines that the screen display of the display 3 is correct, the process exits the subroutine shown in FIG. 7. On the other hand, if the test device 10 determines that the screen display of the display 3 is incorrect, the process proceeds to step S311.
[0073] If the test device 10 makes a negative determination in step S302, the process proceeds to step S306. The processes in steps S306 to S309 correspond to the search process of the test device 10 searching for a target object based on a predetermined element of the object. The processes in steps S306 and S307 correspond to the search process of the test device 10 searching for a target object based on the position of the object. Furthermore, the processes in steps S308 and S309 correspond to the search process of the test device 10 searching for a target object based on characters and icons displayed in the object.
[0074] In step S306, the test device 10 judges whether or not an object exists around the originally assumed position of the specification object on the screen of the display 3. If the test device 10 judges that the object exists around the position on the specification, the process proceeds to step S303. In this case, the test device 10 specifies the object existing around the position on the specification as the target object. An example of an object existing around the position on the specification is the object 21 described with reference to FIG. 3(B). On the other hand, if the test device 10 judges that the object does not exist around the position on the specification, the process proceeds to step S307.
[0075] If the test device 10 makes a negative determination in step S306, the process proceeds to step S307. In step S307, the test device 10 determines whether or not an object exists on the screen of the display 3. If the test device 10 determines that an object exists on the screen of the display 3, the process proceeds to step S308. An example of an object existing on the screen of the display 3 is the object 22 described with reference to FIG. 3(C). On the other hand, if the test device 10 determines that an object does not exist on the screen of the display 3, the process proceeds to step S310.
[0076] If the determination in step S307 is affirmative, the process proceeds to step S308. In step S308, the test device 10 determines whether the object identified in step S307 is acceptable as a specification object based on the character string displayed in the object. If the test device 10 determines that the object identified in step S307 is acceptable as a specification object, the process proceeds to step S303. In this case, the test device 10 identifies the acceptable object as the target object. Examples of objects that are acceptable as specification objects based on the character string displayed in the object include objects 31 to 33 described with reference to FIGS. 4(A) to 4(C). On the other hand, if the test device 10 determines that the object identified in step S307 is not acceptable as a specification object, the process proceeds to step S309.
[0077] If the test device 10 makes a negative determination in step S308, the process proceeds to step S309. In step S309, the test device 10 determines whether the object identified in step S307 is acceptable as a specification object based on an icon displayed within the object. If the test device 10 determines that the object identified in step S307 is acceptable as a specification object, the process proceeds to step S303. In this case, the test device 10 identifies the acceptable object as the target object. Examples of objects that are acceptable as specification objects based on icons displayed within the object include objects 34 to 36 described with reference to FIGS. 4(D) to 4(F). On the other hand, if the test device 10 determines that the object identified in step S307 is not acceptable as a specification object, the process proceeds to step S310.
[0078] If the test device 10 makes a negative determination in step S309, the process proceeds to step S310. In step S310, the test device 10 skips the test item currently being executed. For example, the test device 10 operates an object displayed on the display 3, or inputs a new test pattern into the device 1. When the process in step S310 ends, the subroutine shown in FIG. 7 is exited. This step is a process for skipping the test item when there is no object on the screen of the display 3, or when there is an object on the screen of the display 3 that is not acceptable in appearance to the specification object 20.
[0079] If the test device 10 makes a negative determination in step S305, the process proceeds to step S311. In step S311, the test device 10 skips the currently executing test item. For example, the test device 10 operates an object displayed on the display 3, or inputs a new test pattern into the device 1. When the process in step S311 ends, the subroutine shown in Fig. 7 is exited. This step is a process for skipping a test item when the specification object 20 and an acceptable target object have been operated but the test cannot be continued correctly.
[0080] FIG. 8 is a flowchart showing a subroutine executed in step S312 shown in FIG. 7. In step S401, the test device 10 judges whether or not the number of times a negative judgment is made in step S304 shown in FIG. 7, that is, the number of times the screen display of the display 3 is not changed by the operation of the object in step S303, is equal to or greater than a predetermined number. The test device 10 can count the number of times the screen display is not changed by counting the number of times the process in step S304 is executed. If the number of times the screen display is not changed is less than the predetermined number, the process proceeds to step S402. On the other hand, if the number of times the screen display is not changed is equal to or greater than the predetermined number, the process proceeds to step S403. The predetermined number in this step is a number for judging whether the device 1 is in a frozen state, and is a number that is determined in advance.
[0081] If the test device 10 makes a negative determination in step S401, the process proceeds to step S402. In step S402, the test device 10 counts up the number of times the object was operated in step S303 shown in Fig. 7. When the process in step S402 ends, the process proceeds to step S303 shown in Fig. 7, where the object is operated again.
[0082] If the test device 10 makes a positive determination in step S401, the process proceeds to step S403. In step S403, the test device 10 determines that the device 1 is in a frozen state. In step S404, the test device 10 determines whether the determination in step S403 is a predetermined number of times or more, that is, whether the number of times the device 1 has frozen is a predetermined number or more. If the number of times the device 1 has frozen is less than the predetermined number of times, the process proceeds to step S405. On the other hand, if the number of times the device 1 has frozen is the predetermined number of times or more, the process proceeds to step S409. Note that the predetermined number in this step is a number for determining whether or not to stop testing the device 1, and is a number that is determined in advance.
[0083] If the test device 10 makes a negative determination in step S404, the process proceeds to step S405. In step S405, the test device 10 counts up the number of times that the test device 1 has been determined to have frozen in step S403. In step S406, the test device 10 restarts the device 1. For example, the test device 10 powers the device 1 back on.
[0084] In step S407, the test device 10 reads out test environment information from the storage unit 12 for the test items for which it has been determined in step 203 shown in Fig. 6 that the operation of the device 1 does not match the operation in the specifications. The test device 10 reads out the test environment information stored in the storage unit 12 in step 201 shown in Fig. 6. In step S408, the test device 10 causes the display 3 to display an image for when it has been determined in step 203 shown in Fig. 6 that the operation of the device 1 does not match the operation in the specifications, based on the test environment information read out in step S407. When the processing in step S408 ends, the subroutine shown in Fig. 8 is exited.
[0085] If the determination in step S404 is affirmative, the process proceeds to step S409. In step S409, the test apparatus 10 stops testing the device 1, and the test flow by the test system 100 shown in FIG.
[0086] As described above, the test device 10 according to the present embodiment includes a test execution unit 11 that tests the device 1 along a test flow including the test items of the device 1 and the operation procedures of the objects displayed on the display 3 by the device 1, a storage unit 12 that stores information on the specification objects that are objects in the specifications of the device 1, a search unit 13 that searches for a target object as an object corresponding to the specification object from an image displayed on the display 3 when a test result that does not match the specifications of the device 1 is obtained for a predetermined test item, and an operation unit 14 that operates the target object. When a test result that does not match the specifications of the device 1 is obtained for a predetermined test item, the test can be continued along the test flow by operating the target object, so that unexecuted test items can be tested regardless of the presence or absence of a user. As a result, regardless of the degree of completion of the device 1, a test can be executed along the test flow, and the effective execution rate of the test items can be improved. In addition, the development efficiency for the device 1 can be improved.
[0087] Furthermore, in this embodiment, the search unit 13 searches for a target object from the image displayed on the display 3 based on a predetermined element of the object. The predetermined element of the object includes at least one of the position of the object on the image displayed on the display 3, the characters displayed within the object, and the icon displayed within the object. As a result, even if the device 1 is not fully developed and a test result that does not match the specifications of the device 1 is obtained in a predetermined test item, for example, it is possible to accurately search for a specification object and an acceptable target object from the element of the object.
[0088] Furthermore, in this embodiment, the specification object is displayed at a predetermined position on the image displayed on the display 3, and the search unit 13 specifies an object located within a predetermined search range R from the position of the specification object as the target object. This allows the test of the device 1 to be continued by operating an object located near the specification object, even if the appearance of the object differs from that of the specification object.
[0089] Additionally, in this embodiment, the search range R is larger than the area that the specification object occupies in the image displayed on the display 3, but smaller than the entire area of the image. This allows the test of the device 1 to be continued by operating objects located around the specification object, regardless of the object's appearance.
[0090] In this embodiment, the specification object includes a character string, and the search unit 13 identifies an object that includes a character string that matches or is similar to the character string in the specification object as a target object. This allows the test of the device 1 to be continued by operating the target object that is acceptable as a specification object from the character string, even if the device 1 is tested in a state where the object is in a position different from the specification object.
[0091] Furthermore, in this embodiment, the character string in the target object is any one of a character string obtained by translating a character string in the specification object, a character string that is synonymous with the character string in the specification object, a character string that is synonymous with the character string in the specification object, a character string that is the antonym of the character string in the specification object, and a character string obtained by converting one character from the character string in the specification object. This makes it possible to identify the target object and continue testing of the device 1 even if the device 1 is tested in a state where the character string in the object is different from the specification object.
[0092] Additionally, in this embodiment, the specification object includes an icon, and the search unit 13 identifies an object including an icon that matches or is similar to an icon in the specification object as a target object. This allows the target object to be identified and the test of the device 1 to be continued even if the device 1 is tested in a state where the icon in the object is different from that of the specification object.
[0093] In this embodiment, the icon in the target object is either an icon similar to the icon in the specification object or an icon in a different color from the icon in the specification object. This allows the target object to be identified and the test of the device 1 to be continued even if the device 1 is tested in a state where the icon in the object is different from the specification object.
[0094] Furthermore, in this embodiment, the position of the icon in the target object is within a predetermined range from the position of the icon in the specification object, so that even if the icon in the object is different from the specification object when the device 1 is tested, the target object can be identified and the test of the device 1 can be continued.
[0095] In addition, the test device 10 according to the present embodiment includes a restart unit 15 that restarts the device 1 when the test of the device 1 is not continued after the target object has been operated a predetermined number of times or more by the operation unit 14. This makes it possible to prevent the object from being unable to be operated and the test from falling into a state of practical suspension even when the search accuracy of the target object is low and the test cannot be continued.
[0096] Furthermore, in this embodiment, the storage unit 12 stores test environment information for testing the device 1 for each test item, and the restart unit 15 reads out, from the storage unit 12, the test environment information for a test item for which a test result that does not match the specifications of the device 1 has been obtained after restarting the device 1. This makes it possible to return the state of the device 1 to the state in which a test result that does not match the specifications of the device 1 has been obtained after restarting the device 1. As a result, it is possible to prevent repeated execution from the first test item, thereby improving the test execution rate.
[0097] Furthermore, the test device 10 according to this embodiment includes a determination unit 16 that determines whether the continuation of the test is correct or not when the target object is operated by the operation unit 14 and the test of the device 1 is continued, and a test omission unit 17 that tests the device from a test item in the test flow after the test item for which a test result that does not match the specifications of the device 1 was obtained when the determination unit 16 determines that the continuation of the test is incorrect. This prevents the test from essentially stopping at a specific test item even if the device 1 is tested in a state in which the link destination of an image associated with an object is incorrect, and makes it possible to test test items after the specific test item.
[0098] Additionally, in this embodiment, if the target object is not found in the image displayed on the display 3 by the search unit 13, the test omission unit 17 tests the device from a test item in the test flow that comes after the test item that has given a test result that does not match the specifications of the device 1. This prevents the test from essentially stopping at a certain test item even if the device 1 is tested in a state in which the object does not exist, and makes it possible to test unexecuted test items.
[0099] The above-described embodiments are described for the purpose of facilitating understanding of the present invention, and are not described for the purpose of limiting the present invention. Therefore, the elements disclosed in the above embodiments are intended to include all design modifications and equivalents that fall within the technical scope of the present invention.
[0100] For example, in the above embodiment, an ECU for car navigation has been described as an example of the device 1, but the device 1 is not limited to this. The device 1 may be any device that has a function of displaying an image on the display 3 and a function of inputting information by operating an object displayed on the display 3. [Explanation of symbols]
[0101] 100…Test system 1...Equipment 2...Display control device 3. Display 10. Test equipment 11…Test execution section 12...Storage section 13…Exploration Department 14...Operation unit 15…Restart part 16…Judgment section 17...Test omission section
Claims
1. a test execution unit that tests the device according to a test flow including test items for the device and operation procedures for objects displayed on a display device by the device; a storage unit that stores information on a first object that is the object in the specifications of the device; a search unit that searches for a second object as the object corresponding to the first object from an image displayed on the display device when a test result that does not match the specifications of the device is obtained for a predetermined test item; an operation unit that operates the second object, the first object is displayed at a first position on the image; The search unit is determining whether the object is present within a first predetermined range from the first position; If it is determined that the object is present in the first range, the test device identifies the object in the first range as the second object.
2. The search unit, if it is determined that the object does not exist within the first range, it is determined whether or not the object exists outside the first range and within a screen of the display device; 2. The test device according to claim 1, wherein when it is determined that the object is outside the first range and within the screen of the display device, it is determined whether or not the object is the second object based on at least one of a character string consisting of characters displayed within the object and an icon displayed within the object.
3. The searching unit searches for the second object from the image based on a predetermined element of the object; 3. The test device according to claim 2, wherein the predetermined element includes at least one of a position of the object on the image, the character displayed within the object, and the icon displayed within the object.
4. A test device as described in any one of claims 1 to 3, wherein the first range is wider than the area occupied by the first object in the image and narrower than the entire area of the image.
5. The first object includes a first character string as the character string composed of the characters, The test device according to claim 3 , wherein the search unit identifies the object including a second character string that matches or is similar to the first character string as the second object.
6. The test device described in claim 5, wherein the second string is any one of a string obtained by translating the first string, a string that is a synonym of the first string, a string that is a synonym of the first string, a string that is an antonym of the first string, and a string obtained by converting one character from the first string.
7. The first object includes a first icon as the icon, The test device according to claim 3 , wherein the search unit is configured to identify, as the second object, the object that includes a second icon that matches or is similar to a first icon.
8. The test device as described in claim 7, wherein the second icon is either an icon similar to the first icon or an icon of a different color than the first icon.
9. A test apparatus as described in claim 7 or 8, wherein the position of the second icon within the second object is within a predetermined second range from the position of the first icon within the first object.
10. A test device as described in any one of claims 1 to 9, further comprising a restart unit that restarts the device if the test is not continued after the second object has been operated by the operation unit a predetermined number of times or more.
11. The storage unit stores test environment information for testing the device for each of the test items, The test apparatus according to claim 10 , wherein the restart unit reads out, after restarting the device, the test environment information for the test item for which the test result not matching the specification was obtained from the storage unit.
12. A determination unit that, when the second object is operated by the operation unit and the test is continued, determines whether or not the continuation of the test is successful; The test apparatus according to any one of claims 1 to 11, further comprising a test omission unit that, when the judgment unit judges that the continuation of the test is incorrect, tests the equipment from a test item subsequent to the test item in the test flow that obtained the test result that does not match the specification.
13. A test apparatus as described in any one of claims 1 to 11, further comprising a test skipping unit that, when the search unit cannot find the second object from the image, tests the equipment from a test item in the test flow that comes after the test item that produced the test result that does not match the specification.
14. A program for causing a computer to function as the test device according to any one of claims 1 to 13.
15. A method for controlling a test apparatus including a computer that tests a device according to a test flow and a storage device, comprising the steps of: the test flow includes test items for the device and operation procedures for objects displayed on a display device by the device; the storage device stores information on a first object which is the object in the specifications of the device; The computer includes: when a test result that does not match the specifications of the device is obtained for a predetermined test item, when searching for a second object as the object corresponding to the first object displayed at a first position on the image from the image displayed on the display device, determining whether or not the object is present within a predetermined first range from the first position; When it is determined that the object is present in the first range, the object in the first range is identified as the second object; A method of controlling a test device, the method comprising: manipulating the object identified as the second object.
Citation Information
Patent Citations
GUI application test support device and test support method
JP2010152429A
Image display apparatus and method for controlling the same
JP2011090597A
Scenario generation program, scenario execution program, scenario generation method, scenario execution method, scenario generation apparatus, and scenario execution apparatus
JP2015049520A
Application test device
JP2016173619A
Information processor, information processing method and program
JP2016224868A
