WO2020157795A1 - 試験装置、試験方法および試験プログラム - Google Patents

試験装置、試験方法および試験プログラム Download PDF

Info

Publication number
WO2020157795A1
WO2020157795A1 PCT/JP2019/002721 JP2019002721W WO2020157795A1 WO 2020157795 A1 WO2020157795 A1 WO 2020157795A1 JP 2019002721 W JP2019002721 W JP 2019002721W WO 2020157795 A1 WO2020157795 A1 WO 2020157795A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
program
trace
series
function
Prior art date
Application number
PCT/JP2019/002721
Other languages
English (en)
French (fr)
Inventor
優也 小野
寛隆 茂田井
水口 武尚
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2019/002721 priority Critical patent/WO2020157795A1/ja
Priority to JP2020568832A priority patent/JP6878707B2/ja
Publication of WO2020157795A1 publication Critical patent/WO2020157795A1/ja
Priority to US17/337,717 priority patent/US20210286715A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Definitions

  • the present invention relates to a test device, a test method, and a test program.
  • the quality of conventional software platforms is guaranteed by a unit test or system test of the API (Application Programming Interface) provided to the application program.
  • a specific example of the software platform is an OS (Operating System) or a library. These software platforms are tested based on test cases that assume calls from application programs.
  • Patent Document 1 or Patent Document 3 proposes a technique for facilitating the prediction of the segmentation point of the application program by comparing the trace logs of the application program before the repair and after the repair when the platform is repaired. ..
  • Patent Document 2 a technique that expands a test case to a processing unit viewed from a user, stores a processing history, and allows a test to be re-executed, thereby facilitating platform failure verification on the user side.
  • Patent Document 4 proposes a technique of executing a regression test of a platform at high speed by acquiring a user operation and reproducing the user operation a plurality of times.
  • Patent Document 5 proposes a technique that enables debugging, verification, or optimization by tracing hardware information when a failure occurs, converting the trace data into a format associated with the simulator, and reproducing it by the simulator. ing.
  • the hardware information is information such as an instruction decoder, cache, and register.
  • Patent Document 6 proposes a technique for facilitating debugging by analyzing a function call of a debug target library by a higher-level application and another dependent library.
  • the purpose of the present invention is to efficiently and highly accurately generate a reproduction program that matches the usage range of an application program.
  • the test apparatus is a test apparatus that executes an application program that performs a series of function call processing using a software platform, and tests the software platform.
  • a trace log including a plurality of trace results, which are trace results obtained by tracing the series of function call processes by repeatedly executing the application program, and including trace arguments including function arguments and return values called by the series of function call processes.
  • a log acquisition unit that acquires By analyzing the trace log, a log analysis unit that estimates each attribute of the argument and the return value of the function called by the series of function call processing as a variable attribute, And a program generation unit that generates a reproduction program that reproduces the series of function call processes by using the variable attribute.
  • the log acquisition unit repeatedly executes the application program a plurality of times and acquires a trace log including a plurality of trace results obtained by tracing a series of function call processing.
  • the log analysis unit estimates the variable attributes of the argument and the return value of the function called by the series of function call processing by analyzing the trace log.
  • the program generator uses the variable attribute to generate a reproduction program for reproducing a series of function call processes. Therefore, according to the test apparatus of the present invention, it is possible to efficiently and accurately generate a reproduction program that matches the usage range of the application program.
  • FIG. 3 is a hardware configuration diagram of the test apparatus according to the first embodiment.
  • FIG. 3 is a functional configuration diagram of the test apparatus according to the first embodiment.
  • FIG. 9 is a flowchart of the software test process of the comparative example of the first embodiment.
  • FIG. 6 is a flowchart showing the operation of the log acquisition unit according to the first embodiment. 3 is an example of a trace log according to the first embodiment.
  • FIG. 6 is a flowchart showing the operation of the result determination unit according to the first embodiment.
  • 4 is an example of a function call test table according to the first embodiment.
  • 9 is an example of a function call table according to the second embodiment.
  • FIG. 6 is a flowchart showing the operation of the log analysis unit according to the second embodiment.
  • FIG. 6 is a flowchart showing the operation of the program generation unit according to the second embodiment.
  • FIG. 6 is a flowchart showing the operation of the result determination unit according to the second embodiment.
  • FIG. 11 is a flowchart showing the operation of the log acquisition unit according to the third embodiment.
  • FIG. 11 is a flowchart showing the operation of the log analysis unit according to the third embodiment.
  • FIG. 11 is a flowchart showing the operation of the log acquisition unit according to the fourth embodiment.
  • FIG. 1 is a diagram showing a hardware configuration of a test apparatus 100 according to this embodiment.
  • FIG. 2 is a diagram showing a functional configuration of the test apparatus 100 according to the present embodiment.
  • the test apparatus 100 is a computer.
  • the test apparatus 100 includes a processor 910 and other hardware such as a memory 921, an auxiliary storage device 922, an input/output interface 930, and a communication device 950.
  • the processor 910 is connected to other hardware via the signal line 940 and controls these other hardware.
  • the test apparatus 100 includes, as functional elements, a log acquisition unit 201, a log analysis unit 202, a program generation unit 203, a compilation unit 204, a program execution unit 205, and a result determination unit 206.
  • the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 are realized by software.
  • the processor 910 is a device that executes a test program.
  • the test program is a program that realizes the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206.
  • the processor 910 is an IC (Integrated Circuit) that performs arithmetic processing. Specific examples of the processor 910 are a CPU (Central Processing Unit), a DSP (Digital Signal Processor), and a GPU (Graphics Processing Unit).
  • the memory 921 is a storage device that temporarily stores data.
  • a specific example of the memory 921 is an SRAM (Static Random Access Memory) or a DRAM (Dynamic Random Access Memory).
  • the auxiliary storage device 922 is a storage device that stores data.
  • a specific example of the auxiliary storage device 922 is an HDD.
  • the auxiliary storage device 922 may be a portable recording medium such as an SD (registered trademark) memory card, CF, NAND flash, flexible disk, optical disk, compact disk, Blu-ray (registered trademark) disk, or DVD.
  • SD registered trademark
  • SD Secure Digital
  • CF CompactFlash
  • DVD is an abbreviation for Digital Versatile Disk.
  • the input/output interface 930 includes a port connected to an input device such as a mouse, a keyboard, or a touch panel as an input interface.
  • the input interface is specifically a USB (Universal Serial Bus) terminal.
  • the input interface may be a port connected to a LAN (Local Area Network).
  • the input/output interface 930 also includes a port to which a cable of an output device such as a display is connected, as an output interface.
  • the output interface is specifically a USB terminal or an HDMI (registered trademark) (High Definition Multimedia Interface) terminal.
  • the display is, specifically, an LCD (Liquid Crystal Display).
  • the communication device 950 communicates with other devices via the network.
  • the communication device 950 has a receiver and a transmitter.
  • the communication device 950 is wirelessly connected to a communication network such as a LAN, the Internet, or a telephone line.
  • the communication device 950 is specifically a communication chip or a NIC (Network Interface Card).
  • the test program is read by the processor 910 and executed by the processor 910.
  • the memory 921 stores not only a test program but also an OS (Operating System).
  • the processor 910 executes the test program while executing the OS.
  • the test program and the OS may be stored in the auxiliary storage device 922.
  • the test program and the OS stored in the auxiliary storage device 922 are loaded into the memory 921 and executed by the processor 910.
  • the test program may be partially or entirely incorporated in the OS.
  • the test apparatus 100 may include a plurality of processors that replace the processor 910.
  • the plurality of processors share the execution of the test program.
  • Each processor like the processor 910, is a device that executes a test program.
  • the data, information, signal values and variable values used, processed or output by the test program are stored in the memory 921, the auxiliary storage device 922, or the register or cache memory in the processor 910.
  • the test program causes a computer to execute log acquisition processing, log analysis processing, program generation processing, compilation processing, program execution processing, and result determination processing.
  • the test method is a method performed by the test apparatus 100 executing a test program.
  • the test program may be provided by being stored in a computer-readable storage medium. Also, the test program may be provided as a program product.
  • the test apparatus 100 uses the software platform 106 to execute an application program 111 that performs a series of function call processing, and tests the software platform 106.
  • the operating system 108 is operating, and the dynamic library 109 is operating on it.
  • the software platform 106 is specifically the dynamic library 109. There may be multiple dynamic libraries.
  • the application program 111 is operating on it.
  • the application program 111 is information processing such as display processing, voice processing, database processing, WEB application processing, or calculation processing.
  • the trace program 112 is a program in which the application program 111 hooks the function call of the dynamic library 109 and outputs it to the trace log 113.
  • the trace log 113 is output to the memory 921 or the auxiliary storage device 922.
  • the log acquisition unit 201 executes the application program 111 and also the trace program 112. Then, the log acquisition unit 201 uses the trace program 112 to output the function call of the dynamic library 109 in the application program 111 to the trace log 113.
  • the log analysis unit 202 statistically analyzes the trace log 113, corrects the value of the trace log 113 so that it can be re-executed, and outputs it to the function call table 301.
  • “Correcting the value of the trace log 113” refers to a process of tagging a variable attribute tag to the argument and return value of the function, as described later.
  • a variable type tag such as a random number, a time, a system variable, or an address is stored as an argument of the function.
  • the return value stores, for example, a diversion location that is diverted in another function.
  • the program generation unit 203 reads the function call table 301 and generates a reproduction program source code 302.
  • the compiling unit 204 compiles the reproduction program source code 302 and generates an executable reproduction program 303.
  • the program execution unit 205 executes the reproduction program 303.
  • the reproduction program 303 calls the dynamic library 109 and outputs the reproduction result 26.
  • the output destination is the memory 921 or the auxiliary storage device 922.
  • the result determination unit 206 requests the program execution unit 205 to execute the reproduction program 303, compares the reproduction result 26 of the reproduction program 303 with the function call table 301, and outputs the result to the function call test table 304.
  • the function call test table 304 stores the expected value of the output expected in the reproduction program 303 and the determination result. The expected value is determined in advance based on the variable type or the diversion location of the function call table 301.
  • the developer 110 checks the function call test table 304 and determines whether the dynamic library 109 has performed the expected operation.
  • step S101 a reproduction test program is developed.
  • step S102 the reproduction test program is executed.
  • step S103 the success or failure of the execution is determined, and if the execution is successful, the process ends. If the execution fails, the developer performs a log analysis or a reproducibility test in step S104 to identify the failed part. In addition, the developer considers the correction method.
  • step S105 the platform is modified.
  • test process S100 Next, the operation of the test process S100 according to the present embodiment will be described with reference to FIGS. 4 to 11.
  • FIG. 4 is a flowchart showing the operation of the log acquisition unit 201 according to this embodiment.
  • the log acquisition unit 201 repeatedly executes the application program 111 a plurality of times to acquire the trace log 113 including a plurality of trace results 13.
  • the trace result 13 is a result of tracing a series of function call processing 333.
  • the trace result 13 includes the argument and the return value of the function called by the series of function call processing 333.
  • step S201 the log acquisition unit 201 initializes the log acquisition count i.
  • step S202 the log acquisition unit 201 initializes the execution environment. Initialization of the execution environment is pre-processing such as deleting the configuration file or shared memory.
  • step S203 the log acquisition unit 201 executes the application program 111 that is the target for acquiring the trace log 113.
  • the log acquisition unit 201 executes the trace program 112, specifies the application program 111 executed in step S203, and outputs the trace log 113 in FIG.
  • FIG. 5 is a diagram showing an example of the trace log 113 according to the present embodiment.
  • the log acquisition unit 201 hooks the dynamic library call of the application program 111 by the trace program 112, and outputs the execution start time, the function name, the argument, and the return value.
  • the log acquisition unit 201 acquires arguments 1 to max as arguments. Arguments greater than or equal to the acquired number are represented by "-".
  • the argument max is predetermined.
  • data other than the above-mentioned data such as a call of a system call may be attached to the trace log 113, but it needs to be in a format that can be distinguished from a call of a dynamic library.
  • the execution start times may be in any format as long as they can be compared with each other and the absolute time is known.
  • the execution start time may be in a format such as UNIX (registered trademark) time.
  • Each of the argument and return value is a type name and a value.
  • the type name is, for example, an address, a character string, an integer, a decimal, NULL, or void.
  • the argument and the return value may include those that can refer to the memory map related to application execution. What can refer to the memory map is, for example, data such as a structure member variable name and its value in the case of a structure pointer, and all array data in the case of an array.
  • step S205 the log acquisition unit 201 increments the log acquisition count i by 1.
  • step S206 the log acquisition unit 201 ends if the log acquisition count i is m or more, and returns to step S202 if i is less than m. m is determined in advance. As long as m is 1 or more, any value is acceptable.
  • FIG. 6 is a flowchart showing the operation of the log analysis unit 202 according to this embodiment.
  • the log analysis unit 202 analyzes the trace log 113 to estimate the respective attributes of the argument and the return value of the function called by the series of function call processing 333 as the variable attribute 21.
  • the log analysis unit 202 generates the function call table 301 in which the variable attribute tag 208 representing the variable attribute 21 is tagged to each of the argument and the return value of the function called by the series of function call processing 333.
  • step S301 the log analysis unit 202 acquires the trace log 113 from the memory 921 or the auxiliary storage device 922.
  • step S302 the log analysis unit 202 creates a function sequence from the trace log 113 as a series of function call processing 333. Specifically, in the case of the trace log 113 in FIG. 5, the log analysis unit 202 creates a function sequence (funcA, funcB, funcA,..., FuncF) from No1 to Nox.
  • step S303 the log analysis unit 202 estimates the variable attribute 21 by statistically analyzing the trace log 113.
  • the log analysis unit 202 statistically analyzes the trace log 113 to estimate, as the variable attribute 21, a variable type 211 indicating each type of the argument and the return value of the function called by the series of function calling processes 333. To do.
  • the log analysis unit 202 statistically analyzes the trace log 113 to determine, as the variable attribute 21, the diversion location where each of the argument and the return value of the function called by the series of function calling processes 333 is diverted. presume.
  • the log analysis unit 202 statistically analyzes the function sequence of the m trace results 13 and the corresponding arguments and return values. The log analysis unit 202 estimates that it is a random number when all m variables in the function of the same sequence are different. Further, the log analysis unit 202 estimates that the variable similar to the difference between the execution times of the same function of the trace logs before and after is similar to the time. As described above, the log analysis unit 202 estimates the variable attribute 21 from the m trace results 13 based on the information such as the change of the variable of the same function, and tags the variable attribute 21 with each argument and return value.
  • FIG. 7 is an example of the variable attribute tag 208 according to the present embodiment.
  • the variable attribute tag 208 is a tag for variables and return values.
  • the variable attribute tag 208 is stored in the memory 921 or the auxiliary storage device 922 in advance.
  • the log analysis unit 202 statistically analyzes the m communication sequences, estimates which variable attribute of each argument and return value is in FIG. 7, and tags each argument and return value with a tag. To do.
  • the variable attribute Type is system
  • the function name of the system library and the type of the argument are stored in advance, and if they match the function name of the function sequence, it is determined as the argument of the function. For example, if the function name is getpid, it is determined that the return value is PID.
  • the system library may be any library as long as it is a wrapper function of the system call of the operating system.
  • the system library is a function such as glibc or Newlib of the standard C library.
  • FIG. 8 is an example of the function call table 301 according to the present embodiment.
  • the function call table 301 is a table in which all the arguments and return values in the trace log 113 are tagged with the statistically analyzed variable attributes 21.
  • the log analysis unit 202 tags the member variable and its value as in the variable attribute T301 in FIG.
  • Members 1 and 2 mean members of the structure of structA having the variable attribute T302.
  • the data acquired by the log acquisition unit 201 is directly tagged to the members 1 and 2.
  • the variable type T401 is an example in which Type is “fixed value”.
  • the variable type T501 is an example in which the type is “system”.
  • step S304 the log analysis unit 202 determines whether the argument and the return value are used in the subsequent functions. If it has been diverted, the log analysis unit 202 additionally writes it with a tag. For example, as shown in FIG. 8, when the return value 0xbbbbb of the function funcB matches the argument value of the next function funcA, and it can be seen in all trace logs, the return value 0xbbbb of the function funcB is used. It is determined that In step S305, the log analysis unit 202 outputs the analysis result up to step S304 to the function call table 301.
  • FIG. 9 is a flowchart showing the operation of the program generation unit 203 according to this embodiment.
  • the program generation unit 203 uses the variable attribute 21 to generate the reproduction program 303 that reproduces the series of function call processes 333.
  • the program generation unit 203 uses the function call table 301 to generate the reproduction program 303.
  • step S311 the program generation unit 203 acquires the function call table 301.
  • step S312 the program generation unit 203 reads the dynamic library information linked with the application program 111.
  • the application program 111 includes the function name of the dynamic library, and the information of the function called from the application program 111 is stored in the memory as the dynamic library information.
  • the dynamic library information may be any information as long as the variable name and type can be specified.
  • the dynamic library information may be information such as a header file, for example.
  • the header file is a header file required to link the dynamic library. For example, when using the libc library in C language, #include ⁇ stdio. h> is added, but stdio. h is the header file. If the variable name and type (specifically, the number of bytes) cannot be specified only in the header file, the file referenced by the header file is searched for.
  • step S313 the program generation unit 203 uses the dynamic library information read in step S312 to define the data structure and variables that secure the argument and the return value.
  • step S314 the program generation unit 203 uses the variables defined in step S312 to generate the reproduction program source code 302 so as to output the function call and the log of each function call.
  • the function call time, function name, argument type, and return value are output to the log.
  • the log may be in any format as long as it can uniquely identify the function calling order.
  • the compiling unit 204 compiles the reproduction program source code 302 and generates the reproduction program 303. Further, for the purpose of executing in another environment, cross-compilation may be performed, and subsequent execution may be performed by an apparatus different from the test apparatus 100.
  • the program execution unit 205 receives the command from the result determination unit 206 and executes the reproduction program 303.
  • the program generation unit 203 creates the reproduction program source code 302, and the compiling unit 204 creates the reproduction program 303 from the reproduction program source code 302.
  • the program generation unit 203 may have a function of creating the reproduction program 303 from the reproduction program source code 302.
  • FIG. 10 is a flowchart showing the operation of result determination section 206 according to the present embodiment.
  • the result determination unit 206 is also referred to as a reproduction program output result determination unit that determines the output result of the reproduction program 303.
  • the result determination unit 206 executes the reproduction program 303, acquires each of the argument and the return value of the function called by the series of function call processing 333 as the reproduction result 26, and the attribute of the reproduction result 26 satisfies the expected value. It is determined.
  • step S401 the result determination unit 206 acquires the function call table 301.
  • step S402 the result determination unit 206 requests the program execution unit 205 to execute the reproduction program 303.
  • the program execution unit 205 executes the reproduction program 303.
  • step S403 the result determination unit 206 acquires the output of the reproduction program 303 as the reproduction result 26.
  • step S 404 the result determination unit 206 compares the reproduction result 26 of the reproduction program 303 with the output result of the equivalent function of the function call table 301, and outputs the result to the function call test table 304.
  • FIG. 11 is an example of the function call test table 304 according to the present embodiment.
  • the expected value of the return value and the item of the result are added to the items of the trace log 113.
  • the expected value of the return value is obtained based on the variable attribute 21 tagged in the function call table 301.
  • the test apparatus 100 automatically sets the expected value of the return value based on the tag added to the return value in step S303. For example, when the variable type is PID, the expected value of the return value is set to a value of 1 or more and less than or equal to the MAX value of the PID of the system. If the variable type is an address, the expected value of the return value is set to a value such as within the valid address range of the system.
  • the result determination unit 206 compares the return value with the expected value, and if the return value is within the expected value range, sets the result to be within the range. If the return value is outside the range of the expected value, the result determination unit 206 sets the result to be outside the range. When the result determination unit 206 cannot specify that the type of the return value is other, the result determination unit 206 sets the result to be undeterminable. The result determination unit 206 also determines the result for the argument based on the tagged variable attribute.
  • the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 may be realized by hardware.
  • the test apparatus 100 includes an electronic circuit instead of the processor 910.
  • the electronic circuit is a dedicated electronic circuit that realizes the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206.
  • the electronic circuit is specifically a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, a logic IC, a GA, an ASIC, or an FPGA.
  • GA is an abbreviation for Gate Array.
  • ASIC is an abbreviation for Application Specific Integrated Circuit.
  • FPGA is an abbreviation for Field-Programmable Gate Array.
  • the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 may be realized by one electronic circuit, or by a plurality of electronic circuits. It may be realized in a distributed manner. As another modification, some functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 are realized by an electronic circuit, and the remaining functions. May be realized by software. Further, some or all of the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 may be realized by firmware.
  • Each of the processor and electronic circuit is also called the processing circuitry. That is, in the test apparatus 100, the functions of the log acquisition unit 201, the log analysis unit 202, the program generation unit 203, the compilation unit 204, the program execution unit 205, and the result determination unit 206 are realized by the processing circuitry.
  • test apparatus 100 it is possible to test the library according to the usage range of the application program by automatically generating the executable reproduction program. Therefore, the test apparatus 100 according to the present embodiment improves the quality of the software platform.
  • the reproduction program is created from the trace log executed multiple times within the usage range of the application program. Therefore, according to the test apparatus 100 according to the present embodiment, an optimum reproduction program can be automatically generated, and the work of the developer looking at the test result and maintaining the reproduction program is unnecessary. Therefore, the maintenance cost of the reproduction program can be reduced.
  • test apparatus 100 since only the library call of the application program is reproduced, the black box test of the application program can be realized. Therefore, according to the test apparatus 100 according to the present embodiment, it is not necessary to maintain the environment such as the setting file necessary for executing the application program. This reduces the time and effort required to prepare for test execution and improves test efficiency.
  • a state in which the application program calls the API of the library is traced a plurality of times, and the traced contents are statistically analyzed. Therefore, according to the test apparatus 100 according to the present embodiment, a re-executable reproduction program can be automatically generated by specifying a process that is changed every execution, a type of variable, or a variable that is diverted. Therefore, the maintenance cost of the reproduction program can be reduced, and the test according to the usage range of the application program can be repeated a plurality of times, so that the quality of the platform can be improved.
  • Embodiment 2 In this embodiment, the points different from the first embodiment will be described. The same components as those in the first embodiment are designated by the same reference numerals and the description thereof will be omitted.
  • the test apparatus 100 automatically generates an executable reproduction program from the log obtained by tracing the library call of the application program multiple times.
  • the test apparatus 100 of the present embodiment classifies the processing flow based on the similarity of the function sequence of the trace log. Then, the test apparatus 100 generates a reproduction program for each classified process flow.
  • the hardware configuration and the functional configuration of the test apparatus 100 are the same as those in the first embodiment.
  • the reproduction program source code 302, the reproduction program 303, and the function call test table 107 are plural.
  • the log acquisition unit 201 classifies the plurality of trace results 13 included in the trace log 113 as similar trace logs 132 based on the order of function calls included in each of the plurality of trace results, that is, the processing flow.
  • the log analysis unit 202 estimates a variable attribute for each similar trace log 132.
  • the program generation unit 203 generates a reproduction program 303 for each similar trace log 132.
  • FIG. 12 is an example of the function call table 301a according to the present embodiment.
  • processing flow items for classifying the processing flows are added to each trace result 13 of the function call table 301 of FIG. Further, one trace result 13 is classified into any one of the processing flows of 1, 2,..., N.
  • n takes a value of 1 or more and m or less.
  • the operation of the test apparatus 100 is basically the same as that of the first embodiment.
  • the different points are as follows.
  • the log analysis unit 202 classifies the plurality of trace results 13 of the trace log 113 for each processing flow, and generates the function call table 301a including the similar trace log 132.
  • the program generation unit 203 generates the reproduction program source code 302 for each similar trace log 132 of the function call table 301a.
  • the compiling unit 204 compiles a plurality of reproduction program source codes 302 and generates a plurality of reproduction programs 303.
  • the result determination unit 206 executes the reproduction program 303 generated for each similar trace log 132 and outputs a plurality of function call test tables 304 for each similar trace log 132.
  • FIG. 13 is a flowchart showing the operation of the log analysis unit 202 according to this embodiment. Steps S301, S302, and S305 in FIG. 13 are the same as those in FIG. 6 of the first embodiment.
  • step S501 the log analysis unit 202 calculates the similarity of the function sequence of the trace result 13 and classifies the function sequence of the trace result 13 into n. The plurality of trace results 13 are classified into the similar trace log 132.
  • step S502 the log analysis unit 202 performs the same process as in step S303 for each classified similar trace log 132.
  • step S503 the log analysis unit 202 performs the same process as in step S304 for each classified similar trace log 132.
  • FIG. 14 is a flowchart showing the operation of the program generation unit 203 according to this embodiment.
  • Step S311, step S312, and step S313 of FIG. 14 are the same as those of FIG. 9 of the first embodiment.
  • the program generation unit 203 sets the process flow n.
  • the program generation unit 203 generates the reproduction program source code i to which the process flow number is added.
  • the program generation unit 203 sets i to the next process flow number.
  • the program generation unit 203 branches to step S313 if the process flow number i is less than the process flow n, and ends the process if the process flow number i is greater than or equal to the process flow n.
  • FIG. 15 is a flow chart showing the operation of result determining section 206 according to the present embodiment.
  • Step S401 of FIG. 15 is the same as that of FIG. 10 of the first embodiment.
  • the result determination unit 206 sets the process flow n.
  • the result determination unit 206 executes the reproduction program i corresponding to the process flow number i and acquires the call result.
  • the result determination unit 206 outputs the function call test table i corresponding to the process flow number i.
  • the result determination unit 206 sets i to the next process flow number.
  • step S705 the result determination unit 206 branches to step S702 if the process flow number i is less than the process flow n, and ends the process if the process flow number i is greater than or equal to the process flow n.
  • Embodiment 3 In this embodiment, points different from the first and second embodiments will be described. The same components as those in the first and second embodiments are designated by the same reference numerals and the description thereof will be omitted.
  • the test apparatus 100 automatically generates an executable reproduction program from the log obtained by tracing the library call of the application program multiple times.
  • the time interval from the previous trace of the application program is not set.
  • a time-dependent process such as starting some process based on the absolute time is performed.
  • the process flow is effectively classified by using the periodicity of the execution start time of the application program.
  • the log acquisition unit 201 repeatedly executes the application program 111 multiple times at prescribed execution intervals that represent intervals at which the application program is executed.
  • FIG. 16 is a flowchart showing the operation of the log acquisition unit 201 according to this embodiment. Step S201, step S202, step S204, step S205, and step S206 of FIG. 16 are the same as those of FIG. 4 of the first embodiment.
  • step S801 the log acquisition unit 201 sets the prescribed execution interval T.
  • the execution regulation interval T may be any value as long as it is 0 or more.
  • step S802 the log acquisition unit 201 sets the current time to the previous execution time.
  • step S803 the log acquisition unit 201 waits from the previous execution time to the time when the specified execution interval T is added.
  • step S804 the log acquisition unit 201 saves the current time when the user got up to the last execution time and executes the application program 111. As described above, the log acquisition unit 201 can execute the application program 111 at the specified execution interval T set in step S801.
  • FIG. 17 is a flowchart showing the operation of the log analysis unit 202 according to this embodiment. Step S301, step S302, step S502, step S503, and step S305 of FIG. 17 are the same as those of FIG. 13 of the second embodiment.
  • step S511 the log analysis unit 202 classifies the processing flows in consideration of the prescribed execution interval T. Specifically, although the log analysis unit 202 is similar in the function sequence, if the function execution time is different from the specified execution interval T, the log analysis unit 202 determines that the processing flow is different, and interprets it as another sequence. ..
  • the test device automatically generates an executable reproduction program from the log obtained by tracing the library call of the application program multiple times. Execution of the application program may change the platform state, so the trace environment conditions may differ. Therefore, the test apparatus 100 according to the present embodiment restarts the platform for each trace to make the environmental conditions the same and facilitate the analysis of the trace log.
  • the log acquisition unit 201 initializes the software platform every time the application program 111 is executed.
  • FIG. 18 is a flowchart showing the operation of the log acquisition unit 201 according to this embodiment. Steps S202, S203, S204, S205, and S206 of FIG. 18 are the same as those of FIG. 4 of the first embodiment.
  • step S901 the log acquisition unit 201 initializes the number of restarts.
  • step S902 the log acquisition unit 201 restarts if the restart count is less than the trace log acquisition count.
  • the log acquisition unit 201 instructs the operating system 108 to restart.
  • the log acquisition unit 201 ends.
  • the management of these execution states may be performed by any method as long as it is retained by restarting.
  • each part of the test apparatus has been described as an independent functional block.
  • the configuration of the test apparatus does not have to be the configuration of the above-described embodiment.
  • the functional block of the test apparatus may have any configuration as long as it can realize the functions described in the above-described embodiments.
  • test equipment 100 test equipment, 13 trace result, 21 variable attribute, 26 reproduction result, 106 software platform, 108 operating system, 109 dynamic library, 110 developer, 111 application program, 112 trace program, 113 trace log, 132 similar trace log, 201 log acquisition unit, 202 log analysis unit, 203 program generation unit, 204 compilation unit, 205 program execution unit, 206 result determination unit, 208 variable attribute tag, 301, 301a function call table, 302 reproduction program source code, 303 reproduction program , 304 function call test table, 333 series of function call processing, 910 processor, 921 memory, 922 auxiliary storage device, 930 input/output interface, 940 signal line, 950 communication device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

