Specification
BACKGROUND
The present invention relates to the field of software testing. More specifically, the present invention relates to a method and system for testing an order management system
Software testing is a technique used to verify the accuracy, completeness and quality of computer software. In software testing, two broad approaches are used -white-box testing and black-box testing. In white-box testing, the test developer knows about the internal structure of the source code of the target software to be tested. In black-box testing, also referred to as specification-based testing or behavioral testing, the test developer does not have access to the source cods of the target software to be tested.
Several methods are used for white-box and black-box testing approaches. One of these methods includes regression testing, which is used to identify and eliminate emirs caused by regression. These errors due to regression occur when the software does not function as desired or when the software has been modified.
Regression testing is performed to identify errors caused by regression when the software is being developed. Regression testing is also performed as the software is updated. In addition, regression testing is performed using various test cases to identify inners in the software. These test cases include data for testing the software. Further, the developer uses the test cases by executing regression testing commands.
There exist methods teat involve the use of regression testing. One of these methods employs regression testing to test an order management system. M order management system processes orders placed by users. Examples of an order management system include, but are not limited to, a payment management system, a courier management system, and the lit-system of the set of sub-systems. For example, the order creation sub-system may require inputs in one fonnat and the order payment sub-system may require inputs in another format. In this case, the order creation sub-system may prowde a response in one fonnat, the order payment subsystem may provide a response In another format, and so forth. Therefore, for testing the order creation sub-system, the order payment sub-system, and so forth, ttie script is created, based on the format of the corresponding sub-system. Further, each script of the plurality of scripts is developed for a test scenario. The test scenario relates to a scenario for testing the order management system under certain conditions. In an embodiment of the invention, the test scenario includes a scenario where the order management system is tested when a sub-system of the set of sub-systems is updated.
For example, the order management system needs to be tested when the order payment sub-system is updated, tn another embodiment of the invention, the test scenario relates to a scenario for testing the order management system when the order management system does not perfomi as desired. For example, the order management system may provide an enroneous response indicating that the payment for the order has been made by the user when, in fact, the user has not made the payment for the order.
At 604, the user modifies the script if the test scenario includes testing the order management system after the order management system has been modified. For example, when the test scenario relates to a scenario where the order management system is tested when the order payment sub-system is updated, the user modifies the script, based on the modtfication made in the order payment sub-system. Further, the order management system is tested, based on the modified script. However, if the test scenario includes testing the order management system for performance, testing is performed by the selected script. For example, when the test scenario relates to testing the order management system when the order management system generates an enoneous response, the order management system is tested on the basis of the selected script. In an embodiment of the invention, the script is received by input module 202 of system 200.
The script includes test inputs for each sub-system. Typically, the test inputs include test data and commands. Further, the test inputs are used for testing the order management system. In an embodiment of the invention, the test data represents data related to a mock order. For example, the test data can include data for creation of an order, credit card details, and the like, for buying a movie ticket. The commands can be for creating the order, based on the data for order creation, making payment using the credit card details, and the like. In an embodiment of the invention, the script is an XML file.
The script is parsed to extract the test inputs at 606. In an embodiment of the invention, parsing is performed by an XML parser. In another embodiment of the invention, Jython® is used for parsing the script. Jython® is a Java'^" implementation of the Python® programming language. Typically, parsing of the script is performed by
testing module 204. In an embodiment of the invention, parsing of the script is perfonned by testing module 204.
At 608, each sub-system of the set of sub-systems is tested to identify an en-or associated with a first sub-system of the set of sub-systems. For example, the first subsystem can be the order payment sub-system or the order delivery sub-system. Further, testing is perfomned, based on the test inputs parsed at 606. The en-or associated with the first sub-system is identified, based on the test inputs. In an embodiment of the invention, testing module 204 provides test data and commands as an input to each subsystem, to receive an output. Testing module 204 tests the set of sub-systems according to the dependency flow defined by the order life cycle. Further, testing module 204 analyzes the output received from each sub-system to identic the error associated with the first sub-system. For example, testing module 204 uses the test data and commands included in the test inputs to test the order creation sub-system, the order payment subsystem and the order delivery sub-system, Testing module 204 tests the order creation sub-system followed by the order payment sub-system and finally the order delivery subsystem. Further, testing module 204 identifies that an en^or is associated with the first sub-system, based on the testing.
At 610, an output is generated, based on the testing of the order management system. The output may be in the fonn of a list, a report, a display on a display screen, and the like. In an embodiment of the invention, the output includes information related to the error identified. In another embodiment of the invention, the output Includes infonmation related to a log generated on the basis of testing. In an embodiment of the invention, the output is generated by output module 206.
At 612, the script is updated by the user, based on the en^or identified in the first sub-system. In an embodiment of the invention, the updated script is received by input module 202. The updated script is then parsed to extract updated test inputs by testing module 204.
At 614, the updated script Is used to test the sub-systems of the order management system that follow the first sub-system in the order life cycle, to identify an
error associated with a second sub-system of the set of sub-systems. In an embodiment of the invention, testing is perfomried by testing module 204 to identify an error associated with a second sub-system of the set of sub-systems.
At 616, a response is simulated for the first sub-system, based on the updated scripts. In an embodiment of the invention, testing module 204 simulates the response for the first sub-system, based on the updated test inputs. For example, the error identified indicates that the first sub-system is the payment system and does not return any response on the basis of the test inputs. In this case, testing module 204 simulates that the payment has been made for the order for the first sub-system.
At 618, an output is generated, based on the testing of the order management system with the updated script. The output may be in the fonn of a list, a report, a display on a display screen, and the like. In an embodiment of the invention, the output includes information related to the error identified. In another embodiment of the invention, the output includes infonnation related to a log generated, based on the testing. In an embodiment of the invention, the output is generated by output module 206.
At 620, the first sub-system is tested, based on a specific script selected from the plurality of scripts. A specific script is selected for detailed testing of the first sub-system. Further, detailed testing is perfomied to identify specific infomnation related to the eiror. For example, detailed testing is perfomied if the order creation sub-system is identified to be faulty. In this case, detailed testing of the order creation sub-system returns that the error is located at the step where the order creation sub-system tries to register the order.
In an embodiment of the invention, the user configures the first sub-system, based on the error identified. Further, the user tests the order management system after configuring the first sub-system. In another embodiment of the invention, the user tests the sub-systems in the order life cycle that follow the first sub-system, by simulating a response for the first sub-system.
FIG. 7 illustrates the architecture of a system 700 for testing an order management system, in accordance with an embodiment of the invention. System 700 includes a user interface 702, a script 704, a test library 706, a Jython framewori^ 708, an extensibility framework 710, and an external database 712.
User interface 702 enables a user to provide a script such as script 704 for testing the order management system. User interface 702 displays the execution of the script. For example, user interface 702 indicates the testing of the order management system, based on the scnpt. The user provides the script that has been developed using a base file 714. Typically, base file 714 includes a set of predefined inputs. For example, the predefined inputs can include, but are not limited to, the name of the server of the order management system, the port number of the server, database details of the order management system, and the like. Test library 706 includes a set of commands. In an embodiment of the invention, the set of commands is defined based on Jython®. The script includes test inputs. In an embodiment of the invention, test inputs include commands such as one or more commands of the set of commands. Thereafter, Jython framework 708 provides a scripting language for test libraries such as test library 706. Typically, Jython frameworit 708 worths in conjunction with test library 706. In an embodiment of the invention, Jython framework 708 parses the script to extract test inputs. In anotherembodiment of the invention, Jython framewori^ 708 executes the commands in the test inputs.
Extensibility framewortc 710 includes various APIs which can be invoked to perfomi actions such as create order, create shipment, schedule order, and the like. The APIs are invoked, based on the script and Jython framework 708, Extensibility frameworit 710 stores infonnation in external database 712. Further, when an en^or is identified in the order management system, the error is displayed on user interface 702.
As described above, the invention provides a method and system for testing an order management system including a set of sub-systems. The method includes testing the order management system, based on the script. Further, the script includes test inputs used for testing each sub-system of the set of sub-systems. The script can be used for simulating a response for one or more sub-systems of the set of sub-systems.
which are unavailable, thereby enabling a user to test the sub-systems In the order management system without depending on the availability of all the sub-systems. The method enables the user to select a script from a plurality of scripts. Th^efore, the user need not develop the script again to test the order management system. Further, the user can test a modified order management system by selecting a script from the plurality of scripts and making modifications in the script. Since the method provides the flexibility of testing the sub-systems of the order management system without depending on all Uie sub-systems, the time taken for testing is reduced. Further, since the user tests the order management system, based on a script selected from the plurality of scripts, the need for repetitively setting up data Is eliminated, thereby reducing the time spent on data setup.
The method and system for testing the order management system, as described in the invention or any of its components, may be embodied in the fomi of a computer system. Typical examples of a computer system include a general-purpose computer, a programmed microprocessor, a micro-controller, a peripheral integrated circuit element, and other devices or arrangements of devices that are capable of implementing the steps that constitute the method of the Invention.
The computer system comprises a computer, an input device, a display unit and the Internet. The computer further comprises a microprocessor. The microprocessor is connected to a communication bus. The computer also includes a memory. The memory may include Random Access Memory (RAM) and Read Only Memory (ROM). The computer system further comprises a storage device. The storage device can be a hard disk drive or a removable storage drive such as a floppy disk drive, an optical disk drive, etc. The storage device can also be other similar means of loading computer programs or other instnjctions in the computer system. The computer system also includes a communication unit. The communication unit enables the computer to connect to other databases and the Internet through an I/O interface. The communication unit enables transfer as well as reception of data from other databases. The communication unit may include a modem, an Ethemet card, or any similar device which enables the computer system to connect to databases and networi^s such as LAN, MAN, WAN and the
Internet. The computer system facilitates inputs from a user thfiough an input device, which is accessible to the system through the I/O interface.
The computer system executes a set of instnjctions that is stored in one or more storage elements, to process input data. The storage elements may also hold data or other information as desired. A storage element may be in the form of an information source or a physical memory element in ttie processing machine.
The set of instructions may include various commands that instruct the processing machine to perform specific tasks such as the steps that constitute the Tiethod of the invention. The set of instmctions may be in the form of a software urogram. Further, the software may be in the form of a collection of separate programs, i program module with a large program or a portion of a program module, as described n the invention. The software may also include modular programming in the form of jbject-oriented programming. Processing of input data by the processing machine may 3e in response to user commands, results of previous processing or a request made by another processing machine.
While the preferred embodiments of the Invention have been illustrated and iiescribed, it will be dear that the Invention is not limited to only these embodiments, slumerous modifications, changes, variations, substitutions and equivalents will be apparent to those skilled in the art without departing from the spirit and scope of the nvention, as described in the claims.
We Claim
1. A method for testing an order management system, the order management system comprising a set of sub-systems, wherein an order life-cycle is defined for the order management system based on the set of sub-systems, the order management system capable of processing one or more orders, the method comprising:
a. selecting a script from a plurality of scripts based on a test scenario,
wherein the plurality of scripts are developed for testing the order
management system, further wherein the script comprises test inputs;
b. modifying the script based on the test scenario if the order management
system has been modified, the script being modified based on the modified
order management system;
c. testing each sub-system of the set of sub-systems based on the order life
cycle and the script to identify an error associated with a first sub-system of
the set of sub-systems; and
d. generating an output based on the testing of the order management
system.
The method of claim 1, wherein each of the plurality of scripts is developed based on a base file for a test scenario, further wherein each of the plurality of scripts is developed based on a predefined format defined for each sub-system. The method of claim 1, wherein testing comprises parsing the script to extract the test inputs, wherein the test inputs comprise test data and commands that are used to test each sub-system.
The method of claim 1, wherein the output comprises information related to the
error identified with the first sub-system.
The method of claim 1 further comprises testing the first sub-system based on a
specific script selected from the plurality of scripts.
The method of claim 1 further comprising:
a. updating the script based on the error identified;
b. testing each sub-system of the set of sub-systems based on the order life
cycle and the updated script to identify an error associated with a second
sub-system of the set of sub-systems, wherein the testing comprises:
simulating a response for the first sub-system based on the updated script; and
c. generating an output based on the testing of the order management
system.
A method for testing an order management system, the order management system comprising a set of sub-systems, the order management system capable of processing one or more orders, the method comprising:
a. defining an order life cycle for the order management system based on the
set of sub-systems;
b. configuring the order management system based on the defined order life
cycle;
c. developing a script based on a base file, wherein the script is developed to
test the order management system for a test scenario, further wherein the
script comprises test inputs;
d. testing each sub-system of the set of sub-systems based on the order life
cycle and the script to identify an encore associated with at least one sub
system of the set of sub-systems, wherein the testing comprises:
simulating a response for one or more sub-systems of the set of sub-systems based on the script, wherein the response is simulated when the one or more sub-systems are unavailable for processing the one or more owners; and
e. generating an output based on the testing of the order management
system.
8. The method of claim 7, wherein defining the order life cycle comprises establishing a dependency flow among the set of sub-systems.
9. The method of claim 1, wherein configuring the order management system comprises integrating the order management system with a set of external systems based on the order life cycle.
10. The method of claim 7, wherein the script is developed by a user.
11. The method of claim 7, wherein the script is developed based on a predefined fondant defined for each sub-system.
12. The maid of claim 7, wherein testing the order management system comprises parsing the script to extract the test inputs, wherein the test inputs comprise test data and commands that are used to test each sub-system.
13. The method of claim 7, wherein the output comprises information related to the error identified with the at least one sub-system.
14.A system for testing an order management system, the order management system comprising a set of sub-systems, wherein an order life cycle is defined for
the order management system based on the set of sub-systems, the order management system capable of processing one or more orders, titer order management system comprising:
an input module, the input module configured for receiving a script, wherein the script is one of;
a script developed based on a base file to test the order management system for a test scenario;
a script selected from a plurality of scripts; and a script that is modified based on the test scenario; a testing module configured for:
testing each sub-system of the set of systems based on the order life cycle and the script to identical an error associated with at least one subsystem of the set of sub-systems; and
simulating a response for one of more sub-systems to the set of subsystems based on the script, wherein the response is simulated when the one or more sub-systems are unavailable for processing the one or more orders; and
an output module configured for generating an output based on the testing of the order management system.
15. The system of claim 14, wherein the testing module is further configured for parsing the script to extract the test Inputs, wherein the test inputs comprise test data and commands that are used to test each 'System.
16. The system of claim 14, wherein the output comprises Information related to the error identified with the at least one sub-system.
17. The system of claim 14, wherein the testing module is further configured to test
the at least one sub-system. 18.The system of claim 14, wherein the script and the base file are XML files.
19. The system of claim 14, wherein the base file comprises a set of definitions and variables.
20. The system of claim 14, wherein the test scenario comprises processing of at least one order by the order management system.
21. The system of claim 14, wherein the script is developed by a user.
22. A computer program product for use with a stored program computer, the computer program product comprising a computer usable medium having a computer readable program code embodied therein for testing an order management system, the order management system comprising a set of subsystems, wherein an order llfe-cycie is defined for the order management system based on the set of sub-systems, further wherein the order management system Is configured for processing one or more orders, the computer readable program code performing the steps of:
a. receiving a script, wherein the script is one of:
i. a script developed based on a base file to test the order management system for a test scenario;
ii. a script selected from a plurality of scripts; and lii. a script that is modified based on the test scenario;
b. testing each sub-system of the set of sub-systems based on the order life
cycle and the script to identify an error associated with at least one sub
system of the set of sub-systems;
c. simulating a response for one or more sub-systems of the set of sub
systems based on the script, wherein the response is simulated when the
one or more sub-systems are unavailable for processing the one or more
orders; and
d. generating an output based on the testing of the order management
system.
23. The computer program product of claim 22, wherein the computer readable program code further performs parsing the script to extract the test inputs, wherein the test inputs comprise test data and commands that are used to test each sub-system.