Test device, test method, and program
The test device uses page objects and image-based screen transitions to clarify software testing procedures, addressing the challenge of non-descriptive identifiers and visual execution requirements in existing methods.
Patent Information
- Application Number
- JP2023554216
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-01-22
- Estimated Expiration
- 2041-10-22
AI Technical Summary
Existing software testing methods, such as 'Record & Replay' and 'Programming', face challenges in making the test script content understandable due to non-descriptive element identifiers and the need for visual execution to follow operations, making it difficult for users to comprehend the test procedure.
A test device that generates a software test instruction manual with image-based screen transitions and operation content information, using page objects to define user operations and test procedures, enabling clearer understanding of the test process.
The solution allows users to easily understand the software testing content and procedures through visual aids, enhancing clarity and ease of comprehension.
Smart Images

Figure 0007619473000001 
Figure 0007619473000002 
Figure 0007619473000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a test device, a test method, and a program. [Background technology]
[0002] In recent years, there has been an increasing demand for early software releases while keeping costs down. As a result, software testing, which accounts for a large proportion of the overall development cost and is necessary to ensure a certain level of software quality, can be said to be the key to QCD (Quality, Cost, Delivery) in development.
[0003] Furthermore, there are two main types of technology for automating software testing that involves operating the screens of applications that have screens, such as web apps and mobile apps: "Record & Replay" and "Programming." "Record & Replay" is a technology that records a user's operations as they are as a script and reproduces them by executing the script. On the other hand, "Programming" is a technology that writes test code that uses a library for operating a browser as a program and executes tests using the test code.
[0004] A technique for generating test scripts by inputting user operation logs has been proposed as a technique for dramatically improving the efficiency of software testing (see Non-Patent Document 1). With this technique, software testing can be automated by executing the generated test scripts. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] Business Communication 2021 Vol.58 No.2 Exploratory Testing Resource Technology ~ Introducing LatteArt ~<https: / / www.bcm.co.jp / site / 2021 / 02 / sic / 2102-sic-01-07.pdf> Summary of the Invention [Problem to be solved by the invention]
[0006] However, when a user tries to understand the test contents of a generated test script, the following problems arise: As a premise, operations performed in software testing include inputting text into (input) forms on a screen, selection operations such as radio buttons and check boxes, and screen transitions by clicking link buttons.
[0007] The names (element identifiers) that identify the screen elements (forms, buttons, links, etc.) to be operated on are automatically named based on the attribute values (id, name, text, etc.) in the source code (HTML, etc.) of the relevant screen, so it may be unclear which element is being referred to in the actual test screen, and the names are not descriptive.
[0008] Furthermore, in order for a user to understand the entire software test procedure involving screen transitions, the user must either actually execute the software test and sequentially follow the operations visually, or sequentially follow the character strings of the test script visually, neither of which is easy.
[0009] The present invention has been made in consideration of the above-mentioned points, and has an object to enable a user to easily grasp the contents of software testing compared to the conventional art. [Means for solving the problem]
[0010] In order to solve the above problem, the invention of claim 1 is a testing device for performing software testing, comprising: a log information acquisition means for acquiring log information based on a user's operations; a first generation means for generating, for each screen of a target page of the software testing, a page object that defines each method indicating the user's operation and a test procedure for an operation target on the screen of the target page based on the log information; a second generation means for generating, based on each method of the page object, a software testing instruction manual that includes operation content information indicating the content of the user's operation, the test procedure, and an image of the screen of the target page for identifying the operation target of the user's operation; and an output means for outputting data of the instruction manual. Effect of the Invention
[0011] As described above, according to the present invention, an effect is achieved in that a user can easily grasp the contents of software testing as compared to the conventional art. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a hardware configuration diagram of a test device according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a functional configuration diagram of a test device according to an embodiment of the present invention. [Diagram 3] 1 is a flowchart showing an overall process performed by a test device. [Figure 4] 11 is a flowchart showing detailed processing of a test script generation method. [Diagram 5] FIG. 2 is a conceptual diagram of a test script as a premise for executing the processing of the present embodiment. [Figure 6] 11 is a flowchart showing detailed processing of a method for generating a test script description. [Figure 7] FIG. 6 is a conceptual diagram showing a screen transition diagram of each test case generated for the test script (test case) of FIG. 5. [Figure 8]FIG. 6 is a conceptual diagram showing a screen transition diagram that provides an overview of all test cases generated for the test script (test case) of FIG. 5. [Figure 9] FIG. 6 is a conceptual diagram showing a screen transition diagram generated for the test script (page object) of FIG. 5. [Figure 10] FIG. 13 is a conceptual diagram of information showing a test procedure with images (screenshot images) of screen elements operated by page object p1. [Figure 11] FIG. 13 is a conceptual diagram of information showing a test procedure with images (screenshot images) of screen elements operated by page object p2. [Figure 12] FIG. 13 is a conceptual diagram of information showing a test procedure with images (screenshot images) of screen elements operated by page object p3. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0014] [Hardware configuration] 1 is a diagram showing the hardware configuration of a test device according to an embodiment of the present invention. Note that hereinafter, software testing will be simply referred to as "testing."
[0015] The test device 10 is a device that generates a description of a test script based on test log information and a test script generated from the log information.
[0016] As shown in FIG. 1, the test device 10 is realized by a PC (Personal Computer) or the like, and has a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, a display device 106, and an input device 107, which are all interconnected by a bus B.
[0017] A program for implementing the processing in the test device 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 storing the program is set in the drive device 100, the program is installed from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. However, the program does not necessarily have to be installed from the recording medium 101, but may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program as well as necessary files, data, etc.
[0018] The memory device 103 reads out and stores the program from the auxiliary storage device 102 when an instruction to start the program is received. The CPU 104 realizes functions related to the test device 10 in accordance with the program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a communication network such as the Internet. The display device 106 displays a GUI (Graphical User Interface) or the like according to a program. The input device 107 is composed of a keyboard, a mouse, etc., and is used to input various operation instructions. Note that a mobile terminal or the like may be used as the test device 10.
[0019] [Functional configuration] 2 is a functional configuration diagram of a test device in an embodiment of the present invention. The test device 10 has a log information acquisition unit 11, a test script generation unit 12, a test script description generation unit, and an output unit 14. Each of these units is realized by a process in which one or more programs installed in the test device 10 are executed by a CPU 104.
[0020] Among these, the log information acquisition unit 11 acquires log information based on user operations during a test. The test log information includes user operations during the test, screen elements (forms, buttons, links, etc.) that are the targets of operations, information on screen transitions of test target pages, and images showing the screens of test target pages.
[0021] The test script generating unit 12 generates a test script. This test script includes a page object and a test case using the page object. The "page object" is information that defines each method indicating a user's operation and a test procedure for an operation target on the screen of the target page for each screen of the test target page. Specifically, the page object is an object that indicates a screen element (form, button, link, etc.) that is an operation target on the screen of the target page and a procedure (first, second, third, etc.) of a user's operation (input, selection, click, etc.) on the screen in association with each other so that it can be easily used in a program, and the number of page objects created is the same as the number of target pages of the test. The "test case" is information that indicates one unit of a test by indicating a path to a terminal target page by screen transition from a specific target page as a starting point by each method defined in multiple page objects. In other words, the test case is information that indicates a series of test procedures, etc., defined by combining user operations defined in multiple page objects. Note that one test script includes one or more test cases.
[0022] The test script generation unit 12 has a test log information analysis unit 121, a page object generation unit 122, and a test case generation unit 123 to generate a test script. The test script generation unit 12 is an example of a first generation means. The test script description generation unit is an example of a second generation means.
[0023] Among these, the log information analysis unit 121 analyzes the log information acquired by the log information acquisition unit 11. The page object generation unit 122 generates the above-mentioned page objects. The test case generation unit 123 generates the above-mentioned test cases.
[0024] Next, the test script description generating unit 13 generates a description of the test script. This description of the test script is finally treated as a description of the test so that the user can easily understand visually. The description of the test script includes a screen transition diagram of each test case (see FIG. 7), a screen transition diagram overlooking all the test cases (see FIG. 8), a screen transition diagram illustrating the screen transitions operated by the page object (see FIG. 9), and information indicating the test procedure with images (screenshot images) of the screen elements operated by the page object (see FIG. 10 to FIG. 12).
[0025] Moreover, the test script description generating unit 13 includes a screen transition diagram generating unit 131 and a test procedure information generating unit 132 in order to generate a description of the test script.
[0026] Among these, the screen transition diagram generating unit 131 generates a screen transition diagram for each test case (see FIG. 7), a screen transition diagram overlooking all test cases (see FIG. 8), and a screen transition diagram illustrating screen transitions operated by page objects (see FIG. 9). Also, the test procedure information generating unit 132 generates information indicating test procedures with images (screenshots) of screen elements operated by page objects (see FIG. 10).
[0027] Next, the output unit 14 outputs the instruction data generated by the test script instruction generation unit 13. Examples of the output method include displaying the instruction data on the display device 106 and transmitting the instruction data from the interface device 105 to another device via a communication network.
[0028] [Processing or Operation of the Embodiment] Next, the processing or operation of this embodiment will be described in detail with reference to Figures 3 and 10. Figure 3 is a flowchart showing the overall processing executed by the test device.
[0029] As shown in FIG. 3, the log information acquisition unit 11 acquires the above-mentioned log information generated by user operations during a test (S1).
[0030] Next, the test script generation unit 12 generates a highly maintainable test script based on the page object and a test case utilizing the page object, based on the log information acquired by the log information acquisition unit 11 (S2).
[0031] Step S2 will now be described in detail with reference to Fig. 4. Fig. 4 is a flowchart showing the detailed process of the test script generation method.
[0032] As shown in FIG. 4, the log information analysis unit 121 analyzes the log information acquired by the log information acquisition unit 11 (S21).
[0033] Next, the page object generating unit 122 generates a page object based on the log information analyzed by the log information analyzing unit 121 (S22).
[0034] Next, the test case generating unit 123 generates a test case by combining the methods defined in each page object generated by the page object generating unit 122, and adds the test case to the test script (S23).
[0035] 3, the test script description generator 13 generates a description of the test script based on the test log information and the test script. Step S3 will now be described in detail with reference to FIGS.
[0036] First, as a premise for the processing, test cases and page objects constituting a test script will be described with reference to Fig. 5. Fig. 5 is a conceptual diagram of a test script as a premise for executing the processing of this embodiment.
[0037] As shown in Figure 5, a test script consists of a set of test cases S and a set of multiple page objects P. Each page object p j (∈P) contains a set of methods M. Each method m k (∈M) is a sequence of user operations (text input into a form, selection of radio buttons, clicking links, etc.) for each target page screen of the software test, and also shows the test procedure. i (∈S) is a sequence of methods.
[0038] <Generation of instructions> Assuming that the test script is as shown in Fig. 5, each process of step S3 will be described in detail with reference to Fig. 6 to Fig. 9. Fig. 6 is a flowchart showing the detailed process of the method for generating the description of the test script.
[0039] As shown in FIG. 7, the screen transition diagram generating unit 131 generates each test case s based on a test case script (test case). i FIG. 7 is a conceptual diagram showing the screen transition diagrams of each test case generated for the test script (test case) of FIG. 5. In FIG. 7, each test case s i is the method m k The screen transition diagram generating unit 131 generates a test case s i For each screen, we assign a node in the screen transition diagram to a screen (i.e., a page object p j ) and the edge is defined as method m k As a method m k The screen transition diagram is generated sequentially according to the above order.
[0040] For example, in FIG. 7, the screen transition diagram generated by the screen transition diagram generation unit 131 visually shows that in test case s1, screen P1 is generated, screen P2 is generated according to method m1 of test case s1, and further, the next screen is generated according to the next method m3 of the same test case s1.
[0041] Next, the screen transition diagram generating unit 131 generates a screen transition diagram that overlooks all the test cases s generated in step S31 (S32), as shown in Fig. 8. Fig. 8 is a conceptual diagram showing a screen transition diagram that overlooks all the test cases generated for the test script (test case) in Fig. 5. Here, the screen transition diagram generating unit 131 generates a screen transition diagram that overlooks all the test cases s i In addition, in order to provide an overview of the screen transitions of the entire test case and to assist in understanding the test content, each test case s generated in step S31 is i In this case, screen transition diagram generating unit 131 generates a screen by combining overlapping nodes and edges from the multiple screen transition diagrams generated in step S31 into one.
[0042] 8, for example, the screen transition diagram generated by screen transition diagram generating unit 131 visually shows that, for all test cases S, screen P1 is the root of the tree structure, and in the next lower hierarchical level, screen P2 is generated as a node via an edge that is method m1 of test case s1, and screen P3 is generated as a node via an edge that is method m2 of test case s2. Furthermore, in the next lower hierarchical level, screens P2 and P3 are generated as nodes of the tree structure, and in the next lower hierarchical level, screens are generated in a similar manner.
[0043] Next, the screen transition diagram generating unit 131 generates a screen transition diagram showing the screen transitions operated by each page object as shown in Fig. 9 (S33). Fig. 9 is a conceptual diagram showing a screen transition diagram generated for the test script (page object) of Fig. 5. Here, the screen transition diagram generating unit 131 generates a screen transition diagram showing the screen transitions operated by each page object p j In order to assist the user in understanding what screen transitions are included in the user's operation, the page object p j Method m k (i.e., edges in the screen transition diagram) are highlighted (shown with bold lines in FIG. 9).
[0044] Next, as shown in Fig. 10, the test procedure information generation unit 132 uses the screen generated by merging in step S32 to generate data of instructions showing the test procedure accompanied by images (screenshot images) of screen elements operated by each page object (S34). Fig. 10 is a conceptual diagram of information showing the test procedure accompanied by images (screenshot images) of screen elements operated by page object p1. Here, the test procedure information generation unit 132 uses images (screenshot images) of screen elements included in the test log information. The test log information is generated by the existing technology by using the method m. k Each page object p is associated with an image of its screen element (screenshot image). j Method m in k Based on the order, information indicating the test procedure is generated using images of screen elements (screenshot images).
[0045] <Screen display> Next, the information generated in step S34 will be described with reference to Fig. 10 to Fig. 12. Fig. 10 is a conceptual diagram of information showing a test procedure with images (screenshot images) of screen elements operated by page object p1.
[0046] As shown in FIG. 10, when the test procedure of the method m1 is displayed on the display device 106, the test procedure of the method m1 is displayed on the left side of the screen D1. Also, an image (screenshot image) G1 of a screen element is displayed on the right side of the screen D1. An (input) form g11, a radio button g12, a link button g13, and the like are displayed in the image G1. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G1. For example, in FIG. 10, when the user selects the operation content information "1. Input "xxx", an enclosure line (a dashed enclosure line in FIG. 10) is displayed in the corresponding form g11, and "1" is also displayed near the enclosure line as the test procedure in the method m1.
[0047] On the other hand, as shown in Fig. 10, when the test procedure of the method m2 is displayed on the display device 106, the test procedure of the method m2 is displayed on the left side of the screen D2. Also, an image (screenshot image) G2 of a screen element is displayed on the right side of the screen D2. A form p21, a link button p23, etc. are displayed in the image G2. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G2. For example, in Fig. 10, when the user selects the operation content information "1. Input "yyy", an enclosure line (a dashed enclosure line in Fig. 10) is displayed in the corresponding form g21, and "1" is also displayed near the enclosure line as the test procedure in the method m2.
[0048] FIG. 11 is a conceptual diagram of information showing a test procedure with images (screenshot images) of screen elements operated by page object p2.
[0049] As shown in FIG. 11, when the test procedure of the method m3 is displayed on the display device 106, each operation content information of the test procedure of the method m3 is displayed on the left side of the screen D3. Also, an image (screenshot image) G3 of a screen element is displayed on the right side of the screen D3. A form g31, a link button g33, and the like are displayed in the image G3. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G3. For example, in FIG. 11, when the user selects the operation content information "1. Input "zzz", an enclosure line (a dashed enclosure line in FIG. 11) is displayed in the corresponding input form g31, and "1" is also displayed near the enclosure line as the test procedure in the method m3.
[0050] On the other hand, as shown in Fig. 11, when the test procedure of the method m4 is displayed on the display device 106, the test procedure of the method m4 is displayed on the left side of the screen D4. Also, an image (screenshot image) G4 of a screen element is displayed on the right side of the screen D4. A link button g43 and the like are displayed in the image G4. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G4. For example, in Fig. 11, when the user selects the operation content information "1. Click on the link", an enclosure (a dashed enclosure in Fig. 11) is displayed around the corresponding link button g43, and "1" is also displayed near the enclosure as the test procedure in the method m4.
[0051] FIG. 12 is a conceptual diagram of information showing a test procedure, along with images (screenshot images) of screen elements operated by page object p3.
[0052] As shown in FIG. 12, when the test procedure of the method m5 is displayed on the display device 106, each operation content information of the test procedure of the method m5 is displayed on the left side of the screen D5. Also, an image (screenshot image) G5 of a screen element is displayed on the right side of the screen D5. A radio button g52, a link button g53, and the like are displayed in the image G5. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G5. For example, in FIG. 12, when the user selects the operation content information "1. Select a button", an enclosure line (a dashed enclosure line in FIG. 12) is displayed around the corresponding radio button g52, and "1" is also displayed near the enclosure line as the test procedure in the method m5.
[0053] On the other hand, as shown in Fig. 12, when the test procedure of the method m6 is displayed on the display device 106, the test procedure of the method m6 is displayed on the left side of the screen D6. Also, an image (screenshot image) G6 of a screen element is displayed on the right side of the screen D6. A link button g63 and the like are displayed in the image G6. Here, when the user selects any step of the test procedure with a mouse or the like, an enclosure and the order of the steps are displayed at the corresponding position on the image G6. For example, in Fig. 12, when the user selects the operation content information "1. Click on the link", an enclosure line (a dashed enclosure line in Fig. 11) is displayed around the corresponding link button g63, and "1" is also displayed near the enclosure line as the test procedure in the method m6.
[0054] As described above, for example, the operation content information is displayed that indicates that, specifically, the first step is inputting data into a form, the second step is selecting a button, and the third step is clicking a link as a test procedure for method m1. This allows the user to easily understand the test procedures compared to when the test procedures are automatically named based on attribute values (id, name, text, etc.) in the source code (HTML, etc.).
[0055] Also, the method m k The screen transitions shown in Figs. 10 to 12 are performed each time a test is performed, allowing the user to easily understand the entire procedure of the test.
[0056] [Main Effects of the Embodiments] As described above, according to this embodiment, specific operation content information is displayed in the test script instructions, which has the effect of making it easier to understand the implementation content of software testing compared to the conventional method.
[0057] In addition, as shown in Figures 7 to 12, the test script instructions display screen transitions in accordance with the user's operation log, which has the effect of allowing the user to easily understand the entire test procedure.
[0058] 〔supplement〕 The present invention is not limited to the above-described embodiment, and may have the following configurations or processes (operations).
[0059] For example, the number of CPUs 104 may be multiple rather than singular.
[0060] The above-mentioned highlighting (bold line display in FIG. 9) and the above-mentioned enclosing line (dotted line display in FIG. 10 to FIG. 12) are examples of changes in the display mode. In this case, changes in the display mode include black and white inversion, display with a larger size, display with a changed color, blinking display, etc. [Explanation of symbols]
[0061] 10 Test Equipment 11 Log information acquisition unit 12 Test script generation unit (an example of a first generation means) 13 Test script description generation unit (an example of a second generation means) 14 Output section 121 Log Information Analysis Unit 122 Test Case Generation Unit 123 Page Object Generator 131 Screen transition diagram generation unit 132 Test procedure information generation unit
Claims
1. A test device for performing software testing, A log information acquisition means for acquiring log information based on a user's operation; a first generation means for generating, for each screen of a target page of the software test, a page object that defines each method indicating an operation and a test procedure of the user for an operation target on the screen of the target page based on the log information; a second generation means for generating a description of the software test, the description including operation content information indicating the content of the user's operation, the test procedure, and an image of the screen of the target page for identifying an operation target of the user's operation, based on each of the methods of the page object; An output means for outputting the instruction data; A test device having:
2. The test device according to claim 1, wherein when a specific operation content information is selected from the plurality of operation content information, the output means changes the display form of a specific operation target in an image showing a screen of the target page corresponding to the specific operation content information.
3. the first generation means generates a test case indicating a path to a terminal target page by performing screen transitions starting from a predetermined target page using each of the methods defined in the plurality of page objects; the second generation means generates images showing screens of the plurality of target pages based on the paths in the test cases, and creates a description of the software test based on the paths.
3. A test device according to claim 1 or 2.
4. 4. The testing device according to claim 3, wherein the second generation means generates a screen transition diagram showing screen transitions of the plurality of target pages based on the path in the test case, and creates a description of the software test based on the screen transition diagram.
5. 5. The test device according to claim 4, wherein said second generating means generates a single screen transition diagram by integrating the plurality of screen transition diagrams generated for each test case.
6. 6. The test apparatus according to claim 5, wherein the second generating means changes a display mode of the method related to a predetermined page object.
7. A test method executed by a test device that performs software testing, comprising: a log information acquisition step of acquiring log information based on a user's operation; a first generation step of generating, for each screen of a target page of the software test based on the log information, a page object that defines each method indicating an operation and a test procedure of the user for an operation target on the screen of the target page; a second generation step of generating the software test instructions based on each method of the page object, the software test instructions including operation content information indicating the content of the user's operation, the test procedure, and an image showing the screen of the target page for identifying an operation target of the user's operation; An output step of outputting data of the instruction manual; Test method to run.
8. A program for causing a computer to execute the test method according to claim 7.
Citation Information
Patent Citations
Information processing device, information processing method, and program
JP2019109852A
Test script generation device, test script generation method, and program
WO2021205589A1