試験装置(100)は、ソフトウェアプラットフォーム(106)を利用して一連の関数呼び出し処理を行うアプリケーションプログラム(111)を実行し、ソフトウェアプラットフォーム(106)の試験を行う。ログ取得部(201)は、アプリケーションプログラム(111)を複数回繰り返し実行し、一連の関数呼び出し処理をトレースしたトレース結果を複数含むトレースログ(113)を取得する。ログ解析部(202)は、トレースログ(113)を解析することにより、一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の属性を変数属性として推定する。プログラム生成部(203)は、変数属性を用いて、一連の関数呼び出し処理を再現する再現プログラム(303)を生成する。

Description

試験装置、試験方法および試験プログラム
 本発明は、試験装置、試験方法および試験プログラムに関する。
 従来のソフトウェアプラットフォームは、アプリケーションプログラムに提供するAPI(Application Programming Interface)の単体テストあるいはシステムテストによって品質が保証されていた。ソフトウェアプラットフォームの具体例は、OS(Operating System)あるいはライブラリである。これらのソフトウェアプラットフォームは、アプリケーションプログラムからの呼び出しを想定したテストケースを基にテストされる。
 特許文献1あるいは特許文献3では、プラットフォームが改修されると、改修前と改修後のアプリケーションプログラムのトレースログを比較することで、アプリケーションプログラムのデグレーション箇所の予測を容易化する技術が提案されている。
 特許文献2では、テストケースをユーザから見た処理単位にまで拡大し、処理の履歴を記憶し、テストが再実行できるようにすることで、ユーザ側でのプラットフォームの不具合検証を容易にする技術が提案されている。
 特許文献4では、ユーザ操作を取得し、複数回再生することでプラットフォームの回帰試験を高速に実行する技術が提案されている。
 特許文献5では、障害発生時にハードウェア情報をトレースし、トレースデータをシミュレータに関連付けられたフォーマットに変換し、シミュレータで再生することで、デバッグ、検証、あるいは最適化を可能とする技術が提案されている。ハードウェア情報とは、命令デコーダ、キャッシュ、およびレジスタといった情報である。
 特許文献6では、上位アプリケーションと他依存ライブラリが、デバッグ対象のライブラリの関数呼び出しを解析することで、デバッグを容易にする技術が提案されている。
