US20150089296A1 - Derivation of generalized test cases - Google Patents

Derivation of generalized test cases Download PDF

Info

Publication number
US20150089296A1
US20150089296A1 US14/035,222 US201314035222A US2015089296A1 US 20150089296 A1 US20150089296 A1 US 20150089296A1 US 201314035222 A US201314035222 A US 201314035222A US 2015089296 A1 US2015089296 A1 US 2015089296A1
Authority
US
United States
Prior art keywords
value
parameter
test sample
test
program instructions
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.)
Granted
Application number
US14/035,222
Other versions
US9329979B2 (en
Inventor
Gabriel Dermler
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.)
GlobalFoundries Inc
Original Assignee
International Business Machines Corp
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 International Business Machines Corp filed Critical International Business Machines Corp
Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: DERMLER, GABRIEL, DR.
Priority to US14/035,222 priority Critical patent/US9329979B2/en
Publication of US20150089296A1 publication Critical patent/US20150089296A1/en
Assigned to GLOBALFOUNDRIES U.S. 2 LLC reassignment GLOBALFOUNDRIES U.S. 2 LLC ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: INTERNATIONAL BUSINESS MACHINES CORPORATION
Assigned to GLOBALFOUNDRIES INC. reassignment GLOBALFOUNDRIES INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: GLOBALFOUNDRIES U.S. 2 LLC, GLOBALFOUNDRIES U.S. INC.
Publication of US9329979B2 publication Critical patent/US9329979B2/en
Application granted granted Critical
Assigned to WILMINGTON TRUST, NATIONAL ASSOCIATION reassignment WILMINGTON TRUST, NATIONAL ASSOCIATION SECURITY AGREEMENT Assignors: GLOBALFOUNDRIES INC.
Assigned to GLOBALFOUNDRIES INC. reassignment GLOBALFOUNDRIES INC. RELEASE BY SECURED PARTY (SEE DOCUMENT FOR DETAILS). Assignors: WILMINGTON TRUST, NATIONAL ASSOCIATION
Assigned to GLOBALFOUNDRIES U.S. INC. reassignment GLOBALFOUNDRIES U.S. INC. RELEASE BY SECURED PARTY (SEE DOCUMENT FOR DETAILS). Assignors: WILMINGTON TRUST, NATIONAL ASSOCIATION
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • 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/368Test management for test version control, e.g. updating test cases to a new software version

