This application claims priority to Indian Provisional Patent Application Number: 2779/CHE/2014, filed Jun. 6, 2014, entitled “Automated Generation of Test Cases for Business Process Management Systems”, and Indian Non-Provisional Patent Application Number: 2779/CHE/2014, filed Jun. 4, 2015, entitled “Workflow Test Case Generation”, which are incorporated by reference in their entireties.
A workflow may include a plurality of steps needed to complete a task. For example, a workflow may include an orchestrated and repeatable pattern of activity provided by the systematic organization of resources that transform materials, provide services, and/or process information. Workflow management may include management of each step of a workflow, for example, for compliance with workflow requirements, quality standards, etc.
Features of the present disclosure are illustrated by way of examples shown in the following figures. In the following figures, like numerals indicate like elements, in which:
For simplicity and illustrative purposes, the present disclosure is described by referring mainly to examples thereof. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. It will be readily apparent however, that the present disclosure may be practiced without limitation to these specific details. In other instances, some methods and structures have not been described in detail so as not to unnecessarily obscure the present disclosure.
Throughout the present disclosure, the terms “a” and “an” are intended to denote at least one of a particular element. As used herein, the term “includes” means includes but not limited to, the term “including” means including but not limited to. The term “based on” means based at least in part on.
Workflow management may include the visual definition of workflows as building blocks, where the code-behind the building blocks is not visible. For example, workflow management tools may include a user interface that supports drag and drop creation of a workflow which may be described as placing workflow building blocks on a canvas and connecting the workflow building blocks with arrows. The visually created workflows may then be interpreted and automatically implemented by a workflow implementation tool for a workflow management system that uses the workflow. The workflow implementation tool may implement the backend code that is needed for deployment of a workflow. In this manner, workflows may be created and implemented without the need to write code.
Examples of workflows that may be created and implemented include e-commerce systems such as catalog management systems, shopping carts, order submission systems, etc. For example, a shopping cart may include a workflow, such as add to cart, remove from cart, etc., that may be defined and implemented through the workflow implementation tool. The workflow implementation tool may also include pre-configured workflow building blocks that may be used to create a workflow.
With respect to implementation of such workflows, a quality assurance testing process is needed to determine whether a workflow meets a desired functional and/or design specification. Based on the complexities associated with such workflows, it can be challenging to objectively and efficiently test such workflows.
In order to address the aforementioned aspects related to testing of workflows, a workflow test case generation system and a method for workflow test case generation are disclosed herein. The system and method disclosed herein may provide for the analysis of complex workflows, application of semantics of different workflow building blocks used in a workflow definition, and use of templates to generate a comprehensive set of test artifacts that include test cases for the associated workflow. The test artifacts may be leveraged for high-quality testing of complex workflows, thereby reducing defects and cost of rework related to such workflows.
With respect to analysis of complex workflows, the system and method disclosed herein may provide for the application of test scenarios related to the test artifacts by a test artifact applicator, with the results of the testing being logged and analyzed for compliance by a workflow modifier. Based on the logging and analysis of the testing, the workflow modifier may modify the workflow under consideration for compliance with requirements and/or quality metrics associated with the workflow under consideration.
The workflow test case generation system and the method for workflow test case generation disclosed herein provide a technical solution to technical problems related, for example, to workflow testing. The system and method disclosed herein provide the technical solution of receiving, by a flow extractor that is executed by at least one hardware processor, an intermediate output of a workflow. The intermediate output of the workflow may reference a plurality of workflow building blocks that provide a specified functionality at each step of the workflow. The system and method disclosed herein may further include analyzing, by the flow extractor, workflow definitions of the intermediate output of the workflow to generate a graph structure that represents the workflow. The system and method disclosed herein may further include receiving, by a flow analyzer that is executed by the at least one hardware processor, building block attributes. The building block attributes may include an identification of attributes for the plurality of workflow building blocks. The system and method disclosed herein may further include analyzing, by the flow analyzer, the building block attributes and the graph structure that represents the workflow to generate building block and attribute information for the workflow. The system and method disclosed herein may further include analyzing, by the flow analyzer, the building block and attribute information and the graph structure that represents the workflow to generate test paths for the workflow. The test paths may represent paths and/or lateral branches of the workflow. The system and method disclosed herein may further include analyzing, by a test artifact generator that is executed by the at least one hardware processor, the building block and attribute information, the test paths, and a plurality of test case templates to generate test artifacts that include testing to be performed for the workflow. The system and method disclosed herein may further include applying, by a test artifact applicator that is executed by the at least one hardware processor, the test artifacts to the workflow, and analyzing, by a workflow modifier that is executed by the at least one hardware processor, the application of the test artifacts to the workflow to determine a compliance of the workflow with a predetermined set of compliance requirements. The system and method disclosed herein may further include modifying, by the workflow modifier, the workflow in response to a determination that the workflow is not in compliance with at least one of the predetermined set of compliance requirements.
The flow extractor 102 may analyze the workflow definitions of the XML definition files to generate a graph structure 110. The graph structure 110 may represent the workflow 104. Further, the graph structure 110 may be stored in a graph structure repository 112. The graph structure 110 may use a node and edge format where each node is a workflow building block, and each edge represents the flow between the workflow building block based, for example, on logic and routing. According to an example, the graph structure 110 may be directed, and may not be annotated with additional information.
A flow analyzer 114 may receive building block attributes 116, for example, from a building block attribute repository 118. The building block attributes 116 may characterize a building block. For example, a building block denoted flow action may include attributes such as name, assigned use case, routing details, SLA, etc. The building block attributes 116 may provide for the identification of attributes for various pre-defined building blocks (e.g., pre-defined building blocks that are used to generate the workflow 104) provided by a workflow management tool. For example, the pre-defined building blocks may include SLA, router, ticket, assignment, utility, activity, etc., types of building blocks. In this regard, each of the pre-defined building blocks may represent a unique semantic. Each unique semantic may be used to process the building block and its attributes for generation of test artifacts as described herein. For example, an assignment may create an assignment task associated with a work object in a workbasket or worklist. The task may be completed by a person or a system (e.g., the workflow management system 108) before the workflow 104 can progress further. The assignment may represent a pause or a potential pause in the workflow 104. A ticket may mark an exception that may arise in the workflow 104, such as a cancellation. A utility may specify an activity to run at a given point in the workflow 104 to perform automated processing without any user assignment. The pre-defined building blocks may include various non-workflow concepts such as packaging and inheritances. Packaging may be used to group functionally cohesive flows in the workflow 104. Inheritance may provide for reuse of common flows across a workflow application. According to an example, the building block attributes 116 may be determined by a subject matter expert (SME) 120 based on an understanding of features and associated XML representations of the workflow building blocks 106. The SME 120 may input the building block attributes 116 using a user interface 122. As different industry packages, including their associated building blocks, are installed and used within the workflow management system 108, different building block attributes may be created and made available in the building block attribute repository 118.
The flow analyzer 114 may reference the building block attributes 116 and the graph structure 110, to generate building block and attribute information 124 for the workflow 104 under test. The flow analyzer 114 may reference the building block and attribute information 124 and the graph structure 110 to generate test paths 126 for the workflow 104 under test. A test path may be described as one path in the graph structure 110, and represent a unique flow that may be taken in the workflow 104 based on the logic of the workflow 104. The test paths 126 may represent paths and/or lateral branches in the workflow 104. Branches may represent multiple paths emanating from a node (representing a workflow building block).
A test artifact generator 128 may receive test case templates 130 from a test case template repository 132. The test case templates 130 may be associated with building blocks or sets of building blocks, and define tests that are to be performed for associated building blocks or sets of building blocks (e.g., the workflow building blocks 106). According to an example, the test case templates may specify tests that are to be performed for individual building blocks. According to another example, the test case templates may specify tests that are to be performed for sets or sequences of building blocks within a flow (e.g., the workflow 104). According to an example, the test case templates 130 may be generated by the SME 120 based, for example, on an understanding of the features and associated functionality of the building blocks that are being used in the workflow 104. As different industry packages, including their associated building blocks, are installed and used within the workflow management system 108, different test case templates may be generated and made available in the test case template repository 132.
The test artifact generator 128 may analyze the building block and attribute information, the test paths 126, and the test case templates 130 to generate test artifacts 134 (including test cases) for the workflow 104 under test. The test artifacts 134 may represent documents detailing test scenarios of the workflow 104. In this regard, the test artifact generator 128 may use the test case templates 130 to extract properties of each workflow building block in the workflow 104, and apply heuristics for generating the test artifacts 134. With respect to the application of heuristics for generating the test artifacts 134, heuristics may include identifying the building blocks and associated attributes, and populating the block specific natural language templates based on this extracted data. The test artifact generator 128 may output and/or store the test artifacts 134 in a human readable format (e.g., a textual format), such as in a spreadsheet or word processor document. The test artifact generator 128 may also analyze the semantics of the workflow building blocks 106 to alter the test artifacts 134, and provide contextual information with respect to the test artifacts 134.
A test artifact applicator 136 may apply the test artifacts to the workflow 104 of the workflow management system 108, with the results of the testing being logged and analyzed for compliance by a workflow modifier 138. The application of the test artifacts to the workflow 104 may provide for end to end traceability between requirements for the workflow management system 108 and the test artifacts 134.
Based on the logging and analysis of the testing, and the end to end traceability between requirements for the workflow management system 108 and the test artifacts 134, the workflow modifier 138 may modify the workflow 104 for compliance with the requirements.
Referring to
At block 204, the flow extractor 102 may identify a start flow name to generate a flow at block 206. In this regard, the extracted workflow XML 200 and the start flow information may be passed to the flow extractor 102, where the flow extractor 102 may reconstruct the flow by parsing the XML. For example, referring to
At block 208, the flow extractor 102 may determine whether there are any remaining sub flows.
At block 210, in response to a determination at block 208 that there are remaining sub flows, the flow extractor 102 may complete flow generation from all sub-flows.
At block 212, based on the flow generation at block 206 (that includes all sub-flows identified at block 208), the flow generator may merge the flows, and generate the graph structure 110. The output generated by the flow extractor 102 may include, for example, FromNode and ToNode information. For the example of
At block 214, the flow analyzer 114 may receive the graph structure 110, and analyze the workflow building blocks 106. In this regard, at blocks 216, 218, and 220, the flow analyzer 114 may respectively determine the type of each of the workflow building blocks 106 (e.g., the presence of a SLA, router, ticket, etc., in each of the workflow building blocks 106). In this regard, a workflow building block may be referred to as a SLA building block, a router building block, etc., or as a building block that includes a SLA, a router, etc. Referring to
At blocks 222, 224, and 226, the flow analyzer 114 may respectively process each of the workflow building blocks 106. For the example of
At block 228, the flow analyzer 114 may perform flow consolidation and GraphML processing. The output generated by the flow analyzer 114 may include, for example, TestCase.Graphml. Referring to
At block 230, the test artifact generator 128 may receive the test case templates 130 from the test case template repository 132, to generate the test artifacts 134. In this regard, at block 230, the test artifact generator 128 may convert the test artifacts 134 to natural language steps for testing of the workflow 104. For example, the test artifact generator 128 may read the GraphML, and use, for example, a velocity Template application programming interface (API) to describe the flows and constraints in natural language. The test artifact generator 128 may read the GraphML by providing the start node and end node details. A different template may be used based on a rule type. For example, referring to
At block 232, the test artifact generator 128 may use Apache POI API to populate, for example, an XLS (e.g., Excel Spreadsheet) format test artifact, based on input from a formatting repository 234.
With respect to operation of the test artifact applicator 136 and the workflow modifier 138, referring to
Referring to
Referring to
Referring to
Referring to
Referring to
According to further examples of building blocks and related templates,
Referring to
The elements of the system 100 may be used with different workflow management systems, and with different sets of preconfigured building blocks or industry packs. The elements of the system 100 may be configured for different uses by providing as inputs different test case templates and different workflow management system building block attributes. Thus, the system 100 may extensible to accommodate new workflow building blocks and/or changes to semantics and/or attributes of existing workflow building blocks.
The elements of the system 100 described herein may be machine readable instructions stored on a non-transitory computer readable medium. In addition, or alternatively, the elements of the workflow test case generation system 100 may be hardware or a combination of machine readable instructions and hardware.
Referring to
At block 1304, the method 1300 may include analyzing workflow definitions of the intermediate output of the workflow 104 to generate a graph structure 110 that represents the workflow 104.
At block 1306, the method 1300 may include receiving building block attributes 116, where the building block attributes 116 may include an identification of attributes for the plurality of workflow building blocks 106.
At block 1308, the method 1300 may include analyzing the building block attributes 116 and the graph structure 110 that represents the workflow 104 to generate building block and attribute information 124 for the workflow 104.
At block 1310, the method 1300 may include analyzing the building block and attribute information 124 and the graph structure 110 that represents the workflow 104 to generate test paths 126 for the workflow 104, where the test paths 126 may represent paths and/or lateral branches of the workflow 104.
At block 1312, the method 1300 may include analyzing the building block and attribute information 124, the test paths 126, and a plurality of test case templates 130 to generate test artifacts 134 that include testing to be performed for the workflow 104.
According to an example, the intermediate output of the workflow 104 may include an XML schema format.
According to an example, the intermediate output of the workflow 104 may include a XML file that represents a single workflow building block of the plurality of workflow building blocks 106, or the plurality of workflow building blocks 106.
According to an example, a workflow building block of the plurality of workflow building blocks 106 may include a SLA, a router, a ticket, an assignment, a utility, or an activity.
According to an example, the test case templates 130 may be associated with building blocks or sets of building blocks, where the test case templates 130 define tests that are to be performed for the associated building blocks or the sets of building blocks.
According to an example, the method 1300 may include analyzing the building block and attribute information 124, the test paths 126, and a plurality of test case templates 130 to generate test artifacts 134 that include testing to be performed for the workflow 104 by using the test case templates 130 to extract properties of each workflow building block of the plurality of workflow building blocks 106, and applying heuristics to generate the test artifacts 134.
According to an example, the method 1300 may include applying the test artifacts 134 to the workflow 104, and analyzing the application of the test artifacts 134 to the workflow 104 to determine a compliance of the workflow 104 with a predetermined set of compliance requirements.
According to an example, the method 1300 may include modifying the workflow 104 in response to a determination that the workflow 104 is not in compliance with at least one of the predetermined set of compliance requirements.
According to an example, the method 1300 may include generating the graph structure 110 that represents the workflow 104 by identifying start node and end node details from the intermediate output of the workflow 104.
According to an example, the method 1300 may include generating the graph structure 110 that represents the workflow 104 by merging main and sub-flows of the intermediate output of the workflow 104.
Referring to
At block 1404, the method 1400 may include analyzing, by the flow extractor 102, workflow definitions of the intermediate output of the workflow 104 to generate a graph structure 110 that represents the workflow 104.
At block 1406, the method 1400 may include receiving, by a flow analyzer 114 that is executed by the at least one hardware processor, building block attributes 116, where the building block attributes 116 may include an identification of attributes for the plurality of workflow building blocks 106.
At block 1408, the method 1400 may include analyzing, by the flow analyzer 114, the building block attributes 116 and the graph structure 110 that represents the workflow to generate building block and attribute information 124 for the workflow 104.
At block 1410, the method 1400 may include analyzing, by the flow analyzer 114, the building block and attribute information 124 and the graph structure 110 that represents the workflow 104 to generate test paths 126 for the workflow 104, where the test paths 126 may represent paths and/or lateral branches of the workflow 104.
At block 1412, the method 1400 may include analyzing, by a test artifact generator 128 that is executed by the at least one hardware processor, the building block and attribute information 124, the test paths 126, and a plurality of test case templates 130 to generate test artifacts 134 that include testing to be performed for the workflow 104.
At block 1414, the method 1400 may include applying, by a test artifact applicator 136 that is executed by the at least one hardware processor, the test artifacts 134 to the workflow 104.
At block 1416, the method 1400 may include analyzing, by a workflow modifier 138 that is executed by the at least one hardware processor, the application of the test artifacts 134 to the workflow 104 to determine a compliance of the workflow 104 with a predetermined set of compliance requirements.
According to an example, for the method 1400, analyzing, by the flow analyzer 114, the building block attributes 116 and the graph structure 110 that represents the workflow 104 to generate the building block and attribute information 124 for the workflow 104 may further include analyzing, by the flow analyzer 114, the building block attributes 116 by using test scripts that are specific to a type of the workflow building block of the workflow building blocks 106 and the graph structure 110 that represents the workflow 104 to generate the building block and attribute information 124 for the workflow 104.
According to an example, for the method 1400, analyzing, by the test artifact generator 128, the building block and attribute information 124, the test paths 126, and the plurality of test case templates 130 to generate the test artifacts 134 that include testing to be performed for the workflow 104, may further include using natural language processing to generate the test artifacts 134 in a human readable format.
According to an example, a method for workflow test case generation may include determining an output of a workflow 104, where the output of the workflow 104 may reference a plurality of workflow building blocks 106 that provide a specified functionality at each step of the workflow 104. The method for workflow test case generation may further include generating a graph structure 110 that represents the workflow 104 based on an analysis of workflow definitions of the output of the workflow 104, and analyzing building block attributes 116 and the graph structure 110 that represents the workflow 104 to generate building block and attribute information 124 for the workflow 104, where the building block attributes 116 may include an identification of attributes for the plurality of workflow building blocks 106. The method for workflow test case generation may further include generating test paths 126 for the workflow 104 based on an analysis of the building block and attribute information 124 and the graph structure 110 that represents the workflow 104, where the test paths 126 may represent paths and/or lateral branches of the workflow 104. The method for workflow test case generation may further include generating test artifacts 134 that include testing to be performed for the workflow 104 based on an analysis of the building block and attribute information 124, the test paths 126, and a plurality of test case templates 130. The method for workflow test case generation may further include analyzing an application of the test artifacts 134 to the workflow 104 to determine a compliance of the workflow 104 with a predetermined set of compliance requirements, and modifying the workflow 104 in response to a determination that the workflow 104 is not in compliance with at least one of the predetermined set of compliance requirements.
The computer system 1500 may include a processor 1502 that may implement or execute machine readable instructions performing some or all of the methods, functions and other processes described herein. Commands and data from the processor 1502 may be communicated over a communication bus 1504. The computer system may also include a main memory 1506, such as a random access memory (RAM), where the machine readable instructions and data for the processor 1502 may reside during runtime, and a secondary data storage 1508, which may be non-volatile and stores machine readable instructions and data. The memory and data storage are examples of computer readable mediums. The memory 1506 may include a workflow test case generator 1520 including machine readable instructions residing in the memory 1506 during runtime and executed by the processor 1502. The workflow test case generator 1520 may include the elements of the system 100 shown in
The computer system 1500 may include an I/O device 1510, such as a keyboard, a mouse, a display, etc. The computer system may include a network interface 1512 for connecting to a network. Other known electronic components may be added or substituted in the computer system.
What has been described and illustrated herein is an example along with some of its variations. The terms, descriptions and figures used herein are set forth by way of illustration only and are not meant as limitations. Many variations are possible within the spirit and scope of the subject matter, which is intended to be defined by the following claims—and their equivalents—in which all terms are meant in their broadest reasonable sense unless otherwise indicated.
Number | Date | Country | Kind |
---|---|---|---|
2779/CHE/2014 | Jun 2014 | IN | national |
Number | Name | Date | Kind |
---|---|---|---|
5630069 | Flores et al. | May 1997 | A |
6237020 | Leymann | May 2001 | B1 |
7100195 | Underwood | Aug 2006 | B1 |
7370325 | Hull et al. | May 2008 | B1 |
7734492 | Sun et al. | Jun 2010 | B2 |
8181150 | Szpak | May 2012 | B2 |
8645854 | Kopycinski et al. | Feb 2014 | B2 |
9317254 | Yim | Apr 2016 | B1 |
20030084429 | Schaefer | May 2003 | A1 |
20050066304 | Tattrie | Mar 2005 | A1 |
20060129443 | Chen | Jun 2006 | A1 |
20060178918 | Mikurak | Aug 2006 | A1 |
20060235964 | Childress et al. | Oct 2006 | A1 |
20090018882 | Burton et al. | Jan 2009 | A1 |
20100077260 | Pillai et al. | Mar 2010 | A1 |
20110113287 | Gururaj | May 2011 | A1 |
20120110384 | Brunet | May 2012 | A1 |
20120215723 | Petri | Aug 2012 | A1 |
20130145300 | MacKay et al. | Jun 2013 | A1 |
20140067448 | Joshi et al. | Mar 2014 | A1 |
Entry |
---|
“Patent Examination Report No. 1”, Australia Patent Application No. 2015203263, IP Australia, dated Jul. 28, 2015, 7 pages. |
“The extended European search report”, European Application No. 15171011.8, European Patent Office, dated Sep. 18, 2015, 4 pages. |
Number | Date | Country | |
---|---|---|---|
20160004622 A1 | Jan 2016 | US |