特開平10-320234号公報 特開平11-119956号公報 国際公開第2012/127729号 特開2015-169975号公報 特表2013-531292号公報 特開2007-080036号公報
 従来技術では、アプリケーションプログラムが、ライブラリのAPIをどの順序で呼び出すかについて全て網羅することは困難である。そのため、従来技術では、複数ライブラリの組み合わせテストを行う場合、アプリケーションプログラムの実際の呼び出し順序を特定できず、試験漏れが発生する。また、マルチスレッドあるいはマルチコア環境では、APIの呼び出し順序が実行する度に変わるため、実行順序が複雑となり、静的解析ができないことからより試験が困難となる。また、実際の呼び出し順序を想定できたとしても、アプリケーションが頻繁に更新される場合があり、試験追従のための再現試験プログラムの生成に時間がかかる。そのため、保守コストが高くなるといった課題がある。
 本発明は、アプリケーションプログラムの使用範囲に即した再現プログラムを効率的かつ高精度に生成することを目的とする。
 本発明に係る試験装置は、ソフトウェアプラットフォームを利用して一連の関数呼び出し処理を行うアプリケーションプログラムを実行し、前記ソフトウェアプラットフォームの試験を行う試験装置において、
 前記アプリケーションプログラムを複数回繰り返し実行し、前記一連の関数呼び出し処理をトレースしたトレース結果であって前記一連の関数呼び出し処理により呼び出された関数の引数と返り値とを含むトレース結果を複数含むトレースログを取得するログ取得部と、
 前記トレースログを解析することにより、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の属性を変数属性として推定するログ解析部と、
 前記変数属性を用いて、前記一連の関数呼び出し処理を再現する再現プログラムを生成するプログラム生成部とを備えた。
 本発明に係る試験装置では、ログ取得部が、アプリケーションプログラムを複数回繰り返し実行し、一連の関数呼び出し処理をトレースしたトレース結果を複数含むトレースログを取得する。ログ解析部は、トレースログを解析することにより、一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の変数属性を推定する。プログラム生成部は、変数属性を用いて、一連の関数呼び出し処理を再現する再現プログラムを生成する。よって、本発明に係る試験装置によれば、アプリケーションプログラムの使用範囲に即した再現プログラムを効率的かつ高精度に生成することができる。