Definitions

  • the present invention relates generally to test case generation, and more particularly to deriving generalized test cases for use in regression testing.
  • Regression testing involves the repetition of tests developed for a system for the purpose of ensuring correct system behavior and uncovering any software bugs or regressions in existing functional and non-functional areas of the system. Typically, regression testing is performed after changes, such as enhancements, patches, or configuration changes have been made to the system. The intent of regression testing is to ensure that the changes made to the system have not introduced new faults or bugs to the system. Regression testing can be used to not only test for the correctness of a program, but also for tracking the quality of its output.
  • test clients are programmed to interact with the server and check responses received from the server.
  • manually developing test clients is a tedious task requiring people with profound knowledge of the server APIs and significant programming skills
  • Embodiments of the present invention provide a method, system and computer program product for creating a generalized test case.
  • a first computer receives a first and a second test sample. The first computer executes the first and second test sample. The first computer determines that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample. The first computer creates a first value driven equivalence class. The first computer determines the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample and the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample. The first computer adds the second parameter to the first value driven equivalence class and creates a generalized test case, including at least the first value driven equivalence class.
  • FIG. 1 illustrates a test case creation system for the creation of a generalized test case, in accordance with an embodiment of the invention.
  • FIGS. 2 and 3 are a flowchart illustrating the operations of a test case program in creating a generalized test case, in accordance with an embodiment of the invention.
  • FIG. 4 is a block diagram depicting the hardware components of the test case creation system of FIG. 1 , in accordance with an embodiment of the invention.
  • aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer-readable medium(s) having computer readable program code/instructions embodied thereon.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • a computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof.
  • a computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages.
  • the program code may execute entirely on a user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
  • LAN local area network
  • WAN wide area network
  • Internet Service Provider for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
  • the computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other devices to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • FIG. 1 illustrates test case creation system 100 , in accordance with an embodiment of the invention.
  • test case creation system 100 includes server 110 , client device 120 and test case device 140 , all interconnected via network 130 .
  • network 130 is the Internet, representing a worldwide collection of networks and gateways to support communications between devices connected to the Internet.
  • Network 130 may include, for example, wired, wireless, or fiber optic connections.
  • network 130 may be implemented as an intranet, a local area network (LAN), or a wide area network (WAN).
  • LAN local area network
  • WAN wide area network
  • network 130 can be any combination of connections and protocols that will support communications between server 110 , client device 120 , and test case device 140 .
  • Server 110 includes server program 112 .
  • server 110 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as client device 120 and test case device 140 , via network 130 .
  • server 110 is shown as a single device, in other embodiments, server 110 may be comprised of a cluster or plurality of computing devices, working together or working separately. Server 110 is described in more detail with reference to FIG. 4 .
  • server program 112 is software capable of receiving requests from another computing device such as client device 120 via network 130 and transmitting responses to the requests back to the computing device via network 130 .
  • Client device 120 includes client program 122 .
  • client device 120 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as server 110 and test case device 140 , via network 130 .
  • test case device 140 is shown as a single device, in other embodiments, test case device 140 may be comprised of a cluster or plurality of computing devices, working together or working separately. Test case device 140 is described in more detail with reference to FIG. 4 .
  • client program 122 is software capable of transmitting requests to other computing devices, such as server 110 , via network 130 and receiving responses to the requests from the other computing devices via network 130 .
  • Test case device 140 includes test case program 142 .
  • test case device 140 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as server 110 and client program 120 , via network 130 . While test case device 140 is shown as a single device, in other embodiments, test case device 140 may be comprised of a cluster or plurality of computing devices, working together or working separately. Test case device 140 is described in more detail with reference to FIG. 4 .
  • test case program 142 is software capable of receiving or intercepting messages, such as requests and responses, transmitted between server 110 and client device 120 via network 130 .
  • test case program 142 is capable of analyzing the received or intercepted messages and creating a generalized test case based on the received or intercepted messages.
  • test case program 142 is also capable of receiving input from a user, via a user interface, and transmitting the input to other computing devices, such as server 110 and client device 120 via network 130 .
  • FIG. 2 is a flowchart illustrating the operations of test case program 142 in analyzing messages transmitted between server 110 and client device 120 and creating a generalized test case based on the analyzed messages, in accordance with an exemplary embodiment of the invention.
  • test case program 142 receives one or more pre-defined equivalence classes (step 202 ).
  • the one or more pre-defined equivalence classes are formulated by an administrator or programmer based on design time knowledge.
  • design many server based systems generate values exposing prefixes which are specific for considered resources.
  • TKTID TKTID
  • process task definition identifiers such as “taskDefID” or the plural form “taskDefIDs”.
  • variations of this value such as TKTID. 1 or TKTID. 2 , may be dynamically created by server 110 in some cases. All variations of the value which contain TKTID as a prefix are considered to be equivalent for the purposes of generalized test case creation.
  • a predefined equivalence class is designed to capture this equivalence.
  • a pre-defined equivalence class is a set of parameters exposing a value which is part of a predefined value set.
  • a predefined value set can be defined explicitly as consisting of a specific set of values or implicitly using value constraints.
  • a predefined value set may be defined as any value starting with the prefix TKTID.
  • a pre-defined equivalence class may be defined by an administrator as a set of parameters occurring in specific calls.
  • a parameter is identified uniquely by a “methodID” and a “parameterID”.
  • An administrator can then use design time knowledge to group parameters that contain the same or similar identifiers together into pre-defined equivalence classes. For example, since “getTaskDefinitions.outputtaskDefIDs” and “createTask.input.taskDefID” contain the same parameterID (taskDefID), an administrator with design time knowledge may choose to place both of these parameters into a pre-defined equivalence class.
  • test case program 142 may also receive one more pre-defined test exclusion classes; however, in other embodiments, test case program 142 may not receive any pre-defined test exclusion classes.
  • a pre-defined exclusion class is similar to a pre-defined equivalence class except a pre-defined exclusion class is a set of parameters which the administrator does not want to test. Therefore, an administrator with design time knowledge can create pre-defined exclusion classes so that certain parameters are excluded from testing against the test case.
  • Test case program 142 then receives a message transmitted between client device 120 and server 110 (step 204 ).
  • the received message is part of a test sample which includes a finite number of messages.
  • Test case program 142 determines if the parameter in the message meets the requirements of a pre-defined equivalence class (decision 206 ).
  • the message contains only one parameter; however, in other embodiments, the message may contain multiple parameters, in which case, test case program 142 analyzes each parameter contained in the message independently to determine if the parameter meets the requirements of a pre-defined equivalence class.
  • test case program 142 determines if the parameter in the received message has an associated value which contains the prefix “TKTID”.
  • test case program 142 determines the parameter in the received message is part of a pre-defined equivalence class (decision 206 , “YES” branch)
  • test case program 142 associates the parameter with the appropriate value driven equivalence class (step 208 ). For example, if test case program 142 determines the parameter is part of a pre-defined equivalence class and the parameter has two associated values, such as TKTID. 1 and TKTID. 2 , as stated above, test case program 142 creates two value driven equivalence classes, one for each associated value, with each containing the parameter.
  • a value driven equivalence class is a set of parameters which have the same associated value.
  • one value driven equivalence class may be defined as a set of parameters, where each parameter has an associated value of TKTID. 1
  • another value driven equivalence class may be defined as a set of parameters, where each parameter has an associated value of TKTID. 2 .
  • test case program 142 determines if the parameter in the received message is not part of a pre-defined equivalence class (decision 206 , “NO” branch). If test case program 142 determines if the parameter meets the requirements of a pre-defined exclusion class (decision 210 ). If test case program 142 determines the parameter meets the requirements of a pre-defined exclusions class (decision 210 , “YES” branch), test case program 142 associates the parameter with a “no test” class (step 212 ). In the exemplary embodiment, a “no test” class includes parameters that will not be tested. Once test case program 142 creates a generalized test case, the test case is later used by test case program 142 to verify that a program is working properly.
  • test case device 140 takes the place of client device 120 and test case program 142 communicates with server program 112 in the same fashion as client program 122 .
  • test case program 142 transmits the messages transmitted by client program 122 in the test sample and verifies that the responses by server program 112 match the responses in the test sample. For example, if for a first and second response by server program 112 , each response contains a parameter, with both parameters belonging to the same value driven equivalence class, the associated values of both parameters should be equal. If the associated values are not equal then there may be a bug or issue with server program 112 . In the exemplary embodiment, values for parameters that are in the “no test” class are not verified by test case program 142 .
  • test case program 142 determines that the parameter does not meet the requirements of a pre-defined exclusion class (decision 210 , “NO” branch)
  • test case program 142 associates the parameter with a “value test” class (step 214 ).
  • Parameters that are associated with a “value test” class are verified by test case program 142 on an individual basis. For example, once the generalized test case is created, test case program 142 verifies a parameter associated with a “value test” by verifying if the value associated with the parameter matches the value generated during the formation of the test case.
  • Test case program 142 determines if all messages in the test sample have been transmitted between server 110 and client device 120 (decision 216 ). If test program 142 determines that all messages in the test sample have not been transmitted between server 110 and client device 120 (decision 216 , “NO” branch), test case program 142 returns back to step 204 and analyzes the next message in the test sample.
  • test case program 142 determines if any of the value driven equivalence classes formed contain only one associated parameter (decision 302 ). If test case program 142 determines that no value driven equivalence class formed contains only one associated parameter (decision 302 , “NO” branch), test case program 142 creates a generalized test case from the formed value driven equivalence classes and “value test” classes (step 306 ).
  • test case program 142 determines that one or more value driven equivalence classes contains only one associated parameter (decision 302 , “YES” branch), test case program 142 removes the one or more value driven equivalence classes and associates the parameters contained in the removed value driven equivalence classes with a “no test” class (step 304 ). Test case program 142 then creates a generalized test case from the remaining value driven equivalence classes and “value test” classes (step 306 ).
  • test case device 140 takes the place of client device 140 and the test sample is re-executed.
  • Test case program 142 then verifies that the server response is accurate by way of comparison to the generalized test case. Values for any parameters which fall in a “value test” class are verified by comparison to the value recorded for the “value test” class in the generalized test case. If the value matches the recorded value then the server response is verified and accurate. Values for a parameter which falls in a value driven equivalence class is verified by comparison to values for other members of the value driven equivalence class.
  • a first parameter, belonging to a first value driven equivalence class is received with a corresponding value A and then a second parameter, also belonging to the first value driven equivalence class, is received with a corresponding value A
  • the values of the two parameters are compared to determine if they match. If they do match, the server response is verified.
  • the value recorded in the generalized test case is not used for verification purposes. Values of members of value driven equivalence classes are instead compared to other values corresponding to the value driven equivalence class received during the same iteration of the test sample.
  • the value A of the first parameter is compared to the value of the second parameter in order to verify correctness only if both parameters are received during the same iteration of the test sample.
  • the first parameter may have different associated values, however, the values of each value driven equivalence class should match for each iteration.
  • machine learning may be used to create a generalized test case from multiple test samples.
  • a computing device such as test case device 140 may receive pre-defined equivalence classes or may create a generalized test case without any pre-defined equivalence classes. If pre-defined equivalence classes are used, test case program 142 processes multiple test samples and creates value driven equivalence classes, “value test” classes, and “no test” classes in a similar manner as described above. If pre-defined equivalence classes are not used, test case program 142 processes multiple test samples, with each distinct parameter initially being designated as a “value test” class. Therefore, test case program 142 processes the first test sample, initially designating each parameter with a unique associated value, as “value test” class.
  • each parameter is additionally associated with its own value driven equivalence class containing the parameter itself and all other parameters exposing the same value.
  • test classification as well as the associated value driven equivalence class, are re-computed for every parameter.
  • a parameter is changed to “equiv test” class if the parameter was a “value test” in the previous test sample and the parameter value in the current test sample is different from the one in the previous test sample. Otherwise, the test class remains the same.
  • the value driven class associated with the parameter is cleared of the parameters exposing a value which is different from the parameter's value in the current test sample.
  • test sample 1 and test sample 2 are as follows:
  • Test case program 142 executes test sample 1 and initially classifies each parameter as a “value test” class while also creating a value driven equivalence class for each parameter in the first test sample. Therefore, test case program 142 classifies each parameter as a “value test” and also creates a value driven equivalence class which contains all four parameters since they all expose the same value in the first test sample.
  • Test case program 142 then executes the second test sample.
  • Test case program 142 classifies the first parameter, P1, as a value test since it exposes the same value in the second test sample as the first test sample, and also creates a first value driven equivalence class containing the first parameter.
  • Test case program 142 classifies the second parameter as “equiv test” since the value exposed by the parameter, P2, in the second test sample is different from the value exposed in the first test sample.
  • Test case program 142 creates a second value driven equivalence class containing the second parameter.
  • Test case program 142 also classifies the third parameter, P3, as “equiv test” and includes it in the second equivalence class since the value exposed by the third parameter in the second test sample is the same as the value exposed by the second parameter.
  • Test case program 142 classifies the fourth parameter as “equiv test” and creates a third value driven equivalence class containing the fourth parameter. After execution of the test samples, test case program 142 determines if any of the value driven equivalence classes contain only a single parameter. In this example, the first and fourth value driven equivalence classes contain only a single parameter so they are removed. The first parameter remains a “value test” while the fourth parameter is re-classified as a “no test”.
  • FIG. 4 depicts a block diagram of components of server 110 , client device 120 , and test case device 140 , in accordance with an illustrative embodiment. It should be appreciated that FIG. 4 provides only an illustration of one implementation and does not imply any limitations with regard to the environment in which different embodiments may be implemented. Many modifications to the depicted environment may be made.
  • Server 110 , client device 120 , and test case device 140 include communications fabric 402 , which provides communications between computer processor(s) 404 , memory 406 , persistent storage 408 , communications unit 412 , and input/output (I/O) interface(s) 414 .
  • communications fabric 402 which provides communications between computer processor(s) 404 , memory 406 , persistent storage 408 , communications unit 412 , and input/output (I/O) interface(s) 414 .
  • Memory 406 and persistent storage 408 are examples of computer-readable tangible storage devices and media.
  • Memory 406 may be, for example, one or more random access memories (RAM) 416 , cache 418 , or any other suitable volatile or non-volatile storage device.
  • RAM random access memories
  • persistent storage 408 includes flash memory.
  • persistent storage 408 may include a magnetic disk storage device of an internal hard drive, a solid state drive, a semiconductor storage device, read-only memory (ROM), EPROM, or any other computer-readable tangible storage device that is capable of storing program instructions or digital information.
  • the media used by persistent storage 408 may also be removable.
  • a removable hard drive may be used for persistent storage 408 .
  • Other examples include an optical or magnetic disk that is inserted into a drive for transfer onto another storage device that is also a part of persistent storage 408 , or other removable storage devices such as a thumb drive or smart card.
  • Communications unit 412 in these examples, provides for communications with other data processing systems or devices.
  • communications unit 412 includes one or more network interface cards.
  • Communications unit 412 may provide communications through the use of either or both physical and wireless communications links.
  • Programs server program 112 in server 110 ; client program 122 in client device 120 ; and test case program 142 in test case device 140 may be downloaded to persistent storage 408 through communications unit 412 .
  • I/O interface(s) 414 allows for input and output of data with other devices that may be connected to server 110 , client device 120 , and test case device 140 .
  • I/O interface 414 may provide a connection to external devices 420 such as a keyboard, keypad, a touch screen, and/or some other suitable input device.
  • external devices 420 can also include portable computer-readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards.
  • Software and data used to practice embodiments of the present invention e.g., the programs server program 112 in server 110 ; client program 122 in client device 120 ; and test case program 142 in test case device 140 , can be stored on such portable computer-readable storage media and can be loaded onto persistent storage 408 via I/O interface(s) 414 .
  • I/O interface(s) may also connect to display 422 .
  • Display 422 provides a mechanism to display data to a user and may be, for example, a computer monitor.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.

