FORM 2
THE PATENTS ACT, 1970
(39 of 1970)
&
THE PATENTS RULES, 2003
COMPLETE SPECIFICATION
(See section 10, rule 13)
1. Title of the invention: METHOD AND SYSTEM FOR TESTING AN APPLICATION
2. Applicant(s)
NAME NATIONALITY ADDRESS
TATA CONSULTANCY Indian Nirmal Building, 9th Floor,
SERVICES LIMITED Nariman Point, Mumbai,
Maharashtra 400021, India
3. Preamble to the description
COMPLETE SPECIFICATION
The following specification particularly describes the invention and the manner in which it
is to be performed.
FIELD OF INVENTION
[0001] The present subject matter relates to testing of an application, in particular to automated testing of computer applications.
BACKGROUND
[0002] An application is computer software designed to help the user to perform specific tasks. Examples of computer software include enterprise software, accounting software, office suites, graphics software, media players, web based applications, and document based applications. Some applications may be coupled with a computer and its system software, or may be published separately.
[0003] Testing of such applications presents specific challenges as today applications are generally developed under tough time schedules and require frequent releases. Moreover, any manual error in testing of an application can be very expensive as a huge sum of money is involved. In view of this, adequate test coverage is required to ensure the completeness of testing.
[0004] Attempts have been made to improve testing of applications by providing dedicated test automation frameworks. However, such frameworks are developer centric and need automation specialists to carry out the complete testing. Moreover, such frameworks are also tightly coupled to an application under test.
SUMMARY
[0005] This summary is provided to introduce concepts related to testing of an application. This summary is not intended to identify essential features of the claimed subject matter nor is it intended for use in determining or limiting the scope of the claimed subject matter.
[0006] In one embodiment, a computer implemented method for testing an application is described. The method includes receiving definitions for each of a plurality of test cases, wherein each of the plurality of test cases is marked with appropriate keywords. The method further includes generating, base on the definitions, the plurality of test cases corresponding to common
business scenarios to which the application relates. The method further includes selecting a test automation tool for executing the plurality of test cases. The method further includes invoking a keyword interpreter, wherein the keyword interpreter maps the appropriate keywords to at least one command corresponding to the test automation tool being selected. The method further includes executing, based on the at least one command, the plurality of test cases on the application in a batch through the test automation tool being selected.
[0007] In one embodiment, a computing system for testing an application is described. The computing system comprises a processor, and a memory coupled to the processor. The memory includes a definitions module configured to receive definitions for each of a plurality of test cases, wherein each of the plurality of test cases is marked with appropriate keywords. The memory further includes a test accelerator package configured to generate, based on the definitions, the plurality of test cases corresponding to common business scenarios to which the application relates. The memory further includes a keyword interpreter configured to map the appropriate keywords to at least one command corresponding to a test automation tool being selected for testing the application. The memory further includes a test controller configured to execute, based on the at least one command, the plurality of test cases on the application in a batch through the test automation tool being selected.
BRIEF DESCRIPTION OF THE FIGURES
[0008] The detailed description is described with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The same numbers are used throughout the figures to reference like features and components. Some embodiments of systems and/or methods in accordance with embodiments of the present subject matter are now described, by way of example only, and with reference to the accompanying figures, in which:
[0009] Figure 1 illustrates a computing system for testing an application, in accordance with an embodiment of the present subject matter; and
[0010] Figure 2 illustrates a computer implemented method for testing an application, in accordance with an embodiment of the present subject matter.
DETAILED DESCRIPTION
[0011] The present subject matter describes a computing system and a computer implemented method for testing an application.
[0012] Conventionally, either normal ways of software testing or dedicated test automation frameworks are used for testing an application, such as an ecommerce application, banking application, point of sales application, insurance application, health care application etc. In both, there are several problems, for example, testing the application with the normal ways of software testing does not address the challenges that are specific to the above mentioned computer applications. The examples of such challenges include tough time schedules, frequent releases, expensiveness of errors, and need of adequate test coverage. On the other hand, testing the computer applications using dedicated test automation frameworks is costly and lacks reusability as such test automation frameworks are tightly coupled to an application under test. Therefore, extendibility of such test automation frameworks developed for one application to another application is difficult. Furthermore, such test automation frameworks can be used with a specific testing tool and require skilled person for test automation. In such situations, test cases for new applications have to be developed from beginning.
[0013] The present subject matter describes a computing system and a computer implemented method for testing an application, such as an ecommerce application. According to the present subject matter, a package of pre-automated test cases is generated in a predefined format, preferably in a spreadsheet. A test case is a set of conditions or variables under which it is determined whether the application is working correctly or not. The test cases are generated such that they represent day to day business scenarios related to the application, such as an ecommerce application, banking application, point of sales application, insurance application, and health care application. Therefore, the test cases can be reused for testing any similar application. The test cases are defined by default actions, such as entering text or clicking, associated with objects such as textbox or button. The test cases are further defined by test data, required for testing said objects. Further, the test cases are either automatically or by a user are assigned appropriate keywords.
[0014] According to the present subject matter, a test automation tool is selected from among a variety of available test automation tools, and initialized for executing the test cases on the application being tested. Once the test automation tool is selected, then a keyword interpreter is invoked. The keyword interpreter maps the appropriate keywords into at least one command that is corresponding to the test automation tool being selected. Further, a test controller is provided that executes, based on the at least one command, the test cases through the test automation tool being selected. The test controller executes the test cases in a batch one by one and may optimize the sequence of test cases in the batch based on predefined parameters. The predefined parameters include a priority associated with a test case, a dependency associated with a test case, an execution flag associated with a test case, previous execution results associated with a test case, and the test automation tool selected to execute the plurality of test cases. The test controller can be configured for logging and reporting the results of testing the application.
[0015] The computing system and the computer implemented method, according to the present subject matter, focus on testing of applications, such as ecommerce applications, and thus address the above mentioned challenges that are specific to the ecommerce applications or any other applications, such as banking applications, point of sales applications, insurance applications, health care applications. Further, a package of pre-automated test cases that represent common business scenarios related to the applications is generated such that the package is independent of the application being tested, a platform used for developing that particular application, or test automation tool being selected for executing the test cases. In this way, the test cases are highly reusable and maintainable for testing any application through any test automation tool. Since the test cases are generated in a spreadsheet type of simple format, therefore the test cases can be used by manual testers or business users as well, thereby avoiding a need of skilled person in programming for test automation. Additionally, the reporting and logging features enable faster debugging of the application being tested. Overall, there can be significant time and effort reduction as compared to conventional test automation frameworks.
[0016] These and other advantages of the present subject matter would be described in greater detail in conjunction with the following figures. While aspects of described systems and methods for testing applications can be implemented in any number of different computing
systems, environments, and/or configurations, the embodiments are described in the context of the following exemplary system(s) and method(s)
EXEMPLARY SYSTEM(S)
[0017] Figure 1 illustrates the components of an application testing system 100, herein after referred to as the system 100, for testing an application, in accordance with an embodiment of the present subject matter. The system 100 brings down the time and cost associated with the testing, ensures quality, and improves overall time to market of the application being tested. The system 100 supports various types of testing including functional, regression, and continuous integration testing. The application being tested may be any application irrespective of the domain, for example, a web based ecommerce application, any business to consumer (B2C) ecommerce application, any other ecommerce application, banking application, point of sales application, insurance application, and health care application. Although implementations for the system 100 have been described through example of ecommerce applications, it is to be understood that the system 100 is not limited to ecommerce applications. Rather, the system 100 can be used for testing of any computer application. [0018] Further, the system 100 may be implemented in one or more computing devices, such as mainframe computers, cloud servers, workstations, personal computers, network computers, desktop computers, minicomputers, servers, multiprocessor systems, laptops, and hand-held devices.
[0019] In said embodiment, the system 100 includes one or more processor(s) 102, I/O interface(s) 104, and a memory 106 coupled to the one or more processor(s) 102. The processor(s) 102 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. The processor(s) 102 can be a single processing unit or a number of processing units. Among other capabilities, the processor(s) 102 are configured to fetch and execute computer-readable instructions stored in the memory 106.
[0020] Functions of the various elements shown in the Figure 1, including any functional blocks labeled as “processor(s)”, may be provided through the use of dedicated hardware as well
as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. Moreover, explicit use of the term “processor” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, network processor, application specific integrated circuit (ASIC), field programmable gate array (FPGA), read only memory (ROM) for storing software, random access memory (RAM), and non volatile storage. Other hardware, conventional and/or custom, may also be included.
[0021] The I/O interface(s) 104 may include a variety of software and hardware interfaces, for example, interface for peripheral device(s), such as a keyboard, a mouse, an external memory, a printer, etc. Further, the I/O interface(s) 104 may enable the system 100 to communicate over a communication network, and may include one or more ports for connecting the system 100 with other computing devices, such as web servers and external databases. The I/O interface(s) 104 may facilitate multiple communications within a wide variety of protocols and networks, such as a network, including wired networks, e.g., LAN, cable, etc., and wireless networks, e.g., WLAN, cellular, satellite, etc. The network can also be an individual network or a collection of many such individual networks, interconnected with each other and functioning as a single large network, e.g., the Internet or an intranet. The network may either be a dedicated network or a shared network, which represents an association of the different types of networks that use a variety of protocols, for example, Hypertext Transfer Protocol (HTTP), Transmission Control Protocol/Internet Protocol (TCP/IP), Wireless Application Protocol (WAP), etc., to communicate with each other.
[0022] The memory 106 may include any computer-readable medium known in the art including, for example, volatile memory, such as static random access memory (SRAM) and dynamic random access memory (DRAM), and/or non-volatile memory, such as read only memory (ROM), erasable programmable ROM, flash memories, hard disks, optical disks, and magnetic tapes. The memory 106 further includes module(s) 108 and data 110. The module(s) 108 include routines, programs, objects, components, data structures, etc., which perform particular tasks or implement particular abstract data types. The data 110, amongst other things,
serves as a repository for storing data processed, received, and generated by one or more of the module(s) 108.
[0023] The module(s) 108 further include a definitions module 112, a test accelerator package 114, a keyword interpreter 116, a test controller 118, and other module(s) 120. The other module(s) 120 may include programs or coded instructions that supplement applications and functions of the system 100, for example, programs in the operating system.
[0024] The data 110 includes definitions data 122, test case data 124, keywords data 126, and other data 128. The other data 128 may include data generated as a result of the execution of one or more modules in the other module(s) 120.
[0025] In said embodiment, the definitions module 112 is configured to receive definitions for each of a plurality of test cases, preferably in a spreadsheet type of simple format. In this way, manual testers and business users can also use the test cases, thereby avoiding a requirement for a skilled person having advanced programming skills to write tests and execute them. In one implementation, the definitions module 112 is configured to store the definitions in the definitions data 122.
[0026] The definitions may include three types of definitions, which are object definitions, action definitions, and data definitions. The object definitions define objects identified in the application being tested. For example, in an ecommerce based shopping website, i.e., the ecommerce application, objects of type ‘textbox’ and ‘button’ are identified. The action definitions define default actions for the objects identified in the application to be tested. In said example, default actions for the objects ‘textbox’ and ‘button’ may be ‘Enter Text’ and ‘click’ respectively. The data definitions define test data to be used for testing the application. In said example, the test data for the object ‘textbox’ may be various combination of text, whereas the test data for the object ‘button’ may be ‘a left click’, ‘a right click’, or ‘a return key press’.
[0027] Further, the definitions module 112 assigns appropriate keywords for each of the plurality of test cases in simple English like non technical language so that the test cases resemble manually written test cases. For example, the test case in the above example can be assigned a keyword ‘enter text in a textbox’. In one implementation, a user of the system 100
provides custom keywords for one or more of the plurality of test cases. For example, the test case in the above example can be assigned a custom keyword ‘log-in’.
[0028] In said embodiment, the test accelerator package 114 is configured to generate, based on the definitions, the plurality of test cases corresponding to common business scenarios. The plurality of test cases are generated in such way they are pre-automated and does not require much skill to automate the entire testing process. The examples of such common business scenarios include log in, credit card payment, debit card payment, online banking, adding shopping items to cart, enter shipping and billing address, getting a health insurance quote, patient registration, IP Admission, and log out. The test accelerator package 114 collates such common business scenario related test cases into a package that is highly reusable for testing of any application. To use the package for a new application, only the object definitions for the new application and the data definitions need to be updated. The test cases are collated preferably in a spreadsheet for manual testers and business users to automate the testing of the application without having to understand complex testing tool scripts. In one implementation, the test accelerator package 114 is configured to store the test cases in the test case data 124.
[0029] In said embodiment, the keyword interpreter 116 is configured to map the appropriate keywords assigned to the test cases into at least one command that is corresponding to a test automation tool being selected for testing the application. The keyword interpreter 116 is configured to know most of the commonly used keywords. In one implementation, the keyword interpreter 116 is configured to also know the custom keywords provided the user. In said implementation, the keyword interpreter 116 is further configured to map the custom keywords provided by the user into at least one command that is corresponding to the test automation tool. In one implementation, the keyword interpreter 116 is configured to store the keywords including custom keywords, if any, in the keywords data 126. In one implementation, the keyword interpreter 116 utilizes reusable scripts or functions for mapping of the keywords to the commands of a variety of test automation tools. In this way, every time a new test automation tool is to be made compatible with the system 100, then the reusable scripts or functions can be used for mapping the keywords to the commands of the new test automation tool.
[0030] In said embodiment, the test controller 118 is configured to execute, based on the at least one command, the plurality of test cases on the application in a batch through the test
automation tool being selected. The examples of such commands include searching for a product in multiple pages, traversing through breadcrumbs, click on an object, text input. The test controller 118 controls the flow of test execution and decision of execution of test cases. In one implementation, the test controller 118 selects the test automation tool for executing the test cases as per a user’s inputs. In one implementation, the test controller 118 can be further configured to optimize, based on a plurality of parameters, a sequence of the plurality of test cases in the batch for batch processing of the plurality of test cases. The plurality of parameters include at least one of a priority associated with a test case, a dependency associated with a test case, an execution flag associated with a test case, previous execution results associated with a test case, and the test automation tool coupled to the test controller 118 to execute the plurality of test cases. For example, if the priority for execution is set as high, then test cases which are set with high priority are executed , or two dependent test cases may be executed after one another, or if execution flag is marked as “N” then the test case will be skipped, or if the user wants to re-execute all the failed test cases then they can input rerun flag as “fail”.
[0031] Additionally, the test controller 118 is configured to log results of execution of the plurality of test cases one by one in a log file in form of a spreadsheet or HTML file. In one implementation, the test controller 118 stores the logged results in the other data 128. The test controller 118 is further configured to report results of execution of the plurality of test cases in form of metrics capturing or screenshots for easy and quick debugging of the application. In one implementation, the test controller 118 stores reported results in the other data 128.
EXEMPLARY METHOD(S)
[0032] Figure 2 illustrates an exemplary computer implemented method 200 for testing an application, in according with an embodiment of the present subject matter. The method 200 may be described in the general context of computer executable instructions. Generally, computer executable instructions can include routines, programs, objects, components, data structures, procedures, modules, functions, etc., that perform particular functions or implement particular abstract data types. The method 200 may also be practiced in a distributed computing environment where functions are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, computer executable
instructions may be located in both local and remote computer storage media, including memory storage devices.
[0033] The order in which the method 200 is described is not intended to be construed as a limitation, and any number of the described method blocks can be combined in any order to implement the method 200, or an alternative method. Additionally, individual blocks may be deleted from the method 200 without departing from the scope of the subject matter described herein. Furthermore, the method 200 can be implemented in any suitable hardware, software, firmware, or combination thereof. The method 200 is presently provided testing an application, such as an ecommerce application. Although implementations for the method 200 have been described through example of ecommerce applications, it is to be understood that the method 200 is not limited to ecommerce applications. Rather, the method 200 can be used for testing of any computer application. Further, the method 200 has been described in context of the system 100, the same should not be construed as a limitation. It will be apparent that the method 200 may be implemented for testing an application in various other similar systems and devices.
[0034] At block 202, definitions for each of a plurality of test cases are received and the test cases are marked with appropriate keywords. In one implementation, the definitions are received in a spreadsheet to enable manual testers and business users to automate the test cases. The definitions may include three types of definitions, which are object definitions, action definitions, and data definitions. The object definitions define objects identified in the application being tested. The action definitions define default actions for the objects identified in the application to be tested. The data definitions define test data to be used for testing the application. In one example, the definitions module 112 receives the above three type of definitions and stores them in the definitions data 122. Further, the definitions module 112 assigns appropriate keywords for each of the plurality of test cases in simple English like non technical language so that the test cases resemble manually written test cases. In one implementation, a user can provide custom keywords for one or more of the plurality of test cases.
[0035] At block 204, the plurality of test cases corresponding to common business scenarios are generated based on the definitions. For example, the test accelerator package 114 is configured to generate and collate such common business scenario related test cases into a
package that is highly reusable for testing of any application irrespective of the underlying development platform used to develop the application. To use the package for a new application, only the object definitions for the new application and the data definitions need to be updated. In one example, the test accelerator package 114 is configured to store the test cases in the test case data 124.
[0036] At block 206, a test automation tool for executing the plurality of test cases is selected. In one example, the test controller 118 selects the test automation tool for executing the test cases based on a user’s input.
[0037] At block 208, a sequence of the plurality of test cases in a batch for batch processing of the plurality of test cases is optimized based on plurality of predefined parameters. The plurality of parameters include at least one of a priority associated with a test case, a dependency associated with a test case, an execution flag associated with a test case, previous execution results associated with a test case, and the test automation tool being selected to execute the plurality of test cases. In one example, the test controller 118 is configured to optimize the sequence of test cases based on predefined parameters, such as sequence of test cases and tool selected for execution of the test cases.
[0038] At block 210, a keyword interpreter is invoked to map the appropriate keywords to at least one command corresponding to the test automation tool being selected. The keyword interpreter is configured to know most of the commonly used keywords in respect of computer applications, including custom keywords specified by a user. In one example, the keyword interpreter 116 is configured to map the appropriate keywords assigned to the test cases into at least one command that is corresponding to a test automation tool being selected for testing the application. In one implementation, the keyword interpreter 116 is configured to store the keywords including custom keywords, if any, in the keywords data 126.
[0039] At block 212, the plurality of test cases is executed, based on the at least one command, on the application in the batch through the test automation tool being selected, once the test automation tool is initialized. In one implementation, the plurality of test cases is executed based on optimization as per block 208. In one example, the test controller 118 controls the flow of test execution and decision of execution of test cases.
[0040] At block 214, results obtained from the execution of each of the plurality of test cases logged in a log file. In one example, the test controller 118 is configured to log results of execution of the plurality of test cases one by one in a log file in form of a spreadsheet or HTML file. In one implementation, the test controller 118 stores the logged results in the other data 128.
[0041] At block 216, results obtained from the executing are reported in form of captured matrices or screen shots. In one example, the test controller 118 is further configured to report results of execution of the plurality of test cases in form of metrics capturing or screenshots for easy and quick debugging of the application under test. In one implementation, the test controller 118 stores reported results in the other data 128.
[0042] The systems and methods for testing an application, in accordance with the present subject matter enable easy extendibility with minimal customization, high reusability, comprehensive reporting, easy maintainability, improved test coverage, reduced cost of testing over a period of time, reduced test design effort, reduced dependency on test automation specialists, and user friendliness.
[0043] Although implementations for system and method for testing an application have been described in language specific to structural features and/or methods, it is to be understood that the appended claims are not necessarily limited to the specific features or methods described. Rather, the specific features and methods are disclosed as exemplary implementations.
I/We claim:
1. A computing system (100) for testing an application, the computing system (100) comprising:
a processor (102); and
a memory (106) coupled to the processor (102), the memory (106) comprising:
a definitions module (112) configured to receive definitions for each of a plurality of test cases, wherein each of the plurality of test cases is marked with keywords;
a test accelerator package (114) configured to generate, based on the definitions, the plurality of test cases corresponding to a plurality of business scenarios related to the application;
a keyword interpreter (116) configured to map the keywords to at least one command corresponding to a test automation tool selected for testing the application; and
a test controller (118) configured to execute, based on the at least one command, at least one of the plurality of test cases on the application in a batch through the selected test automation tool .
2. The computing system (100) as claimed in claim 1, wherein the definitions comprise at least one
of:
object definitions defining objects identified in the application to be tested; action definitions defining default actions for objects identified in the application to be tested; and
data definitions defining test data to be used for testing the application.
3. The computing system (100) as claimed in claim 1, wherein the definitions module (112) stores the definitions a spreadsheet.
4. The computing system (100) as claimed in claim 1, wherein the keywords include custom keywords provided by a user.
5. The computing system (100) as claimed in claim 1, wherein the test controller (118) is further configured to:
optimize, based on a plurality of parameters, a sequence of the plurality of test cases in the batch for batch processing of the plurality of test cases.
6. The computing system (100) as claimed in claim 5, wherein the plurality of parameters include at
least one of a priority associated with a test case, a dependency associated with a test case, an
execution flag associated with a test case, previous execution results associated with a test case, and the test automation tool coupled to the test controller (118) to execute the plurality of test cases.
7. The computing system (100) as claimed in claim 1, wherein the test controller (118) is further configured to log results of execution of the plurality of test cases in a log file.
8. The computing system (100) as claimed in claim 1, wherein the test controller (118) is further configured to report results of execution of the plurality of test cases in form of at least one of captured metrics and screen shots for debugging of the application.
9. The computing system (100) as claimed in claim 1, wherein the application is selected from a group consisting of an ecommerce application, banking application, point of sales application, insurance application, and health care application.
10. A computer implemented method for testing an application, the method comprising:
receiving definitions, in a spreadsheet, for each of a plurality of test cases, wherein each of the plurality of test cases is marked with keywords;
generating, based on the definitions, the plurality of test cases corresponding to a plurality of business scenarios related to the application;
selecting a test automation tool for executing the plurality of test cases;
invoking a keyword interpreter (116), wherein the keyword interpreter (116) maps the keywords to at least one command corresponding to the selected test automation tool ; and
executing, based on the at least on command, the plurality of test cases on the application in a batch through the selected test automation tool .
11. The method as claimed in claim 10, further comprising:
optimizing, based on a plurality of parameters, a sequence of the plurality of test cases in the batch for batch processing of the plurality of test cases;
12. The method as claimed in claim 11, wherein the plurality of parameters include at least one of a priority associated with a test case, a dependency associated with a test case, an execution flag associated with a test case, previous execution results associated with a test case, and a test automation tool coupled to a test controller (118) to execute the plurality of test cases.
13. The method as claimed in claim 10, further comprising:
logging results obtained from execution of each of the plurality of test cases in a log file.
14. The method as claimed in claim 10, further comprising:
reporting results obtained from the executing in form of at least one of captured matrices and screen shots for debugging of the application.
15. The method as claimed in claim 10, wherein the definitions comprise at least one of:
object definitions defining objects identified in the application to be tested; action definitions defining default actions for objects identified in the application to be tested; and
data definitions defining test data to be used for testing the application.
16. The method as claimed in claim 10, wherein the application is selected from a group consisting of an ecommerce application, banking application, point of sales application, insurance application, and health care application.
17. The method as claimed in claim 10, wherein the selecting is based on a user’s input.