実施の形態1に係る試験装置のハードウェア構成図。 実施の形態1に係る試験装置の機能構成図。 実施の形態1の比較例のソフトウェア試験処理のフロー図。 実施の形態1に係るログ取得部の動作を示すフロー図。 実施の形態1に係るトレースログの例。 実施の形態1に係るログ解析部の動作を示すフロー図。 実施の形態1に係る変数属性タグの例。 実施の形態1に係る関数呼び出しテーブルの例。 実施の形態1に係るプログラム生成部の動作を示すフロー図。 実施の形態1に係る結果判定部の動作を示すフロー図。 実施の形態1に係る関数呼び出し試験表の例。 実施の形態2に係る関数呼び出しテーブルの例。 実施の形態2に係るログ解析部の動作を示すフロー図。 実施の形態2に係るプログラム生成部の動作を示すフロー図。 実施の形態2に係る結果判定部の動作を示すフロー図。 実施の形態3に係るログ取得部の動作を示すフロー図。 実施の形態3に係るログ解析部の動作を示すフロー図。 実施の形態4に係るログ取得部の動作を示すフロー図。
 以下、本発明の実施の形態について、図を用いて説明する。なお、各図中、同一または相当する部分には、同一符号を付している。実施の形態の説明において、同一または相当する部分については、説明を適宜省略または簡略化する。
 実施の形態1.
***構成の説明***
 図1は、本実施の形態に係る試験装置100のハードウェア構成を示す図である。
 図2は、本実施の形態に係る試験装置100の機能構成を示す図である。
 試験装置100は、コンピュータである。試験装置100は、プロセッサ910を備えるとともに、メモリ921、補助記憶装置922、入出力インタフェース930、および通信装置950といった他のハードウェアを備える。
 プロセッサ910は、信号線940を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
 試験装置100は、機能要素として、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206を備える。
 ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能は、ソフトウェアにより実現される。
 プロセッサ910は、試験プログラムを実行する装置である。試験プログラムは、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能を実現するプログラムである。
 プロセッサ910は、演算処理を行うIC(Integrated Circuit)である。プロセッサ910の具体例は、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)である。
 メモリ921は、データを一時的に記憶する記憶装置である。メモリ921の具体例は、SRAM(Static Random Access Memory)、あるいはDRAM(Dynamic Random Access Memory)である。
 補助記憶装置922は、データを保管する記憶装置である。補助記憶装置922の具体例は、HDDである。また、補助記憶装置922は、SD(登録商標)メモリカード、CF、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVDといった可搬記録媒体であってもよい。なお、HDDは、Hard Disk Driveの略語である。SD(登録商標)は、Secure Digitalの略語である。CFは、CompactFlash(登録商標)の略語である。DVDは、Digital Versatile Diskの略語である。
 入出力インタフェース930は、マウス、キーボード、あるいはタッチパネルといった入力装置と接続されるポートを入力インタフェースとして備える。入力インタフェースは、具体的には、USB(Universal Serial Bus)端子である。なお、入力インタフェースは、LAN(Local Area Network)と接続されるポートであってもよい。
 また、入出力インタフェース930は、ディスプレイといった出力機器のケーブルが接続されるポートを出力インタフェースとして備える。出力インタフェースは、具体的には、USB端子またはHDMI(登録商標)(High Definition Multimedia Interface)端子である。ディスプレイは、具体的には、LCD(Liquid Crystal Display)である。
 通信装置950は、ネットワークを介して他の装置と通信する。通信装置950は、レシーバとトランスミッタを有する。通信装置950は、無線で、LAN、インターネット、あるいは電話回線といった通信網に接続している。通信装置950は、具体的には、通信チップまたはNIC(Network Interface Card)である。
 試験プログラムは、プロセッサ910に読み込まれ、プロセッサ910によって実行される。メモリ921には、試験プログラムだけでなく、OS(Operating System)も記憶されている。プロセッサ910は、OSを実行しながら、試験プログラムを実行する。試験プログラムおよびOSは、補助記憶装置922に記憶されていてもよい。補助記憶装置922に記憶されている試験プログラムおよびOSは、メモリ921にロードされ、プロセッサ910によって実行される。なお、試験プログラムの一部または全部がOSに組み込まれていてもよい。
 試験装置100は、プロセッサ910を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、試験プログラムの実行を分担する。それぞれのプロセッサは、プロセッサ910と同じように、試験プログラムを実行する装置である。
 試験プログラムにより利用、処理または出力されるデータ、情報、信号値および変数値は、メモリ921、補助記憶装置922、または、プロセッサ910内のレジスタあるいはキャッシュメモリに記憶される。
 ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の各部の「部」を「処理」、「手順」あるいは「工程」に読み替えてもよい。
 試験プログラムは、ログ取得処理、ログ解析処理、プログラム生成処理、コンパイル処理、プログラム実行処理、および結果判定処理をコンピュータに実行させる。また、試験方法は、試験装置100が試験プログラムを実行することにより行われる方法である。
 試験プログラムは、コンピュータ読取可能な記憶媒体に格納されて提供されてもよい。また、試験プログラムは、プログラムプロダクトとして提供されてもよい。