Landscapes

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

Abstract

A first computer receives a first and a second test sample. The first computer executes the first and second test sample. The first computer determines that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample. The first computer creates a first value driven equivalence class. The first computer determines the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample and the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample. The first computer adds the second parameter to the first value driven equivalence class and creates a generalized test case, including at least the first value driven equivalence class.

Description

    CROSS REFERENCE TO RELATED APPLICATION
  • This application is a continuation of U.S. patent application Ser. No. 14/033,762 filed Sep. 23, 2013 the entire content and disclosure of which is incorporated herein by reference.
  • FIELD OF THE INVENTION
  • The present invention relates generally to test case generation, and more particularly to deriving generalized test cases for use in regression testing.
  • BACKGROUND
  • Regression testing involves the repetition of tests developed for a system for the purpose of ensuring correct system behavior and uncovering any software bugs or regressions in existing functional and non-functional areas of the system. Typically, regression testing is performed after changes, such as enhancements, patches, or configuration changes have been made to the system. The intent of regression testing is to ensure that the changes made to the system have not introduced new faults or bugs to the system. Regression testing can be used to not only test for the correctness of a program, but also for tracking the quality of its output.
  • When developing regression tests for a client/server system, testing the server APIs (application programming interfaces) constitutes a significant part. Test clients are programmed to interact with the server and check responses received from the server. However, manually developing test clients is a tedious task requiring people with profound knowledge of the server APIs and significant programming skills
  • SUMMARY
  • Embodiments of the present invention provide a method, system and computer program product for creating a generalized test case. A first computer receives a first and a second test sample. The first computer executes the first and second test sample. The first computer determines that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample. The first computer creates a first value driven equivalence class. The first computer determines the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample and the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample. The first computer adds the second parameter to the first value driven equivalence class and creates a generalized test case, including at least the first value driven equivalence class.
  • BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
  • FIG. 1 illustrates a test case creation system for the creation of a generalized test case, in accordance with an embodiment of the invention.
  • FIGS. 2 and 3 are a flowchart illustrating the operations of a test case program in creating a generalized test case, in accordance with an embodiment of the invention.
  • FIG. 4 is a block diagram depicting the hardware components of the test case creation system of FIG. 1, in accordance with an embodiment of the invention.
  • DETAILED DESCRIPTION
  • As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer-readable medium(s) having computer readable program code/instructions embodied thereon.
  • Any combination of one or more computer-readable medium(s) may be utilized. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • A computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on a user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
  • Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
  • The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other devices to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • Embodiments of the present invention will now be described in detail with reference to the accompanying Figures.
  • FIG. 1 illustrates test case creation system 100, in accordance with an embodiment of the invention. In an exemplary embodiment, test case creation system 100 includes server 110, client device 120 and test case device 140, all interconnected via network 130.
  • In the exemplary embodiment, network 130 is the Internet, representing a worldwide collection of networks and gateways to support communications between devices connected to the Internet. Network 130 may include, for example, wired, wireless, or fiber optic connections. In other embodiments, network 130 may be implemented as an intranet, a local area network (LAN), or a wide area network (WAN). In general, network 130 can be any combination of connections and protocols that will support communications between server 110, client device 120, and test case device 140.
  • Server 110 includes server program 112. In the exemplary embodiment, server 110 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as client device 120 and test case device 140, via network 130. While server 110 is shown as a single device, in other embodiments, server 110 may be comprised of a cluster or plurality of computing devices, working together or working separately. Server 110 is described in more detail with reference to FIG. 4.
  • In the exemplary embodiment, server program 112 is software capable of receiving requests from another computing device such as client device 120 via network 130 and transmitting responses to the requests back to the computing device via network 130.
  • Client device 120 includes client program 122. In the exemplary embodiment, client device 120 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as server 110 and test case device 140, via network 130. While test case device 140 is shown as a single device, in other embodiments, test case device 140 may be comprised of a cluster or plurality of computing devices, working together or working separately. Test case device 140 is described in more detail with reference to FIG. 4.
  • In the exemplary embodiment, client program 122 is software capable of transmitting requests to other computing devices, such as server 110, via network 130 and receiving responses to the requests from the other computing devices via network 130.
  • Test case device 140 includes test case program 142. In the exemplary embodiment, test case device 140 may be a desktop computer, a notebook, a laptop computer, a tablet computer, a handheld device, a smart-phone, a thin client, or any other electronic device or computing system capable of receiving and sending data to and from other computing devices, such as server 110 and client program 120, via network 130. While test case device 140 is shown as a single device, in other embodiments, test case device 140 may be comprised of a cluster or plurality of computing devices, working together or working separately. Test case device 140 is described in more detail with reference to FIG. 4.
  • In the exemplary embodiment, test case program 142 is software capable of receiving or intercepting messages, such as requests and responses, transmitted between server 110 and client device 120 via network 130. In addition, test case program 142 is capable of analyzing the received or intercepted messages and creating a generalized test case based on the received or intercepted messages. Furthermore, test case program 142 is also capable of receiving input from a user, via a user interface, and transmitting the input to other computing devices, such as server 110 and client device 120 via network 130.
  • FIG. 2 is a flowchart illustrating the operations of test case program 142 in analyzing messages transmitted between server 110 and client device 120 and creating a generalized test case based on the analyzed messages, in accordance with an exemplary embodiment of the invention. In an exemplary embodiment, test case program 142 receives one or more pre-defined equivalence classes (step 202). In the exemplary embodiment, the one or more pre-defined equivalence classes are formulated by an administrator or programmer based on design time knowledge. With regard to the associated value of a parameter, by design, many server based systems generate values exposing prefixes which are specific for considered resources. For example, for a WebSphere Process Server® (Registered Trademark of IBM), values of a type “TKTID” are associated with all parameters corresponding to process task definition identifiers such as “taskDefID” or the plural form “taskDefIDs”. It is important to note that variations of this value, such as TKTID.1 or TKTID.2, may be dynamically created by server 110 in some cases. All variations of the value which contain TKTID as a prefix are considered to be equivalent for the purposes of generalized test case creation. A predefined equivalence class is designed to capture this equivalence. In the exemplary embodiment, a pre-defined equivalence class is a set of parameters exposing a value which is part of a predefined value set. A predefined value set can be defined explicitly as consisting of a specific set of values or implicitly using value constraints. For example, with regard to value constraints, a predefined value set may be defined as any value starting with the prefix TKTID. Using this pre-defined value set for a test sample which includes a parameter which has associated values of TKTID.1 and TKTID.2, and a parameter which has an associated value of TKTID.1, in the exemplary embodiment, both of these parameters may be placed in the same pre-defined equivalence class because they both have associated values which contain the prefix TKTID.
  • In other embodiments, based on design time knowledge, a pre-defined equivalence class may be defined by an administrator as a set of parameters occurring in specific calls. A parameter is identified uniquely by a “methodID” and a “parameterID”. An administrator can then use design time knowledge to group parameters that contain the same or similar identifiers together into pre-defined equivalence classes. For example, since “getTaskDefinitions.outputtaskDefIDs” and “createTask.input.taskDefID” contain the same parameterID (taskDefID), an administrator with design time knowledge may choose to place both of these parameters into a pre-defined equivalence class. In addition, in the exemplary embodiment, test case program 142 may also receive one more pre-defined test exclusion classes; however, in other embodiments, test case program 142 may not receive any pre-defined test exclusion classes. In the exemplary embodiment, a pre-defined exclusion class is similar to a pre-defined equivalence class except a pre-defined exclusion class is a set of parameters which the administrator does not want to test. Therefore, an administrator with design time knowledge can create pre-defined exclusion classes so that certain parameters are excluded from testing against the test case.
  • Test case program 142 then receives a message transmitted between client device 120 and server 110 (step 204). In the exemplary embodiment, the received message is part of a test sample which includes a finite number of messages.
  • Test case program 142 then determines if the parameter in the message meets the requirements of a pre-defined equivalence class (decision 206). In the exemplary embodiment, the message contains only one parameter; however, in other embodiments, the message may contain multiple parameters, in which case, test case program 142 analyzes each parameter contained in the message independently to determine if the parameter meets the requirements of a pre-defined equivalence class. Referring to the example above, for a pre-defined equivalence class defined in terms of associated values having certain value constraints, such as values containing the prefix “TKTID”, test case program 142 determines if the parameter in the received message has an associated value which contains the prefix “TKTID”. If test case program 142 determines the parameter in the received message is part of a pre-defined equivalence class (decision 206, “YES” branch), test case program 142 associates the parameter with the appropriate value driven equivalence class (step 208). For example, if test case program 142 determines the parameter is part of a pre-defined equivalence class and the parameter has two associated values, such as TKTID.1 and TKTID.2, as stated above, test case program 142 creates two value driven equivalence classes, one for each associated value, with each containing the parameter. A value driven equivalence class is a set of parameters which have the same associated value. Unlike pre-defined value classes, they cannot be defined in terms of value constraints or prefixes, but rather parameters in a value driven equivalence class must have the same associated value. Referring to the example provided above, one value driven equivalence class may be defined as a set of parameters, where each parameter has an associated value of TKTID.1, and another value driven equivalence class may be defined as a set of parameters, where each parameter has an associated value of TKTID.2.
  • If test case program 142 determines the parameter in the received message is not part of a pre-defined equivalence class (decision 206, “NO” branch), test case program 142 determines if the parameter meets the requirements of a pre-defined exclusion class (decision 210). If test case program 142 determines the parameter meets the requirements of a pre-defined exclusions class (decision 210, “YES” branch), test case program 142 associates the parameter with a “no test” class (step 212). In the exemplary embodiment, a “no test” class includes parameters that will not be tested. Once test case program 142 creates a generalized test case, the test case is later used by test case program 142 to verify that a program is working properly. For example, once the test case is generated and ready for utilization, test case device 140 takes the place of client device 120 and test case program 142 communicates with server program 112 in the same fashion as client program 122. In the exemplary embodiment, test case program 142 transmits the messages transmitted by client program 122 in the test sample and verifies that the responses by server program 112 match the responses in the test sample. For example, if for a first and second response by server program 112, each response contains a parameter, with both parameters belonging to the same value driven equivalence class, the associated values of both parameters should be equal. If the associated values are not equal then there may be a bug or issue with server program 112. In the exemplary embodiment, values for parameters that are in the “no test” class are not verified by test case program 142.
  • If test case program 142 determines that the parameter does not meet the requirements of a pre-defined exclusion class (decision 210, “NO” branch), test case program 142 associates the parameter with a “value test” class (step 214). Parameters that are associated with a “value test” class are verified by test case program 142 on an individual basis. For example, once the generalized test case is created, test case program 142 verifies a parameter associated with a “value test” by verifying if the value associated with the parameter matches the value generated during the formation of the test case.
  • Test case program 142 then determines if all messages in the test sample have been transmitted between server 110 and client device 120 (decision 216). If test program 142 determines that all messages in the test sample have not been transmitted between server 110 and client device 120 (decision 216, “NO” branch), test case program 142 returns back to step 204 and analyzes the next message in the test sample.
  • If test case program 142 determines that all messages in the test sample have been transmitted between server 110 and client device 120 (decision 216, “YES” branch), test case program 142 determines if any of the value driven equivalence classes formed contain only one associated parameter (decision 302). If test case program 142 determines that no value driven equivalence class formed contains only one associated parameter (decision 302, “NO” branch), test case program 142 creates a generalized test case from the formed value driven equivalence classes and “value test” classes (step 306).
  • If test case program 142 determines that one or more value driven equivalence classes contains only one associated parameter (decision 302, “YES” branch), test case program 142 removes the one or more value driven equivalence classes and associates the parameters contained in the removed value driven equivalence classes with a “no test” class (step 304). Test case program 142 then creates a generalized test case from the remaining value driven equivalence classes and “value test” classes (step 306).
  • Once the generalized test case has been created, test case device 140 takes the place of client device 140 and the test sample is re-executed. Test case program 142 then verifies that the server response is accurate by way of comparison to the generalized test case. Values for any parameters which fall in a “value test” class are verified by comparison to the value recorded for the “value test” class in the generalized test case. If the value matches the recorded value then the server response is verified and accurate. Values for a parameter which falls in a value driven equivalence class is verified by comparison to values for other members of the value driven equivalence class. For example, if a first parameter, belonging to a first value driven equivalence class, is received with a corresponding value A and then a second parameter, also belonging to the first value driven equivalence class, is received with a corresponding value A, the values of the two parameters are compared to determine if they match. If they do match, the server response is verified. In addition, for verification of a member of a value driven equivalence class, the value recorded in the generalized test case is not used for verification purposes. Values of members of value driven equivalence classes are instead compared to other values corresponding to the value driven equivalence class received during the same iteration of the test sample. In other words, the value A of the first parameter is compared to the value of the second parameter in order to verify correctness only if both parameters are received during the same iteration of the test sample. In previous or subsequent iterations of the test sample, the first parameter may have different associated values, however, the values of each value driven equivalence class should match for each iteration.
  • In other embodiments, machine learning may be used to create a generalized test case from multiple test samples. In this embodiment, a computing device, such as test case device 140 may receive pre-defined equivalence classes or may create a generalized test case without any pre-defined equivalence classes. If pre-defined equivalence classes are used, test case program 142 processes multiple test samples and creates value driven equivalence classes, “value test” classes, and “no test” classes in a similar manner as described above. If pre-defined equivalence classes are not used, test case program 142 processes multiple test samples, with each distinct parameter initially being designated as a “value test” class. Therefore, test case program 142 processes the first test sample, initially designating each parameter with a unique associated value, as “value test” class.
  • Within the first test sample, each parameter is additionally associated with its own value driven equivalence class containing the parameter itself and all other parameters exposing the same value. For any subsequent test samples, test classification, as well as the associated value driven equivalence class, are re-computed for every parameter. A parameter is changed to “equiv test” class if the parameter was a “value test” in the previous test sample and the parameter value in the current test sample is different from the one in the previous test sample. Otherwise, the test class remains the same. In addition, the value driven class associated with the parameter is cleared of the parameters exposing a value which is different from the parameter's value in the current test sample. After the test samples and related computations have been completed, each parameter classified as “equiv test” with a value driven equivalence class containing only one parameter is re-classified as a “no test”.
  • For example, if test sample 1 and test sample 2 are as follows:
  • Test Sample 1
  • Method ID Input/Output Parameter ID Value
    Method 1 Input P1 aVa11
    Output P2 aVa11
    Method 2 Input P3 aVa11
    Output P4 aVa11
  • Test Sample 2
  • Method ID Input/Output Parameter ID Value
    Method 1 Input P1 aVa11
    Output P2 aVa12
    Method 2 Input P3 aVa12
    Output P4 aVa13
  • Test case program 142 executes test sample 1 and initially classifies each parameter as a “value test” class while also creating a value driven equivalence class for each parameter in the first test sample. Therefore, test case program 142 classifies each parameter as a “value test” and also creates a value driven equivalence class which contains all four parameters since they all expose the same value in the first test sample.
  • Test case program 142 then executes the second test sample. Test case program 142 classifies the first parameter, P1, as a value test since it exposes the same value in the second test sample as the first test sample, and also creates a first value driven equivalence class containing the first parameter. Test case program 142 classifies the second parameter as “equiv test” since the value exposed by the parameter, P2, in the second test sample is different from the value exposed in the first test sample. Test case program 142 creates a second value driven equivalence class containing the second parameter. Test case program 142 also classifies the third parameter, P3, as “equiv test” and includes it in the second equivalence class since the value exposed by the third parameter in the second test sample is the same as the value exposed by the second parameter. Test case program 142 classifies the fourth parameter as “equiv test” and creates a third value driven equivalence class containing the fourth parameter. After execution of the test samples, test case program 142 determines if any of the value driven equivalence classes contain only a single parameter. In this example, the first and fourth value driven equivalence classes contain only a single parameter so they are removed. The first parameter remains a “value test” while the fourth parameter is re-classified as a “no test”.
  • The foregoing description of various embodiments of the present invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible. Such modifications and variations that may be apparent to a person skilled in the art of the invention are intended to be included within the scope of the invention as defined by the accompanying claims.
  • FIG. 4 depicts a block diagram of components of server 110, client device 120, and test case device 140, in accordance with an illustrative embodiment. It should be appreciated that FIG. 4 provides only an illustration of one implementation and does not imply any limitations with regard to the environment in which different embodiments may be implemented. Many modifications to the depicted environment may be made.
  • Server 110, client device 120, and test case device 140 include communications fabric 402, which provides communications between computer processor(s) 404, memory 406, persistent storage 408, communications unit 412, and input/output (I/O) interface(s) 414.
  • Memory 406 and persistent storage 408 are examples of computer-readable tangible storage devices and media. Memory 406 may be, for example, one or more random access memories (RAM) 416, cache 418, or any other suitable volatile or non-volatile storage device.
  • The programs server program 112 in server 110; client program 122 in client device 120; and test case program 142 in test case device 140 are stored in persistent storage 408 for execution by one or more of the respective computer processors 404 via one or more memories of memory 406. In the embodiment illustrated in FIG. 4, persistent storage 408 includes flash memory. Alternatively, or in addition to flash memory, persistent storage 408 may include a magnetic disk storage device of an internal hard drive, a solid state drive, a semiconductor storage device, read-only memory (ROM), EPROM, or any other computer-readable tangible storage device that is capable of storing program instructions or digital information.
  • The media used by persistent storage 408 may also be removable. For example, a removable hard drive may be used for persistent storage 408. Other examples include an optical or magnetic disk that is inserted into a drive for transfer onto another storage device that is also a part of persistent storage 408, or other removable storage devices such as a thumb drive or smart card.
  • Communications unit 412, in these examples, provides for communications with other data processing systems or devices. In these examples, communications unit 412 includes one or more network interface cards. Communications unit 412 may provide communications through the use of either or both physical and wireless communications links. Programs server program 112 in server 110; client program 122 in client device 120; and test case program 142 in test case device 140 may be downloaded to persistent storage 408 through communications unit 412.
  • I/O interface(s) 414 allows for input and output of data with other devices that may be connected to server 110, client device 120, and test case device 140. For example, I/O interface 414 may provide a connection to external devices 420 such as a keyboard, keypad, a touch screen, and/or some other suitable input device. External devices 420 can also include portable computer-readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention, e.g., the programs server program 112 in server 110; client program 122 in client device 120; and test case program 142 in test case device 140, can be stored on such portable computer-readable storage media and can be loaded onto persistent storage 408 via I/O interface(s) 414. I/O interface(s) may also connect to display 422.
  • Display 422 provides a mechanism to display data to a user and may be, for example, a computer monitor.
  • The programs described herein are identified based upon the application for which they are implemented in a specific embodiment of the invention. However, it should be appreciated that any particular program nomenclature herein is used merely for convenience, and thus the invention should not be limited to use solely in any specific application identified and/or implied by such nomenclature.
  • The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (9)

