Test assistance system, test assistance method, and program
The test support system automates smartphone application testing by transmitting applications and recording user interactions, allowing for efficient and automated testing without a physical smartphone, addressing the inefficiencies of existing debugging methods.
Patent Information
- Application Number
- PCT/JP2023/012788
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-03
AI Technical Summary
Existing methods for debugging smartphones require a physical connection and are not efficient for automated testing.
A test support system that includes a server device connected to a simulator, allowing for the transmission of applications, acquisition of execution screens, and recording of operations to create and execute automated test programs, enabling efficient testing without a physical smartphone.
Enables efficient and automated testing of smartphone applications by simulating user interactions and executing test programs, reducing the need for manual intervention and physical devices.
Smart Images

Figure JP2023012788_03102024_PF_FP_ABST
Abstract
Description
Test support system, test support method and program
[0001] The present invention relates to a test support system, a test support method, and a program.
[0002] Debugging of smartphones is being carried out (see Patent Document 1).
[0003] Patent No. 5507500
[0004] In Patent Document 1, debugging is performed while maintaining a connection with the smartphone, which requires the actual smartphone.
[0005] The present invention has been made in view of the above background, and has an object to provide a technique that enables efficient testing.
[0006] The main invention of the present invention for solving the above problem is a system for supporting application testing, characterized in that it comprises a transmission unit that transmits the application to a device that executes the application, a screen acquisition unit that causes the device to execute the application and acquires an execution screen output by the device, and an operation acquisition unit that acquires operations performed on the execution screen by a test executor.
[0007] Other problems and solutions disclosed in this application will be made clear in the section on preferred embodiments of the invention and the drawings.
[0008] According to the present invention, an efficient test can be performed.
[0009] It is a diagram showing an example of the overall configuration of a test system according to the present embodiment. It is a diagram showing an example of the hardware configuration of a server device 2. It is a diagram showing an example of the software configuration of a server device 2. It is a diagram explaining the flow of creating a test program. It is a diagram explaining the flow of automatic execution of a test.
[0010] <System Overview> A test system according to one embodiment of the present invention will be described below. The test system of this embodiment automates software (program) testing. The test system of this embodiment tests programs (hereinafter referred to as apps) that run on mobile devices such as smartphones. In this embodiment, testing is performed by the system executing an auto-execution program (hereinafter referred to as a test program) that automatically performs operations on the apps. The test program can be created by recording operations performed by a tester.
[0011] 1 is a diagram showing an example of the overall configuration of a test system according to this embodiment. The test system according to this embodiment includes a server device 2. The server device 2 is communicably connected to a user terminal 1 and a simulator 3 via a communication network. The communication network is, for example, the Internet, and is constructed using a public telephone network, a mobile phone network, a wireless communication path, Ethernet (registered trademark), or the like.
[0012] The user terminal 1 is a computer such as a personal computer that is operated by a user who intends to perform a test. It is assumed that the user terminal 1 is operated by a test executor, a developer, or the like.
[0013] The simulator 3 is a computer that provides an execution environment for an app. The simulator 3 is an execution environment for an app that is executed on a mobile device such as a smartphone. The simulator 3 can be, for example, an emulator that emulates a mobile device. Note that instead of the simulator 3, a web server or an actual device environment for executing the app can also be used. Note that in this embodiment, the simulator 3 can respond with a screen (GUI) showing the execution results of the app as a web page, and can externally provide data in response to operations on the app (such as touching or swiping the screen) (for example, by sending event information for the screen).
[0014] The server device 2 is a computer that supports application testing, including executing, recording, and managing tests. The server device 2 may be a general-purpose computer such as a workstation or a personal computer, or may be logically realized using cloud computing. The user terminal 1 can access the simulator 3 via the server device 2, and the server device 2 can acquire and record operations performed by the user terminal 1 on the application on the simulator 3 and transmit the operations to the simulator 3. The server device 2 can create and store a test program for the application based on the operations acquired from the user terminal 1. Furthermore, the server device 2 can then automatically (without operations performed by the user terminal 1) reproduce the operations performed on the application executed on the simulator 3.
[0015] <Server Device 2> FIG. 2 is a diagram illustrating an example of the hardware configuration of the server device 2. Note that the illustrated configuration is merely an example, and other configurations may also be used. The server device 2 includes a CPU 201, a memory 202, a storage device 203, a communication interface 204, an input device 205, and an output device 206. The storage device 203 stores various data and programs, and is, for example, a hard disk drive, a solid-state drive, or a flash memory. The communication interface 204 is an interface for connecting to a communication network, and is, for example, an adapter for connecting to Ethernet (registered trademark), a modem for connecting to a public telephone network, a wireless communication device for wireless communication, a USB (Universal Serial Bus) connector, or an RS232C connector for serial communication. The input device 205 is, for example, a keyboard, a mouse, a touch panel, buttons, a microphone, or the like for inputting data. The output device 206 is, for example, a display, a printer, a speaker, or the like for outputting data. Each functional unit of the server device 2 described below is realized by the CPU 201 reading a program stored in the storage device 203 into the memory 202 and executing it, and each storage unit of the server device 2 is realized as part of the storage area provided by the memory 202 and the storage device 203.
[0016] 3 is a diagram illustrating an example of the software configuration of the server device 2. The server device 2 includes an operation history storage unit 231, a test program storage unit 232, a learning model storage unit 233, an application information storage unit 234, a test result storage unit 235, an application transmission unit 211, a screen acquisition unit 212, an operation acquisition unit 213, an element identification unit 214, a test program creation unit 215, a test program execution unit 216, and a test result aggregation unit 217.
[0017] The operation history storage unit stores an operation history including user operations on the execution screen of the app. The operations can be expressed as event information including the type and position of, for example, touching or swiping the screen, inputting a string of characters, inputting voice, pressing a button on the mobile device (a virtual button during testing), and data such as input text and voice. The operation history can include the date and time (timestamp) when the operation occurred and event information, associated with a test ID for identifying the test and an app ID for identifying the app.
[0018] The test program storage unit 232 stores test programs. The test program storage unit 232 can store test programs in association with a test ID that identifies a test and an app ID that identifies an app. The test program can be a script that defines steps such as tapping a specific location on the execution screen of the app, swiping a specific location on the execution screen of the app, and typing specific text on the execution screen of the app. The script can be one or more combinations of steps that include, for example, an operation (tap, swipe, type, etc.), a target of the operation (which does not need to be specified), and a value (for example, in the case of typing, this can be text, and in the case of tapping or swiping, this can be a position on the screen).
[0019] The learning model storage unit 233 stores a learning model for extracting objects that constitute an application from an image. The learning model is created by machine learning using an image as input data and objects (elements on the execution screen) placed on the application's execution screen as training data. The elements can be specified by the user as areas on the image, for example.
[0020] The application information storage unit 234 stores information about applications (hereinafter referred to as application information). The application information may include information about the simulator 3 (simulator information) and application attributes (application attributes) associated with an application ID that identifies the application. The simulator information may be, for example, the host name or IP address of the simulator 3, or a URL if the simulator 3 provides an emulator as a web application. The application attributes may be various attributes related to the execution environment in which the application is executed (or the execution environment emulated by the simulator 3), such as the OS version or the display size of the mobile device.
[0021] The test result storage unit 235 stores the execution results of the test program. The test result storage unit 235 can store the execution results in association with an app ID that identifies the app, the date and time the test program was executed, and a user ID that identifies the user who performed the test. The execution results include the success or failure of the test program. The execution results may also include input to the system (event information) and responses from the system (screen data) for each step.
[0022] The application transmitting unit 211 transmits the application to the simulator 3. The application transmitting unit 211 can receive the application (executable file) from the user terminal 1 and transmit the received application to the simulator 3. The application transmitting unit 211 can also cause the simulator 3 to execute the application.
[0023] The server device 2 may include an application storage unit that stores an application (executable file) in association with an application ID that identifies the application. The application transmission unit 211 may receive a designation of an application ID from the user terminal 1, read out the application corresponding to the received application ID from the application storage unit, and transmit the application to the simulator 3 for execution.
[0024] The screen acquisition unit 212 acquires the execution screen output by the simulator 3. The execution screen from the simulator 3 can be acquired, for example, as an image. The screen acquisition unit 212 can also receive data for displaying the screen (for example, XML that defines the screen configuration and image data, or a web page (HTML data)) from the simulator 3 and update the execution screen. The screen acquisition unit 212 can transmit the execution screen (which can include a web page for displaying the screen and the subsequent image) to the user terminal 1.
[0025] The operation acquisition unit 213 acquires operations performed on the execution screen by the test executor. The operation acquisition unit 213 can receive event information from the user terminal 1. The operation acquisition unit 213 can create an operation history including the received event information, the test ID, the application ID, and the current date and time, and register the operation history in the operation history storage unit 231.
[0026] The element identification unit 214 identifies an element to be operated from the execution screen of the application. The element identification unit 214 can identify the element by performing image analysis on the image of the execution screen. The element identification unit 214 can also identify the element to be operated in XML, HTML, or the like that defines the screen configuration, for example, using XPath. In this embodiment, the element identification unit 214 identifies the element to be arranged on the execution screen using a learning model stored in the learning model storage unit 233. The element identification unit 214 can infer the element by, for example, providing an image of the execution screen to the learning model. The element identification unit 214 may identify each of the elements arranged on the image and, from among the identified elements, identify the element to be operated according to position information included in the event information.
[0027] The operation acquisition unit 213 can set the element identified by the element identification unit 214 as an operation target in the event information.
[0028] The test program creation unit 215 creates a test program based on the operation history. The test program creation unit 215 can create a test program by, for example, converting event information included in the operation history into a script format. The test program includes one or more steps that execute operations on operation targets together with values in the order of the operation history.
[0029] The test program execution unit 216 executes a test program. By executing the test program, it is possible to automatically execute a test of the application. The test program execution unit 216 can execute the test program in response to an instruction from the user terminal 1.
[0030] As described above, first, the operations performed by the test executor on the application execution screen are recorded, and a test program is created from the operation history. After that, the test program creation unit 215 executes the test program without any operations by the test executor, thereby automating the test.
[0031] When the test program execution unit 216 executes each step of the test program, if it is unable to find the element to be operated on from the execution screen, it can search for an element similar to the element to be operated on recorded in the test program and generate an operation event for the searched element.
[0032] The test result tallying unit 217 tally the execution results of the test programs stored in the test result storage unit 235 and transmits the tallying results to the user terminal 1 .
[0033] <Operation> FIG. 4 is a diagram illustrating the flow of creating a test program.
[0034] Upon receiving the application from the user terminal 1, the server device 2 installs the application on the simulator 3 (S401) and causes the simulator 3 to execute the application (S402). The server device 2 acquires an image of the execution screen from the simulator 3 (S403). If the test executor performs an operation on the execution screen (S404: YES), the server device 2 receives event information related to the operation from the user terminal 1 (S405). The server device 2 identifies an element on the execution screen to be operated based on the position on the screen where the operation (the position where the event occurred) included in the event information was performed (S406). For example, the server device 2 can identify multiple elements from the image of the execution screen and identify the element located at the position where the event occurred as the operation target. The server device 2 sets the identified operation target as event information, creates an operation history including the event information, and registers it in the operation history storage unit 231 (S407). The server device 2 repeats the process from step S403 until the test executor issues a termination command (S408: NO).
[0035] If the tester issues an instruction to end the test (S408: YES), the server device 2 can create a test program from the operation history (S409) and register the created test program in the test program storage unit 232.
[0036] In this way, the operations performed by the tester can be recorded as a test program.
[0037] FIG. 5 is a diagram illustrating the flow of automatic test execution.
[0038] When the server device 2 receives an app from the user terminal 1, it installs the app on the simulator 3 (S421), causes the simulator 3 to execute the app (S422), and reads out and executes the test program corresponding to the test and the app from the test program memory unit 232 (S423).
[0039] The server device 2 executes the test program to perform the following processing for each step defined in the test program.
[0040] The server device 2 receives an image of the application's execution screen from the simulator 3 (S424). If an operation target is set for each operation (event) included in the step (S425: YES), the server device 2 extracts elements from the execution screen image, for example, by image analysis (S426). The server device 2 may identify elements by providing the execution screen image to a learning model stored in the learning model storage unit 233. The server device 2 identifies the operation target element from the elements extracted from the execution screen image (S427). For example, the server device 2 may identify an element located at the event occurrence position. If the operation target element does not exist or the operation target element is different from the element specified in the test program (S428: NO), the server device 2 may identify an element similar to the element specified in the test program (S429). Note that if an element similar to the element specified in the test program cannot be identified, the test may fail. The server device 2 notifies the simulator 3 to generate an event for the operation target element (S430).
[0041] On the other hand, if the element to be operated is not set in the test program (S425: NO), the server device 2 can notify the simulator 3 to generate an event on the execution screen (S431).
[0042] As described above, the test system of this embodiment can automate testing by executing a test program that records operations performed by a tester. Furthermore, even in cases where on-screen elements cannot be obtained from structured data such as XML, such as in the case of mobile device apps, the on-screen elements to be operated can be identified through image analysis.
[0043] Although the present embodiment has been described above, the above embodiment is intended to facilitate understanding of the present invention and is not intended to limit the present invention. The present invention may be modified or improved without departing from the spirit thereof, and equivalents thereof are also included in the present invention.
[0044] <Disclosures> The present disclosure also includes the following configurations. [Item 1] A system for supporting the testing of an application, comprising: a transmission unit that transmits the application to a device that executes the application; a screen acquisition unit that causes the device to execute the application and acquires an execution screen output by the device; and an operation acquisition unit that acquires operations on the execution screen by a test executor. [Item 2] The test support system according to item 1, wherein the device is a simulator. [Item 3] The test support system according to item 1, comprising: an operation history storage unit that stores an operation history including the operations; and a program creation unit that creates a test program based on the operation history. [Item 4] The test support system according to item 1, comprising an element identification unit that identifies an element that is the target of the operation from an image of the execution screen. [Item 5] The test support system according to Item 4, wherein the element identification unit identifies the element by providing the image as input data to a learning model created by machine learning using the image as training data. [Item 6] A method for supporting application testing, the test support method comprising: a computer executing the steps of: sending the application to a device that executes the application; acquiring an execution screen output by the device; and acquiring operations on the execution screen by a test executor. [Item 7] A method for supporting application testing, the program causing a computer to execute the steps of: sending the application to a device that executes the application; acquiring an execution screen output by the device; and acquiring operations on the execution screen by a test executor.
[0045] 1 User terminal 2 Server device 3 Simulator
Claims
1. A system for supporting the testing of an application, comprising: a transmission unit that transmits the application to a device that executes the application; a screen acquisition unit that causes the device to execute the application and acquires an execution screen output by the device; and an operation acquisition unit that acquires operations performed on the execution screen by a test executor.
2. A test support system according to claim 1, characterized in that the device is a simulator.
3. A test support system as described in claim 1, comprising: an operation history storage unit that stores an operation history including the operation; and a program creation unit that creates a test program based on the operation history.
4. A test support system as claimed in claim 1, characterized in that it comprises an element identification unit which identifies an element to be the target of the operation from the image of the execution screen.
5. A test support system as described in claim 4, wherein the element identification unit identifies the element by providing the image to a learning model created by machine learning using the image as input data and the element as teacher data.
6. A method for supporting application testing, comprising the steps of: transmitting the application to a device that executes the application; acquiring an execution screen output by the device; and acquiring operations performed on the execution screen by a test executor, wherein the computer executes the method.
7. A method for assisting in application testing, comprising the steps of: transmitting the application to a device that executes the application; acquiring an execution screen output by the device; and acquiring operations performed on the execution screen by a test executor, said program causing a computer to execute the steps.
Citation Information
Patent Citations
Method and system for performing human machine interface (HMI) automation testing
EP4131010A1
Method, device and program, for recognizing application state
JP2011181007A
Operation automation device
JP2018116394A
Information processing device, information processing method, and program
JP2019109852A
Mobile application testing platform
US20150082282A1