***機能概要の説明***
 試験装置100は、ソフトウェアプラットフォーム106を利用して一連の関数呼び出し処理を行うアプリケーションプログラム111を実行し、ソフトウェアプラットフォーム106の試験を行う。
 図2に示すように、試験装置100において、オペレーティングシステム108が動作しており、その上で動的ライブラリ109が動作している。ソフトウェアプラットフォーム106は、具体的には、動的ライブラリ109である。動的ライブラリは複数であってもよい。また、その上でアプリケーションプログラム111が動作している。アプリケーションプログラム111は、表示処理、音声処理、データベース処理、WEBアプリケーション処理、あるいは計算処理といった情報処理である。トレースプログラム112はアプリケーションプログラム111が動的ライブラリ109の関数呼び出しをフックし、トレースログ113に出力するプログラムである。トレースログ113は、メモリ921あるいは補助記憶装置922に出力される。
 ログ取得部201は、アプリケーションプログラム111を実行し、また、トレースプログラム112を実行する。そして、ログ取得部201は、トレースプログラム112を用いて、アプリケーションプログラム111における動的ライブラリ109の関数呼び出しをトレースログ113に出力させる。
 ログ解析部202は、トレースログ113を統計的に解析し、再実行できるようにトレースログ113の値を補正し、関数呼び出しテーブル301に出力する。「トレースログ113の値を補正する」とは、後述するように、関数の引数および返り値に変数属性タグをタグ付けする処理のことを指す。
 関数呼び出しテーブル301において、関数の引数には、例えば、乱数、時刻、システム変数、あるいはアドレスといった変数種別のタグが記憶される。また、返り値には、例えば、他関数において流用されている流用箇所が記憶される。
 プログラム生成部203は、関数呼び出しテーブル301を読み込み、再現プログラムソースコード302を生成する。
 コンパイル部204は、再現プログラムソースコード302をコンパイルし、実行可能な再現プログラム303を生成する。
 プログラム実行部205は、再現プログラム303を実行する。再現プログラム303は、動的ライブラリ109を呼び出し、その再現結果26を出力する。出力先は、メモリ921あるいは補助記憶装置922である。
 結果判定部206は、プログラム実行部205に対して再現プログラム303の実行を要求し、再現プログラム303の再現結果26と関数呼び出しテーブル301を比較し、関数呼び出し試験表304に出力する。
 関数呼び出し試験表304には、再現プログラム303において期待される出力の期待値と、判定結果とが記憶される。期待値は、関数呼び出しテーブル301の変数種別あるいは流用箇所に基づいて予め定められる。開発者110は、関数呼び出し試験表304を確認し、動的ライブラリ109が期待される動作を行ったかを判断する。
***動作の説明***
 まず、図3を用いて、本実施の形態と比較するための比較例のソフトウェア試験処理の流れを説明する。
 ステップS101において、再現試験プログラムが開発される。
 ステップS102において、再現試験プログラムが実行される。
 ステップS103において、実行の成否が判定され、実行が成功すれば、処理は終了する。
 実行が失敗すると、ステップS104において、開発者により、ログ解析あるいは再現性試験が行われ、失敗箇所が特定される。また、開発者により、修正方法が検討される。
 ステップS105において、プラットフォームが改修される。
 次に、図4から図11を用いて、本実施の形態に係る試験処理S100の動作について説明する。
<ログ取得処理>
 図4は、本実施の形態に係るログ取得部201の動作を示すフロー図である。
 ログ取得処理において、ログ取得部201は、アプリケーションプログラム111を複数回繰り返し実行し、トレース結果13を複数含むトレースログ113を取得する。トレース結果13は、一連の関数呼び出し処理333をトレースした結果である。トレース結果13は、一連の関数呼び出し処理333により呼び出された関数の引数と返り値とを含む。
 ステップS201において、ログ取得部201は、ログ取得回数iを初期化する。
 ステップS202において、ログ取得部201は、実行環境を初期化する。実行環境の初期化とは、設定ファイルあるいは共有メモリの削除といった前処理である。
 ステップS203において、ログ取得部201は、トレースログ113を取得する対象となるアプリケーションプログラム111を実行する。
 ステップS204において、ログ取得部201は、トレースプログラム112を実行し、ステップS203で実行したアプリケーションプログラム111を指定して、図5のトレースログ113を出力する。
 図5は、本実施の形態に係るトレースログ113の一例を示す図である。
 ログ取得部201は、トレースプログラム112により、アプリケーションプログラム111の動的ライブラリの呼び出しをフックし、実行開始時刻、関数名、引数、および返り値を出力する。ログ取得部201は、引数として、引数1から引数maxまで取得する。取得した数以上の引数は、“-”で表す。引数maxは、予め決まっている。また、システムコールの呼び出しといった、前述のもの以外のデータがトレースログ113に付随しても構わないが、動的ライブラリの呼び出しと区別できるフォーマットである必要がある。実行開始時刻は、互いに比較演算でき、絶対時刻が分かるものであれば、どの形式でも構わない。例えば、実行開始時刻は、UNIX(登録商標) timeといった形式でよい。引数および返り値の各々は、型名と値である。型名は、例えば、アドレス、文字列、整数、小数、NULL、あるいはvoidである。また、引数および返り値には、アプリケーション実行に関係するメモリマップを参照できるものを含めてもよい。メモリマップを参照できるものは、例えば、構造体のポインタであれば、構造体のメンバ変数名とその値、配列であれば、全配列データといったデータである。
 ステップS205において、ログ取得部201は、ログ取得回数iを1増加する。
 ステップS206において、ログ取得部201は、ログ取得回数iがm以上であれば終了し、iがm未満であればステップS202に戻る。mは予め決めておく。mは1以上であれば、どの値でも構わない。
<ログ解析処理>
 図6は、本実施の形態に係るログ解析部202の動作を示すフロー図である。
 ログ解析部202は、トレースログ113を解析することにより、一連の関数呼び出し処理333により呼び出される関数の引数と返り値との各々の属性を変数属性21として推定する。ログ解析部202は、一連の関数呼び出し処理333により呼び出される関数の引数と返り値との各々に、変数属性21を表す変数属性タグ208をタグ付けした関数呼び出しテーブル301を生成する。
 ステップS301において、ログ解析部202は、メモリ921あるいは補助記憶装置922から、トレースログ113を取得する。
 ステップS302において、ログ解析部202は、トレースログ113から関数シーケンスを一連の関数呼び出し処理333として作成する。具体的に図5のトレースログ113であれば、ログ解析部202は、No1からNoxまでの関数シーケンス(funcA,funcB,funcA,・・・,funcF)を作成する。
 ステップS303において、ログ解析部202は、トレースログ113を統計的に解析することにより、変数属性21を推定する。ログ解析部202は、トレースログ113を統計的に解析することにより、変数属性21として、一連の関数呼び出し処理333により呼び出される関数の引数と返り値との各々の種別を表す変数種別211を推定する。また、ログ解析部202は、トレースログ113を統計的に解析することにより、変数属性21として、一連の関数呼び出し処理333により呼び出される関数の引数と返り値との各々が流用される流用箇所を推定する。
 具体的には、ログ解析部202は、m個のトレース結果13の関数シーケンスと、それに対応する引数および返り値を、統計的に解析する。ログ解析部202は、同一シーケンスの関数内の、変数がm個全てで異なる場合は乱数であると推定する。また、ログ解析部202は、前後のトレースログの同一関数での実行時刻の差と類似した変数は時刻であると推定する。このように、ログ解析部202は、m個のトレース結果13から同一関数の変数の変化といった情報から変数属性21を推定し、変数属性21をそれぞれの引数と返り値にタグ付する。
 図7は、本実施の形態に係る変数属性タグ208の例である。
 変数属性タグ208は、変数および返り値のタグである。変数属性タグ208は、予めメモリ921あるいは補助記憶装置922に記憶されている。
 ログ解析部202は、m個の通信シーケンスを統計的に解析し、それぞれの引数および返り値の変数属性が図7のうちのいずれであるかを推定し、それぞれの引数および返り値にタグ付する。変数属性のTypeがシステムとなるものは、システムライブラリの関数名と引数の型を予め保存しておき、関数シーケンスの関数名と一致すれば、その関数の引数と判別する。例えば、関数名がgetpidであれば返り値がPIDであると判別する。システムライブラリは、オペレーティングシステムのシステムコールのラッパー関数であればどのライブラリでも構わない。例えば、システムライブラリは、標準CライブラリのglibcあるいはNewlibといった関数である。
 図8は、本実施の形態に係る関数呼び出しテーブル301の例である。
 関数呼び出しテーブル301は、トレースログ113における全ての引数および返り値に、統計的に解析した変数属性21をタグ付したテーブルである。
 アドレスが構造体の場合は、ログ解析部202は、図8の変数属性T301のように、メンバ変数とその値をタグ付する。メンバ1とメンバ2は変数属性T302のstructAの構造体のメンバを意味している。メンバ1とメンバ2には、ログ取得部201で取得されたデータがそのままタグ付されている。
 変数種別T401は、Typeが「固定値」の例である。変数種別T501は、Typeが「システム」の例である。
 ステップS304において、ログ解析部202は、引数および返り値が、以降の関数でも流用されているか否かを判定する。流用されていた場合は、ログ解析部202は、タグ付に追記する。例えば、図8に示すように、関数funcBの返り値0xbbbbが次の関数funcAの引数の値と一致し、それが全てのトレースログでも見られる場合には、関数funcBの返り値0xbbbbが流用されていると判定される。
 ステップS305において、ログ解析部202は、ステップS304までの解析結果を関数呼び出しテーブル301に出力する。