What is claimed is:
1. A method for creating a generalized test case, comprising the steps of:
a first computer receiving a first and a second test sample, wherein each test sample contains the same plurality of messages, and each message contains one or more parameters, and each parameter has at least one corresponding value;
the first computer executing the first test sample, wherein each parameter in the first test sample exposes a corresponding value;
the first computer executing the second test sample, wherein each parameter in the second test sample exposes a corresponding value;
the first computer determining that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample;
the first computer creating a first value driven equivalence class, wherein the first value driven equivalence class contains the first parameter;
the first computer determining the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample;
the first computer determining the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample;
the first computer adding the second parameter to the first value driven equivalence class; and
the first computer creating a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class.
2. The method of claim 1, further comprising the steps of:
the first computer determining that the third parameter exposes the same corresponding value in the second test sample as the first test sample;
the first computer classifying the third parameter as a first value test; and
the first computer creating a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class and the first value test.
3. The method of claim 1, further comprising the steps of:
the first computer determining the value exposed by the fourth parameter in the second test sample is different from the value exposed the fourth parameter in the first test sample;
the first computer creating a second value driven equivalence class, wherein the second value driven equivalence class contains the fourth parameter;
the first computer determining that the second value driven equivalence class contains a single parameter; and
the first computer removing the second value driven equivalence class and classifying the fourth parameter as a no test.
4. A computer program product for creating a generalized test case, the computer program product comprising:
one or more computer-readable storage devices and program instructions stored on at least one of the one or more tangible storage devices, the program instructions comprising:
program instructions to receive a first and a second test sample, wherein each test sample contains the same plurality of messages, and each message contains one or more parameters, and each parameter has at least one corresponding value;
program instructions to execute the first test sample, wherein each parameter in the first test sample exposes a corresponding value;
program instructions to execute the second test sample, wherein each parameter in the second test sample exposes a corresponding value;
program instructions to determine that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample;
program instructions to create a first value driven equivalence class, wherein the first value driven equivalence class contains the first parameter;
program instructions to determine the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample;
program instructions to determine the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample;
program instructions to add the second parameter to the first value driven equivalence class; and
program instructions to create a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class.
5. The computer program product of claim 4, further comprising:
program instructions to determine that the third parameter exposes the same corresponding value in the second test sample as the first test sample;
program instructions to classify the third parameter as a first value test; and
program instructions to create a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class and the first value test.
6. The computer program product of claim 4, further comprising:
program instructions to determine the value exposed by the fourth parameter in the second test sample is different from the value exposed the fourth parameter in the first test sample;
program instructions to create a second value driven equivalence class, wherein the second value driven equivalence class contains the fourth parameter;
program instructions to determine that the second value driven equivalence class contains a single parameter; and
program instructions to remove the second value driven equivalence class and classifying the fourth parameter as a no test.
7. A computer system for creating a generalized test case, the computer system comprising:
one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the program instructions comprising:
program instructions to receive a first and a second test sample, wherein each test sample contains the same plurality of messages, and each message contains one or more parameters, and each parameter has at least one corresponding value;
program instructions to execute the first test sample, wherein each parameter in the first test sample exposes a corresponding value;
program instructions to execute the second test sample, wherein each parameter in the second test sample exposes a corresponding value;
program instructions to determine that the value exposed by a first parameter in the second test sample is different from the value exposed by the first parameter in first test sample;
program instructions to create a first value driven equivalence class, wherein the first value driven equivalence class contains the first parameter;
program instructions to determine the value exposed by the second parameter in the second test sample is different from the value exposed by the second parameter in the first test sample;
program instructions to determine the value exposed by the second parameter in the second test sample is equivalent to the value exposed by the first parameter in the second test sample;
program instructions to add the second parameter to the first value driven equivalence class; and
program instructions to create a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class.
8. The computer system of claim 7, further comprising:
program instructions to determine that the third parameter exposes the same corresponding value in the second test sample as the first test sample;
program instructions to classify the third parameter as a first value test; and
program instructions to create a generalized test case, wherein the generalized test case includes at least the first value driven equivalence class and the first value test.
9. The computer system of claim 7, further comprising:
program instructions to determine the value exposed by the fourth parameter in the second test sample is different from the value exposed the fourth parameter in the first test sample;
program instructions to create a second value driven equivalence class, wherein the second value driven equivalence class contains the fourth parameter;
program instructions to determine that the second value driven equivalence class contains a single parameter; and
program instructions to remove the second value driven equivalence class and classifying the fourth parameter as a no test.
US14/035,222 2013-09-23 2013-09-24 Derivation of generalized test cases Expired - Fee Related US9329979B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/035,222 US9329979B2 (en) 2013-09-23 2013-09-24 Derivation of generalized test cases

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US14/033,762 US9286195B2 (en) 2013-09-23 2013-09-23 Derivation of generalized test cases
US14/035,222 US9329979B2 (en) 2013-09-23 2013-09-24 Derivation of generalized test cases

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US14/033,762 Continuation US9286195B2 (en) 2013-09-23 2013-09-23 Derivation of generalized test cases

