[go: up one dir, main page]

WO2010134123A1 - Test support device and test support method - Google Patents

Test support device and test support method Download PDF

Info

Publication number
WO2010134123A1
WO2010134123A1 PCT/JP2009/002189 JP2009002189W WO2010134123A1 WO 2010134123 A1 WO2010134123 A1 WO 2010134123A1 JP 2009002189 W JP2009002189 W JP 2009002189W WO 2010134123 A1 WO2010134123 A1 WO 2010134123A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
test
logging
syntax tree
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2009/002189
Other languages
French (fr)
Japanese (ja)
Inventor
久田雅之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NST Inc
Original Assignee
NST Inc
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 NST Inc filed Critical NST Inc
Priority to JP2009543267A priority Critical patent/JPWO2010134123A1/en
Priority to PCT/JP2009/002189 priority patent/WO2010134123A1/en
Priority to JP2010112475A priority patent/JP2010267266A/en
Publication of WO2010134123A1 publication Critical patent/WO2010134123A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software

Definitions

  • the present invention relates to a data processing technique, and more particularly to a technique for testing a computer program.
  • a penetration test is known as a test for detecting security vulnerabilities in computer programs.
  • data indicating a known attack pattern is input to a computer program to be tested, and output data from the computer program is verified.
  • the penetration test is a black box test that focuses on output data from a computer program without considering the internal structure of the computer program. Therefore, although it can be detected that there is a security vulnerability in the computer program to be tested, since the internal structure is a black box, it may take time to solve the problem existing in the computer program.
  • the present invention has been completed based on the above-mentioned problem recognition of the present inventor, and its main purpose is to provide a technique for supporting a test for a computer program.
  • a test support apparatus includes a program acquisition unit that acquires a test target program described in a predetermined programming language as an original program, and a grammar rule of the programming language.
  • a syntax tree generation unit that generates a syntax tree having each element of program code described in the original program as a node, and a control instruction node that controls the execution flow of the original program in the syntax tree, the control instruction
  • a syntax tree altering unit that associates and sets a node of a logging instruction that outputs a message indicating that the execution flow is controlled, and execution when predetermined test data is input to the original program with reference to the syntax tree
  • This is a program for checking the flow, and the logging command is set in association with the control command. It includes a program output unit that outputs the test program, the.
  • This device is a program for enabling confirmation of an execution flow when predetermined test data is input to an original program that is a program to be tested, and is associated with a control instruction that controls the execution flow of the original program.
  • a program acquisition unit that acquires a test program in which a logging instruction that outputs a message indicating that the execution flow is controlled by the control instruction is set, and the test data is input to the test program.
  • the test execution unit that outputs a message with the logging command executed according to the command and the message output from the test program, identify the logging command executed according to the test data, and set it in the test program.
  • Test the ratio of executed logging instructions to the original logging instructions against the original program Includes a coverage situation identifying unit for calculating a coverage percentage, a coverage situation display unit for displaying the calculated coverage ratio, the.
  • Still another aspect of the present invention is a test support method.
  • This method includes a step of acquiring a test target program described in a predetermined programming language as an original program, and a syntax tree having each element of the program code described in the original program as a node according to a grammatical rule of the programming language.
  • the node of the control instruction that controls the execution flow of the original program is associated with the node of the logging instruction that outputs a message indicating that the execution flow is controlled by the control instruction.
  • This is a program for checking the execution flow when predetermined test data is input to the original program by referring to the syntax tree and the syntax tree, and the logging instruction is set in association with the control instruction. Outputting a test program to be executed on a computer. That.
  • a test for a computer program can be supported.
  • FIG. 5 It is a block diagram which shows the function structure of the test assistance apparatus which is embodiment of this invention. It is a figure which shows the structure of the definition information of a control command node. It is a figure which shows the structure of logging command list information. It is a figure which shows the structure of logging command list information. It is a flowchart which shows operation
  • FIG. 7 is a diagram illustrating a modified syntax tree obtained by modifying the original syntax tree of FIG.
  • FIG. 7 is a diagram illustrating a modified syntax tree obtained by modifying the original syntax tree of FIG.
  • This embodiment proposes a test support apparatus that visualizes an execution flow of a program code in a penetration test for an original program (hereinafter also referred to as an “original program” as appropriate) to be a penetration test target.
  • the test support apparatus is configured to output a message for notifying the user of the execution flow in accordance with the execution of the control instruction for controlling the execution flow of the original program among the instructions described in the program code in the original program. Modify the original program.
  • This message is hereinafter referred to as an “execution flow message”.
  • the test support apparatus generates an abstract syntax tree having each element of the program code described in the original program as a node.
  • a node indicating a control instruction hereinafter also referred to as a “control instruction node” as appropriate
  • a node indicating a logging instruction that outputs an execution flow message that can specify the control instruction hereinafter referred to as “control instruction node”.
  • control instruction node a node indicating a logging instruction that outputs an execution flow message that can specify the control instruction
  • logging command node As appropriate.
  • the test support apparatus generates a program in which the original program is modified (hereinafter also referred to as “test program” as appropriate) from the abstract syntax tree to which the logging command node is added.
  • test program a logging command is associated with a control command.
  • the test support apparatus executes a penetration test on the generated test program. And the execution flow message which can specify the control command which controlled the execution flow is output by the logging command performed in this penetration test. According to the test support apparatus of the present embodiment, the execution flow at the time of execution of the penetration test for the original program is visualized, and it becomes easy to identify a problem location existing in the original program, and can support a quick solution of the problem.
  • FIG. 1 is a block diagram showing a functional configuration of a test support apparatus 100 according to an embodiment of the present invention.
  • the test support apparatus 100 includes a storage unit 10, a UI unit 30, and a data processing unit 40.
  • the storage unit 10 is a storage area for holding various data.
  • the UI unit 30 is responsible for user interface processing for the user, such as a program developer or a tester.
  • the data processing unit 40 executes various types of data processing based on data held in the storage unit 10 and data acquired by the UI unit 30.
  • the data processing unit 40 also serves as an interface between the storage unit 10 and the UI unit 30.
  • each block shown in the block diagram of the present specification can be realized in terms of hardware by an element such as a CPU of a computer or a mechanical device, and in terms of software, it can be realized by a computer program or the like.
  • the functional block realized by those cooperation is drawn. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software.
  • the memory or the auxiliary storage device may execute the processing of the storage unit 10.
  • the CPU reads a program module in which the processing contents of the UI unit 30 and the data processing unit 40 are mounted into the memory, and executes various processes of the UI unit 30 and the data processing unit 40 according to the respective program modules. Also good.
  • the storage unit 10 includes an original program holding unit 12, a node definition holding unit 14, a logging command holding unit 16, a test program holding unit 18, an input data holding unit 20, and an output data holding unit 22.
  • the original program holding unit 12 holds the source code of the original program.
  • There is no limitation on the programming language for describing the original program and for example, PHP / JAVA (registered trademark) may be used.
  • the node definition holding unit 14 holds the definition information of the control instruction node. Specifically, for abstract structure trees generated from original programs written in different programming languages such as PHP and JAVA, the definition information of control instruction nodes that can exist in each abstract syntax tree is held. . A specific example of this definition information will be described later with reference to FIG.
  • the logging command holding unit 16 holds attribute information of each logging command as logging command list information for a plurality of logging commands set in association with each of the plurality of control commands in the test program. A specific example of the logging command list information will be described later with reference to FIG.
  • the test program holding unit 18 holds a test program in which the original program is modified.
  • the input data holding unit 20 holds test data for executing a penetration test on the original program.
  • This test data is typically data in which a known attack pattern for confirming the presence or absence of a program vulnerability is set.
  • it may be test data including a program code written in a script language for verifying the presence or absence of vulnerability to cross-site scripting. Further, it may be test data including a character string for verifying whether or not there is a vulnerability to SQL (Structured Query) Language injection.
  • the output data holding unit 22 holds output data output from the test program in the penetration test.
  • the UI unit 30 includes an instruction receiving unit 32, an execution flow display unit 34, and an coverage status display unit 36.
  • the instruction receiving unit 32 receives various instructions input by the user via various input devices.
  • the execution flow display unit 34 displays output data from the test program in the penetration test on the display.
  • the coverage status display unit 36 displays the ratio (hereinafter referred to as “coverage rate” as appropriate) of the execution of the program code of the original program in the penetration test in the entire program code of the original program.
  • the coverage status display unit 36 displays a list of logging commands set in the test program. At that time, logging commands that have not been executed in the penetration test are displayed on the display in a manner that is easier for the user to see than the executed logging commands. For example, an unexecuted logging command may be displayed in a character size larger than an executed logging command, a display color that is more easily visible, or the like.
  • the data processing unit 40 includes a modification unit 50 that modifies the original program into a test program, and a test unit 60 that performs a penetration test on the test program.
  • the modification unit 50 includes an original program acquisition unit 52, a syntax tree generation unit 54, a syntax tree modification unit 56, and a test program output unit 58.
  • the test unit 60 includes a test program acquisition unit 62, a test execution unit 64, and an coverage status specifying unit 66.
  • the original program acquisition unit 52 reads the original program data from the original program holding unit 12 into the memory.
  • the syntax tree generation unit 54 performs lexical analysis and syntax analysis on the program code described in the original program by a predetermined method according to the grammar rules of the programming language being used. Then, data of an abstract syntax tree (hereinafter referred to as “original syntax tree” as appropriate) based on the original program is generated in the memory.
  • the syntax tree generation unit 54 may create an original syntax tree by a known method such as an LR syntax analysis method, or may create an original syntax tree by calling a known parsing function. As an example of the latter, by passing the original program data described in JAVA to the library function of JDT (Java Development Tools) provided by Eclipse (registered trademark), an abstract syntax tree corresponding to the original program is obtained. It may be generated. Similarly, an abstract syntax tree corresponding to the original program described in PHP may be generated by calling a library function of PDT (PHP Development Tools) provided by Eclipse.
  • JDT Java Development Tools
  • the syntax tree modifying unit 56 refers to the control instruction node definition information stored in the node definition holding unit 14, and identifies the control instruction node corresponding to the programming language of the original program among the nodes of the original syntax tree.
  • This control instruction node includes, for example, a node indicating a method declaration, a method call instruction, a conditional branch instruction such as if / else / switch, a repeat instruction such as for / while, and an exception processing instruction such as try / catch.
  • the syntax tree modifying unit 56 is associated with the control instruction node, and typically sets a logging instruction node as a node immediately below the control instruction node in the original syntax tree, thereby modifying the original syntax tree ( Hereinafter, the data of “modified syntax tree” is set as appropriate.
  • the syntax tree modifying unit 56 associates the identification information of the control instruction node in the original syntax tree with the identification information of the logging instruction node in the modified syntax tree and stores them in the logging instruction holding unit 16.
  • the syntax tree generation unit 54 may generate an object of a DOM (Document Object Model) tree having each node of the original syntax tree as a child node under the root node as data in the original syntax tree. At this time, each child node may have information indicating the type of control instruction as its attribute (for example, class type).
  • the syntax tree modifying unit 56 traverses the DOM tree indicating the original syntax tree to detect a control instruction node, and sets a logging instruction node to be associated with the detected control instruction node as a new child node in the DOM tree. Also good. In this case, the DOM tree to which the logging command node is added becomes the modified syntax tree data.
  • the test program output unit 58 generates a test program according to the modified syntax tree data and the logging command list information stored in the logging command holding unit 16 and stores it in the test program holding unit 18.
  • This test program may be a source code in which a logging instruction is set in association with each of a plurality of control instructions in the original program, or may be an executable binary code corresponding to the source code.
  • the test program output unit 58 determines an execution flow message to be output by the logging command according to the correspondence relationship between the control command node and the logging command node stored as the logging command list information. Specifically, the identification information of the control command corresponding to the logging command, for example, the identification name and position information of the control command in the original program is set as the execution flow message.
  • the test program output unit 58 by inputting the execution flow message to a predetermined conversion function, differs from the execution flow message, and after-conversion data for uniquely specifying the execution flow message (hereinafter referred to as the execution flow message).
  • the execution flow message also referred to as “message identification data”.
  • an execution flow message may be input to a predetermined hash function, and a hash value uniquely generated from the execution flow message may be acquired as message identification data.
  • the test program output unit 58 further associates the execution flow message with the message identification data corresponding to the execution flow message and causes the logging command holding unit 16 to further store the execution flow message.
  • the test program output unit 58 determines a logging command corresponding to the programming language of the original program.
  • the logging command may be a command for outputting argument data to a standard output or a predetermined log file, or a command for recording argument data in a predetermined database.
  • the “echo” command may be used as the logging command.
  • the test program output unit 58 sets the message identification data as an argument of the logging command so that the message identification data corresponding to the execution flow message is output by the logging command, not the execution code notification message itself.
  • the test program output unit 58 refers to the modified syntax tree and generates a test program in which logging instructions are appropriately inserted into the program code of the original program.
  • the source code corresponding to the modified syntax tree may be generated by sequentially setting a predetermined program code corresponding to each node of the modified syntax tree.
  • a source code may be generated from data of an abstract syntax tree by calling a known library function.
  • the test program acquisition unit 62 reads the test program data from the test program storage unit 18 into the memory.
  • the test execution unit 64 executes a penetration test for the test program. Specifically, the test data stored in the input data holding unit 20 is acquired and input to the test program to operate the test program, and the output data from the test program is stored in the output data holding unit 22 Let This output data includes the processing result of the test data by the test program and the message identification data from the logging command set in association with the control command.
  • the coverage status specifying unit 66 refers to the logging command list information recorded in the logging command holding unit 16 and the message identification data recorded in the output data holding unit 22, and specifies the logging command executed in the penetration test. To do.
  • the coverage status specifying unit 66 calculates the ratio of the number of output message identification data to the total number of logging commands in the logging command list information as the coverage rate of the penetration test for the original program. When calculating the number of output message identification data, the same message identification data is counted as 1 even if it is output a plurality of times.
  • FIG. 2 shows the structure of the definition information of the control instruction node.
  • the type of programming language is recorded.
  • identification information of a control instruction node among a plurality of types of nodes that can exist in the abstract syntax tree of each programming language is recorded. That is, the syntax tree modifying unit 56 refers to the control instruction field corresponding to the programming language of the original program, and when the control instruction node recorded in the control instruction field is detected in the original syntax tree, immediately after the control instruction node. Insert a predetermined logging instruction node.
  • 3A and 3B show the structure of the logging command list information.
  • identification information for uniquely specifying the logging command inserted into the test program is recorded.
  • identification information of the logging command node in the modified syntax tree is recorded. In the figure, it is recorded in the format of “logging command node identification name: line number in test program”.
  • identification information in the original syntax tree of the control instruction node in which the logging instruction node is set in the modified syntax tree is recorded. In the figure, it is recorded in the format of “control command node identification name: line number in original program”.
  • An execution flow message is recorded in the execution flow message column, and message identification data is recorded in the message identification data column.
  • FIG. 4 is a flowchart showing the operation of the test support apparatus 100.
  • the instruction receiving unit 32 receives an instruction to create a test program from the user
  • the original program acquiring unit 52 acquires the data of the original program from the original program holding unit 12 (S10).
  • FIG. 5A and FIG. 5B show examples of the program code of the original program.
  • FIG. 5A shows an original program written in JAVA, and includes control instructions 102a to 102g.
  • FIG. 5B shows an original program written in PHP and includes control instructions 102h to 102k.
  • the syntax tree generation unit 54 generates data of the original syntax tree corresponding to the original program in the memory (S12).
  • FIG. 6A shows an example of an original syntax tree generated from the original program of FIG.
  • the control instruction nodes 104a to 104g in FIG. 6A correspond to the control instructions 102a to 102g in FIG.
  • each control instruction node is shown in the format of “control node identification name: line number in original program”.
  • Each node in the subsequent abstract syntax tree is shown in the same format.
  • FIG. 6B shows an example of an original syntax tree generated from the original program shown in FIG.
  • the control command nodes 104h to 104k in FIG. 6B correspond to the control commands 102h to 102k in FIG.
  • the syntax tree modifying unit 56 sets a modified syntax tree in which the original syntax tree is modified by detecting a control instruction node existing in the original syntax tree and setting a logging instruction node in association with the control instruction node. (S14). Then, the syntax tree modifying unit 56 associates the identification information of the control instruction node in the original syntax tree with the identification information of the logging instruction node set for the control instruction node in the modified syntax tree to the logging instruction holding unit 16. Store (S16). In the present embodiment, a logging command ID field, a logging command node field, and a control command node field in the logging command list information are set.
  • FIG. 7 (a) shows a modified syntax tree obtained by modifying the original syntax tree of FIG. 6 (a).
  • the logging command nodes 106a to 106g are associated with the control command nodes 104a to 104g in FIG.
  • the logging command node column and the control command node column of the logging command ID “001” in FIG. 3A indicate data recorded when setting the logging command node 106a in association with the control command node 104a. Yes. That is, the logging command node column indicates identification information of the logging command node 106a in the modified syntax tree, and the control command node column indicates identification information of the control command node 104a in the original syntax tree.
  • FIG. 7 (b) shows a modified syntax tree obtained by modifying the original syntax tree of FIG. 6 (b).
  • the logging command nodes 106h to 106k are associated with the control command nodes 104h to 104k in FIG. 6B.
  • the logging command node column and the control command node column of the logging command ID “001” in FIG. 3B indicate data recorded when setting the logging command node 106h in association with the control command node 104h. Yes. That is, the logging command node column indicates identification information of the logging command node 106h in the modified syntax tree, and the control command node column indicates identification information of the control command node 104h in the original syntax tree.
  • the test program output unit 58 refers to each record of the logging command list information, determines an execution flow message to be output by the logging command, and determines message identification data corresponding to the execution flow message. Then, the execution flow message and message identification data are added and recorded in each record of the logging command list information (S18).
  • the test program output unit 58 is added with a logging command for outputting message identification data according to the modified syntax tree and the logging command list information, and stores the test program in which the original program is modified in the test program holding unit 18. (S20).
  • the execution flow message field in FIG. 3 (a) and FIG. 3 (b) is "Test log fixed character string
  • Control program line number in original program” is set to the record data of the control command node column.
  • the message identification data column in FIGS. 3A and 3B shows a hash value obtained by inputting the execution flow message into a predetermined hash function.
  • FIG. 8 (a) shows an example of a test program corresponding to the original program of FIG. 3 (a).
  • This figure shows the program code generated in accordance with the modified syntax tree of FIG. 7A and the logging instruction list information of FIG.
  • logging commands 108a to 108g are set in association with the control commands 102a to 102g described in the original program.
  • FIG. 8B shows an example of a test program corresponding to the original program shown in FIG.
  • This figure shows the program code generated in accordance with the modified syntax tree of FIG. 7B and the logging instruction list information of FIG. 3B.
  • logging commands 108h to 108k are set in association with the control commands 102h to 102k described in the original program.
  • the test program output unit 58 When the logging command node set in the logging command list information is detected by the modified syntax tree, the test program output unit 58 generates a test program by setting the message identification data as an argument of a predetermined logging command. To do.
  • the logging instruction “insert” in FIGS. 8A and 8B is a function defined by the user, and outputs character string data specified by an argument to a predetermined file or database.
  • the logging command in this embodiment is a command for outputting character string data specified by an argument to the output destination of the processing result in the original program.
  • message identification data is output in parallel with the processing result output by the program code described at the beginning of the original program, and the correspondence between the processing result and the execution flow is facilitated.
  • the logging command of the present embodiment is a command for outputting the message identification data specified by the argument in such a manner that it is normally hidden in software for browsing the processing result in the original program.
  • the output destination of the processing result in the original program is a structured document such as an HTML file or an XML file
  • the character string data specified by the argument is output as a comment sentence in the structured document.
  • FIG. 9 is a flowchart showing the operation of the test support apparatus 100.
  • the instruction receiving unit 32 receives from the user an instruction to start a penetration test for the test program, and the test program acquiring unit 62 reads the test program data from the test program holding unit 18 (S30).
  • the test execution unit 64 reads the test data stored in the input data holding unit 20, operates the test program by inputting the test data into the test program, and executes the penetration test (S32).
  • the test program if the test program is a source code, it is appropriately converted into an executable binary code as necessary.
  • test execution unit 64 stores the output data from the test program accompanying the operation of the test program in the output data holding unit 22 (S34).
  • This output data includes message identification data output by the logging command.
  • the test execution unit 64 may store the output data from the test program as character data in the structured document file, or may store it as a record of a predetermined table in the database.
  • the instruction receiving unit 32 receives a display request for output data from the test program from the user (S36). If it is a display request from a user who does not have the authority to refer to the execution flow message (N in S38), the execution flow display unit 34 displays the output data from the test program as it is.
  • FIG. 10 shows the output data of the test program output to the HTML file. This figure shows output data when the “theMethod” method indicated by the control instruction 102h in FIG. 8B is called in the penetration test. In the figure, since the message identification data is displayed as it is, it is difficult to grasp the execution flow of the original program in the penetration test.
  • the execution flow display unit 34 refers to the logging command list information in the logging command holding unit 16 and outputs from the test program.
  • the message identification data which is data, is converted into an execution flow message associated with the message identification data and displayed (S40).
  • FIG. 11 shows the output data of the test program output to the HTML file.
  • the user has the reference authority may be determined by a known user authentication method, and may be determined by, for example, the ID of the user terminal or user input data at the time of login.
  • FIG. 12 is a flowchart showing the operation of the test support apparatus 100.
  • S30 to S34 in the figure are the same as S30 to S34 in FIG.
  • the instruction receiving unit 32 receives from the user a request to display the test coverage for the original program.
  • the coverage status specifying unit 66 refers to the message identification data stored in the output data holding unit 22 and specifies a logging command executed by the test (S50). That is, the logging command corresponding to the message identification data stored in the output data holding unit 22 can be specified as the logging command executed by the test.
  • the coverage status specifying unit 66 refers to the logging command list information in the logging command holding unit 16 and calculates the number of executed logging commands in the total number of logging commands as a coverage rate (S52).
  • the coverage status display unit 36 displays the coverage rate calculated by the coverage status specifying unit 66 on the display (S54). Further, when displaying the list of logging commands, the coverage status display unit 36 highlights the logging commands that have not been executed in the test more than the executed logging commands (S56).
  • FIG. 13 shows a display image of the coverage status by the coverage status display unit 36.
  • the coverage status in FIG. 5 indicates the test coverage status for the original program in FIG.
  • the code coverage is displayed as 71%.
  • a message output in an unexecuted logging command is highlighted with a bold font and a larger character size than other messages. The user who confirms the result can recognize that the test data or the like should be adjusted so that the condition determination on the 15th line in the original program in FIG. 5A becomes true in order to improve the coverage rate.
  • the penetration test for the original program when the penetration test for the original program is to be executed, the penetration test is executed for the test program in which the logging command is set in association with the control command. Thereby, the user can check the execution flow of the original program when the penetration test is executed.
  • the problem part can be quickly identified by referring to the corresponding part of the original program execution flow.
  • the description position of the control instruction in the original program is output instead of the description position of the control instruction in the test program. Thereby, it becomes easy to identify the problem location which exists in the original program. Since the original program is to be repaired by the user, the repair work by the user can be further supported.
  • control command can be detected easily and accurately without depending on the description style of the original program, and the setting of the logging command can be realized easily and accurately.
  • a control instruction node that matches the definition is detected by referring to a table in which the definition of the control instruction node is recorded for each of a plurality of programming languages.
  • the control instruction node can be detected by common logic independent of the programming language, and the logging instruction node can be set in association with the control instruction node.
  • the processing result of the test program in the penetration test is output as structured document data, and the output data by the logging command is output as a comment sentence in the structured document.
  • the structured document browsing program it is output in a mode that is normally hidden.
  • the processing result of the test program is output as HTML file data
  • the output data by the logging command is displayed as it is, there may be a problem in display on the web browser.
  • the processing result of the test program can be displayed without any problem in the web browser.
  • the source data of the HTML file is referred to, a message by a logging command can be referred to, and the execution flow can be easily specified.
  • message identification data is output as output data by the logging command instead of the execution flow message itself.
  • the message identification data is converted into an execution flow message and displayed.
  • the execution flow message can be concealed from unauthorized users, and information leakage such as the internal structure of the original program can be prevented.
  • test support apparatus 100 it is possible to provide the user with a coverage rate indicating the execution rate of the program code in the penetration test.
  • a coverage rate indicating the execution rate of the program code in the penetration test.
  • both the modification unit 50 and the test unit 60 are provided in one test support apparatus 100.
  • the modification unit 50 and the test unit 60 may be distributed and provided in a plurality of different devices.
  • the second device different from the first device reads the test program data generated in the first device, and the second device performs a penetration test, a test result display, and the like. Also good.
  • the program module that realizes each functional block of the test support apparatus 100 may be implemented as a plug-in to other software programs such as IDE (Integrated Development Environment).
  • IDE Integrated Development Environment
  • the program module that realizes each functional block of the test support apparatus 100 may be implemented as a plug-in to other software programs such as IDE (Integrated Development Environment).
  • IDE Integrated Development Environment
  • it may be implemented as a plug-in for Eclipse, and the user may add this plug-in to Eclipse to execute a test program generation and a penetration test.
  • the user can seamlessly execute a penetration test for the program code after coding the program code in Eclipse.
  • the present invention can be applied to an apparatus for supporting a test for a computer program.

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

A test support device (100) comprises: an original program acquisition unit (52) for acquiring an original program to be tested; a syntax tree generation unit (54) for generating a syntax tree, based on a program code described in the original program; a syntax tree modification unit (56) for setting, in the syntax tree, to a node of a control command for controlling an execution flow in the original program, a node of a logging command for outputting a message indicating that the execution flow has been controlled by the control command, in correspondence to each other; and a test program output unit (58) for outputting, with reference to the modified syntax tree, a test program in which the logging command is set in correspondence with the control command.

Description

試験支援装置および試験支援方法Test support apparatus and test support method

 この発明は、データ処理技術に関し、特に、コンピュータプログラムを試験するための技術に関する。 The present invention relates to a data processing technique, and more particularly to a technique for testing a computer program.

 コンピュータプログラムにおけるセキュリティ上の脆弱性を検出するためのテストとしてペネトレーションテストが知られている。ペネトレーションテストにおいては、既知の攻撃パターンを示すデータを試験対象のコンピュータプログラムに入力して、そのコンピュータプログラムからの出力データを検証する。 A penetration test is known as a test for detecting security vulnerabilities in computer programs. In the penetration test, data indicating a known attack pattern is input to a computer program to be tested, and output data from the computer program is verified.

特開2005-228177号公報JP 2005-228177 A

 ペネトレーションテストは、コンピュータプログラムの内部構造は考慮せずに、そのコンピュータプログラムからの出力データに着目するブラックボックステストである。したがって、試験対象のコンピュータプログラムにセキュリティ上の脆弱性が存在することは検出できるものの、内部構造はブラックボックスであるため、そのコンピュータプログラムに存在する問題の解決には時間を要することがあった。 The penetration test is a black box test that focuses on output data from a computer program without considering the internal structure of the computer program. Therefore, although it can be detected that there is a security vulnerability in the computer program to be tested, since the internal structure is a black box, it may take time to solve the problem existing in the computer program.

 本発明は、本発明者の上記課題認識に基づいて完成された発明であり、その主たる目的は、コンピュータプログラムに対する試験を支援する技術を提供することである。 The present invention has been completed based on the above-mentioned problem recognition of the present inventor, and its main purpose is to provide a technique for supporting a test for a computer program.

 上記課題を解決するために、本発明のある態様の試験支援装置は、所定のプログラミング言語で記述された試験対象のプログラムを原本プログラムとして取得するプログラム取得部と、プログラミング言語の文法規則にしたがって、原本プログラムに記述されたプログラムコードの各要素をノードとする構文木を生成する構文木生成部と、構文木において、原本プログラムの実行フローを制御する制御命令のノードに対して、当該制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令のノードを対応づけて設定する構文木改変部と、構文木を参照して、所定の試験データが原本プログラムに入力された際の実行フローを確認可能にするためのプログラムであって、制御命令に対応づけてロギング命令が設定された試験用プログラムを出力するプログラム出力部と、を備える。 In order to solve the above problems, a test support apparatus according to an aspect of the present invention includes a program acquisition unit that acquires a test target program described in a predetermined programming language as an original program, and a grammar rule of the programming language. A syntax tree generation unit that generates a syntax tree having each element of program code described in the original program as a node, and a control instruction node that controls the execution flow of the original program in the syntax tree, the control instruction A syntax tree altering unit that associates and sets a node of a logging instruction that outputs a message indicating that the execution flow is controlled, and execution when predetermined test data is input to the original program with reference to the syntax tree This is a program for checking the flow, and the logging command is set in association with the control command. It includes a program output unit that outputs the test program, the.

 本発明の別の態様もまた、試験支援装置である。この装置は、試験対象のプログラムである原本プログラムに所定の試験データが入力された際の実行フローを確認可能にするためのプログラムであって、原本プログラムの実行フローを制御する制御命令に対応づけて、その制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令が設定された試験用プログラムを取得するプログラム取得部と、試験用プログラムに試験データを入力して、試験データに応じて実行されたロギング命令によりメッセージを出力させる試験実行部と、試験用プログラムから出力されたメッセージを参照して、試験データに応じて実行されたロギング命令を特定し、試験用プログラムに設定されたロギング命令に占める実行されたロギング命令の割合を、原本プログラムに対する試験の網羅率として算出する網羅状況特定部と、算出された網羅率を表示させる網羅状況表示部と、を備える。 Another aspect of the present invention is also a test support apparatus. This device is a program for enabling confirmation of an execution flow when predetermined test data is input to an original program that is a program to be tested, and is associated with a control instruction that controls the execution flow of the original program. A program acquisition unit that acquires a test program in which a logging instruction that outputs a message indicating that the execution flow is controlled by the control instruction is set, and the test data is input to the test program. Refer to the test execution unit that outputs a message with the logging command executed according to the command and the message output from the test program, identify the logging command executed according to the test data, and set it in the test program. Test the ratio of executed logging instructions to the original logging instructions against the original program Includes a coverage situation identifying unit for calculating a coverage percentage, a coverage situation display unit for displaying the calculated coverage ratio, the.

 本発明のさらに別の態様は、試験支援方法である。この方法は、所定のプログラミング言語で記述された試験対象のプログラムを原本プログラムとして取得するステップと、プログラミング言語の文法規則にしたがって、原本プログラムに記述されたプログラムコードの各要素をノードとする構文木を生成するステップと、構文木において、原本プログラムの実行フローを制御する制御命令のノードに対して、当該制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令のノードを対応づけて設定するステップと、構文木を参照して、所定の試験データが原本プログラムに入力された際の実行フローを確認可能にするためのプログラムであって、制御命令に対応づけてロギング命令が設定された試験用プログラムを出力するステップと、をコンピュータに実行させる。 Still another aspect of the present invention is a test support method. This method includes a step of acquiring a test target program described in a predetermined programming language as an original program, and a syntax tree having each element of the program code described in the original program as a node according to a grammatical rule of the programming language. In the syntax tree, in the syntax tree, the node of the control instruction that controls the execution flow of the original program is associated with the node of the logging instruction that outputs a message indicating that the execution flow is controlled by the control instruction. This is a program for checking the execution flow when predetermined test data is input to the original program by referring to the syntax tree and the syntax tree, and the logging instruction is set in association with the control instruction. Outputting a test program to be executed on a computer. That.

 なお、以上の構成要素の任意の組合せ、本発明の表現を装置、方法、システム、プログラム、プログラムを格納した記録媒体などの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and the expression of the present invention converted between the apparatus, method, system, program, recording medium storing the program, etc. are also effective as an aspect of the present invention.

 本発明によれば、コンピュータプログラムに対する試験を支援できる。 According to the present invention, a test for a computer program can be supported.

本発明の実施の形態である試験支援装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the test assistance apparatus which is embodiment of this invention. 制御命令ノードの定義情報の構造を示す図である。It is a figure which shows the structure of the definition information of a control command node. ロギング命令一覧情報の構造を示す図である。It is a figure which shows the structure of logging command list information. ロギング命令一覧情報の構造を示す図である。It is a figure which shows the structure of logging command list information. 試験支援装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a test assistance apparatus. 原本プログラムのプログラムコードの例を示す図である。It is a figure which shows the example of the program code of an original program. 原本プログラムのプログラムコードの例を示す図である。It is a figure which shows the example of the program code of an original program. 図5(a)の原本プログラムから生成された原本構文木の一例を示す図である。It is a figure which shows an example of the original syntax tree produced | generated from the original program of Fig.5 (a). 図5(b)の原本プログラムから生成された原本構文木の一例を示す図である。It is a figure which shows an example of the original syntax tree produced | generated from the original program of FIG.5 (b). 図6(a)の原本構文木が改変された改変構文木を示す図である。FIG. 7 is a diagram illustrating a modified syntax tree obtained by modifying the original syntax tree of FIG. 図6(b)の原本構文木が改変された改変構文木を示す図である。FIG. 7 is a diagram illustrating a modified syntax tree obtained by modifying the original syntax tree of FIG. 試験用プログラムのプログラムコードの例を示す図である。It is a figure which shows the example of the program code of the program for a test. 試験用プログラムのプログラムコードの例を示す図である。It is a figure which shows the example of the program code of the program for a test. 試験支援装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a test assistance apparatus. HTMLファイルに出力された試験用プログラムの出力データを示す図である。It is a figure which shows the output data of the program for a test output to the HTML file. HTMLファイルに出力された試験用プログラムの出力データを示す図である。It is a figure which shows the output data of the program for a test output to the HTML file. 試験支援装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a test assistance apparatus. 網羅状況表示部による網羅状況の表示イメージを示す図である。It is a figure which shows the display image of the coverage status by a coverage status display part.

 本実施の形態では、ペネトレーションテストの対象となるオリジナルのプログラム(以下、適宜「原本プログラム」とも呼ぶ。)について、ペネトレーションテストにおけるプログラムコードの実行フローを可視化する試験支援装置を提案する。この試験支援装置は、原本プログラムにおけるプログラムコードに記述された命令のうち、原本プログラムの実行フローを制御する制御命令の実行に伴って、その実行フローをユーザに通知するためのメッセージを出力させるよう原本プログラムを改変する。このメッセージを、以下、「実行フローメッセージ」と呼ぶこととする。 This embodiment proposes a test support apparatus that visualizes an execution flow of a program code in a penetration test for an original program (hereinafter also referred to as an “original program” as appropriate) to be a penetration test target. The test support apparatus is configured to output a message for notifying the user of the execution flow in accordance with the execution of the control instruction for controlling the execution flow of the original program among the instructions described in the program code in the original program. Modify the original program. This message is hereinafter referred to as an “execution flow message”.

 具体的には、本実施の形態の試験支援装置は、原本プログラムに記述されたプログラムコードの各要素をノードとする抽象構文木を生成する。そして、抽象構文木において、制御命令を示すノード(以下、適宜「制御命令ノード」とも呼ぶ。)に対して、その制御命令を特定可能な実行フローメッセージを出力するロギング命令を示すノード(以下、適宜「ロギング命令ノード」とも呼ぶ。)を対応づけて設定する。そして、試験支援装置は、ロギング命令ノードを追加した抽象構文木から、原本プログラムが改変されたプログラム(以下、適宜「試験用プログラム」とも呼ぶ。)を生成する。この試験用プログラムでは、制御命令にロギング命令が対応づけられることになる。 Specifically, the test support apparatus according to the present embodiment generates an abstract syntax tree having each element of the program code described in the original program as a node. In the abstract syntax tree, for a node indicating a control instruction (hereinafter also referred to as a “control instruction node” as appropriate), a node indicating a logging instruction that outputs an execution flow message that can specify the control instruction (hereinafter referred to as “control instruction node”). (Also referred to as “logging command node” as appropriate). Then, the test support apparatus generates a program in which the original program is modified (hereinafter also referred to as “test program” as appropriate) from the abstract syntax tree to which the logging command node is added. In this test program, a logging command is associated with a control command.

 本実施の形態の試験支援装置のように、原本プログラムの改変のために、そのプログラムコードそのものを解析するのではなく、原本プログラムに対応する抽象構文木を解析することにより、制御命令に対応づけてロギング命令を設定することが容易になる。例えば、同じ条件分岐処理であっても、以下の3例のように、プログラムコードとしては様々な記述パターンが存在する。
 第1の記述パターン:
  If(status)operation;
 第2の記述パターン:
  If(status){
    operation;
  }
 第3の記述パターン:
  If(status)
  {
    operation;
   }
As in the test support apparatus of this embodiment, in order to modify the original program, the program code itself is not analyzed, but the abstract syntax tree corresponding to the original program is analyzed, and the control instructions are associated with each other. This makes it easy to set logging commands. For example, even in the same conditional branch process, there are various description patterns as program codes as in the following three examples.
First description pattern:
If (status) operation;
Second description pattern:
If (status) {
operation;
}
Third description pattern:
If (status)
{
operation;
}

 プログラムコードそのものを解析する場合には、上記3例それぞれのパターンに対応する解析処理が必要である。これに対し、抽象構文木においてはプログラムコードの書式レベルの差異は吸収されて同じノード構成となるため、制御命令ノードに対してロギング命令ノードを追加する処理を共通化できる。言い換えれば、プログラムコードの記述パターンに依存しない共通ロジックでの処理が可能となる。その結果、試験支援装置を実現するためのプログラムコードについて、そのコード量を低減できるとともに容易なメンテナンスを実現できる。 When analyzing the program code itself, an analysis process corresponding to each pattern of the above three examples is required. On the other hand, in the abstract syntax tree, the difference in the format level of the program code is absorbed and becomes the same node configuration, so that the process of adding the logging command node to the control command node can be made common. In other words, it is possible to perform processing with a common logic independent of the program code description pattern. As a result, the program code for realizing the test support apparatus can be reduced in code amount and easy maintenance can be realized.

 さらに、本実施の形態の試験支援装置は、生成した試験用プログラムに対してペネトレーションテストを実行する。そして、このペネトレーションテストにおいて実行されたロギング命令により、実行フローを制御した制御命令を特定可能な実行フローメッセージを出力させる。本実施の形態の試験支援装置によれば、原本プログラムに対するペネトレーションテスト実行時の実行フローが可視化され、原本プログラムに存在する問題箇所の特定が容易になり、問題の迅速な解決を支援できる。 Furthermore, the test support apparatus according to the present embodiment executes a penetration test on the generated test program. And the execution flow message which can specify the control command which controlled the execution flow is output by the logging command performed in this penetration test. According to the test support apparatus of the present embodiment, the execution flow at the time of execution of the penetration test for the original program is visualized, and it becomes easy to identify a problem location existing in the original program, and can support a quick solution of the problem.

 図1は、本発明の実施の形態である試験支援装置100の機能構成を示すブロック図である。試験支援装置100は、記憶部10と、UI部30と、データ処理部40とを備える。記憶部10は、各種データを保持するための記憶領域である。UI部30は、プログラムの開発者や試験担当者等、ユーザに対するユーザインタフェース処理を担当する。データ処理部40は、記憶部10に保持されたデータや、UI部30において取得されたデータに基づいて各種のデータ処理を実行する。データ処理部40は、記憶部10とUI部30との間のインタフェースの役割も果たす。 FIG. 1 is a block diagram showing a functional configuration of a test support apparatus 100 according to an embodiment of the present invention. The test support apparatus 100 includes a storage unit 10, a UI unit 30, and a data processing unit 40. The storage unit 10 is a storage area for holding various data. The UI unit 30 is responsible for user interface processing for the user, such as a program developer or a tester. The data processing unit 40 executes various types of data processing based on data held in the storage unit 10 and data acquired by the UI unit 30. The data processing unit 40 also serves as an interface between the storage unit 10 and the UI unit 30.

 本明細書のブロック図において示される各ブロックは、ハードウェア的には、コンピュータのCPUをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。例えば、メモリや補助記憶装置は、記憶部10の処理を実行してもよい。また、CPUは、UI部30やデータ処理部40それぞれの処理内容が実装されたプログラムモジュールをメモリに読み込み、それぞれのプログラムモジュールにしたがって、UI部30やデータ処理部40の各種処理を実行してもよい。 Each block shown in the block diagram of the present specification can be realized in terms of hardware by an element such as a CPU of a computer or a mechanical device, and in terms of software, it can be realized by a computer program or the like. The functional block realized by those cooperation is drawn. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software. For example, the memory or the auxiliary storage device may execute the processing of the storage unit 10. In addition, the CPU reads a program module in which the processing contents of the UI unit 30 and the data processing unit 40 are mounted into the memory, and executes various processes of the UI unit 30 and the data processing unit 40 according to the respective program modules. Also good.

 記憶部10:
 記憶部10は、原本プログラム保持部12と、ノード定義保持部14と、ロギング命令保持部16と、試験用プログラム保持部18と、入力データ保持部20と、出力データ保持部22とを有する。原本プログラム保持部12は、原本プログラムのソースコードを保持する。原本プログラムを記述するプログラミング言語には制限はなく、例えばPHP・JAVA(登録商標)等であってもよい。
Storage unit 10:
The storage unit 10 includes an original program holding unit 12, a node definition holding unit 14, a logging command holding unit 16, a test program holding unit 18, an input data holding unit 20, and an output data holding unit 22. The original program holding unit 12 holds the source code of the original program. There is no limitation on the programming language for describing the original program, and for example, PHP / JAVA (registered trademark) may be used.

 ノード定義保持部14は、制御命令ノードの定義情報を保持する。具体的には、PHPやJAVA等、互いに異なる複数のプログラミング言語のそれぞれで記述された原本プログラムから生成される抽象構造木について、各抽象構文木において存在しうる制御命令ノードの定義情報を保持する。この定義情報の具体例は、図2において後述する。 The node definition holding unit 14 holds the definition information of the control instruction node. Specifically, for abstract structure trees generated from original programs written in different programming languages such as PHP and JAVA, the definition information of control instruction nodes that can exist in each abstract syntax tree is held. . A specific example of this definition information will be described later with reference to FIG.

 ロギング命令保持部16は、試験用プログラムにおいて、複数の制御命令のそれぞれに対応づけて設定される複数のロギング命令について、各ロギング命令の属性情報をロギング命令一覧情報として保持する。ロギング命令一覧情報の具体例は、図3において後述する。試験用プログラム保持部18は、原本プログラムが改変された試験用プログラムを保持する。 The logging command holding unit 16 holds attribute information of each logging command as logging command list information for a plurality of logging commands set in association with each of the plurality of control commands in the test program. A specific example of the logging command list information will be described later with reference to FIG. The test program holding unit 18 holds a test program in which the original program is modified.

 入力データ保持部20は、原本プログラムに対してペネトレーションテストを実行するための試験データを保持する。この試験データは、典型的には、プログラムの脆弱性の有無を確認するための既知の攻撃パターンが設定されたデータである。例えば、クロスサイトスクリプティングに対する脆弱性の有無を検証するための、スクリプト言語で記述されたプログラムコードを含む試験データでもよい。また、SQL(Structured Query Language)インジェクションに対する脆弱性の有無を検証するための文字列を含む試験データでもよい。出力データ保持部22は、ペネトレーションテストにおいて試験用プログラムから出力された出力データを保持する。 The input data holding unit 20 holds test data for executing a penetration test on the original program. This test data is typically data in which a known attack pattern for confirming the presence or absence of a program vulnerability is set. For example, it may be test data including a program code written in a script language for verifying the presence or absence of vulnerability to cross-site scripting. Further, it may be test data including a character string for verifying whether or not there is a vulnerability to SQL (Structured Query) Language injection. The output data holding unit 22 holds output data output from the test program in the penetration test.

 UI部30:
 UI部30は、指示受付部32と、実行フロー表示部34と、網羅状況表示部36とを有する。指示受付部32は、各種入力装置を介して、ユーザにより入力された各種指示を受け付ける。実行フロー表示部34は、ペネトレーションテストにおける試験用プログラムからの出力データをディスプレイに表示させる。
UI unit 30:
The UI unit 30 includes an instruction receiving unit 32, an execution flow display unit 34, and an coverage status display unit 36. The instruction receiving unit 32 receives various instructions input by the user via various input devices. The execution flow display unit 34 displays output data from the test program in the penetration test on the display.

 網羅状況表示部36は、原本プログラムのプログラムコード全体に占める、ペネトレーションテストにおいて原本プログラムのプログラムコードが実行された割合(以下、適宜「網羅率」と呼ぶ。)をディスプレイに表示させる。また網羅状況表示部36は、試験用プログラムに設定されたロギング命令の一覧を表示する。その際に、ペネトレーションテストにおいて未実行のロギング命令については、実行済のロギング命令よりもユーザから視認されやすい態様でディスプレイ上に表示する。例えば、未実行のロギング命令を、実行済のロギング命令よりも大きな文字サイズや、より視認させやすい表示色等で表示させてもよい。 The coverage status display unit 36 displays the ratio (hereinafter referred to as “coverage rate” as appropriate) of the execution of the program code of the original program in the penetration test in the entire program code of the original program. The coverage status display unit 36 displays a list of logging commands set in the test program. At that time, logging commands that have not been executed in the penetration test are displayed on the display in a manner that is easier for the user to see than the executed logging commands. For example, an unexecuted logging command may be displayed in a character size larger than an executed logging command, a display color that is more easily visible, or the like.

 データ処理部40:
 データ処理部40は、原本プログラムを試験用プログラムへと改変する改変部50と、試験用プログラムに対してペネトレーションテストを実行する試験部60とを有する。改変部50は、原本プログラム取得部52と、構文木生成部54と、構文木改変部56と、試験用プログラム出力部58とを含む。また試験部60は、試験用プログラム取得部62と、試験実行部64と、網羅状況特定部66とを含む。
Data processing unit 40:
The data processing unit 40 includes a modification unit 50 that modifies the original program into a test program, and a test unit 60 that performs a penetration test on the test program. The modification unit 50 includes an original program acquisition unit 52, a syntax tree generation unit 54, a syntax tree modification unit 56, and a test program output unit 58. The test unit 60 includes a test program acquisition unit 62, a test execution unit 64, and an coverage status specifying unit 66.

 原本プログラム取得部52は、原本プログラム保持部12から原本プログラムのデータをメモリに読み込む。構文木生成部54は、原本プログラムに記述されたプログラムコードに対して、使用されているプログラミング言語の文法規則にしたがってあらかじめ定められた方法により字句解析および構文解析を実行する。そして、原本プログラムに基づく抽象構文木(以下、適宜「原本構文木」と呼ぶ。)のデータをメモリに生成する。 The original program acquisition unit 52 reads the original program data from the original program holding unit 12 into the memory. The syntax tree generation unit 54 performs lexical analysis and syntax analysis on the program code described in the original program by a predetermined method according to the grammar rules of the programming language being used. Then, data of an abstract syntax tree (hereinafter referred to as “original syntax tree” as appropriate) based on the original program is generated in the memory.

 構文木生成部54は、LR構文解析法等の既知の手法により原本構文木を作成してもよく、公知の構文解析関数を呼び出すことにより原本構文木を作成してもよい。後者の例として、Eclipse(登録商標)が提供するJDT(Java Development Tools)のライブラリ関数に対して、JAVAで記述された原本プログラムのデータを渡すことにより、その原本プログラムに対応する抽象構文木を生成してもよい。同様に、Eclipseが提供するPDT(PHP Development Tools)のライブラリ関数を呼び出すことにより、PHPで記述された原本プログラムに対応する抽象構文木を生成してもよい。 The syntax tree generation unit 54 may create an original syntax tree by a known method such as an LR syntax analysis method, or may create an original syntax tree by calling a known parsing function. As an example of the latter, by passing the original program data described in JAVA to the library function of JDT (Java Development Tools) provided by Eclipse (registered trademark), an abstract syntax tree corresponding to the original program is obtained. It may be generated. Similarly, an abstract syntax tree corresponding to the original program described in PHP may be generated by calling a library function of PDT (PHP Development Tools) provided by Eclipse.

 構文木改変部56は、ノード定義保持部14に記憶された制御命令ノードの定義情報を参照して、原本構文木のノードのうち原本プログラムのプログラミング言語に対応した制御命令ノードを識別する。この制御命令ノードには、例えば、メソッド宣言、メソッド呼び出し命令、if・else・switch等の条件分岐命令、for・while等の繰り返し命令、try・catch等の例外処理命令を示すノードが含まれる。 The syntax tree modifying unit 56 refers to the control instruction node definition information stored in the node definition holding unit 14, and identifies the control instruction node corresponding to the programming language of the original program among the nodes of the original syntax tree. This control instruction node includes, for example, a node indicating a method declaration, a method call instruction, a conditional branch instruction such as if / else / switch, a repeat instruction such as for / while, and an exception processing instruction such as try / catch.

 構文木改変部56は、制御命令ノードに対応づけて、典型的には原本構文木における制御命令ノード直下のノードとして、ロギング命令ノードを設定することにより、原本構文木を改変した抽象構文木(以下、適宜「改変構文木」と呼ぶ。)のデータを設定する。構文木改変部56は、改変構文木を設定する際に、原本構文木における制御命令ノードの識別情報と、改変構文木におけるロギング命令ノードの識別情報とを対応づけてロギング命令保持部16に記憶させる。 The syntax tree modifying unit 56 is associated with the control instruction node, and typically sets a logging instruction node as a node immediately below the control instruction node in the original syntax tree, thereby modifying the original syntax tree ( Hereinafter, the data of “modified syntax tree” is set as appropriate. When setting the modified syntax tree, the syntax tree modifying unit 56 associates the identification information of the control instruction node in the original syntax tree with the identification information of the logging instruction node in the modified syntax tree and stores them in the logging instruction holding unit 16. Let

 なお構文木生成部54は、原本構文木のデータとして、原本構文木の各ノードをルートノード配下の子ノードとして有するDOM(Document Object Model)ツリーのオブジェクトをメモリ上に生成してもよい。このとき、それぞれの子ノードはその属性(例えばクラス型等)として制御命令の種類を示す情報を有してもよい。構文木改変部56は、原本構文木を示すDOMツリーをトラバースして制御命令ノードを検出し、検出した制御命令ノードに対応づけるべきロギング命令ノードを新たな子ノードとしてこのDOMツリーに設定してもよい。この場合、ロギング命令ノードが付加されたDOMツリーが改変構文木のデータとなる。 Note that the syntax tree generation unit 54 may generate an object of a DOM (Document Object Model) tree having each node of the original syntax tree as a child node under the root node as data in the original syntax tree. At this time, each child node may have information indicating the type of control instruction as its attribute (for example, class type). The syntax tree modifying unit 56 traverses the DOM tree indicating the original syntax tree to detect a control instruction node, and sets a logging instruction node to be associated with the detected control instruction node as a new child node in the DOM tree. Also good. In this case, the DOM tree to which the logging command node is added becomes the modified syntax tree data.

 試験用プログラム出力部58は、改変構文木のデータおよびロギング命令保持部16に記憶されたロギング命令一覧情報にしたがって、試験用プログラムを生成して試験用プログラム保持部18に記憶させる。この試験用プログラムは、原本プログラムにおける複数の制御命令それぞれに対応づけてロギング命令が設定されたソースコードであってもよく、そのソースコードに対応する実行可能形式のバイナリコードであってもよい。 The test program output unit 58 generates a test program according to the modified syntax tree data and the logging command list information stored in the logging command holding unit 16 and stores it in the test program holding unit 18. This test program may be a source code in which a logging instruction is set in association with each of a plurality of control instructions in the original program, or may be an executable binary code corresponding to the source code.

 ここで試験用プログラム出力部58における試験用プログラムの設定処理を具体的に説明する。まず、試験用プログラム出力部58は、ロギング命令一覧情報として記憶された制御命令ノードとロギング命令ノードとの対応関係にしたがって、ロギング命令で出力させるべき実行フローメッセージを決定する。具体的には、実行フローメッセージとして、ロギング命令が対応する制御命令の識別情報、例えば原本プログラムにおける制御命令の識別名称や位置情報等を設定する。 Here, the test program setting process in the test program output unit 58 will be described in detail. First, the test program output unit 58 determines an execution flow message to be output by the logging command according to the correspondence relationship between the control command node and the logging command node stored as the logging command list information. Specifically, the identification information of the control command corresponding to the logging command, for example, the identification name and position information of the control command in the original program is set as the execution flow message.

 次に、試験用プログラム出力部58は、その実行フローメッセージを所定の変換関数に入力することで、その実行フローメッセージとは異なり、その実行フローメッセージを一意に特定するための変換後データ(以下、適宜「メッセージ識別データ」とも呼ぶ。)を取得する。例えば、実行フローメッセージを所定のハッシュ関数に入力して、その実行フローメッセージから一意に生成されるハッシュ値をメッセージ識別データとして取得してもよい。試験用プログラム出力部58は、実行フローメッセージと、その実行フローメッセージに対応するメッセージ識別データとを対応づけて、ロギング命令保持部16にさらに記憶させる。 Next, the test program output unit 58, by inputting the execution flow message to a predetermined conversion function, differs from the execution flow message, and after-conversion data for uniquely specifying the execution flow message (hereinafter referred to as the execution flow message). As appropriate, also referred to as “message identification data”). For example, an execution flow message may be input to a predetermined hash function, and a hash value uniquely generated from the execution flow message may be acquired as message identification data. The test program output unit 58 further associates the execution flow message with the message identification data corresponding to the execution flow message and causes the logging command holding unit 16 to further store the execution flow message.

 次に、試験用プログラム出力部58は、原本プログラムのプログラミング言語に対応したロギング命令を決定する。このロギング命令は、標準出力や所定のログファイルに引数データを出力する命令であってもよく、所定のデータベースに引数データを記録する命令であってもよい。例えば、原本プログラムがPHPで記述されている場合には「echo」命令をロギング命令としてもよい。試験用プログラム出力部58は、実行コード通知メッセージそのものではなく、実行フローメッセージに対応するメッセージ識別データをロギング命令により出力させるために、ロギング命令の引数としてメッセージ識別データを設定する。 Next, the test program output unit 58 determines a logging command corresponding to the programming language of the original program. The logging command may be a command for outputting argument data to a standard output or a predetermined log file, or a command for recording argument data in a predetermined database. For example, when the original program is written in PHP, the “echo” command may be used as the logging command. The test program output unit 58 sets the message identification data as an argument of the logging command so that the message identification data corresponding to the execution flow message is output by the logging command, not the execution code notification message itself.

 最後に、試験用プログラム出力部58は、改変構文木を参照して、原本プログラムのプログラムコードに対してロギング命令が適宜挿入された試験用プログラムを生成する。試験用プログラムのソースコードを生成する場合には、改変構文木の各ノードに対応する所定のプログラムコードを逐次設定することにより、改変構文木に対応するソースコードを生成してもよい。また、構文木生成部54と同様に、既知のライブラリ関数を呼び出すことで、抽象構文木のデータからソースコードを生成してもよい。実行形式のバイナリコードを生成する場合には、通常のコンパイル処理と同様に、改変構文木に対して意味解析やリンク処理等を順次実行してバイナリコードを出力すればよい。 Finally, the test program output unit 58 refers to the modified syntax tree and generates a test program in which logging instructions are appropriately inserted into the program code of the original program. When generating the source code of the test program, the source code corresponding to the modified syntax tree may be generated by sequentially setting a predetermined program code corresponding to each node of the modified syntax tree. Similarly to the syntax tree generation unit 54, a source code may be generated from data of an abstract syntax tree by calling a known library function. When generating an executable binary code, it is only necessary to sequentially execute semantic analysis, link processing, and the like on the modified syntax tree and output the binary code, as in normal compilation processing.

 試験用プログラム取得部62は、試験用プログラム保持部18から試験用プログラムのデータをメモリに読み込む。試験実行部64は、試験用プログラムに対するペネトレーションテストを実行する。具体的には、入力データ保持部20に記憶された試験データを取得して試験用プログラムに入力することで試験用プログラムを動作させ、試験用プログラムからの出力データを出力データ保持部22に記憶させる。この出力データには、試験用プログラムによる試験データの処理結果や、制御命令に対応づけて設定されたロギング命令からのメッセージ識別データが含まれる。 The test program acquisition unit 62 reads the test program data from the test program storage unit 18 into the memory. The test execution unit 64 executes a penetration test for the test program. Specifically, the test data stored in the input data holding unit 20 is acquired and input to the test program to operate the test program, and the output data from the test program is stored in the output data holding unit 22 Let This output data includes the processing result of the test data by the test program and the message identification data from the logging command set in association with the control command.

 網羅状況特定部66は、ロギング命令保持部16に記録されたロギング命令一覧情報と、出力データ保持部22に記録されたメッセージ識別データとを参照して、ペネトレーションテストにおいて実行されたロギング命令を特定する。網羅状況特定部66は、ロギング命令一覧情報におけるロギング命令の総数に占める、出力されたメッセージ識別データ数の割合を、原本プログラムに対するペネトレーションテストの網羅率として算出する。なお、出力されたメッセージ識別データ数を算出する際、同一のメッセージ識別データについては、複数回出力されている場合にも1とカウントする。 The coverage status specifying unit 66 refers to the logging command list information recorded in the logging command holding unit 16 and the message identification data recorded in the output data holding unit 22, and specifies the logging command executed in the penetration test. To do. The coverage status specifying unit 66 calculates the ratio of the number of output message identification data to the total number of logging commands in the logging command list information as the coverage rate of the penetration test for the original program. When calculating the number of output message identification data, the same message identification data is counted as 1 even if it is output a plurality of times.

 図2は、制御命令ノードの定義情報の構造を示す。言語欄には、プログラミング言語の種類が記録される。制御命令欄には、各プログラミング言語の抽象構文木に存在しうる複数種類のノードのうち制御命令ノードの識別情報が記録される。すなわち、構文木改変部56は、原本プログラムのプログラミング言語に対応する制御命令欄を参照し、その制御命令欄に記録された制御命令ノードを原本構文木において検出すると、その制御命令ノードの直後に所定のロギング命令ノードを挿入する。 FIG. 2 shows the structure of the definition information of the control instruction node. In the language column, the type of programming language is recorded. In the control instruction column, identification information of a control instruction node among a plurality of types of nodes that can exist in the abstract syntax tree of each programming language is recorded. That is, the syntax tree modifying unit 56 refers to the control instruction field corresponding to the programming language of the original program, and when the control instruction node recorded in the control instruction field is detected in the original syntax tree, immediately after the control instruction node. Insert a predetermined logging instruction node.

 図3(a)および図3(b)は、ロギング命令一覧情報の構造を示す。ロギング命令ID欄には、試験用プログラムに挿入したロギング命令を一意に特定するための識別情報が記録される。ロギング命令ノード欄には、改変構文木におけるロギング命令ノードの識別情報が記録される。同図においては、「ロギング命令ノードの識別名 : 試験用プログラムでの行番号」の形式で記録されている。制御命令ノード欄には、改変構文木においてロギング命令ノードが設定された制御命令ノードの、原本構文木における識別情報が記録される。同図においては、「制御命令ノードの識別名 : 原本プログラムでの行番号」の形式で記録されている。また、実行フローメッセージ欄には実行フローメッセージが記録され、メッセージ識別データ欄にはメッセージ識別データが記録される。 3A and 3B show the structure of the logging command list information. In the logging command ID column, identification information for uniquely specifying the logging command inserted into the test program is recorded. In the logging command node column, identification information of the logging command node in the modified syntax tree is recorded. In the figure, it is recorded in the format of “logging command node identification name: line number in test program”. In the control instruction node column, identification information in the original syntax tree of the control instruction node in which the logging instruction node is set in the modified syntax tree is recorded. In the figure, it is recorded in the format of “control command node identification name: line number in original program”. An execution flow message is recorded in the execution flow message column, and message identification data is recorded in the message identification data column.

 以上の構成による動作を以下説明する。
 図4は、試験支援装置100の動作を示すフローチャートである。指示受付部32が試験用プログラムの作成指示をユーザから受け付けると、原本プログラム取得部52は原本プログラムのデータを原本プログラム保持部12から取得する(S10)。図5(a)および図5(b)は、原本プログラムのプログラムコードの例を示す。図5(a)は、JAVAで記述された原本プログラムを示し、制御命令102a~102gを含む。また図5(b)は、PHPで記述された原本プログラムを示し、制御命令102h~102kを含む。図4に戻る。
The operation of the above configuration will be described below.
FIG. 4 is a flowchart showing the operation of the test support apparatus 100. When the instruction receiving unit 32 receives an instruction to create a test program from the user, the original program acquiring unit 52 acquires the data of the original program from the original program holding unit 12 (S10). FIG. 5A and FIG. 5B show examples of the program code of the original program. FIG. 5A shows an original program written in JAVA, and includes control instructions 102a to 102g. FIG. 5B shows an original program written in PHP and includes control instructions 102h to 102k. Returning to FIG.

 構文木生成部54は、原本プログラムに対応する原本構文木のデータをメモリ内に生成する(S12)。図6(a)は、図5(a)の原本プログラムから生成された原本構文木の一例を示す。図6(a)における制御命令ノード104a~104gは、図5(a)における制御命令102a~102gに対応する。同図では、制御命令ノードのそれぞれを、「制御ノードの識別名 : 原本プログラムでの行番号」の形式で示している。以降の抽象構文木における各ノードについても同様の形式で示すこととする。図6(b)は、図5(b)の原本プログラムから生成された原本構文木の一例を示す。図6(b)における制御命令ノード104h~104kは、図5(b)における制御命令102h~102kに対応する。図4に戻る。 The syntax tree generation unit 54 generates data of the original syntax tree corresponding to the original program in the memory (S12). FIG. 6A shows an example of an original syntax tree generated from the original program of FIG. The control instruction nodes 104a to 104g in FIG. 6A correspond to the control instructions 102a to 102g in FIG. In the figure, each control instruction node is shown in the format of “control node identification name: line number in original program”. Each node in the subsequent abstract syntax tree is shown in the same format. FIG. 6B shows an example of an original syntax tree generated from the original program shown in FIG. The control command nodes 104h to 104k in FIG. 6B correspond to the control commands 102h to 102k in FIG. Returning to FIG.

 構文木改変部56は、原本構文木に存在する制御命令ノードを検出して、その制御命令ノードにロギング命令ノードを対応づけて設定することにより、原本構文木が改変された改変構文木を設定する(S14)。そして、構文木改変部56は、原本構文木における制御命令ノードの識別情報と、改変構文木においてその制御命令ノードに対し設定したロギング命令ノードの識別情報とを対応づけてロギング命令保持部16に記憶させる(S16)。本実施の形態では、ロギング命令一覧情報のロギング命令ID欄と、ロギング命令ノード欄と、制御命令ノード欄とを設定する。 The syntax tree modifying unit 56 sets a modified syntax tree in which the original syntax tree is modified by detecting a control instruction node existing in the original syntax tree and setting a logging instruction node in association with the control instruction node. (S14). Then, the syntax tree modifying unit 56 associates the identification information of the control instruction node in the original syntax tree with the identification information of the logging instruction node set for the control instruction node in the modified syntax tree to the logging instruction holding unit 16. Store (S16). In the present embodiment, a logging command ID field, a logging command node field, and a control command node field in the logging command list information are set.

 図7(a)は、図6(a)の原本構文木が改変された改変構文木を示す。同図の改変構文木においては、図6(a)における制御命令ノード104a~104gのそれぞれに対して、ロギング命令ノード106a~106gのそれぞれが対応づけられている。また、図3(a)におけるロギング命令ID「001」のロギング命令ノード欄、制御命令ノード欄は、制御命令ノード104aに対応づけてロギング命令ノード106aを設定する際に記録されたデータを示している。すなわち、そのロギング命令ノード欄は改変構文木におけるロギング命令ノード106aの識別情報を示し、制御命令ノード欄は原本構文木における制御命令ノード104aの識別情報を示している。同様に、図3(a)におけるロギング命令ID「002」~「007」の各レコードは、制御命令ノード104b~104gのそれぞれに対応づけてロギング命令ノード106b~106gのそれぞれを設定する際に記録されたデータを示している。 FIG. 7 (a) shows a modified syntax tree obtained by modifying the original syntax tree of FIG. 6 (a). In the modified syntax tree of FIG. 6, the logging command nodes 106a to 106g are associated with the control command nodes 104a to 104g in FIG. Also, the logging command node column and the control command node column of the logging command ID “001” in FIG. 3A indicate data recorded when setting the logging command node 106a in association with the control command node 104a. Yes. That is, the logging command node column indicates identification information of the logging command node 106a in the modified syntax tree, and the control command node column indicates identification information of the control command node 104a in the original syntax tree. Similarly, the records of the logging command IDs “002” to “007” in FIG. 3A are recorded when the logging command nodes 106b to 106g are set in association with the control command nodes 104b to 104g, respectively. Data is shown.

 図7(b)は、図6(b)の原本構文木が改変された改変構文木を示す。同図の改変構文木においては、図6(b)における制御命令ノード104h~104kのそれぞれに対して、ロギング命令ノード106h~106kのそれぞれが対応づけられている。また、図3(b)におけるロギング命令ID「001」のロギング命令ノード欄、制御命令ノード欄は、制御命令ノード104hに対応づけてロギング命令ノード106hを設定する際に記録されたデータを示している。すなわち、そのロギング命令ノード欄は改変構文木におけるロギング命令ノード106hの識別情報を示し、制御命令ノード欄は原本構文木における制御命令ノード104hの識別情報を示している。同様に、図3(b)におけるロギング命令ID「002」~「004」の各レコードは、制御命令ノード104i~104kのそれぞれに対応づけてロギング命令ノード106i~106kのそれぞれを設定する際に記録されたデータを示している。図4に戻る。 FIG. 7 (b) shows a modified syntax tree obtained by modifying the original syntax tree of FIG. 6 (b). In the modified syntax tree of FIG. 6, the logging command nodes 106h to 106k are associated with the control command nodes 104h to 104k in FIG. 6B. Further, the logging command node column and the control command node column of the logging command ID “001” in FIG. 3B indicate data recorded when setting the logging command node 106h in association with the control command node 104h. Yes. That is, the logging command node column indicates identification information of the logging command node 106h in the modified syntax tree, and the control command node column indicates identification information of the control command node 104h in the original syntax tree. Similarly, the records of the logging command IDs “002” to “004” in FIG. 3B are recorded when the logging command nodes 106i to 106k are set in association with the control command nodes 104i to 104k, respectively. Data is shown. Returning to FIG.

 試験用プログラム出力部58は、ロギング命令一覧情報の各レコードを参照して、ロギング命令にて出力させる実行フローメッセージを決定し、その実行フローメッセージに対応するメッセージ識別データを決定する。そして、実行フローメッセージおよびメッセージ識別データをロギング命令一覧情報の各レコードに追加して記録する(S18)。試験用プログラム出力部58は、改変構文木とロギング命令一覧情報とにしたがって、メッセージ識別データを出力するロギング命令が追加され、原本プログラムが改変された試験用プログラムを試験用プログラム保持部18に記憶させる(S20)。 The test program output unit 58 refers to each record of the logging command list information, determines an execution flow message to be output by the logging command, and determines message identification data corresponding to the execution flow message. Then, the execution flow message and message identification data are added and recorded in each record of the logging command list information (S18). The test program output unit 58 is added with a logging command for outputting message identification data according to the modified syntax tree and the logging command list information, and stores the test program in which the original program is modified in the test program holding unit 18. (S20).

 図3(a)および図3(b)における実行フローメッセージ欄は、「テストログの固定文字列 | ロギング命令ID | 原本プログラムファイル名 | 制御命令の識別名 | 原本プログラムにおける制御命令の行番号」の形式の実行フローメッセージを示している。このうち「制御命令の識別名 | 原本プログラムにおける制御命令の行番号」には、制御命令ノード欄の記録データが設定される。また、図3(a)および図3(b)におけるメッセージ識別データ欄は、実行フローメッセージを所定のハッシュ関数に入力して得られたハッシュ値を示している。 The execution flow message field in FIG. 3 (a) and FIG. 3 (b) is "Test log fixed character string | Logging instruction ID | Original program file name | Control instruction identification name | Control instruction line number in original program" An execution flow message of the form Of these, “Control command identification name | Control program line number in original program” is set to the record data of the control command node column. Also, the message identification data column in FIGS. 3A and 3B shows a hash value obtained by inputting the execution flow message into a predetermined hash function.

 図8(a)は、図3(a)の原本プログラムに対応する試験用プログラムの例を示す。同図は、図7(a)の改変構文木および図3(a)のロギング命令一覧情報にしたがって生成されたプログラムコードを示している。同図では、原本プログラムに記述された制御命令102a~102gのそれぞれに対応づけてロギング命令108a~108gのそれぞれが設定されている。図8(b)は、図3(b)の原本プログラムに対応する試験用プログラムの例を示す。同図は、図7(b)の改変構文木および図3(b)のロギング命令一覧情報にしたがって生成されたプログラムコードを示している。同図では、原本プログラムに記述された制御命令102h~102kのそれぞれに対応づけてロギング命令108h~108kのそれぞれが設定されている。 FIG. 8 (a) shows an example of a test program corresponding to the original program of FIG. 3 (a). This figure shows the program code generated in accordance with the modified syntax tree of FIG. 7A and the logging instruction list information of FIG. In the figure, logging commands 108a to 108g are set in association with the control commands 102a to 102g described in the original program. FIG. 8B shows an example of a test program corresponding to the original program shown in FIG. This figure shows the program code generated in accordance with the modified syntax tree of FIG. 7B and the logging instruction list information of FIG. 3B. In the figure, logging commands 108h to 108k are set in association with the control commands 102h to 102k described in the original program.

 試験用プログラム出力部58は、ロギング命令一覧情報に設定されたロギング命令ノードを改変構文木にて検出すると、そのメッセージ識別データを所定のロギング命令の引数として設定することで、試験用プログラムを生成する。図8(a)および図8(b)におけるロギング命令「insert」は、ユーザにより定義された関数であり、所定のファイルやデータベースに対して、引数で指定された文字列データを出力する。 When the logging command node set in the logging command list information is detected by the modified syntax tree, the test program output unit 58 generates a test program by setting the message identification data as an argument of a predetermined logging command. To do. The logging instruction “insert” in FIGS. 8A and 8B is a function defined by the user, and outputs character string data specified by an argument to a predetermined file or database.

 本実施の形態のロギング命令は、原本プログラムにおける処理結果の出力先に、引数で指定された文字列データを出力する命令である。これにより、原本プログラムの当初記載のプログラムコードにより出力された処理結果と並列して、メッセージ識別データが出力され、処理結果と実行フローとの対応づけが容易になる。また、本実施の形態のロギング命令は、引数で指定されたメッセージ識別データを、原本プログラムにおける処理結果を閲覧するソフトウェアにおいて通常非表示とされる態様で出力する命令である。例えば、原本プログラムにおける処理結果の出力先がHTMLファイルやXMLファイル等の構造化文書である場合、引数で指定された文字列データをその構造化文書におけるコメント文として出力する。 The logging command in this embodiment is a command for outputting character string data specified by an argument to the output destination of the processing result in the original program. Thus, message identification data is output in parallel with the processing result output by the program code described at the beginning of the original program, and the correspondence between the processing result and the execution flow is facilitated. Further, the logging command of the present embodiment is a command for outputting the message identification data specified by the argument in such a manner that it is normally hidden in software for browsing the processing result in the original program. For example, when the output destination of the processing result in the original program is a structured document such as an HTML file or an XML file, the character string data specified by the argument is output as a comment sentence in the structured document.

 図9は、試験支援装置100の動作を示すフローチャートである。指示受付部32は、試験用プログラムに対するペネトレーションテストの開始指示をユーザから受け付け、試験用プログラム取得部62は、試験用プログラムのデータを試験用プログラム保持部18から読み込む(S30)。試験実行部64は、入力データ保持部20に記憶された試験データを読み込み、試験用プログラムに試験データを入力することにより試験用プログラムを動作させてペネトレーションテストを実行する(S32)。なお、試験用プログラムの実行に際し、試験用プログラムがソースコードである場合には、必要に応じて適宜実行可能形式のバイナリコードに変換する。 FIG. 9 is a flowchart showing the operation of the test support apparatus 100. The instruction receiving unit 32 receives from the user an instruction to start a penetration test for the test program, and the test program acquiring unit 62 reads the test program data from the test program holding unit 18 (S30). The test execution unit 64 reads the test data stored in the input data holding unit 20, operates the test program by inputting the test data into the test program, and executes the penetration test (S32). When executing the test program, if the test program is a source code, it is appropriately converted into an executable binary code as necessary.

 続いて、試験実行部64は、試験用プログラムの動作に伴う試験用プログラムからの出力データを出力データ保持部22に記憶させる(S34)。この出力データには、ロギング命令により出力されたメッセージ識別データが含まれる。試験実行部64は、試験用プログラムからの出力データを、構造化文書のファイル内の文字データとして記憶させてもよく、データベースにおける所定テーブルのレコードとして記憶させてもよい。 Subsequently, the test execution unit 64 stores the output data from the test program accompanying the operation of the test program in the output data holding unit 22 (S34). This output data includes message identification data output by the logging command. The test execution unit 64 may store the output data from the test program as character data in the structured document file, or may store it as a record of a predetermined table in the database.

 指示受付部32は、試験用プログラムからの出力データの表示要求をユーザから受け付ける(S36)。実行フローメッセージの参照権限がないユーザからの表示要求であれば(S38のN)、実行フロー表示部34は、試験用プログラムからの出力データをそのまま表示させる。図10は、HTMLファイルに出力された試験用プログラムの出力データを示す。同図は、ペネトレーションテストにおいて、図8(b)の制御命令102hが示す「theMethod」メソッドが呼び出されたときの出力データを示している。同図では、メッセージ識別データがそのまま表示されているため、ペネトレーションテストにおける原本プログラムの実行フローを把握することは困難である。図9に戻る。 The instruction receiving unit 32 receives a display request for output data from the test program from the user (S36). If it is a display request from a user who does not have the authority to refer to the execution flow message (N in S38), the execution flow display unit 34 displays the output data from the test program as it is. FIG. 10 shows the output data of the test program output to the HTML file. This figure shows output data when the “theMethod” method indicated by the control instruction 102h in FIG. 8B is called in the penetration test. In the figure, since the message identification data is displayed as it is, it is difficult to grasp the execution flow of the original program in the penetration test. Returning to FIG.

 実行フローメッセージの参照権限を有するユーザからの表示要求であれば(S38のY)、実行フロー表示部34は、ロギング命令保持部16のロギング命令一覧情報を参照して、試験用プログラムからの出力データであるメッセージ識別データを、そのメッセージ識別データに対応づけられた実行フローメッセージに変換して表示させる(S40)。図11は、HTMLファイルに出力された試験用プログラムの出力データを示す。同図では、図10のメッセージ識別データが、対応する実行フローメッセージに変換されているため、ペネトレーションテストにおける原本プログラムの実行フローを容易に確認できる。なお、ユーザが参照権限を有するか否かは公知のユーザ認証方法により判定されてよく、例えばユーザ端末のIDやログイン時のユーザ入力データにより判定してもよい。 If it is a display request from a user who has an authority to refer to the execution flow message (Y in S38), the execution flow display unit 34 refers to the logging command list information in the logging command holding unit 16 and outputs from the test program. The message identification data, which is data, is converted into an execution flow message associated with the message identification data and displayed (S40). FIG. 11 shows the output data of the test program output to the HTML file. In the figure, since the message identification data of FIG. 10 is converted into the corresponding execution flow message, the execution flow of the original program in the penetration test can be easily confirmed. Note that whether or not the user has the reference authority may be determined by a known user authentication method, and may be determined by, for example, the ID of the user terminal or user input data at the time of login.

 図12は、試験支援装置100の動作を示すフローチャートである。同図のS30~S34は、図9のS30~S34と同様であるため説明を省略する。指示受付部32は、原本プログラムに対するテストの網羅状況の表示要求をユーザから受け付ける。網羅状況特定部66は、出力データ保持部22に記憶されたメッセージ識別データを参照して、テストにより実行済のロギング命令を特定する(S50)。すなわち、出力データ保持部22に記憶されたメッセージ識別データに対応するロギング命令は、テストにより実行されたロギング命令であると特定できる。網羅状況特定部66は、ロギング命令保持部16のロギング命令一覧情報を参照して、ロギング命令の総数に占める実行済のロギング命令数を網羅率として算出する(S52)。網羅状況表示部36は、網羅状況特定部66において算出された網羅率をディスプレイに表示させる(S54)。また網羅状況表示部36は、ロギング命令を一覧表示させる際、テストにおいて未実行のロギング命令については実行済のロギング命令よりも強調表示させる(S56)。 FIG. 12 is a flowchart showing the operation of the test support apparatus 100. S30 to S34 in the figure are the same as S30 to S34 in FIG. The instruction receiving unit 32 receives from the user a request to display the test coverage for the original program. The coverage status specifying unit 66 refers to the message identification data stored in the output data holding unit 22 and specifies a logging command executed by the test (S50). That is, the logging command corresponding to the message identification data stored in the output data holding unit 22 can be specified as the logging command executed by the test. The coverage status specifying unit 66 refers to the logging command list information in the logging command holding unit 16 and calculates the number of executed logging commands in the total number of logging commands as a coverage rate (S52). The coverage status display unit 36 displays the coverage rate calculated by the coverage status specifying unit 66 on the display (S54). Further, when displaying the list of logging commands, the coverage status display unit 36 highlights the logging commands that have not been executed in the test more than the executed logging commands (S56).

 図13は、網羅状況表示部36による網羅状況の表示イメージを示す。なお、同図の網羅状況は、図5(a)の原本プログラムに対するテストの網羅状況を示している。この例では、ロギング命令の総数が7、実行済のロギング命令数が5であるため、コード網羅率が71%と表示されている。また、実行フローメッセージの一覧表示においては、未実行のロギング命令において出力されるメッセージが、ボールド書体かつ他のメッセージよりも大きな文字サイズで強調表示されている。この結果を確認したユーザは、網羅率を向上させるために、図5(a)の原本プログラムにおける15行目の条件判定がtrueとなるように、試験データ等を調整すべきことを認識できる。 FIG. 13 shows a display image of the coverage status by the coverage status display unit 36. Note that the coverage status in FIG. 5 indicates the test coverage status for the original program in FIG. In this example, since the total number of logging instructions is 7 and the number of executed logging instructions is 5, the code coverage is displayed as 71%. In the execution flow message list display, a message output in an unexecuted logging command is highlighted with a bold font and a larger character size than other messages. The user who confirms the result can recognize that the test data or the like should be adjusted so that the condition determination on the 15th line in the original program in FIG. 5A becomes true in order to improve the coverage rate.

 本実施の形態の試験支援装置100によれば、原本プログラムに対するペネトレーションテストを実行すべき際に、制御命令に対応づけてロギング命令を設定した試験用プログラムに対してペネトレーションテストが実行される。これにより、ペネトレーションテスト実行時の原本プログラムの実行フローをユーザが確認可能になる。ペネトレーションテストにおいて問題が検出された場合には、原本プログラムの実行フロー該当箇所を参照することで問題箇所を迅速に特定できる。また、ロギング命令では、試験用プログラムにおける制御命令の記述位置ではなく、原本プログラムにおける制御命令の記述位置が出力される。これにより、原本プログラムに存在する問題箇所を容易に特定しやすくなる。ユーザによる改修対象となるのは原本プログラムであるため、ユーザによる改修作業を一層支援できることになる。また、原本プログラムに記載されたプログラムコードそのものではなく、原本プログラムに対応する抽象構文木が改変されて試験用プログラムが生成される。これにより、原本プログラムの記述スタイルに依存することなく、制御命令を容易かつ正確に検出可能となり、ロギング命令の設定を容易かつ正確に実現できる。 According to the test support apparatus 100 of this embodiment, when the penetration test for the original program is to be executed, the penetration test is executed for the test program in which the logging command is set in association with the control command. Thereby, the user can check the execution flow of the original program when the penetration test is executed. When a problem is detected in the penetration test, the problem part can be quickly identified by referring to the corresponding part of the original program execution flow. In the logging instruction, the description position of the control instruction in the original program is output instead of the description position of the control instruction in the test program. Thereby, it becomes easy to identify the problem location which exists in the original program. Since the original program is to be repaired by the user, the repair work by the user can be further supported. Further, not the program code itself described in the original program but the abstract syntax tree corresponding to the original program is modified to generate a test program. As a result, the control command can be detected easily and accurately without depending on the description style of the original program, and the setting of the logging command can be realized easily and accurately.

 また試験支援装置100によれば、複数のプログラミング言語のそれぞれについて制御命令ノードの定義を記録したテーブルを参照して、その定義に合致する制御命令ノードが検出される。原本プログラムを記述したプログラミング言語に応じた定義を参照することにより、プログラミング言語に依存しない共通のロジックにて制御命令ノードを検出でき、その制御命令ノードに対応づけてロギング命令ノードを設定できる。 Further, according to the test support apparatus 100, a control instruction node that matches the definition is detected by referring to a table in which the definition of the control instruction node is recorded for each of a plurality of programming languages. By referring to the definition corresponding to the programming language describing the original program, the control instruction node can be detected by common logic independent of the programming language, and the logging instruction node can be set in association with the control instruction node.

 さらに試験支援装置100によれば、ペネトレーションテストにおける試験用プログラムの処理結果は構造化文書のデータとして出力され、ロギング命令による出力データはその構造化文書におけるコメント文として出力される。言い換えれば、構造化文書の閲覧用プログラムにおいて、通常非表示とされる態様で出力される。これにより、ロギング命令による出力データによって、試験用プログラムの処理結果の閲覧が困難になることを回避できる。例えば、試験用プログラムの処理結果がHTMLファイルのデータとして出力される場合、ロギング命令による出力データをそのまま表示させると、ウェブブラウザでの表示上問題になる場合がある。しかし、コメント文として出力されるため、ウェブブラウザでは試験用プログラムの処理結果を問題なく表示させることができる。かつ、HTMLファイルのソースデータを参照すればロギング命令によるメッセージも参照でき、実行フローを容易に特定できる。 Further, according to the test support apparatus 100, the processing result of the test program in the penetration test is output as structured document data, and the output data by the logging command is output as a comment sentence in the structured document. In other words, in the structured document browsing program, it is output in a mode that is normally hidden. Thereby, it is possible to avoid difficulty in browsing the processing result of the test program due to the output data by the logging command. For example, when the processing result of the test program is output as HTML file data, if the output data by the logging command is displayed as it is, there may be a problem in display on the web browser. However, since it is output as a comment sentence, the processing result of the test program can be displayed without any problem in the web browser. In addition, if the source data of the HTML file is referred to, a message by a logging command can be referred to, and the execution flow can be easily specified.

 さらにまた試験支援装置100によれば、ロギング命令による出力データとして、実行フローメッセージそのものに代えてメッセージ識別データが出力される。そして、ロギング命令による出力データを権限のあるユーザが参照する際には、メッセージ識別データが実行フローメッセージに変換されて表示される。これにより、権限のないユーザからは実行フローメッセージを隠蔽することができ、原本プログラムの内部構造等の情報漏洩を防止できる。 Furthermore, according to the test support apparatus 100, message identification data is output as output data by the logging command instead of the execution flow message itself. When an authorized user refers to the output data from the logging command, the message identification data is converted into an execution flow message and displayed. As a result, the execution flow message can be concealed from unauthorized users, and information leakage such as the internal structure of the original program can be prevented.

 さらにまた試験支援装置100によれば、ペネトレーションテストにおけるプログラムコードの実行割合を示す網羅率をユーザに提供できる。試験支援装置100では、抽象構文木を介して、複数の制御命令のそれぞれに対応づけてロギング命令が設定されるため、原本プログラムの規模や、原本プログラムの書式に依存することなく、高い精度の網羅率を容易に算出できる。 Furthermore, according to the test support apparatus 100, it is possible to provide the user with a coverage rate indicating the execution rate of the program code in the penetration test. In the test support apparatus 100, since a logging instruction is set in association with each of a plurality of control instructions via an abstract syntax tree, high accuracy can be achieved without depending on the size of the original program or the format of the original program. The coverage rate can be calculated easily.

 以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. is there.

 上述した実施の形態においては、1つの試験支援装置100において、改変部50および試験部60の両方が備えられた。変形例においては、改変部50と試験部60とは、互いに異なる複数の装置に分散して備えられてもよい。言い換えれば、第1の装置において生成された試験用プログラムのデータを第1の装置とは異なる第2の装置が読み込んで、第2の装置においてペネトレーションテスト、およびテスト結果の表示等が行われてもよい。 In the above-described embodiment, both the modification unit 50 and the test unit 60 are provided in one test support apparatus 100. In a modification, the modification unit 50 and the test unit 60 may be distributed and provided in a plurality of different devices. In other words, the second device different from the first device reads the test program data generated in the first device, and the second device performs a penetration test, a test result display, and the like. Also good.

 また、試験支援装置100の各機能ブロックを実現するプログラムモジュールは、IDE(Integrated Development Environment)等、他のソフトウェアプログラムに対するプラグインとして実装されてもよい。例えば、Eclipseに対するプラグインとして実装され、ユーザはこのプラグインをEclipseにアドオンすることで、試験用プログラムの生成およびペネトレーションテストを実行してもよい。これにより、ユーザはEclipseにおいてプログラムコードをコーディングした後、そのプログラムコードに対するペネトレーションテストをシームレスに実行できる。 In addition, the program module that realizes each functional block of the test support apparatus 100 may be implemented as a plug-in to other software programs such as IDE (Integrated Development Environment). For example, it may be implemented as a plug-in for Eclipse, and the user may add this plug-in to Eclipse to execute a test program generation and a penetration test. As a result, the user can seamlessly execute a penetration test for the program code after coding the program code in Eclipse.

 上述した実施の形態においては、本発明の技術思想をペネトレーションテストに適用した例を示した。しかし、本発明の技術思想はペネトレーションテストのみならずコンピュータプログラムのテスト全般に適用可能であり、その場合にも、実施の形態に記載した各効果を奏することは当業者には理解されるところである。 In the above-described embodiment, the example in which the technical idea of the present invention is applied to the penetration test has been shown. However, the technical idea of the present invention can be applied not only to the penetration test but also to the entire computer program test, and even in that case, those skilled in the art will understand that the effects described in the embodiments can be achieved. .

 請求項に記載の各構成要件が果たすべき機能は、実施の形態および変形例において示された各構成要素の単体もしくはそれらの連携によって実現されることも当業者には理解されるところである。 It should be understood by those skilled in the art that the functions to be fulfilled by the constituent elements described in the claims are realized by the individual constituent elements shown in the embodiments and the modifications or by their cooperation.

 12 原本プログラム保持部、 14 ノード定義保持部、 16 ロギング命令保持部、 18 試験用プログラム保持部、 20 入力データ保持部、 22 出力データ保持部、 32 指示受付部、 34 実行フロー表示部、 36 網羅状況表示部、 52 原本プログラム取得部、 54 構文木生成部、 56 構文木改変部、 58 試験用プログラム出力部、 62 試験用プログラム取得部、 64 試験実行部、 66 網羅状況特定部、 100 試験支援装置。 12 original program holding unit, 14 node definition holding unit, 16 logging instruction holding unit, 18 test program holding unit, 20 input data holding unit, 22 output data holding unit, 32 instruction receiving unit, 34 execution flow display unit, 36 coverage Status display section, 52 original program acquisition section, 54 syntax tree generation section, 56 syntax tree modification section, 58 test program output section, 62 test program acquisition section, 64 test execution section, 66 coverage status identification section, 100 test support apparatus.

 本発明は、コンピュータプログラムに対する試験を支援するための装置に適用できる。 The present invention can be applied to an apparatus for supporting a test for a computer program.

Claims (10)

 所定のプログラミング言語で記述された試験対象のプログラムを原本プログラムとして取得するプログラム取得部と、
 前記プログラミング言語の文法規則にしたがって、前記原本プログラムに記述されたプログラムコードの各要素をノードとする構文木を生成する構文木生成部と、
 前記構文木において、前記原本プログラムの実行フローを制御する制御命令のノードに対して、当該制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令のノードを対応づけて設定する構文木改変部と、
 前記構文木を参照して、所定の試験データが前記原本プログラムに入力された際の実行フローを確認可能にするためのプログラムであって、制御命令に対応づけてロギング命令が設定された試験用プログラムを出力するプログラム出力部と、
 を備えることを特徴とする試験支援装置。
A program acquisition unit for acquiring a test target program described in a predetermined programming language as an original program;
In accordance with the grammatical rules of the programming language, a syntax tree generation unit that generates a syntax tree having each element of the program code described in the original program as a node;
In the syntax tree, a syntax that associates and sets a logging instruction node that outputs a message indicating that the execution flow is controlled by the control instruction to a control instruction node that controls the execution flow of the original program A tree modification section;
A program for checking the execution flow when predetermined test data is input to the original program with reference to the syntax tree, wherein the logging instruction is set in association with the control instruction. A program output unit for outputting a program;
A test support apparatus comprising:
 前記構文木改変部は、複数のプログラミング言語のそれぞれについて制御命令を示すノードを記録したテーブルを参照して、各プログラミング言語で記述された原本プログラムから生成された構文木のそれぞれにおいて、制御命令を示すノードに対してロギング命令を示すノードを対応づけて設定することを特徴とする請求項1に記載の試験支援装置。 The syntax tree modifying unit refers to a table in which a node indicating a control instruction is recorded for each of a plurality of programming languages, and in each of the syntax trees generated from the original program described in each programming language, The test support apparatus according to claim 1, wherein a node indicating a logging command is set in association with a node indicated.  前記試験用プログラムに所定の試験データを入力して、その試験データに応じて実行されたロギング命令により前記メッセージを出力させる試験実行部をさらに備えることを特徴とする請求項1または2に記載の試験支援装置。 The test execution unit according to claim 1, further comprising: a test execution unit that inputs predetermined test data to the test program and outputs the message by a logging command executed according to the test data. Test support device.  前記原本プログラムは、入力に対する処理結果を、所定のタグセットによる構造化文書ファイルとして出力するよう記述されたものであり、
 前記ロギング命令により出力されるメッセージは、前記構造化文書ファイルにおけるコメント文であることを特徴とする請求項1から3のいずれかに記載の試験支援装置。
The original program is described to output a processing result for input as a structured document file with a predetermined tag set,
4. The test support apparatus according to claim 1, wherein the message output by the logging command is a comment sentence in the structured document file.
 前記原本プログラムへの入力に対する処理結果は、所定の閲覧プログラムの実行装置により表示される態様で出力され、
 前記ロギング命令により出力されるメッセージは、前記閲覧プログラムの実行装置では非表示とされる態様で出力されることを特徴とする請求項1から3のいずれかに記載の試験支援装置。
The processing result for the input to the original program is output in a form displayed by an execution device of a predetermined browsing program,
4. The test support apparatus according to claim 1, wherein the message output by the logging command is output in a mode in which the message is not displayed in the browsing program execution apparatus. 5.
 ユーザの権限に応じて、前記試験用プログラムの実行フローの表示を制限する実行フロー表示部をさらに備え、
 前記ロギング命令は、前記メッセージに代えて、前記メッセージとは異なるデータであって、前記メッセージを一意に特定可能な識別データを出力する命令であり、
 前記実行フロー表示部は、ユーザが前記試験用プログラムの実行フローを確認するとき、そのユーザが所定の権限を有する場合には、前記識別データにより特定されるメッセージを表示させることを特徴とする請求項1から5のいずれかに記載の試験支援装置。
According to the authority of the user, further comprising an execution flow display unit for limiting the display of the execution flow of the test program,
The logging command is a command to output identification data that is different from the message and can uniquely identify the message, instead of the message,
The execution flow display unit displays a message specified by the identification data when the user confirms the execution flow of the test program and the user has a predetermined authority. Item 6. The test support device according to any one of Items 1 to 5.
 前記試験データに応じて前記試験用プログラムから出力されたメッセージを参照して、前記試験データに応じて実行されたロギング命令を特定し、前記試験用プログラムに設定されたロギング命令に占める前記実行されたロギング命令の割合を、前記原本プログラムに対する試験の網羅率として算出する網羅状況特定部と、
 算出された網羅率を表示させる網羅状況表示部と、
 をさらに備えることを特徴とする請求項1から6のいずれかに記載の試験支援装置。
Referring to a message output from the test program according to the test data, the logging command executed according to the test data is specified, and the executed command occupies the logging command set in the test program A coverage status specifying unit that calculates the ratio of logging commands as the coverage rate of the test for the original program;
A coverage status display section for displaying the calculated coverage rate;
The test support apparatus according to claim 1, further comprising:
 試験対象のプログラムである原本プログラムに所定の試験データが入力された際の実行フローを確認可能にするためのプログラムであって、前記原本プログラムの実行フローを制御する制御命令に対応づけて、その制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令が設定された試験用プログラムを取得するプログラム取得部と、
 前記試験用プログラムに前記試験データを入力して、前記試験データに応じて実行されたロギング命令によりメッセージを出力させる試験実行部と、
 前記試験用プログラムから出力されたメッセージを参照して、前記試験データに応じて実行されたロギング命令を特定し、前記試験用プログラムに設定されたロギング命令に占める前記実行されたロギング命令の割合を、前記原本プログラムに対する試験の網羅率として算出する網羅状況特定部と、
 算出された網羅率を表示させる網羅状況表示部と、
 を備えることを特徴とする試験支援装置。
A program for making it possible to confirm an execution flow when predetermined test data is input to an original program as a test target program, which is associated with a control instruction for controlling the execution flow of the original program. A program acquisition unit for acquiring a test program in which a logging instruction for outputting a message indicating that the execution flow is controlled by the control instruction is set;
A test execution unit for inputting the test data to the test program and outputting a message by a logging command executed according to the test data;
With reference to the message output from the test program, the logging command executed according to the test data is specified, and the ratio of the executed logging command to the logging command set in the test program is determined. , A coverage status specifying unit that calculates the coverage rate of the test for the original program,
A coverage status display section for displaying the calculated coverage rate;
A test support apparatus comprising:
 所定のプログラミング言語で記述された試験対象のプログラムを原本プログラムとして取得するステップと、
 前記プログラミング言語の文法規則にしたがって、前記原本プログラムに記述されたプログラムコードの各要素をノードとする構文木を生成するステップと、
 前記構文木において、前記原本プログラムの実行フローを制御する制御命令のノードに対して、当該制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令のノードを対応づけて設定するステップと、
 前記構文木を参照して、所定の試験データが前記原本プログラムに入力された際の実行フローを確認可能にするためのプログラムであって、制御命令に対応づけてロギング命令が設定された試験用プログラムを出力するステップと、
 をコンピュータに実行させることを特徴とする試験支援方法。
Obtaining a test program written in a predetermined programming language as an original program;
Generating a syntax tree having each element of the program code described in the original program as a node according to the grammatical rules of the programming language;
In the syntax tree, a step of associating and setting a logging instruction node that outputs a message indicating that the execution flow is controlled by the control instruction to a control instruction node that controls the execution flow of the original program When,
A program for checking the execution flow when predetermined test data is input to the original program with reference to the syntax tree, wherein the logging instruction is set in association with the control instruction. Outputting a program;
A test support method characterized by causing a computer to execute.
 所定のプログラミング言語で記述された試験対象のプログラムを原本プログラムとして取得する機能と、
 前記プログラミング言語の文法規則にしたがって、前記原本プログラムに記述されたプログラムコードの各要素をノードとする構文木を生成する機能と、
 前記構文木において、前記原本プログラムの実行フローを制御する制御命令のノードに対して、当該制御命令により実行フローが制御されたことを示すメッセージを出力するロギング命令のノードを対応づけて設定する機能と、
 前記構文木を参照して、所定の試験データが前記原本プログラムに入力された際の実行フローを確認可能にするためのプログラムであって、制御命令に対応づけてロギング命令が設定された試験用プログラムを出力する機能と、
 をコンピュータに実現させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。
A function for acquiring a test program written in a predetermined programming language as an original program;
A function of generating a syntax tree having each element of the program code described in the original program as a node according to the grammatical rules of the programming language;
In the syntax tree, a function that associates and sets a logging instruction node that outputs a message indicating that the execution flow is controlled by the control instruction with respect to a control instruction node that controls the execution flow of the original program When,
A program for checking the execution flow when predetermined test data is input to the original program with reference to the syntax tree, wherein the logging instruction is set in association with the control instruction. A function to output a program;
The computer-readable recording medium which recorded the program for making a computer implement | achieve.
PCT/JP2009/002189 2009-05-18 2009-05-18 Test support device and test support method Ceased WO2010134123A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2009543267A JPWO2010134123A1 (en) 2009-05-18 2009-05-18 Test support apparatus and test support method
PCT/JP2009/002189 WO2010134123A1 (en) 2009-05-18 2009-05-18 Test support device and test support method
JP2010112475A JP2010267266A (en) 2009-05-18 2010-05-14 Test support device and test support method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2009/002189 WO2010134123A1 (en) 2009-05-18 2009-05-18 Test support device and test support method

Publications (1)

Publication Number Publication Date
WO2010134123A1 true WO2010134123A1 (en) 2010-11-25

Family

ID=43125824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/002189 Ceased WO2010134123A1 (en) 2009-05-18 2009-05-18 Test support device and test support method

Country Status (2)

Country Link
JP (1) JPWO2010134123A1 (en)
WO (1) WO2010134123A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05197560A (en) * 1992-01-20 1993-08-06 Toshiba Corp Programming language conversion device
JPH0934750A (en) * 1995-07-17 1997-02-07 Fujitsu Ltd Test source program generation system
JP2001282580A (en) * 2000-03-28 2001-10-12 Ntt Comware Corp Program test device, test program creation device, test program creation method, and information recording medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11224211A (en) * 1998-02-06 1999-08-17 Fuji Xerox Co Ltd Software inspection support device
JP3430252B2 (en) * 2000-01-24 2003-07-28 独立行政法人産業技術総合研究所 Source code conversion method, recording medium recording source code conversion program, and source code conversion device
JP2002244898A (en) * 2001-02-19 2002-08-30 Hitachi Ltd Database management program and database system
JP2007257613A (en) * 2006-12-19 2007-10-04 Nec Corp Obstacle influence extent specification system, process instance operation tracing method, obstacle influence extent specification method, and its program
JP4963070B2 (en) * 2007-03-02 2012-06-27 株式会社日立ソリューションズ Software component template management system
JP5038760B2 (en) * 2007-03-28 2012-10-03 株式会社東芝 Source code conversion apparatus and source code conversion method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05197560A (en) * 1992-01-20 1993-08-06 Toshiba Corp Programming language conversion device
JPH0934750A (en) * 1995-07-17 1997-02-07 Fujitsu Ltd Test source program generation system
JP2001282580A (en) * 2000-03-28 2001-10-12 Ntt Comware Corp Program test device, test program creation device, test program creation method, and information recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHUJI ONO, ASP Q&A, WINDOWS 2000 WORLD, IDG, vol. 5, no. 7, 1 July 2000 (2000-07-01), pages 132 - 133 *

Also Published As

Publication number Publication date
JPWO2010134123A1 (en) 2012-11-08

Similar Documents

Publication Publication Date Title
US10127386B2 (en) Systems and methods for adaptive analysis of software
EP3458953B1 (en) Systems and methods for model-based analysis of software
Leotta et al. Pesto: Automated migration of DOM‐based Web tests towards the visual approach
US9229738B2 (en) Software development tool for providing user context information to improve message quality at development time
US9632754B2 (en) Auto generation and linkage of source code to test cases
RU2367999C2 (en) Mechanism for production and application of limitations to logical structures in interactive medium
CN108920496B (en) Rendering method and device
JP4023803B2 (en) Web application development support apparatus, data processing method, and program
WO2014052661A2 (en) Security remediation
US20090288072A1 (en) Automatic Tests of Product Documentation
JP2010267266A (en) Test support device and test support method
JP2013134573A (en) Software correction device, software correction system, software correction method and software correction program
Mesbah Software analysis for the web: Achievements and prospects
An et al. Static typing for Ruby on Rails
Oliveira pytest Quick Start Guide: Write better Python code with simple and maintainable tests
JP2013030017A (en) Method, device, and program for generating test program
WO2010134123A1 (en) Test support device and test support method
Mg Learning Selenium Testing Tools
Martin et al. Property-based testing of browser rendering engines with a consensus oracle
CN116610558A (en) Code detection method, device, electronic equipment and computer readable storage medium
Ben Khalfallah CRISP: Clean, Reliable, Integrated Software Process
JP5123337B2 (en) Verification data generation device, verification data generation program, and verification data generation method
Zhou et al. Janus: Detecting Rendering Bugs in Web Browsers via Visual Delta Consistency
JP5556480B2 (en) Context Violation Detection Support Method, Context Violation Detection Support Device, and Context Violation Detection Support Program
CN120540699B (en) Generating method, plug-in and device of Vue element identifier

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2009543267

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 09844858

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09844858

Country of ref document: EP

Kind code of ref document: A1