<プログラム生成処理>
 図9は、本実施の形態に係るプログラム生成部203の動作を示すフロー図である。
 プログラム生成処理において、プログラム生成部203は、変数属性21を用いて、一連の関数呼び出し処理333を再現する再現プログラム303を生成する。プログラム生成部203は、関数呼び出しテーブル301を用いて、再現プログラム303を生成する。
 ステップS311において、プログラム生成部203は、関数呼び出しテーブル301を取得する。
 ステップS312において、プログラム生成部203は、アプリケーションプログラム111とリンクされた動的ライブラリ情報を読み込む。例えば、アプリケーションプログラム111には動的ライブラリの関数名が含まれており、アプリケーションプログラム111から呼び出される関数の情報が動的ライブラリ情報としてメモリに記憶されている。
 動的ライブラリ情報は、変数名と型を特定できるものであればいかなる情報でも構わない。動的ライブラリ情報は、例えば、ヘッダファイルといった情報でもよい。ヘッダファイルとは、動的ライブラリをリンクするために必要なヘッダファイルを指す。例えばC言語でlibcライブラリを使う場合ソースコードの先頭に#include<stdio.h>を付けるが、stdio.hがそのヘッダファイルとなる。そのヘッダファイルのみで変数名と型(具体的にはバイト数)が特定できない場合は、ヘッダファイルが参照しているファイルを検索するといった方法で特定する。
 ステップS313において、プログラム生成部203は、ステップS312で読み込んだ動的ライブラリ情報を用いて、引数と返り値を確保するデータ構造および変数を定義する。
 ステップS314において、プログラム生成部203は、ステップS312で定義した変数を用いて、関数呼び出し、また、それぞれの関数呼び出しのログを出力するように再現プログラムソースコード302を生成する。ログには、関数呼び出し時刻、関数名、引数の型、および返り値の値を出力する。ログは、関数の呼び出し順序を一意に特定できるものであれば、どのような形式でも構わない。
 コンパイル部204は、再現プログラムソースコード302をコンパイルし、再現プログラム303を生成する。また、別環境で実行させる目的で、クロスコンパイルクロスコンパイルし、以降の実行を試験装置100とは別の装置で行っても構わない。
 プログラム実行部205は、結果判定部206から命令を受けて、再現プログラム303を実行させる。
 なお、ここでは、プログラム生成部203が再現プログラムソースコード302を作成し、コンパイル部204が再現プログラムソースコード302から再現プログラム303を作成している。しかし、プログラム生成部203が再現プログラムソースコード302から再現プログラム303を作成する機能を有していてもよい。
<結果判定処理>
 図10は、本実施の形態に係る結果判定部206の動作を示すフロー図である。結果判定部206は、再現プログラム303の出力結果を判定する再現プログラム出力結果判定部ともいう。
 結果判定部206は、再現プログラム303を実行し、一連の関数呼び出し処理333により呼び出された関数の引数と返り値との各々を再現結果26として取得し、再現結果26の属性が期待値を満たしているかを判定する。
 ステップS401において、結果判定部206は、関数呼び出しテーブル301を取得する。
 ステップS402において、結果判定部206は、プログラム実行部205に再現プログラム303の実行を要求する。プログラム実行部205は、再現プログラム303を実行する。
 ステップS403において、結果判定部206は、再現プログラム303の出力を再現結果26として取得する。
 ステップS404において、結果判定部206は、再現プログラム303の再現結果26と関数呼び出しテーブル301の同等の関数における出力結果とを比較し、関数呼び出し試験表304に出力する。
 図11は、本実施の形態に係る関数呼び出し試験表304の例である。
 関数呼び出し試験表304には、トレースログ113の項目に、返り値の期待値と結果の項目が加えられている。返り値の期待値は、関数呼び出しテーブル301にタグ付された変数属性21に基づいて求められる。具体的には、試験装置100が、ステップS303で返り値に付与したタグを基に返り値の期待値を自動的に設定する。例えば、変数種別がPIDであれば、返り値の期待値には、1以上、システムのPIDのMAX値以下の値が設定される。また、変数種別がアドレスであれば、返り値の期待値には、システムの有効なアドレス範囲内といった値が設定される。結果判定部206は、返り値と期待値を比較し、返り値が期待値の範囲であれば結果に範囲内と設定する。結果判定部206は、返り値が期待値の範囲外であれば結果に範囲外と設定する。結果判定部206は、返り値の種別がその他であるといった特定できない場合は、結果に判断不可を設定する。また、結果判定部206は、引数についても、タグ付された変数属性を基に結果を判定する。
***他の構成***
 本実施の形態では、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能がハードウェアで実現されてもよい。
 試験装置100は、プロセッサ910に替えて、電子回路を備える。
 電子回路は、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能を実現する専用の電子回路である。
 電子回路は、具体的には、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA、ASIC、または、FPGAである。GAは、Gate Arrayの略語である。ASICは、Application Specific Integrated Circuitの略語である。FPGAは、Field-Programmable Gate Arrayの略語である。
 ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能は、1つの電子回路で実現されてもよいし、複数の電子回路に分散して実現されてもよい。
 別の変形例として、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の一部の機能が電子回路で実現され、残りの機能がソフトウェアで実現されてもよい。また、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の一部またはすべての機能がファームウェアで実現されてもよい。
 プロセッサと電子回路の各々は、プロセッシングサーキットリとも呼ばれる。つまり、試験装置100において、ログ取得部201、ログ解析部202、プログラム生成部203、コンパイル部204、プログラム実行部205、および結果判定部206の機能は、プロセッシングサーキットリにより実現される。
***本実施の形態の効果の説明***
 以上のように、本実施の形態に係る試験装置100によれば、実行可能な再現プログラムを自動生成することにより、アプリケーションプログラムの使用範囲に即したライブラリの試験が可能となる。よって、本実施の形態に係る試験装置100によれば、ソフトウェアプラットフォームの品質が向上する。
 また、本実施の形態に係る試験装置100によれば、アプリケーションプログラムの使用範囲で複数回実行したトレースログから再現プログラムを作成する。よって、本実施の形態に係る試験装置100によれば、自動的に最適な再現プログラムが生成でき、開発者が試験の結果を見て再現プログラムをメンテナンスするといった作業が不要となる。よって、再現プログラムの保守コストを削減することができる。
 また、本実施の形態に係る試験装置100によれば、アプリケーションプログラムのライブラリ呼び出しのみ再現することから、アプリケーションプログラムのブラックボックステストが実現できる。よって、本実施の形態に係る試験装置100によれば、アプリケーションプログラムの実行に必要な設定ファイルといった環境整備が不要となる。これにより、テスト実行の準備の手間が削減されテスト効率が向上する。
 また、本実施の形態に係る試験装置100によれば、アプリケーションプログラムがライブラリのAPIを呼び出す様子を複数回トレースし、トレースした内容を統計的に解析する。よって、本実施の形態に係る試験装置100によれば、毎実行変わるような処理、変数の種別、あるいは流用されている変数を特定することにより、再実行可能な再現プログラムを自動生成できる。よって、再現プログラムの保守コストを削減でき、アプリケーションプログラムの使用範囲に即した試験を複数回繰り返し実施可能とすることで、プラットフォームの品質を向上させることができる。
 実施の形態2.
 本実施の形態では、実施の形態1と異なる点について説明する。なお、実施の形態1と同様の構成については同一の符号を付し、その説明を省略する。
 実施の形態1の試験装置100は、アプリケーションプログラムのライブラリ呼び出しを複数回トレースしたログから、実行可能な再現プログラムを自動生成していた。本実施の形態の試験装置100は、アプリケーションプログラムの処理フローがトレース毎に異なる場合に、トレースログの関数シーケンスの類似度から処理フローを分類する。そして、試験装置100は、分類された処理フロー毎に再現プログラムを生成する。