Publications (2)

Publication Number Publication Date
US20150089296A1 true US20150089296A1 (en) 2015-03-26
US9329979B2 US9329979B2 (en) 2016-05-03

Family

ID=51352493

Family Applications (2)

Application Number Title Priority Date Filing Date
US14/033,762 Expired - Fee Related US9286195B2 (en) 2013-09-23 2013-09-23 Derivation of generalized test cases
US14/035,222 Expired - Fee Related US9329979B2 (en) 2013-09-23 2013-09-24 Derivation of generalized test cases

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US14/033,762 Expired - Fee Related US9286195B2 (en) 2013-09-23 2013-09-23 Derivation of generalized test cases

Country Status (3)

Country Link
US (2) US9286195B2 (en)
DE (1) DE112014002960T5 (en)
WO (1) WO2015039793A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228309A1 (en) * 2016-02-09 2017-08-10 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
CN107291610A (en) * 2016-04-12 2017-10-24 展讯通信(上海)有限公司 Testing case management and device
CN110134589A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Generation method, device, computer equipment and the storage medium of interface testing use-case
EP3588304A1 (en) * 2018-06-21 2020-01-01 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
US10949334B2 (en) * 2018-11-26 2021-03-16 Cognizant Technology Solutions India Pvt. Ltd. System and a method for automated unit test generation

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210075B2 (en) * 2015-05-08 2019-02-19 Mastercard International Incorporated Systems and methods for automating test scripts for applications that interface to payment networks
CN107291620A (en) * 2017-06-30 2017-10-24 郑州云海信息技术有限公司 A kind of method for generating test case and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2001264713A1 (en) 2000-05-19 2001-12-03 Wu-Hon Francis Leung Methods and apparatus for preventing software modifications from invalidating previously passed integration tests
US6966013B2 (en) 2001-07-21 2005-11-15 International Business Machines Corporation Method and system for performing automated regression tests in a state-dependent data processing system
US7032212B2 (en) 2002-05-06 2006-04-18 Microsoft Corporation Method and system for generating test matrices for software programs
US7024589B2 (en) * 2002-06-14 2006-04-04 International Business Machines Corporation Reducing the complexity of finite state machine test generation using combinatorial designs
GB0221257D0 (en) 2002-09-13 2002-10-23 Ibm Automated testing
US7478365B2 (en) 2004-01-13 2009-01-13 Symphony Services Corp. Method and system for rule-based generation of automation test scripts from abstract test case representation
DE102006050112A1 (en) * 2006-10-25 2008-04-30 Dspace Digital Signal Processing And Control Engineering Gmbh Requirement description e.g. test specification, creating method for embedded system i.e. motor vehicle control device, involves automatically representing modules, and assigning to classes in particular unified modeling language classes
JP5107131B2 (en) * 2008-04-28 2012-12-26 株式会社東芝 Test case generation device, generation method thereof, and program for test case generation
JP5767471B2 (en) * 2010-12-24 2015-08-19 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Apparatus and method for evaluating test completeness

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228309A1 (en) * 2016-02-09 2017-08-10 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
US10025696B2 (en) * 2016-02-09 2018-07-17 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
US20180300226A1 (en) * 2016-02-09 2018-10-18 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
US10437713B2 (en) * 2016-02-09 2019-10-08 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
CN110633206A (en) * 2016-02-09 2019-12-31 通用电气公司 System and method for automation requirement-based test case generation based on equivalence class analysis
CN107291610A (en) * 2016-04-12 2017-10-24 展讯通信(上海)有限公司 Testing case management and device
EP3588304A1 (en) * 2018-06-21 2020-01-01 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
US10949334B2 (en) * 2018-11-26 2021-03-16 Cognizant Technology Solutions India Pvt. Ltd. System and a method for automated unit test generation
CN110134589A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Generation method, device, computer equipment and the storage medium of interface testing use-case

