The present invention relates to the electrical, electronic and computer arts, and more particularly to test plan coverage for processes and the like.
Services oriented architecture (SOA) is fast becoming a popular choice for many enterprises in building a flexible information technology (IT) infrastructure that can adapt quickly and economically to fast changing enterprise needs. Repeatable enterprise tasks or “services” with well defined interfaces, that are independent of the computing platforms and underlying applications, serve as the building blocks for this architecture These “services” are choreographed through composite applications in support of horizontal enterprise processes. Many commercial SOA implementations use Web services standards to promote inter-operability between different software vendors, but these are not the only techniques for realizing a SOA within the enterprise. Business Process Execution Language (BPEL) enables the combination and choreography of individual services into coarse-grained code constructs or enterprise processes which in turn can be used to build workflows that support enterprise requirements through web portals.
A poorly planned SOA implementation can create more problems than it solves—performance bottlenecks, expensive outages and significant implementation delays are the hallmark of such a system In large enterprises, where the number of applications and interfaces that need to be adapted into a SOA framework can be both numerous and complex, these problems are especially difficult to address A significant feature of SOA systems is the repeated reuse of services and enterprise processes in the context of multiple composite applications—thus the same service or process may be invoked in a number of different ways, increasing the probability of failure to a significantly higher degree when compared with a typical non-SOA software application.
Current tools in the SOA testing space are of two types. The first type directly tests Web Services (such as Paiasoft's SOAtest tool) The second type is exemplified by the SOA Validation System from AmberPoint This type validates production traces from Web Service components. With both types, ensuring test coverage back to the system's enterprise requirements must be done manually.
A more common technique to show coverage is to use a requirement-based testing technique during system testing, system integration testing, and user acceptance testing levels The test cases are based on and traced to enterprise requirements, and as such, the underlying architecture becomes transparent to these testers. How the transaction is executing is typically not as important as the results of the execution. There are many tools that support this methodology, such as Mercury's WinRunner and QuickTest Professional (QTP) with TestDirector, and IBM's Rational Functional Tester in combination with Rational TestManager and Rational RequisitePro. However, these tools do not explicitly support SOA and cannot ensure that a change in a single web service will not adversely affect entire systems.
There are tools that will test SOA web services (“white box testing”) without test coverage focus, and there are non-SOA specific tools that will test end-to-end enterprise transactions (“black box testing”) and allow coverage traceability.
It would be desirable to overcome the limitations in the previous approaches.
Principles of the present invention provide techniques for providing requirement driven static analyses of test coverage for Web-based, distributed processes In one aspect, an exemplary method (which can be computer implemented) for analyzing test coverage of distributed processes includes the step of identifying at least one of the processes that is invoked by a test case The method further includes the steps of mapping at least a portion of the test case to a plurality of specific test paths in the at least one of the processes, and identifying given ones of the test paths as possibly relevant test paths in the at least one of the processes, if the test paths are not infeasible.
As used herein, including the claims, “facilitating” an action includes performing the action, making the action easier, helping to carry the action out, or causing the action to be performed Thus, by way of example and not limitation, instructions executing on one processor might facilitate an action carried out by instructions executing on a remote processor, by sending appropriate data or commands to cause or aid the action to be performed In some instances, an additional step includes facilitating provision of a report that describes test coverage. The test coverage can be described in a quantitative manner, by identifying a specific sub-set of the test paths that are covered by the test case. The test cover age could also be described in a qualitative manner, by identifying a percentage of the test paths covered by the test case. In one or more embodiments, the step of identifying given test paths as possibly relevant test paths includes identifying substantially all possibly relevant test paths.
In some cases, the test coverage is static test-case coverage and the distributed processes choreograph distributed web-based software modules. At least some of the processes can be defined in Business Process Execution Language (BPEL), if desired
Where desired or required, an additional step can include repeating the steps of identifying at least one of the processes, mapping, and identifying the given test paths for a plurality of additional test cases At least some of the test cases can be described in documents, conceptual use cases, and/or programmatically in an automated test tool. In some instances, the test cases axe actionable test cases and form a portion of a test plan, which further includes a list of desirable outcomes for each of the test cases as well as a list of associated processes for, verifying the desirable outcomes. An additional optional step includes facilitating documenting results of running the test cases The distributed processes can each include, for example, a construct describing choreography of at least one service to complete at least one task. At least some of the constructs can be executable and the test cases can define direct invocation of the executable constructs. In some instances, at least some of the constructs are conceptual, and the test cases define invocation of executable realizations of the conceptual constructs. The at least one service can be, for example, a web service.
In one or more embodiments, in the step of identifying given ones of the test paths, the given test paths are limited to those that can be traced back to enterprise requirements. Further, in some cases, in the step of identifying given test paths, such paths are identified to facilitate test coverage of every service of every service provider associated with the distributed processes. In some instances, at least some of the processes are defined in BPEL, including decision points and branches, and in the step of identifying given test paths, the test paths are identified to facilitate test coverage of all feasible combinations of all the branches of all the decision points In one or more embodiments, in the step of identifying given test paths, such paths are identified to facilitate derivation of multiple test cases for the given test paths.
In another aspect, an exemplary method of analyzing test coverage of distributed processes associated with a plurality of software modules of a customer, the software modules being from a plurality of software vendors, includes the step of identifying, by a service provider; at least one of the processes that is invoked by a test case. The method further includes the steps of mapping, by the service provider; at least a portion of the test case to a plurality of specific test paths in the at least one of the processes, and identifying, by the service provider, given test paths as possibly relevant in at least one of the processes, if the given test paths are not infeasible Yet further, the method includes facilitating provision of a report to the customer that describes test coverage In this particular exemplary aspect, at least some of the software modules of the customer are not products of the service provider
In yet another aspect, an exemplary method for analyzing test coverage of distributed processes associated with a plurality of software modules of a customer includes the step of identification, by a service provider; of at least one of the processes that is invoked by a test case. The method further includes mapping, by the service provider, of at least a portion of the test case to a plurality of specific test paths in at least one of the processes, and identification, by the service provider, of given test paths as possibly relevant test paths in at least one of the processes, if the given test paths are not infeasible Yet further, the method includes facilitating provision of a report to the customer that describes test coverage, and, responsive to the customer indicating that the test coverage requires enhancement, designing at least one new test case to enhance the test coverage.
One or more embodiments of the invention may provide one or more beneficial techniques for analyzing a test plan in terms of coverage. A test plan may describe, for example:
A test plan may also include a description of the testing environment, work loads under which test cases should be run, traceability to enterprise requirements that required the inclusion of particular test cases, and the like. These may not be particularly relevant to all aspects of one or more embodiments of the invention. Some test plans may not define all three elements described above for each individual test, as there may be an implicit assumption on how to document the test result, or because the criteria for failure and/or success of the test are apparent.
One significant concept in one or more instances of the invention is to make a systematic connection between a test case and the enterprise process(es) which are involved in the execution of the test case, and then to use this connection to drive coverage analysis. In this context, an enterprise process may be understood as a conceptual or executable construct which describes the choreography of one or more services to complete a task. A test case may include invoking one or more such enterprise processes directly, if they are executable, or an executable realization of the enterprise process(es) that captures the enterprise logic, if they are conceptual. The invocation may itself involve calling on user interface elements that are not part of the enterprise process
In one or more embodiments of the invention, coverage analysis involves performing several pertinent steps:
The techniques for coverage analysis can be provided as a service to an enterprise, by providing the statistical information gathered using the described techniques, broken down by enterprise process, composite application, service or higher level enterprise requirements. Optionally, an additional service, which involves designing new test cases to achieve a desired level of cover age, may be provided.
One or more embodiments of the invention or elements thereof can be implemented in the form of a computer product including a computer usable medium with computer usable program code for performing the method steps indicated. Furthermore, one or more embodiments of the invention or elements thereof can be implemented in the form of an apparatus including a memory and at least one processor that is coupled to the memory and operative to perform exemplary method steps
These and other features, aspects, and advantages of the present invention will become apparent from the following detailed description of illustrative embodiments thereof) which is to be read in connection with the accompanying drawings.
A non-limiting exemplary embodiment of the invention will now be described in the context of enterprise processes defined in BPEL and services defined using web services standards. First, we examine the BPEL processes that are used in real projects A typical SOA system could contain many BPEL processes. With reference to patterns 100 of
A BPEL process typically contains different execution paths, which represent different web service interactions (transaction patterns) between SOA system components. It is desirable to exercise all the possible tuns of a program to detect hidden bugs in testing, so each execution path could correspond to a test path In this description, we use the terms “execution path” and “test path” interchangeably. Test path exploration is performed to find out these different paths; preferably, all the paths beginning from the start node to all the termination nodes of the program. It is desirable to set an upper limit on repetition logic to avoid infinite loops. Test path exploration can be manually done, or aided with automatic tools. We describe an exemplary procedure that testers can follow to explore test paths systematically and easily.
With reference now to
In one or more embodiments, we mark up the decision points in the BPEL process. These are places where control logic diverges and different paths form Then, beginning from the start node of the process graph, we follow the control flow, and at each decision point, all branches are exercised to form new test paths After all the test paths have been identified, we analyze their feasibility: whether or not a test path is executable, that is, whether there is proper data to satisfy the branch conditions associated with the path In this step, infeasible test paths can be filtered. Note that the word “we” is not necessarily intended to imply human agency, but also is intended to covert acts or steps carried out by a computer
One or more embodiments of the invention provide a mechanism for finding test paths in a BPEL process which is somewhat similar to that of a sequential program: exercising different branches of decision points There are certain aspects introduced in BPEL: new types of decision points including pick, invoke, link, event handlers; and some special control semantics including dead path elimination and exception handling There are six kinds of decision points in a BPEL process, as depicted in the table of
Attention should now be given to
In terms of specific details, chart 500 of
Once all the decision points are found, a tester can exercise their branches to generate test paths For this work, there is an effective technique called a “decision table.” An adapted version of that technique can be used for test path identification and representation In the table of
http://download.boulder ibm com/ibmdl/pub/software/dw/spees/ws-bpel/ws-bpel.pdf.
The number of combinations can be very large due to the multiplication effect In the example of
Referring to
In one or more embodiments of the invention, we limit our test paths to those that can be traced back to requirements, such as enterprise requirements In practice, many BPEL processes are not rigidly unit tested. Accordingly, if time allows, identifying more test paths with higher coverage goals may potentially provide additional defect-detecting capability.
The following is an exemplary, non-limiting list of common coverage goals for reference
Thus, referring back to
One or more embodiments of the invention provide techniques for analyzing test path feasibility Not all the test paths found so far are feasible, for example in
Other sources of information for path feasibility analysis include enterprise requirements and designs that specify enterprise process rules. If a test path can be traced back to an enterprise scenario and the associated conditions can be determined, testers could use such information for path feasibility analysis, rather than data handling statements in the BPEL program
For “while” decision points as depicted in
A test path can be represented by the table in
It will thus be appreciated that one or more embodiments of the invention help to ensure that a test plan used to certify the reliability of enterprise processes and services in a SOA system provides adequate coverage, and also that it is attained when we have limited knowledge of a customer's IT infrastructure, which is the usual situation. It should be noted that this IT infrastructure might be built by combining assets from multiple vendors, so the complexity level can be quite high.
As discussed above, in one aspect, a services offering is provided In particular, a method for analyzing test coverage of distributed processes associated with a plurality of software modules of a customer, the software modules being from a plurality of software vendors, includes steps 302-306 performed by a service provider The service provider can facilitate provision of a report to the customer that describes the test coverage. At least some of the software modules of the customer are not products of the service provider In the step 306 of identifying given ones of the test paths, the given ones of the test paths can be identified to facilitate test coverage associated with at least one of enterprise process, composite application, service, and higher level enterprise requirements of the customer.
In another aspect, a services offering involves providing new test cases. In particular; a method for analyzing test coverage of distributed processes associated with a plurality of software modules of a customer, involves a service provider performing steps 302 to 306 as just described, facilitating provision of a report as just described, and, responsive to the customer indicating that the test coverage requires enhancement, designing at least one new test case to enhance the test coverage
A variety of techniques, utilizing dedicated hardware, general purpose processors, firmware, software, or a combination of the foregoing may be employed to implement the present invention or components thereof. One or more embodiments of the invention, or elements thereof, can be implemented in the form of a computer product including a computer usable medium with computer usable program code for performing the method steps indicated. Furthermore, one or more embodiments of the invention, or elements thereof, can be implemented in the form of an apparatus including a memory and at least one processor that is coupled to the memory and operative to perform exemplary method steps
One or more embodiments can make use of software running on a general purpose computer or workstation. With reference to
Accordingly, computer software including instructions or code for performing the methodologies of the invention, as described herein, may be stored in one or more of the associated memory devices (for example, ROM, fixed or removable memory) and, when ready to be utilized, loaded in part or in whole (for example, into RAM) and executed by a CPU Such software could include, but is not limited to, firmware, resident software, microcode, and the like.
Furthermore, the invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium (for example, media 1318) providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer usable or computer readable medium can be any apparatus for use by or in connection with the instruction execution system, apparatus, or device
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid-state memory (for example memory 1304), magnetic tape, a removable computer diskette (for example media 1318), a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD
A data processing system suitable for storing and/or executing program code will include at least one processor 1302 coupled directly or indirectly to memory elements 1304 through a system bus 1310. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in older to reduce the number of times code must be retrieved from bulk storage during execution.
Input/output or I/O devices (including but not limited to keyboards 1308, displays 1306, pointing devices, and the like) can be coupled to the system either directly (such as via bus 1310) or through intervening I/O controllers (omitted for clarity).
Network adapters such as network interface 1314 may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.
In any case, it should be understood that the components illustrated herein may be implemented in various forms of hardware, software, or combinations thereof, for example, application specific integrated circuit(s) (ASICS), functional circuitry one or more appropriately programmed general purpose digital computers with associated memory, and the like. Given the teachings of the invention provided herein, one of ordinary skill in the related art will be able to contemplate other implementations of the components of the invention.
It will be appreciated and should be understood that the exemplary embodiments of the invention described above can be implemented in a number of different fashions. Given the teachings of the invention provided herein, one of ordinary skill in the related art will be able to contemplate other implementations of the invention. Indeed, although illustrative embodiments of the present invention have been described herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various other changes and modifications may be made by one skilled in the art without departing from the scope or spirit of the invention.