***構成の説明***
 本実施の形態では、試験装置100のハードウェア構成および機能構成は、実施の形態1と同様である。ただし、本実施の形態では、再現プログラムソースコード302、再現プログラム303、および関数呼び出し試験表107が複数になる。
 ログ取得部201は、トレースログ113に含まれる複数のトレース結果13を、複数のトレース結果の各々に含まれる関数呼び出しの順序、すなわち処理フローに基づいて類似トレースログ132として分類する。ログ解析部202は、類似トレースログ132毎に、変数属性を推定する。プログラム生成部203は、類似トレースログ132ごとに、再現プログラム303を生成する。
***動作の説明***
 図12は、本実施の形態に係る関数呼び出しテーブル301aの例である。
 関数呼び出しテーブル301aには、図8の関数呼び出しテーブル301の各トレース結果13に、処理フローを分類する処理フローの項目が追加されている。また、1つのトレース結果13は、1,2,・・・,nまでの処理フローのいずれかに分類される。nは1以上m以下の値を取る。
 本実施の形態に係る試験装置100の動作は、基本的に実施の形態1と同様である。異なる点は、以下の通りである。
(1)ログ解析部202が、トレースログ113の複数のトレース結果13を処理フロー毎に分類し、類似トレースログ132から成る関数呼び出しテーブル301aを生成する点。
(2)プログラム生成部203が、関数呼び出しテーブル301aの類似トレースログ132毎に、再現プログラムソースコード302を生成する点。
(3)コンパイル部204が、複数の再現プログラムソースコード302をコンパイルし、複数の再現プログラム303を生成する点。
(4)結果判定部206が、類似トレースログ132毎に生成された再現プログラム303を実行し、関数呼び出し試験表304を類似トレースログ132毎に複数出力する点。
 図13は、本実施の形態に係るログ解析部202の動作を示すフロー図である。
 図13のステップS301、ステップS302、およびステップS305は、実施の形態1の図6と同様である。
 ステップS501において、ログ解析部202は、トレース結果13の関数シーケンスの類似度を算出し、トレース結果13の関数シーケンスをn個に分類する。複数のトレース結果13は、類似トレースログ132に分類される。
 ステップS502において、ログ解析部202は、分類した類似トレースログ132毎に、ステップS303と同様の処理を行う。
 ステップS503において、ログ解析部202は、分類した類似トレースログ132毎に、ステップS304と同様の処理を行う。
 図14は、本実施の形態に係るプログラム生成部203の動作を示すフロー図である。
 図14のステップS311、ステップS312、およびステップS313は、実施の形態1の図9と同様である。
 ステップS601において、プログラム生成部203は、処理フローnを設定する。
 ステップS602において、プログラム生成部203は、処理フローの番号を付与した再現プログラムソースコードiを生成する。
 ステップS603において、プログラム生成部203は、iを次の処理フロー番号に設定する。
 ステップS604において、プログラム生成部203は、処理フロー番号iが処理フローn未満であれば、ステップS313に分岐し、処理フロー番号iが処理フローn以上であれば、処理を終了する。
 図15は、本実施の形態に係る結果判定部206の動作を示すフロー図である。
 図15のステップS401は、実施の形態1の図10と同様である。
 ステップS701において、結果判定部206は、処理フローnを設定する。
 ステップS702において、結果判定部206は、処理フロー番号iに対応した再現プログラムiを実行し呼び出し結果を取得する。
 ステップS703において、結果判定部206は、処理フロー番号iに対応した関数呼び出し試験表iを出力する。
 ステップS704において、結果判定部206は、iを次の処理フロー番号に設定する。
 ステップS705において、結果判定部206は、処理フロー番号iが処理フローn未満であれば、ステップS702に分岐し、処理フロー番号iが処理フローn以上であれば、処理を終了する。
***本実施の形態の効果の説明***
 以上のように、本実施の形態に係る試験装置100によれば、アプリケーションプログラムの異なる処理フロー毎にライブラリのテストを実施できる。よって、複数パターンのライブラリのテストにより、発見しづらいバグおよび脆弱性を効率的に検証でき、ソフトウェアのプラットフォームの品質が向上する。
 実施の形態3.
 本実施の形態では、実施の形態1および2と異なる点について説明する。なお、実施の形態1および2と同様の構成については同一の符号を付し、その説明を省略する。
 実施の形態2の試験装置100は、アプリケーションプログラムのライブラリ呼び出しを複数回トレースしたログから、実行可能な再現プログラムを自動生成していた。しかし、実施の形態2では、アプリケーションプログラムの前回トレースとの時間間隔を定めていなかった。トレースログを統計的に解析するにあたって、絶対時刻を基になんらかの処理が開始するといった時刻に依存した処理が行われる場合がある。本実施の形態では、アプリケーションプログラムの実行開始時刻の定周期性を用いることで、処理フローの分類を効果的に行う。
***構成の説明***
 本実施の形態では、試験装置100のハードウェア構成および機能構成は、実施の形態1と同様である。
 ログ取得部201は、アプリケーションプログラムを実行する間隔を表す実行規定間隔で、アプリケーションプログラム111を複数回繰り返し実行する。
***動作の説明***
 図16は、本実施の形態に係るログ取得部201の動作を示すフロー図である。
 図16のステップS201、ステップS202、ステップS204、ステップS205、およびステップS206は、実施の形態1の図4と同様である。
 ステップS801において、ログ取得部201は、実行規定間隔Tを設定する。実行規定間隔Tは0以上であれば、いかなる値でも構わない。
 ステップS802において、ログ取得部201は、前回実行時刻に現在時刻を設定する。
 ステップS803において、ログ取得部201は、前回実行時刻から実行規定間隔Tを加算した時刻まで待機する。
 ステップS804において、ログ取得部201は、起床した現在時刻を前回実行時刻に保存し、アプリケーションプログラム111を実行する。
 以上により、ログ取得部201は、ステップS801で設定した実行規定間隔Tでの、アプリケーションプログラム111の実行が可能となる。
 図17は、本実施の形態に係るログ解析部202の動作を示すフロー図である。
 図17のステップS301、ステップS302、ステップS502、ステップS503、およびステップS305は、実施の形態2の図13と同様である。
 ステップS511において、ログ解析部202は、実行規定間隔Tを考慮し処理フローを分類する。具体的には、ログ解析部202は、関数シーケンスでは類似しているが、実行規定間隔Tと相違した関数実行時刻であれば、異なる処理フローと判定し、別シーケンスとして解釈するといった処理を行う。
***本実施の形態の効果の説明***
 本実施の形態に係る試験装置100によれば、処理フローの分類精度を向上させることができ、再現プログラムの実行可能性を高めることができる。
 実施の形態4.
 本実施の形態では、実施の形態1から3と異なる点について説明する。なお、実施の形態1から3と同様の構成については同一の符号を付し、その説明を省略する。
 実施の形態1の試験装置は、アプリケーションプログラムのライブラリ呼び出しを複数回トレースしたログから、実行可能な再現プログラムを自動生成していた。アプリケーションプログラムの実行により、プラットフォームの状態が変わる可能性があるため、トレースの環境条件が異なる場合がある。そこで、本実施の形態の試験装置100は、トレース毎にプラットフォームを再起動させることで、環境条件を同一にし、トレースログの解析を容易にする。
***構成の説明***
 本実施の形態では、試験装置100のハードウェア構成および機能構成は、実施の形態1と同様である。
 ログ取得部201は、アプリケーションプログラム111を実行する毎に、ソフトウェアプラットフォームを初期化する。
 図18は、本実施の形態に係るログ取得部201の動作を示すフロー図である。
 図18のステップS202、ステップS203、ステップS204、ステップS205、およびステップS206は、実施の形態1の図4と同様である。
 ステップS901において、ログ取得部201は、再起動回数を初期化する。
 ステップS902において、ログ取得部201は、再起動回数がトレースログ取得回数よりも少なければ、再起動する。ログ取得部201は、再起動をオペレーティングシステム108に指示する。
 再起動回数がトレースログ取得回数以上になったら、ログ取得部201は、終了する。これら実行状態の管理は、再起動によって保持される方法であれば、いかなる方法でもよい。
***本実施の形態の効果の説明***
 本実施の形態に係る試験装置によれば、アプリケーションプログラムの動作環境を同一にすることが可能となり、複数のトレースログの類似性が高まり、解析精度が向上する。
 以上の実施の形態1から4では、試験装置の各部を独立した機能ブロックとして説明した。しかし、試験装置の構成は、上述した実施の形態のような構成でなくてもよい。試験装置の機能ブロックは、上述した実施の形態で説明した機能を実現することができれば、どのような構成でもよい。
 以上の実施の形態1から4のうち、複数の部分を組み合わせて実施しても構わない。あるいは、これらの実施の形態のうち、1つの部分を実施しても構わない。その他、これらの実施の形態を、全体としてあるいは部分的に、どのように組み合わせて実施しても構わない。
 なお、上述した実施の形態は、本質的に好ましい例示であって、本発明の範囲、本発明の適用物の範囲、および本発明の用途の範囲を制限することを意図するものではない。上述した実施の形態は、必要に応じて種々の変更が可能である。
 100 試験装置、13 トレース結果、21 変数属性、26 再現結果、106 ソフトウェアプラットフォーム、108 オペレーティングシステム、109 動的ライブラリ、110 開発者、111 アプリケーションプログラム、112 トレースプログラム、113 トレースログ、132 類似トレースログ、201 ログ取得部、202 ログ解析部、203 プログラム生成部、204 コンパイル部、205 プログラム実行部、206 結果判定部、208 変数属性タグ、301,301a 関数呼び出しテーブル、302 再現プログラムソースコード、303 再現プログラム、304 関数呼び出し試験表、333 一連の関数呼び出し処理、910 プロセッサ、921 メモリ、922 補助記憶装置、930 入出力インタフェース、940 信号線、950 通信装置。