Also Published As

Publication number Publication date
US9329979B2 (en) 2016-05-03
WO2015039793A1 (en) 2015-03-26
US20150089290A1 (en) 2015-03-26
DE112014002960T5 (en) 2016-03-24
US9286195B2 (en) 2016-03-15

Similar Documents

Publication Publication Date Title
US11169906B2 (en) Extraction of problem diagnostic knowledge from test cases
US9329979B2 (en) Derivation of generalized test cases
US11086619B2 (en) Code analytics and publication platform
US10296446B2 (en) Proactive and selective regression testing based on historic test results
US10437714B2 (en) System and method for performing script-less unit testing
US10185650B1 (en) Testing service with control testing
US11216342B2 (en) Methods for improved auditing of web sites and devices thereof
AU2018201941A1 (en) Automated program code analysis and reporting
US20200201689A1 (en) System and method for determining a process flow of a software application and for automatically generating application testing code
CN113227971A (en) Real-time application error identification and mitigation
CN108363634B (en) Method, device and equipment for identifying service processing failure reason
US20150317234A1 (en) System, method, apparatus and computer program for automatic evaluation of user interfaces in software programs
US20160162385A1 (en) Correlation of violating change sets in regression testing of computer software
US11138091B2 (en) Regression analysis platform
US11249880B1 (en) Debugging and simulating application runtime execution
US20210286706A1 (en) Graph-based method for inductive bug localization
US10176087B1 (en) Autogenic test framework
US20230297496A1 (en) System and method for serverless application testing
US10481969B2 (en) Configurable system wide tests
Lavoie et al. A case study of TTCN-3 test scripts clone analysis in an industrial telecommunication setting
US10331436B2 (en) Smart reviews for applications in application stores
CN110297625B (en) Application processing method and device
US9250870B2 (en) Automated creation of shim programs and interfaces
Patel et al. A review on software testing in software engineering
Erfani Joorabchi Mobile app development: challenges and opportunities for automated support

