WO2012128120A1 - Générateur de spécifications de test, procédé de génération de spécifications de test, et logiciel - Google Patents

Générateur de spécifications de test, procédé de génération de spécifications de test, et logiciel Download PDF

Info

Publication number
WO2012128120A1
WO2012128120A1 PCT/JP2012/056368 JP2012056368W WO2012128120A1 WO 2012128120 A1 WO2012128120 A1 WO 2012128120A1 JP 2012056368 W JP2012056368 W JP 2012056368W WO 2012128120 A1 WO2012128120 A1 WO 2012128120A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
test
variable
information acquisition
acquisition unit
Prior art date
Application number
PCT/JP2012/056368
Other languages
English (en)
Japanese (ja)
Inventor
崇央 安藤
銀惠 崔
秀明 西原
Original Assignee
独立行政法人産業技術総合研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 独立行政法人産業技術総合研究所 filed Critical 独立行政法人産業技術総合研究所
Priority to JP2013505910A priority Critical patent/JP5729465B2/ja
Publication of WO2012128120A1 publication Critical patent/WO2012128120A1/fr

Links

Images

Classifications

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

Definitions

  • the present invention relates to a test specification generation device for generating a test specification from specification description information described in a specification description language.
  • the test specification generation device of the first invention includes a test information storage unit that can store test information that is information used in a test, and a target specification described in a specification description language that is a language for describing the target specification.
  • a specification description information storage unit that can store specification description information that is information including one or more variable declarations and includes test source information for generating test information, and variable declaration and Using the test source information, a test information acquisition unit that acquires one or more test information having at least one input value of each of one or more variables, and one or more test information acquired by the test information acquisition unit in the test information storage unit
  • a test specification generation device including a test information storage unit for storing.
  • the variable has a type and the specification description information is associated with one or more variables among the one or more variables.
  • the test source information that is information for specifying the value used in the test among the values that each variable can take, and the test information acquisition unit associates the test source information with the variable from the specification description information.
  • the variable information acquisition means From the test source information acquisition means to be acquired, the variable information acquisition means to acquire variables and variable types that do not have test source information from the specification description information, and the test source information acquired by the test source information acquisition means, each test Test information acquisition means for acquiring one or more input values of variables corresponding to the original information for each variable and acquiring the input value for each variable from the variable acquired by the variable information acquisition means and the variable type.
  • information related to appropriate test specifications can be automatically generated by specifying values to be used in tests in association with variables among the specifications described formally at the time of target design.
  • the test information acquisition unit includes a variable corresponding to each test source information from the test source information acquired by the test source information acquisition unit.
  • the test specification generation device acquires one or more input values and output values for each variable, and acquires the input value and output value for each variable from the variable and variable type acquired by the variable information acquisition unit.
  • an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
  • the test specification generation device of the fourth aspect of the invention has a specification description information having declarations of one or more variables and one or more pieces of constraint information that is a description about the constraints, as compared with the third aspect of the invention.
  • the information acquisition unit acquires, for each variable, one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit, and the variable information acquisition unit acquires One or more test suites that are a set of one or more input values and one or more output values so that input values and output values are obtained for each variable from the selected variables and variable types, and all constraint information is satisfied. This is a test specification generation device to be acquired.
  • an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
  • the test specification generation device is based on the pre-transition state, which is a state having a set of one or more variable values, and the pre-transition state.
  • State transition information having an event that occurs and a post-transition state that is a state to be transitioned to when an event occurs in the pre-transition state, or a first state and a first state having a set of one or more variable values
  • the test specification generating apparatus is invariant condition information having a second state having a set of values of one or more variables that is always employed in the case of.
  • an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
  • the test information acquisition means has one or more premise information that is a set of a pre-transition state and an event included in one or more constraint information.
  • a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values that satisfy all the constraint information.
  • This configuration can prevent the generation of test suites that do not satisfy the prerequisites for state transition.
  • the test specification generation device further includes an event constraint information storage unit that can store one or more event constraint information indicating a constraint related to an event.
  • the test information acquisition means includes a test suite that is a set of one or more input values and one or more output values so as to satisfy all the constraint information by using one or more event constraint information as constraint information. It is a test specification generation device that acquires one or more.
  • This configuration can prevent the generation of test suites that include specified events.
  • the test information acquisition unit deletes the information of the pre-transition state from the information corresponding to the already acquired test suite, and To obtain one or more second constraint information that constitutes a logical negation of a part of information other than the pre-transition state, and to satisfy all the constraint information using the one or more second constraint information as constraint information,
  • This is a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values.
  • Such a configuration can prevent generation of a test suite having a known post-transition state.
  • the test information acquisition means deletes post-transition state information from the information corresponding to the test suite already acquired, and To obtain one or more second constraint information that constitutes the logical negation of the part of the information other than the post-transition state, and to satisfy all the constraint information using the one or more second constraint information as the constraint information,
  • This is a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values.
  • Such a configuration can prevent generation of a test suite having a known pre-transition state.
  • the test specification generation apparatus can automatically generate information related to appropriate test specifications if information for test design is described in the specifications described formally at the time of target design.
  • Block diagram of test specification generation apparatus Flow chart explaining operation of the test specification generation device Flow chart explaining the variable table acquisition process Flow chart for explaining the propositional formula acquisition process Flow chart explaining the test information acquisition process Figure showing the same specification description information Figure showing the variable table Diagram showing an example of a set of propositional formulas
  • the figure which shows the numerical sequence which the same test information acquisition means acquires Diagram showing the test information
  • the figure explaining the flow of processing of the test specification generation device Block diagram of test specification generation apparatus 2 in Embodiment 2 Figure showing the same specification description information Figure showing the variable table Diagram showing an example of a set of propositional formulas
  • the figure which shows the numerical sequence which the same test information acquisition means acquires Diagram explaining the operation to suppress the unnecessary test suite Overview of the computer system in the first embodiment Block diagram of the computer system
  • test specification generation device and the like will be described with reference to the drawings.
  • movement description may be abbreviate
  • the specification description language is usually a formal specification description language, but the format is not limited.
  • the specification description language is usually a language used to describe the specification when designing and constructing software, but may be a hardware description language.
  • it is preferable that the specification description information described in the specification description language is automatically converted into a program, but it is not always necessary to be automatically converted into a program.
  • FIG. 1 is a block diagram of the test specification generation device 1 in the present embodiment.
  • the test specification generation device 1 includes a test information storage unit 11, a specification description information storage unit 12, a reception unit 13, a test information acquisition unit 14, a test information storage unit 15, and a test information output unit 16.
  • the test information acquisition unit 14 includes a test source information acquisition unit 141, a variable information acquisition unit 142, and a test information acquisition unit 143.
  • the test information storage unit 11 can store test information.
  • the test information is information used in the target test.
  • the target is a target of specification description, which is usually software, but may be hardware.
  • the test information may be so-called one or more test cases or so-called one or more test suites.
  • the test case is input information (for example, one or more input values) given to the subject during the test.
  • the test suite is a set of input information (for example, one or more input values) given to an object during a test and output information (for example, one or more output values) when the input information is given.
  • the test information may be information that is useful for performing the test.
  • the test information may be information for automatic testing or may be information used for manual testing.
  • the output information is a result of the target operation.
  • the test information storage unit 11 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium.
  • the specification description information storage unit 12 can store specification description information.
  • the specification description information is information related to the target specification described in the specification description language.
  • the specification description information is usually information including declaration of one or more variables.
  • the specification description information is preferably information including test source information for generating test information.
  • Test source information which is information for specifying the value of, may be included. In other words, the test source information may be one or more values used in the test, a range of values used in the test (for example, 1 to 10, etc.), or one or more values not used in the test.
  • a range of values not used in the test for example, an even number, a combination of 3 or less alphabetic characters, and a condition of values not used in the test (for example, It may be a natural number divisible by 3).
  • the specification description information includes one or more variable declarations and one or more constraint information that is a description related to the constraints.
  • the constraint information is preferably, for example, state transition information or invariant condition information.
  • the state transition information is information related to state transition. It is preferable that the state transition information includes a pre-transition state, an event, a post-transition state, and an action.
  • the state transition information may be information having a pre-transition state, an event, and a post-transition state.
  • the pre-transition state is a state before accepting an event.
  • the pre-transition state is a state having a set of one or more variable values. An event occurs for the pre-transition state.
  • the post-transition state is a state that is shifted when an event occurs in the pre-transition state.
  • the post-transition state is a state having a set of one or more variable values.
  • An action explicitly raises a specific event.
  • the invariant condition information indicates an invariant condition.
  • the invariant condition information has a first state and a second state.
  • the first state has a set of values of one or more variables.
  • the second state has a set of values of one or more variables that are always adopted in the case of the first state.
  • the invariant condition information indicates a condition that is satisfied in both the first state and the second state.
  • the variable usually has a type.
  • a type is also called a data type. Some types have a fixed value or range.
  • the specification description information is preferably a file, but the data structure is not limited.
  • the specification description information storage unit 12 is preferably a nonvolatile recording medium, but can also be realized by a volatile recording medium.
  • specification description information may be stored in the specification description information storage unit 12 via a recording medium, and specification description information transmitted via a communication line or the like is stored in the specification description information storage unit 12.
  • specification description information input via an input device may be stored in the specification description information storage unit 12.
  • the accepting unit 13 accepts instructions and information.
  • the instruction is, for example, a test information generation instruction that is an instruction for generating test information.
  • the instruction is, for example, a test information output instruction that is an instruction to output test information.
  • the input means such as an instruction may be anything such as a keyboard, mouse, or menu screen.
  • the receiving unit 13 can be realized by a device driver for input means such as a keyboard, control software for a menu screen, or the like.
  • the test information acquisition unit 14 acquires one or more test information having at least an input value of each one or more variables, using the variable declaration and the test source information included in the specification description information.
  • An input value is a value given to an object.
  • the input value may be an initial value of a variable or a set value.
  • acquiring includes generating.
  • the acquisition may be reading from a recording medium.
  • the test source information acquisition unit 141 constituting the test information acquisition unit 14 acquires the test source information in association with the variable from the specification description information.
  • the test source information acquisition unit 141 performs lexical analysis and syntax analysis on the specification description information, and acquires the test source information in association with variables.
  • the test source information acquisition unit 141 performs, for example, pattern matching of reserved words (for example, “Var”, “testedwith”, etc.) on the specification description information, and acquires test source information in association with variables. You may do it. That is, the test source information acquisition unit 141 may acquire the test source information in association with the variable from the specification description information using a predetermined character string (for example, a reserved word).
  • the variable information acquisition unit 142 acquires a variable having no test source information and the type of the variable from the specification description information.
  • the test information acquisition unit 143 acquires one or more input values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable.
  • the test information acquisition unit 143 acquires an input value for each variable from the variable acquired by the variable information acquisition unit 142 and the variable type.
  • test information acquisition unit 143 acquires one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable.
  • the test information acquisition unit 143 may acquire an input value and an output value for each variable from the variable acquired by the variable information acquisition unit 142 and the variable type.
  • the test information acquisition unit 143 acquires one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable, and all One or more test suites satisfying the constraint information are acquired.
  • the test information acquisition unit 143 acquires an input value and an output value for each variable from the variable acquired by the variable information acquisition unit 142 and the type of the variable, and acquires one or more test suites that satisfy all the constraint information. May be.
  • a test suite is a set of one or more input values and one or more output values.
  • the test information acquisition unit 143 acquires, for example, candidate values of input values for each variable from the test source information acquired by the test source information acquisition unit 141 and the variable type. Then, the test information acquisition unit 143 acquires all combinations of input values (values before state transition) and output values (values after state transition) of one or more variables. This combination is a test suite candidate. Then, the test information acquisition unit 143 applies test suite candidates to all constraint information, and extracts test suites that satisfy all constraint information as test suites to be used.
  • test information acquisition unit 143 may acquire one or more test suite candidates, apply one or more constraint information to the one or more test suites, and delete a test suite that does not satisfy the constraint information. good.
  • the test information acquisition unit 143 may apply one or more pieces of constraint information when acquiring a test suite.
  • the constraint information is state transition information or invariant condition information.
  • State transition information is a state that transitions when an event occurs in the pre-transition state, the pre-transition state, and the pre-transition state, which are states having a set of one or more variable values. This is information having a post-transition state and an action.
  • the invariant condition information is information having a first state having a set of values of one or more variables and a second state having a set of values of one or more variables that are always employed in the case of the first state. .
  • the test information storage unit 15 stores one or more pieces of test information acquired by the test information acquisition unit 14 in the test information storage unit 11.
  • the test information output unit 16 outputs the test information stored in the test information storage unit 11.
  • output means display on a display, projection using a projector, printing on a printer, transmission to an external device, storage on a recording medium, processing result to another processing device or another program, etc. It is a concept that includes delivery.
  • the test information output unit 16 may be considered as including or not including an output device such as a display.
  • the test information output unit 16 can be implemented by output device driver software, or output device driver software and an output device.
  • the test information acquisition unit 14, the test source information acquisition unit 141, the variable information acquisition unit 142, the test information acquisition unit 143, and the test information storage unit 15 can be usually realized by an MPU, a memory, or the like.
  • the processing procedure of the test information acquisition unit 14 and the like is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
  • test specification generation device 1 Next, the operation of the test specification generation device 1 will be described using the flowchart of FIG.
  • Step S201 The receiving unit 13 determines whether a test information generation instruction has been received. If a test information generation instruction is accepted, the process proceeds to step S202. If a test information generation instruction is not accepted, the process proceeds to step S207.
  • the test information acquisition unit 14 reads the specification description information from the specification description information storage unit 12.
  • Step S203 The test information acquisition unit 14 interprets the specification description information and acquires a variable table.
  • the interpretation of the specification description information is usually lexical analysis, syntax analysis, etc., and is a well-known technique performed by a program language processing system (for example, a compiler or interpreter).
  • a program language processing system for example, a compiler or interpreter.
  • Step S204 The test information acquisition unit 14 interprets the specification description information and acquires a propositional logical expression.
  • a propositional logical expression acquisition process for acquiring a propositional logical expression will be described with reference to the flowchart of FIG.
  • the interpretation of the specification description information here is usually lexical analysis, syntax analysis, etc., and is a well-known technique performed by a program language processing system (for example, a compiler, interpreter, etc.).
  • Step S205 The test information acquisition unit 14 acquires test information using the variable table and the propositional logical expression. Test information acquisition processing for acquiring test information will be described with reference to the flowchart of FIG.
  • Step S206 The test information storage unit 15 stores the test information acquired in step S205 in the test information storage unit 11. The process returns to step S201.
  • Step S207 The receiving unit 13 determines whether or not a test information output instruction has been received. If a test information output instruction is accepted, the process proceeds to step S208. If a test information output instruction is not accepted, the process returns to step S201.
  • the test information output unit 16 reads the test information from the test information storage unit 11.
  • Step S209 The test information output unit 16 outputs the test information read in step S208. The process returns to step S201.
  • the process is terminated by turning off the power or interrupting the process.
  • variable table acquisition process in step S203 will be described with reference to the flowchart of FIG.
  • Step S301 The variable information acquisition unit 142 substitutes 1 for the counter i.
  • the variable information acquisition unit 142 reads the i-th processing unit from the specification description information.
  • One processing unit is, for example, a character string next to a specific reserved word from a character string next to one terminal, one terminator (for example, “;” or a reserved word) to the next terminator. To the next specific reserved word, etc.
  • One processing unit is a character string unit for determining whether a variable is declared or a character string unit for determining whether a variable is a constraint.
  • Step S303 The variable information acquisition unit 142 determines whether or not the i-th processing unit has been read in Step S303. If the i-th processing unit can be read, the process proceeds to step S304, and if it cannot be read, the process returns to the upper process.
  • Step S304 The variable information acquisition unit 142 determines whether or not the i-th processing unit is a variable declaration. If it is a variable declaration, go to step S305, and if it is not a variable declaration, go to step S310. Whether the processing unit is a variable declaration is, for example, whether the line includes the reserved word “Var”, whether it is a non-reserved word following the reserved word “Var”, or the type of the variable (reserved word ) And the like. Processing for determining whether such a processing unit is a variable declaration is also a known technique.
  • Step S305 The variable information acquisition unit 142 acquires the variable type from the i-th processing unit.
  • Step S306 The test source information acquisition unit 141 determines whether or not test source information exists in the i-th processing unit. If the test source information exists, the process goes to step S307, and if the test source information does not exist, the process goes to step S311. Whether or not the test source information exists is determined, for example, by whether or not a reserved word (for example, “testedwith”) that specifies the test source information is included.
  • a reserved word for example, “testedwith”
  • the test source information acquisition unit 141 acquires test source information from the i-th processing unit. Note that the test source information acquisition unit 141 acquires, for example, test source information corresponding to a reserved word (for example, “testedwith”) that specifies the test source information.
  • a reserved word for example, “testedwith”
  • Step S308 The variable information acquisition unit 142 uses the test source information and type or the test source information to obtain one or more input values of the variable, or one or more input values of the variable and one or more output values of the variable. get.
  • Step S309) The variable information acquisition unit 142 adds a record to the conversion table.
  • a record has one or more input values for a variable, or one or more input values for a variable and one or more output values for a variable.
  • Step S310 The variable information acquisition unit 142 increments the counter i by one. The process returns to step S303.
  • Step S311 The variable information acquisition unit 142 acquires one or more input values of the variable, or one or more input values of the variable and one or more output values of the variable using the type. Go to step S309. Note that the variable information acquisition unit 142 holds, for example, a correspondence table between types and one or more values. Using the correspondence table, one or more input values from the type, or one or more input values and 1 The above output value is acquired.
  • a record may be configured from default variable information (for example, “null # true” described later), and the record may be written in the variable table.
  • the variable information acquisition unit 142 holds default variable information in advance.
  • step S204 the propositional logical expression acquisition process in step S204 will be described using the flowchart of FIG.
  • Step S401 The test information acquisition unit 143 substitutes 1 for the counter i.
  • Step S402 The test information acquisition unit 143 reads the i-th processing unit from the specification description information.
  • Step S403 The test information acquisition unit 143 determines whether or not the i-th processing unit has been read in Step S402. If the i-th processing unit can be read, the process proceeds to step S404, and if it cannot be read, the process returns to the upper process.
  • Step S404 The test information acquisition unit 143 determines whether or not the i-th processing unit is a constraint. If it is a constraint, go to step S405, and if not, go to step S406.
  • a constraint is a condition that must be satisfied by a target in a specification description.
  • the test information acquisition unit 143 determines, for example, a line following a reserved word (for example, “Require”) until a reserved word indicating other than the next restriction appears as restriction information.
  • the method for determining the constraint information is not limited.
  • the test information acquisition unit 143 converts the constraint information corresponding to the i-th processing unit into a propositional logical expression.
  • a technique for converting constraint information into a propositional logical expression is a known technique.
  • Step S406 The test information acquisition unit 143 increments the counter i by one. The process returns to step S402.
  • step S205 Next, the test information acquisition process of step S205 will be described using the flowchart of FIG.
  • Step S501 The test information acquisition unit 143 substitutes 1 for the counter i.
  • the test information acquisition unit 143 acquires the i-th input value set from the variable table.
  • the test information acquisition unit 143 acquires the value of each variable from the values that one or more of each variable can take as an input value, and acquires one or more pieces of information having a pair of variable name and value.
  • One or more pieces of information having this variable name / value pair is a set of input values.
  • Step S503 The test information acquisition unit 143 determines whether or not the i-th input value set has been acquired in step S502. If the i-th set of input values can be acquired, the process proceeds to step S504, and if it cannot be acquired, the process returns to the upper process.
  • Step S504 The test information acquisition unit 143 substitutes 1 for the counter j.
  • the test information acquisition unit 143 acquires the j-th output value set from the variable table.
  • the test information acquisition unit 143 acquires the value of each variable from the values that one or more of each variable can take as an output value, and acquires one or more information having a pair of variable name and value.
  • One or more pieces of information having this variable name / value pair is a set of output values.
  • Step S506 The test information acquisition unit 143 determines whether or not the j-th output value set has been acquired in step S505. If the j-th output value set can be acquired, the process goes to step S507, and if not, the process goes to step S516.
  • Step S507 The test information acquisition unit 143 substitutes 1 for the counter k.
  • the test information acquisition unit 143 acquires the kth propositional logical expression.
  • the propositional formula here is the kth propositional formula among the one or more propositional formulas acquired by the propositional formula acquisition process in step S204.
  • Step S509 The test information acquisition unit 143 determines whether or not the kth propositional logical expression has been acquired in step S508. If the kth propositional logical expression can be acquired, the process proceeds to step S510. If the kth propositional logical expression cannot be acquired, the process proceeds to step S513.
  • Step S510 The test information acquisition unit 143 applies the i-th input value and the j-th output value to the k-th propositional formula.
  • Step S511 The test information acquisition unit 143 determines whether or not the i-th input value and the j-th output value satisfy the k-th propositional logical expression. If the kth propositional formula is satisfied, the process goes to step S512, and if not, the process goes to step S515.
  • Step S512 The test information acquisition unit 143 increments the counter k by one. The process returns to step S508.
  • the test information acquisition unit 143 configures test information having an i-th input value and a j-th output value.
  • Step S514 The test information acquisition unit 143 adds the test information configured in Step S513 to a buffer (not shown).
  • This buffer is usually a temporary storage medium.
  • Step S575 The test information acquisition unit 143 increments the counter j by one. The process returns to step S505.
  • Step S566 The test information acquisition unit 143 increments the counter i by one. The process returns to step S502.
  • test specification generation device 1 in the present embodiment will be described.
  • the specification description information storage unit 12 stores the specification description information shown in FIG. In FIG. 6, (1) and (2) are declarations of variable types.
  • the variable of the data type “onoff_type” in (1) can take the value “ON” or “OFF”.
  • Information that the data type “onoff_type” can take the value “ON” or “OFF” is held by the test specification generation device 1. That is, for example, the test specification generation device 1 holds “onoff_type: on
  • (3) is an example of variable declaration.
  • the test source information ⁇ off ⁇ exists by the reserved word “testedwith” of the test source information.
  • the test source information ⁇ off ⁇ indicates that “off” is the only value used when testing the variable “op” of the type “onoff_type”. That is, the description of the test source information can reflect the intention of the creator of the specification description information in the test. Note that “off” in “op: onoff_type ⁇ off ⁇ ” indicates that the initial value of the variable “op” is “off”.
  • (4) is an example of variable declaration, but does not have test source information.
  • the type of the variable “lamp” is “onoff_type”, and the initial value is “off”.
  • the values used in the test are all the values that the variable “lamp” can take (here, “on” and “off”).
  • (6) and (7) in FIG. 6 are constraint information.
  • the reserved words “Function” and “Require” indicate that the subsequent character string is constraint information.
  • (6) is state transition information.
  • “ch? M” represents an event
  • (7) is invariant condition information.
  • test specification generation device 1 it is assumed that the user has input a test information generation instruction to the test specification generation device 1.
  • the reception unit 13 receives a test information generation instruction. Then, the test information acquisition unit 14 reads the specification description information in FIG. 6 from the specification description information storage unit 12.
  • variable information acquisition unit 142 of the test information acquisition unit 14 interprets the specification description information in FIG. 6 and acquires a variable table. That is, the variable information acquisition unit 142 first acquires default variable information “null # true” and “SubsystemCountUp # true” from a recording medium (not shown) (usually a recording medium held by the variable information acquisition unit 142). . Then, the variable information acquisition unit 142 configures a record by attaching a variable identification code (hereinafter referred to as a variable identifier) to the acquired variable information, and writes the record in an empty variable table.
  • a variable identifier is an integer that is sequentially incremented from “1”. That is, the variable information acquisition unit 142 first writes the records “1 null # true” and “2 SubsystemCountUp # true” to the variable table.
  • variable information acquisition unit 142 sequentially reads “Extern”, “Data onoff_type; // from main”, “Class B”, “Data m_type ⁇ m ⁇ ;” in FIG. 6, not a variable declaration. Judge that. Note that the processing unit here is, for example, a row.
  • variable information acquisition unit 142 reads “Var op: onoff_typeoff ⁇ off ⁇ testedwith ⁇ off ⁇ ;” in FIG. 6. Then, the variable information acquisition unit 142 determines from the reserved word “Var” that this processing unit is a variable declaration. It is assumed that the variable information acquisition unit 142 determines that a variable declaration is made until a reserved word that is not a variable appears in subsequent processing units.
  • variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “Varop: onoff_type ⁇ off ⁇ testedwith ⁇ off ⁇ ;”.
  • test source information acquisition unit 141 acquires test source information “testedwith ⁇ off ⁇ ” from this processing unit.
  • variable information acquisition unit 142 uses the test source information “testedwith ⁇ off ⁇ ” to input one or more input values of the variable “op” or one or more input values of the variable and one or more output values of the variable. (The value of the next state) is acquired. That is, the variable information acquisition unit 142 acquires the input value “off” of the variable “op” and the output value “off” of the variable “op”. That is, the test source information “testedwith ⁇ off ⁇ ” indicates that only “off” is used as the test value of the variable “op”, and “on” is not used. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “op” to configure the record “3 op # off”.
  • variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “op”, and configures the record “4 @ op # off”. Note that “@” in “4 @ op # off” indicates an output value.
  • variable information acquisition unit 142 reads “lamp: onoff_type ⁇ off ⁇ ;” in FIG. Then, the variable information acquisition unit 142 determines that this processing unit is a variable declaration.
  • variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “lamp: onoff_type_ ⁇ off ⁇ ;”.
  • test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
  • variable information acquisition unit 142 uses the type “onoff_type” to obtain one or more input values ⁇ on, off ⁇ of the variable “lamp” and one or more output values ⁇ on, off ⁇ of the variable “lamp”. get. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “lamp”, and configures the record “5 lamp # on”. Further, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “lamp”, and configures the record “6 lamp # off”. Also, the variable information acquisition unit 142 adds the variable identifier to the output value “on” of the variable “lamp”, and configures the record “7 @ lamp # on”. Furthermore, the variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “lamp”, and configures the record “8 @ lamp # off”. And the variable information acquisition means 142 adds these records to a conversion table.
  • variable information acquisition unit 142 reads “Channel ch: m_type;” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Channel” that this processing unit is a variable declaration.
  • variable information acquisition unit 142 acquires the variable type “m_type” from the processing unit “Channel ch: m_type;”.
  • test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
  • variable information acquisition unit 142 acquires the input value ⁇ m ⁇ of the variable “ch” using the type “m_type”. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “m” of the variable “ch” to configure the record “9 ch? M”. Then, the variable information acquisition unit 142 adds this record to the conversion table. Note that the reserved word “Channel” indicates an event, and the variable information acquisition unit 142 knows in advance that only an input value exists and no output value exists.
  • variable table shown in FIG. 7 was obtained by the above processing.
  • “c --- CNFNum to VarAssign table ---”, “c --- end ---”, and “c” at the beginning of the line have no significant meaning here.
  • test information acquisition unit 143 interprets the specification description information in FIG. 6 and acquires a propositional logical expression as follows.
  • the test information acquisition unit 143 reads, for example, the processing unit “Var op: onoff_type ⁇ off ⁇ testedwith ⁇ off ⁇ ;”, and from the processing unit, the propositional logical expression “op # off” before the state transition and the state transition We get the later propositional formula "@ op # off”.
  • the test information acquisition means 143 interprets the processing unit “Var op: onoff_type ⁇ off ⁇ testedwith ⁇ off ⁇ ;”, the value of the variable “op” before the state transition is always “off”, and the variable after the state transition The value of “op” is always determined to be “off”.
  • “Op # off” indicates that the value of the variable “op” before the state transition is “off”.
  • “@ Op # off” indicates that the value of the variable “op” after the state transition is “off”.
  • the test information acquisition means 143 acquires the variable identifier “3” corresponding to “op # off” using the variable table of FIG. 7 for the propositional logical expression “op # off”. Then, replace “op # off” with “30”. Note that “0” in “3 0” indicates the end of the propositional logical expression.
  • the propositional formula “op # off” is added as a comment.
  • FIG. 8 is an example of a set of propositional logical expressions acquired by the test information acquisition unit 143. In FIG. 8, the propositional formula is commented out (c is added to the beginning of the line) and replaced with a set of variable identifiers having the same meaning. (1) in FIG.
  • test information acquisition unit 143 corresponds to “op # off”, and (2) corresponds to a set of variable identifiers having the same meaning. Similarly, (3) in FIG. 8 corresponds to “@ op # off”, and (4) corresponds to a set of variable identifiers having the same significance. Note that the test information acquisition unit 143 does not need to add the commented propositional logical expression.
  • the test information acquisition unit 143 changes the propositional logical expression “op # on ⁇ lamp # off ⁇ ch? M ⁇ @ lamp # on”. Judge that it cannot be converted into a set of variable identifiers. Therefore, the test information acquisition unit 143 obtains the information (5) in FIG.
  • the test information acquisition unit 143 performs a process of converting the propositional logical expression “ ⁇ op # off ⁇ lamp # off” before the state transition into a set of variable identifiers, and obtains “ ⁇ 3.6.0”. And the test information acquisition means 143 obtains (7) of FIG.
  • “ ⁇ ” of “ ⁇ 3” indicates negation. That is, “ ⁇ 3” that is a value obtained by subtracting “3 (op # off)” of the variable table is obtained from “ ⁇ op # off”.
  • the test information acquisition unit 143 applies “lamp # off” to the variable table to obtain “6”.
  • test information acquisition unit 143 obtains a multiplicative standard form (CNF) file of FIG.
  • the test information acquisition unit 143 takes the values “off” and “on” that can be taken by the variable “op” before the state transition, and the values “off” and “on” that can take the variable “@op” after the state transition.
  • Possible values “off” and “on” of variable “lamp” before state transition Possible values “off” and “on” of variable “@lamp” after state transition, Possible values of channel variable ” m ”, possible values of default“ null ”“ true ”and“ false ”, possible values of default counter“ SubsystemCountUp ”“ true ”and“ false ”, and all combinations (set of input value and output value ) Satisfies all the propositional formulas in FIG. 8 (FIG.
  • the test information acquisition unit 143 acquires a set of input values and output values that satisfy all the propositional logical expressions. This set of input values and output values is test information. However, here, the test information acquisition unit 143 converts the set of input values and output values into a numeric string with reference to the variable table.
  • the numerical sequence acquired by the test information acquisition unit 143 is (1), (2), and (3) in FIG. Note that “ ⁇ 1” in “ ⁇ 1 2 3 4 -5 6 -7 8 -9” in FIG. 9A indicates the negation of “1 null # true” in the variable table. Also, “2” in FIG. 9A indicates “2 SubsystemCountUp # true” in the variable table. Also, “3” in FIG. 9A indicates “3 op # off” in the variable table.
  • the test information acquisition unit 143 converts the numerical sequence shown in FIGS. 9 (1) to (3) into a set of input values and output values using (FIG. 7), and obtains the test information shown in FIG. .
  • FIG. 10 shows an example of test information, which is a test suite here.
  • the action attribute may not exist.
  • An event that is explicitly generated after state transition can be assigned to the attribute of action, but here, all are “null”.
  • test information acquisition unit 14 performs three processes of T1, T2, and T3.
  • specification description information here, in particular, a SENS description file that is a file described in a specification description language called SENS
  • a CNF file is output.
  • the constraint information appearing in the SENS description is converted into a multiplicative normal form (CNF) propositional logical expression, and a set of sequences representing the propositional logical expression is output.
  • CNF multiplicative normal form
  • the test information acquisition unit 14 expresses, with respect to variables appearing in the SENS description, what value the variable takes at the current time by an atomic proposition, and assigns a unique integer value to the atomic proposition.
  • the integer value is a serial number of the atomic proposition, and the truth value of the atomic proposition is expressed as a positive value of the integer value, and the false value is expressed as a negative value.
  • the value that the variable takes at the next time is expressed by an atomic proposition, and a unique integer value is assigned to the atomic proposition.
  • the test information acquisition unit 14 sets a proposition that indicates that the lamp is on at the current time as lamp # on and off. And assign integer values 5 and 6, respectively.
  • a proposition indicating that the lamp is on is @ lamp # on
  • a proposition indicating that the lamp is off is @ lamp # off
  • integer values 7 and 8 are assigned, respectively (see FIG. 8).
  • the test information acquisition unit 14 converts the constraint information appearing in the SENS description into a propositional logical expression.
  • the constraint information expressed in the form of “precondition: event: postcondition, action” is converted into a propositional formula of the form “precondition ⁇ event ⁇ postcondition ⁇ action”.
  • the test information acquisition unit 14 converts the propositional logical expression expressing the constraint information into a multiplicative standard form. For example, if the propositional formula ⁇ op # on ⁇ lamp # off ⁇ ch? M ⁇ @ lamp # on '' is converted to the multiplicative standard form, ⁇ ⁇ op # on ⁇ lamp # off ⁇ ch? M ⁇ @ lamp # on "
  • the clause of the multiplicative standard form is 1. It is expressed as a sequence using the integer value assigned to the atomic proposition. At this time, a negative literal is represented by a negative number.
  • the test information acquisition unit 14 outputs the numerical sequence for one clause as a line to a file. For example, the section “ ⁇ op # on ⁇ lamp # off ⁇ ch? M ⁇ @ lamp # on” is usually converted to a number sequence, but here “op” is only “off” according to the test source information. However, since it is only the target of the test information, it cannot be converted into a number sequence, and the number sequence is not output.
  • the test information acquisition unit 14 writes a correspondence table of atomic propositions and integer values as a comment at the end of the file.
  • the test information acquisition unit 14 receives the CNF file and outputs the DNF file. That is, all the Boolean value assignments that satisfy the propositional formula expressed by the CNF file are searched using SAT-solver (software by a known technique). The flow of processing is as shown in FIG.
  • SAT-solver outputs value assignments in additive standard form (DNF).
  • the value assignment is written (a) to a file in the form of a numerical sequence.
  • B At the same time, the logical negation is fed back to the SAT-solver to obtain the next value assignment. This is repeated until no value assignment is output.
  • Each numerical sequence appearing in the output file of T2 represents one of value assignments that satisfy the logical expression expressed by the CNF file.
  • process T3 is performed.
  • the CNF file and DNF file created from the SENS description are input, and the CSV file is output.
  • Each number sequence in the DNF file is interpreted as a logical expression based on the correspondence table at the end of the CNF file, and converted into a CSV format that represents the SENS variable and its value assignment table.
  • One line of CSV represents the input during test execution and the corresponding expected output. That is, one line of CSV represents a set of test suites. For example, the line “-1 -2 3 4 -5 6 -7 8 9” in the DNF file is changed to the propositional formula “op # off ⁇ lamp # off ⁇ ch? M ⁇ @ op # off ⁇ @ lamp # off”.
  • CSV format “off, off, ch? M, off, off, null” (see the second record in FIG. 10).
  • test source information can be described in the specification description information, so that the test information reflecting the designer's intention can be generated.
  • the processing in the present embodiment may be realized by software. Then, this software may be distributed by software download or the like. Further, this software may be recorded on a recording medium such as a CD-ROM and distributed. This also applies to other embodiments in this specification.
  • the software that implements the test specification generation apparatus according to the present embodiment is the following program.
  • this program is information related to the target specification described in the specification description language, which is the test information that is information used in the test, and the language that describes the target specification, in the storage medium.
  • the specification description information which is information including test source information for generating test information, is stored, and the computer uses one or more of the declaration of the variable and the test source information.
  • a test information acquisition unit that acquires one or more test information having at least an input value of each variable, and a test information storage unit that stores the one or more test information acquired by the test information acquisition unit in the test information storage unit It is a program for functioning.
  • the variable has a type
  • the specification description information is associated with one or more variables among the one or more variables, and among the values that each variable can take.
  • Test source information that is information for specifying a value to be used in the test information acquisition unit
  • the test information acquisition unit acquires the test source information in association with the variable from the specification description information, From the specification description information, a variable that does not have test source information, a variable information acquisition unit that acquires the type of the variable, and a variable corresponding to each test source information from the test source information acquired by the test source information acquisition unit
  • a test information acquisition unit for acquiring each input value from the variable acquired by the variable information acquisition unit and the type of the variable. It is preferable that a program for causing a data.
  • the test information acquisition unit acquires, for each variable, one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit. And it is suitable that it is a program for making a computer function as what acquires an input value and an output value for every variable from the variable which the said variable information acquisition means acquired, and the type of the said variable.
  • the specification description information includes one or more variable declarations and one or more constraint information that is a description related to the constraints
  • the test information acquisition unit is acquired by the test source information acquisition unit.
  • One or more input values and output values of variables corresponding to each test source information are acquired from the test source information for each variable, and the input values and outputs are obtained from the variables acquired by the variable information acquisition means and the types of the variables.
  • the constraint information includes a pre-transition state that is a state having a set of one or more variable values, an event that occurs for the pre-transition state, and the event that occurs in the state.
  • State transition information having a post-transition state that is a state to be transferred to, or a first state having a set of one or more variable values and a set of one or more variable values that are always employed in the case of the first state
  • the program is a program for causing a computer to function as the invariant condition information having the second state.
  • test specification generation apparatus 2 that can prevent generation of an inappropriate test suite will be described.
  • the test specification generation device 2 that prevents the generation of a test suite that does not satisfy the premise of the state transition will be described using the premise part of the state transition information as a constraint.
  • the test specification generation device 2 that provides restrictions on events and prevents the generation of a test suite including a specified event will be described.
  • the test specification generation device 2 that deletes the pre-transition state information and uses the logical negation of the remaining part as constraint information will be described.
  • a description will be given of the test specification generation device 2 in which the post-transition state information is deleted and the logical negation of the remaining part is used as constraint information.
  • FIG. 13 is a block diagram of the test specification generation apparatus 2 in the present embodiment.
  • the test specification generation apparatus 2 includes a test information storage unit 11, a specification description information storage unit 12, a reception unit 13, a test information acquisition unit 24, a test information storage unit 15, and a test information output unit 16.
  • the test information acquisition unit 24 includes an event constraint information storage unit 240, a test source information acquisition unit 141, a variable information acquisition unit 142, and a test information acquisition unit 243.
  • the specification description information stored in the specification description information storage unit 12 includes one or more variable declarations and one or more constraint information.
  • the constraint information here is, for example, state transition information having a state before transition, an event, and a state after transition in the case of the state.
  • the state transition information may have an action.
  • the constraint information is, for example, invariant condition information.
  • the test information acquisition unit 24 acquires one or more pieces of test information having at least an input value of each of one or more variables using the variable declaration. In addition, it is preferable that the test information acquisition unit 24 acquires one or more pieces of test information having at least an input value of each of one or more variables using the variable declaration and the test source information.
  • the test information here is usually a test suite.
  • the event constraint information storage unit 240 can store one or more event constraint information.
  • the event constraint information is information indicating constraints related to events.
  • the event constraint information is, for example, “ ⁇ null”, “ ⁇ t? Clear”, and the like. “ ⁇ null” indicates that the event is not null. “ ⁇ t? Clear” indicates that the event is not “t? Clear”.
  • the test information acquisition unit 24 can usually be realized by an MPU, a memory, or the like.
  • the processing procedure of the test information acquisition unit 24 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
  • the test information acquisition unit 243 acquires the input value and the output value for each variable from the specification description information, the variable acquired by the variable information acquisition unit 142 and the type of the variable, and satisfies all the constraint information.
  • One or more test suites that are a set of one or more input values and one or more output values are acquired. Further, the test information acquisition unit 243 acquires one or more input values and output values of the variables corresponding to each test source information from the specification description information for each variable, and satisfies 1
  • One or more test suites that are a set of the above input value and one or more output values may be acquired.
  • the test information acquisition means 243 acquires one or more test suites that are a set of one or more input values and one or more output values so as to satisfy all the constraint information by using one or more premise information as constraint information. It is preferable to do.
  • the premise information is a set of a pre-transition state and an event included in one or more pieces of constraint information.
  • the precondition information may be only the pre-transition state.
  • the logical sum of one or more pieces of premise information is usually constraint information.
  • the test information acquisition unit 243 uses one or more event constraint information as constraint information, and a test suite that is a set of one or more input values and one or more output values so as to satisfy all the constraint information. It is preferable to acquire one or more.
  • the event constraint information is event constraint information stored in the event constraint information storage unit 240.
  • the test information acquisition unit 243 acquires one or more second constraint information from the constraint information corresponding to the test suite (which may be referred to as a solution) that has already been acquired, and obtains the one or more second constraint information.
  • the second constraint information is information configured by deleting the pre-transition state information included in the already acquired test suite information and logically negating the remaining part.
  • the second constraint information may be information configured by deleting the pre-transition state and the event included in the constraint information and taking the logical negation of the remaining portion (post-transition state). For example, when the solution “op # off, null # true, @ op # off” is obtained, the test information acquisition unit 243 determines that the second constraint information “is not @ op # off” ( ⁇ “@ op # off” ) Is added as constraint information. Note that deleting the pre-transition state is equivalent to acquiring a part other than the pre-transition state from the constraint information.
  • the second constraint information is information that is deleted from the post-transition state information included in the constraint information and is included in the constraint information, and is configured by logical negation of a portion other than the post-transition state. Also good.
  • the second constraint information is information that the constraint information deletes the action and post-transition state, and the constraint information has, and is configured by logical negation of a portion other than the deleted portion (pre-transition state) Information may be used.
  • the test information acquisition unit 243 determines that the second constraint information “an event that is not op # off is not null” ( ⁇ (op # off
  • the test information acquisition unit 243 can be usually realized by an MPU, a memory, or the like.
  • the processing procedure of the test information acquisition unit 243 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
  • test specification generation device 2 in the present embodiment will be described.
  • four specific examples will be described.
  • Specific example 1 is a case where one or more pieces of premise information are also used as constraint information to suppress unnecessary test suites.
  • the specification description information storage unit 12 stores the specification description information shown in FIG.
  • the specification description information in FIG. 14 does not have “testedwith ⁇ off ⁇ ” in (3) as compared with the specification description information in FIG.
  • the constraint information is (6) and (7).
  • test specification generation device 1 it is assumed that the user has input a test information generation instruction to the test specification generation device 1.
  • the reception unit 13 receives a test information generation instruction. Then, the test information acquisition unit 14 reads the specification description information in FIG. 14 from the specification description information storage unit 12.
  • variable information acquisition unit 142 of the test information acquisition unit 14 interprets the specification description information in FIG. 14 and acquires a variable table. That is, the variable information acquisition unit 142 first acquires default variable information “null # true” and “SubsystemCountUp # true” from a recording medium (not shown). Then, the variable information acquisition unit 142 configures a record by attaching a variable identifier to the acquired information of each variable, and writes the record in an empty variable table.
  • variable information acquisition unit 142 sequentially reads “Extern”, “Data onoff_type; // from main”, “Class B”, and “Data m_type ⁇ m ⁇ ;” in FIG. Judge that.
  • variable information acquisition unit 142 reads “Var op: onoff_type ⁇ off ⁇ ;” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Var” that this processing unit is a variable declaration. It is assumed that the variable information acquisition unit 142 determines that a variable declaration is made until a reserved word that is not a variable appears in subsequent processing units.
  • variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “Varop: onoff_type” ⁇ off ⁇ ; ”.
  • test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
  • variable information acquisition unit 142 acquires the input values “on” and “off” of the variable “op” and the output values “on” and “off” of the variable “op” from the variable type “onoff_type”. To do. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “op” to configure the record “3 op # on. The variable information acquisition unit 142 also sets the variable“ op ”. A variable identifier is added to the input value “off” of the record, and the record “4 op # off” is formed. The variable information acquisition unit 142 adds a variable identifier to the output value “on” of the variable “op”. Record “5 @ op # on”, and variable information acquisition means 142 attaches a variable identifier to the output value “off” of variable “op” and records “6 @ op # off”. Constitute.
  • variable information acquisition unit 142 reads “lamp: onoff_type ⁇ off ⁇ ;” in FIG. Then, the variable information acquisition unit 142 determines that this processing unit is a variable declaration.
  • variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “lamp: onoff_type_ ⁇ off ⁇ ;”.
  • test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
  • variable information acquisition unit 142 uses the type “onoff_type” to obtain one or more input values ⁇ on, off ⁇ of the variable “lamp” and one or more output values ⁇ on, off ⁇ of the variable “lamp”. get. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “lamp”, and configures the record “7 lamp # on”. Further, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “lamp”, and configures the record “8 lamp # off”. Further, the variable information acquisition unit 142 adds the variable identifier to the output value “on” of the variable “lamp”, and configures the record “9 @ lamp # on”. Furthermore, the variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “lamp”, and configures the record “10 @ lamp # off”. And the variable information acquisition means 142 adds these records to a conversion table.
  • variable information acquisition unit 142 reads “Channel ch: m_type;” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Channel” that this processing unit is a variable declaration.
  • variable information acquisition unit 142 acquires the variable type “m_type” from the processing unit “Channel ch: m_type;”.
  • test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
  • variable information acquisition unit 142 acquires the input value ⁇ m ⁇ of the variable “ch” using the type “m_type”. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “m” of the variable “ch” to configure the record “11 ch? M”. Then, the variable information acquisition unit 142 adds this record to the conversion table. Note that the reserved word “Channel” indicates an event, and the variable information acquisition unit 142 knows in advance that only an input value exists and no output value exists.
  • variable table shown in FIG. 15 was obtained by the above processing.
  • test information acquisition unit 243 interprets the specification description information in FIG. 14 and acquires a propositional logical expression as follows.
  • the test information acquisition unit 243 reads, for example, the processing unit “Var op: offonoff_typeoff ⁇ off ⁇ ;”, and sets the propositional logical expression “op # on
  • the test information acquisition unit 243 obtains a variable identifier set “34.0” for the propositional logical expression “op # on
  • test information acquisition unit 243 obtains a set of variable identifiers “56.0” for the propositional formula “@ op # on
  • the test information acquisition unit 243 obtains the propositional logical expression “op # on ⁇ lamp # off ⁇ ch? M ⁇ @ lamp # on” as an equivalent logical expression “ ⁇ op # on ⁇ ⁇ lamp # off ⁇ ”. It is transformed into “ ⁇ ch? M ⁇ @ lamp # on” and is converted into a set of variable identifiers using the variable table of FIG. Then, the test information acquisition unit 243 obtains “9-11-11-3-8”. Therefore, the test information acquisition unit 243 obtains information (5) in FIG.
  • the test information acquisition unit 243 performs the above processing for all processing units, and obtains a set of propositional logical expressions shown in FIG. That is, if the specification description information of FIG. 14 is given to the processing system T1 described in the first embodiment, a set of propositional logical expressions of FIG. 16 is obtained. Note that the set of propositional formulas in FIG. 16 is an input to the SAT-solver.
  • test information acquisition unit 243 adds nine lines to the CNF file. 3 3 0 3 7 0 3 1 0 8 3 0 8 7 0 8 1 0 11 3 0 11 7 0 11 1 0
  • test information acquisition unit 243 extracts the description (premise information) corresponding to the precondition and the event occurrence from the specification description information, converts it into the input form of the SAT-solver, and adds a constraint. Run it.
  • Specific example 2 is a case where event constraint information is also used as constraint information to suppress unnecessary test suites.
  • the specification description information storage unit 12 stores the specification description information shown in FIG. Further, it is assumed that the event constraint information storage unit 240 stores “ ⁇ null”. Here, “ ⁇ null” indicates that “the event is not“ null ””. In other words, depending on the test execution plan, it may be desired to focus only on the test suite that accompanies the event occurrence. At this time, generating a test suite without an event is redundant. Therefore, by storing “ ⁇ null” in the event constraint information storage unit 240, generation of useless test suites is suppressed.
  • the test information acquisition unit 243 reads “ ⁇ null” from the event constraint information storage unit 240. Then, the test information acquisition unit 243 adds “ ⁇ null” as a constraint. That is, the test information acquisition unit 243 refers to the variable table of FIG. 15, picks up the variable “1” corresponding to “null # true”, adds the sign of “ ⁇ ” representing negative, Add one line (7) at the end.
  • test information acquisition unit 243 searches for a test suite that satisfies the specification of FIG. 14 and satisfies “the event is not“ null ””.
  • the search for test suites with specific event occurrences can be suppressed by the same process for other than null.
  • the test information acquisition means 243 picks up the variable “2” corresponding to “SubsystemCountUp” and adds the constraint information “ ⁇ 2 0”. do it.
  • the event constraint information “ ⁇ SubsystemCountUp” is stored in the event constraint information storage unit 240.
  • Specific Example 3 is a case where unnecessary test suites are suppressed by deleting the pre-transition state information. The operation of specific example 3 is shown in FIG.
  • test information acquisition means in the prior art acquires the value assignment as shown in FIG. 17 from the set of propositional logical expressions obtained by removing (6) and (7) from the set of propositional logical expressions in FIG. Note that the test information acquisition means in the prior art does not have a test suite generation prevention function of the test specification generation apparatus 2 in the present embodiment.
  • test information acquisition means 243 obtains the logical negation “null # true ⁇ S ubsys temCountUp # true ⁇ ⁇ op # on ⁇ op # off ⁇ ⁇ @ op # on ⁇ @ op # off ⁇ lamp # on ⁇ ⁇ lamp # Get the sequence ⁇ 1 2 -3 4 -5 6 7 -8 -9 10 -11 0 '' that encodes ⁇ off ⁇ ⁇ @ lamp # on ⁇ @ lamp # off ⁇ ⁇ ch? m '' and put it in SAT-solver As a result, the second solution (b) is calculated.
  • the test information acquisition unit 243 finally outputs a test suite corresponding to (c) of FIG.
  • the test information acquisition unit 243 can obtain an exhaustive list of test suites in which the posterior state does not overlap as a result.
  • Specific example 4 is a case where unnecessary test suites are suppressed by deleting the posterior state information.
  • the software that implements the test specification generation device is the following program.
  • this program is information related to the target specification described in the specification description language, which is the test information that is information used in the test, and the language that describes the target specification, in the storage medium.
  • Test information acquisition unit that stores specification description information, which is information including the declaration of, and uses the declaration of the variable to acquire one or more test information having at least an input value of each of the one or more variables
  • the specification description information includes declaration of one or more variables and one or more constraint information that is a description related to the constraint
  • the test information acquisition unit includes the variable acquired by the variable information acquisition unit.
  • one or more test suites that are a set of one or more input values and one or more output values so that the input value and the output value are obtained for each variable from the variable type, and all the constraint information is satisfied. It is a program to acquire.
  • the constraint information includes a pre-transition state that is a state having a set of one or more variable values, an event that occurs for the pre-transition state, and the event that occurs in the state. It is preferable that the information is constraint information for a state transition having a post-transition state that is a state to be transferred to.
  • the test information acquisition unit satisfies all constraint information by using, as constraint information, one or more premise information that is a set of a pre-transition state and an event included in the one or more constraint information.
  • one or more test suites that are a set of one or more input values and one or more output values.
  • the test information acquisition unit further includes an event constraint information storage unit capable of storing one or more event constraint information indicating a constraint regarding the event, and the test information acquisition unit includes the one or more event constraint information. It is preferable to acquire at least one test suite that is a set of one or more input values and one or more output values so that all the constraint information is satisfied using the constraint information as the constraint information.
  • the test information acquisition unit deletes the information about the pre-transition state and the event included in the constraint information from the constraint information corresponding to the test suite that has already been acquired, and the other than the pre-transition state.
  • One or more second constraint information that constitutes a logical negation of the part of the constraint information is acquired, and the one or more second constraint information is also used as the constraint information to satisfy all the constraint information. It is preferable to acquire at least one test suite that is a set of input values and one or more output values.
  • the test information acquisition unit is a part that the post-transition state included in each constraint information is deleted from each of the one or more pieces of constraint information, and the post-transition state.
  • One or more input values so as to obtain one or more second constraint information that constitutes a logical negation of a part other than, and to satisfy all the constraint information using the one or more second constraint information as constraint information It is preferable to acquire one or more test suites that are a set of one or more output values.
  • FIG. 19 shows the external appearance of a computer that executes the program described in this specification and realizes the test specification generation apparatus and the like of the above-described embodiment.
  • the above-described embodiments can be realized by computer hardware and a computer program executed thereon.
  • FIG. 19 is an overview diagram of the computer system 340
  • FIG. 20 is a diagram showing an internal configuration of the computer system 340. As shown in FIG.
  • the computer system 340 includes a computer 341 including an FD drive 3411 and a CD-ROM drive 3412, a keyboard 342, a mouse 343, and a monitor 344.
  • the computer 341 stores an MPU 3413, a bus 3414 connected to the CD-ROM drive 3412 and the FD drive 3411, and a program such as a bootup program.
  • a RAM 3416 for temporarily storing application program instructions and providing a temporary storage space; and a hard disk 3417 for storing application programs, system programs, and data.
  • the computer 341 may further include a network card that provides connection to the LAN.
  • a program that causes the computer system 340 to execute the functions of the test specification generation device or the like of the above-described embodiment is stored in the CD-ROM 3501 or FD 3502, inserted into the CD-ROM drive 3412 or FD drive 3411, and further a hard disk 3417 may be transferred.
  • the program may be transmitted to the computer 341 via a network (not shown) and stored in the hard disk 3417.
  • the program is loaded into the RAM 3416 at the time of execution.
  • the program may be loaded directly from the CD-ROM 3501, the FD 3502, or the network.
  • the program does not necessarily include an operating system (OS) or a third-party program that causes the computer 341 to execute the functions of the test specification generation device according to the above-described embodiment.
  • the program only needs to include an instruction portion that calls an appropriate function (module) in a controlled manner and obtains a desired result. How the computer system 340 operates is well known and will not be described in detail.
  • the computer that executes the program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.
  • each process may be realized by centralized processing by a single device (system), or by distributed processing by a plurality of devices. May be.
  • the test specification generation device has an effect that information related to an appropriate test specification can be automatically generated if information for test design is described at the time of target design, such as a test support device. Useful as.
  • Test information acquisition means 141
  • Test information source acquisition means 142

Abstract

La présente invention concerne un générateur de spécifications de test comprenant une unité de stockage d'informations de tests, une unité de stockage d'informations de description de spécifications, une unité d'acquisition d'informations de tests, et une unité d'accumulation d'informations de tests. L'unité de stockage d'informations de tests permet de stocker l'information de test correspondant à l'information utilisée dans un test. L'unité de stockage d'informations de descriptions de spécifications permet de stocker l'information de description de spécifications, c'est-à-dire l'information se rapportant à une spécification cible décrite dans un langage de description de spécifications constitué d'un langage conçu pour décrire la spécification, c'est-à-dire l'information incluant au moins une déclaration de variable, et constituant une information incluant l'information de source de test permettant de générer l'information de test. L'unité d'acquisition d'informations de tests utilise la déclaration de variable et l'information de source de test pour acquérir au moins une donnée de l'information de test comportant au moins la valeur d'entrée de la variable considérée. Enfin, l'unité d'accumulation d'informations de tests permet d'accumuler, dans l'unité de stockage des informations de tests, au moins une donnée de l'information de test acquise par l'unité d'acquisition d'informations de tests. Ainsi, dans le cas où de l'information destinée à la conception du test est décrite lors de la conception de la cible, il sera possible de générer automatiquement l'information se rapportant à la spécification de test appropriée.
PCT/JP2012/056368 2011-03-18 2012-03-13 Générateur de spécifications de test, procédé de génération de spécifications de test, et logiciel WO2012128120A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013505910A JP5729465B2 (ja) 2011-03-18 2012-03-13 テスト仕様生成装置、テスト仕様生成方法、およびプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-060199 2011-03-18
JP2011060199 2011-03-18

Publications (1)

Publication Number Publication Date
WO2012128120A1 true WO2012128120A1 (fr) 2012-09-27

Family

ID=46879273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/056368 WO2012128120A1 (fr) 2011-03-18 2012-03-13 Générateur de spécifications de test, procédé de génération de spécifications de test, et logiciel

Country Status (2)

Country Link
JP (1) JP5729465B2 (fr)
WO (1) WO2012128120A1 (fr)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0855041A (ja) * 1994-08-16 1996-02-27 Matsushita Electric Ind Co Ltd システムテスト仕様生成装置
JP2007323573A (ja) * 2006-06-05 2007-12-13 Internatl Business Mach Corp <Ibm> 機能テスト・スクリプト生成装置
JP2008293382A (ja) * 2007-05-25 2008-12-04 Fuji Electric Holdings Co Ltd テスト仕様自動生成方式

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0855041A (ja) * 1994-08-16 1996-02-27 Matsushita Electric Ind Co Ltd システムテスト仕様生成装置
JP2007323573A (ja) * 2006-06-05 2007-12-13 Internatl Business Mach Corp <Ibm> 機能テスト・スクリプト生成装置
JP2008293382A (ja) * 2007-05-25 2008-12-04 Fuji Electric Holdings Co Ltd テスト仕様自動生成方式

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
EUN HYE CHOI ET AL.: "SENS - Specification Language for Embedded Network Systems - toward Automatic Test Generation, Programming Science Technical Report", COLLABORATIVE RESEARCH TEAM FOR VERIFICATION AND SPECIFICATON, NATIONAL INSTITUTE OF ADVANCED INDUSTRIAL SCIENCE AND TECHNOLOGY, August 2011 (2011-08-01), Retrieved from the Internet <URL:http://cfv.jp/cvs/introduction/pdf/PS2011-002.pdf> [retrieved on 20120409] *
TAKAHIRO SEINO ET AL.: "Generating test cases for implementing concurrent systems based on the OTS/CafeOBJ method", IEICE TECHNICAL REPORT, vol. 110, no. 161, 26 July 2010 (2010-07-26), pages 7 - 12 *

Also Published As

Publication number Publication date
JP5729465B2 (ja) 2015-06-03
JPWO2012128120A1 (ja) 2014-07-24

Similar Documents

Publication Publication Date Title
US11093240B2 (en) Automating identification of code snippets for library suggestion models
US20210011696A1 (en) Blackbox matching engine
US11340896B2 (en) Library model addition
US20200264870A1 (en) Automating Generation of Library Suggestion Engine Models
US7685576B2 (en) System and method for model based system testing of interactive applications
CN106951305B (zh) 一种基于模型转换由QVT-R语言生成midCore脚本的方法
US9311077B2 (en) Identification of code changes using language syntax and changeset data
JP2014071899A (ja) ソフトウェア開発方法及びそのためのシステム
Brumbulli et al. Automatic verification of BPMN models
CN113157597A (zh) 结构解析方法、装置、电子设备和存储介质
Mishra et al. Creating reusable software component from object-oriented legacy system through reverse engineering.
JP2006350729A (ja) アプリケーションソフトウェア構築方法、アプリケーションソフトウェア構築処理プログラム及びアプリケーションソフトウェア構築装置
Deantoni Modeling the behavioral semantics of heterogeneous languages and their coordination
JP2009009418A (ja) 検証装置および検証方法
Schreiner et al. A new approach for generating view generators
JP5729465B2 (ja) テスト仕様生成装置、テスト仕様生成方法、およびプログラム
CN114020604A (zh) 一种基于工作流的自动化测试方法及装置
EP3255558A1 (fr) Dispositif d&#39;analyse syntaxique, dispositif d&#39;apprentissage, dispositif de traduction automatique et support d&#39;enregistrement
Hnětynka et al. Using meta‐modeling in design and implementation of component‐based systems: the SOFA case study
Höver et al. A domain specific language for describing s-bpm processes
JP2006338399A (ja) プログラム開発装置、プログラム開発ソフトウェア及び記憶媒体
Zaytsev Micropatterns in grammars
Lu et al. DATAM: A model‐based tool for dependability analysis
WO2016085213A1 (fr) Procédé et appareil d&#39;ingénierie inverse de modèle exécutable par ordinateur
CN110765020B (zh) 基于领域知识的测试用例生成方法

Legal Events

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

Ref document number: 12759955

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013505910

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12759955

Country of ref document: EP

Kind code of ref document: A1