Claims (11)

  1.  ソフトウェアプラットフォームを利用して一連の関数呼び出し処理を行うアプリケーションプログラムを実行し、前記ソフトウェアプラットフォームの試験を行う試験装置において、
     前記アプリケーションプログラムを複数回繰り返し実行し、前記一連の関数呼び出し処理をトレースしたトレース結果であって前記一連の関数呼び出し処理により呼び出された関数の引数と返り値とを含むトレース結果を複数含むトレースログを取得するログ取得部と、
     前記トレースログを解析することにより、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の属性を変数属性として推定するログ解析部と、
     前記変数属性を用いて、前記一連の関数呼び出し処理を再現する再現プログラムを生成するプログラム生成部と
    を備えた試験装置。
  2.  前記試験装置は、
     前記再現プログラムを実行し、前記一連の関数呼び出し処理により呼び出された関数の引数と返り値との各々を再現結果として取得し、前記再現結果の属性が期待値を満たしているかを判定する結果判定部を備えた請求項1に記載の試験装置。
  3.  前記ログ解析部は、
     前記トレースログを統計的に解析することにより、前記変数属性を推定する請求項1または請求項2に記載の試験装置。
  4.  前記ログ解析部は、
     前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々に、前記変数属性を表す変数属性タグをタグ付けした関数呼び出しテーブルを生成し、
     前記プログラム生成部は、
     前記関数呼び出しテーブルを用いて、前記再現プログラムを生成する請求項1から請求項3のいずれか1項に記載の試験装置。
  5.  前記ログ解析部は、
     前記トレースログを統計的に解析することにより、前記変数属性として、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の種別を表す変数種別を推定する請求項1から請求項4のいずれか1項に記載の試験装置。
  6.  前記ログ解析部は、
     前記トレースログを統計的に解析することにより、前記変数属性として、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々が流用される流用箇所を推定する請求項1から請求項5のいずれか1項に記載の試験装置。
  7.  前記ログ取得部は、
     前記トレースログに含まれる複数のトレース結果を、前記複数のトレース結果の各々に含まれる関数呼び出しの順序に基づいて類似トレースログとして分類し、
     前記ログ解析部は、
     前記類似トレースログごとに、前記変数属性を推定し、
     前記プログラム生成部は、
     前記類似トレースログごとに、前記再現プログラムを生成する請求項1から請求項6のいずれか1項に記載の試験装置。
  8.  前記ログ取得部は、
     前記アプリケーションプログラムを実行する間隔を表す実行規定間隔で、前記アプリケーションプログラムを複数回繰り返し実行する請求項1から請求項7のいずれか1項に記載の試験装置。
  9.  前記ログ取得部は、
     前記アプリケーションプログラムを実行する毎に、前記ソフトウェアプラットフォームを初期化する請求項1から請求項8のいずれか1項に記載の試験装置。
  10.  ソフトウェアプラットフォームを利用して一連の関数呼び出し処理を行うアプリケーションプログラムを実行し、前記ソフトウェアプラットフォームの試験を行う試験装置の試験方法において、
     ログ取得部が、前記アプリケーションプログラムを複数回繰り返し実行し、前記一連の関数呼び出し処理をトレースしたトレース結果であって前記一連の関数呼び出し処理により呼び出された関数の引数と返り値とを含むトレース結果を複数含むトレースログを取得し、
     ログ解析部が、前記トレースログを解析することにより、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の属性を変数属性として推定し、
     プログラム生成部が、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との前記変数属性を用いて、前記一連の関数呼び出し処理を再現する再現プログラムを生成する試験方法。
  11.  ソフトウェアプラットフォームを利用して一連の関数呼び出し処理を行うアプリケーションプログラムを実行し、前記ソフトウェアプラットフォームの試験を行う試験装置の試験プログラムにおいて、
     前記アプリケーションプログラムを複数回繰り返し実行し、前記一連の関数呼び出し処理をトレースしたトレース結果であって前記一連の関数呼び出し処理により呼び出された関数の引数と返り値とを含むトレース結果を複数含むトレースログを取得するログ取得処理と、
     前記トレースログを解析することにより、前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との各々の属性を変数属性として推定するログ解析処理と、
     前記一連の関数呼び出し処理により呼び出される関数の引数と返り値との前記変数属性を用いて、前記一連の関数呼び出し処理を再現する再現プログラムを生成するプログラム生成処理と
    をコンピュータである試験装置に実行させる試験プログラム。
PCT/JP2019/002721 2019-01-28 2019-01-28 試験装置、試験方法および試験プログラム WO2020157795A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2019/002721 WO2020157795A1 (ja) 2019-01-28 2019-01-28 試験装置、試験方法および試験プログラム
JP2020568832A JP6878707B2 (ja) 2019-01-28 2019-01-28 試験装置、試験方法および試験プログラム
US17/337,717 US20210286715A1 (en) 2019-01-28 2021-06-03 Test device, test method, and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/002721 WO2020157795A1 (ja) 2019-01-28 2019-01-28 試験装置、試験方法および試験プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/337,717 Continuation US20210286715A1 (en) 2019-01-28 2021-06-03 Test device, test method, and computer readable medium

Publications (1)

Publication Number Publication Date
WO2020157795A1 true WO2020157795A1 (ja) 2020-08-06

Family

ID=71842420

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/002721 WO2020157795A1 (ja) 2019-01-28 2019-01-28 試験装置、試験方法および試験プログラム

Country Status (3)

Country Link
US (1) US20210286715A1 (ja)
JP (1) JP6878707B2 (ja)
WO (1) WO2020157795A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722020B (zh) * 2020-05-26 2024-06-11 腾讯科技(深圳)有限公司 接口调用方法、装置和计算机可读存储介质
KR102614650B1 (ko) * 2022-11-28 2023-12-19 쿠팡 주식회사 전자 장치 및 그의 api 관리 방법

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009217664A (ja) * 2008-03-12 2009-09-24 Hitachi Software Eng Co Ltd 自動テスト実行システム
JP2010226617A (ja) * 2009-03-25 2010-10-07 Seiko Epson Corp テストプログラム生成方法、プログラム
JP2016177659A (ja) * 2015-03-20 2016-10-06 ヤフー株式会社 検証プログラム、検証装置及び検証方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762781B2 (en) * 2010-11-16 2014-06-24 International Business Machines Corporation Method and apparatus useful in manufacturing test case operations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009217664A (ja) * 2008-03-12 2009-09-24 Hitachi Software Eng Co Ltd 自動テスト実行システム
JP2010226617A (ja) * 2009-03-25 2010-10-07 Seiko Epson Corp テストプログラム生成方法、プログラム
JP2016177659A (ja) * 2015-03-20 2016-10-06 ヤフー株式会社 検証プログラム、検証装置及び検証方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FUJIWARA TAKAYUKI: "Expanding automated testing for large embedded system", TRANSACTION OF THE INFORMATION PROCESSING SOCIETY OF JAPAN, CONSUMER DEVICES AND SYSTEMS, vol. 4, no. 4, 10 December 2014 (2014-12-10), pages 1 - 10, ISSN: 2186-5728 *

Also Published As

Publication number Publication date
US20210286715A1 (en) 2021-09-16
JP6878707B2 (ja) 2021-06-02
JPWO2020157795A1 (ja) 2021-04-30

Similar Documents

Publication Publication Date Title
JP4148527B2 (ja) 機能テスト・スクリプト生成装置
US9152731B2 (en) Detecting a broken point in a web application automatic test case
US11835987B2 (en) Methods and apparatus for finding long methods in code
US20120167060A1 (en) System and Method for Software Immunization Based on Static and Dynamic Analysis
US8997065B2 (en) Automatic modularization of source code
US11675575B2 (en) Checking source code validity at time of code update
US11132282B2 (en) Managing cloud-based hardware accelerators
US20180232297A1 (en) Selecting breakpoints for cross-layer debugging
US20130179867A1 (en) Program Code Analysis System
US8898649B2 (en) Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program
US20200089477A1 (en) Program optimization by converting code portions to directly reference internal data representations
US20190205239A1 (en) Code update based on detection of change in runtime code during debugging
JP6878707B2 (ja) 試験装置、試験方法および試験プログラム
US20220244931A1 (en) Image file obtaining method and apparatus
US8762781B2 (en) Method and apparatus useful in manufacturing test case operations
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
JPWO2019077738A1 (ja) データ検証装置、データ検証方法及びデータ検証プログラム
US20150121051A1 (en) Kernel functionality checker
US11947966B2 (en) Identifying computer instructions enclosed by macros and conflicting macros at build time
US11740895B2 (en) Generation of software program repair explanations
WO2023145165A1 (ja) プログラム検査装置、及びプログラム検査方法
US20210365294A1 (en) Reducing the memory load time for logic simulator by leveraging architecture simulator
JP6851210B2 (ja) 分析支援装置、分析支援方法および分析支援プログラム
CN117616387A (zh) 增量编译处理方法、装置、电子设备及存储介质
JPH11282722A (ja) プログラム検証方法

Legal Events

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

Ref document number: 19912523

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020568832

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19912523

Country of ref document: EP

Kind code of ref document: A1