Legal Events

Date Code Title Description
AS Assignment

Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:DERMLER, GABRIEL, DR.;REEL/FRAME:031269/0336

Effective date: 20130924

AS Assignment

Owner name: GLOBALFOUNDRIES U.S. 2 LLC, NEW YORK

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:INTERNATIONAL BUSINESS MACHINES CORPORATION;REEL/FRAME:036550/0001

Effective date: 20150629

AS Assignment

Owner name: GLOBALFOUNDRIES INC., CAYMAN ISLANDS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:GLOBALFOUNDRIES U.S. 2 LLC;GLOBALFOUNDRIES U.S. INC.;REEL/FRAME:036779/0001

Effective date: 20150910

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCF Information on status: patent grant

Free format text: PATENTED CASE

AS Assignment

Owner name: WILMINGTON TRUST, NATIONAL ASSOCIATION, DELAWARE

Free format text: SECURITY AGREEMENT;ASSIGNOR:GLOBALFOUNDRIES INC.;REEL/FRAME:049490/0001

Effective date: 20181127

FEPP Fee payment procedure

Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20200503

AS Assignment

Owner name: GLOBALFOUNDRIES INC., CAYMAN ISLANDS

Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:WILMINGTON TRUST, NATIONAL ASSOCIATION;REEL/FRAME:054636/0001

Effective date: 20201117

AS Assignment

Owner name: GLOBALFOUNDRIES U.S. INC., NEW YORK

Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:WILMINGTON TRUST, NATIONAL ASSOCIATION;REEL/FRAME:056987/0001

Effective date: 20201117