I do remember a discussion with one of our QA guys regarding BPMS testing I want to share. I was asking QA for requirements on a system and curious what methodology is being used for this component. The answer I got and I will probably never forget was: BPMS is a minor part of the system hence we are not supposed test it at all. The motivation behind this article is simply based on fact that this approach wasn’t correct an provide some insight what’s going on. There is no ambition to provide complete methodology or best practices regarding testing of BPMS component. That is the role of skilled QA.
As BPMS is a solution for orchestration of your business services inside the house. Simply it drives the work flow. BPMS isn’t usually a decision maker. Decision making rules are typically required to be flexible, expect frequent changes. It should reflex business changes as quick as possible. So because of that it is not a good practice to hard-code them into processes in a form of “spaghetti code structure” (structure of if-else in several levels) which is error-prone and hard to maintain . Those are reasons for having a separate component responsible for decision making – BRE (business rule engine). So the QA task can be divided into two main objectives for functional testing. Verify for given input data:
- all the necessary data for making a decision present at specified point? This can be difficult because of large amount of incoming path to the decision point. Despite the execution path you are verifying that all the data needed were gathered in the system.
- based on decision results are the steps actioned in the correct order? Verification of the required business process.
- are the fault recovery procedures working correctly? Switching the system to fault recovery mode and verification that the system stored all data correctly and data completeness.
For sure there can be more aspects but those are considered as the main ones. The main problem of the testing is that those aspects cannot be tested in isolation. By isolation I mean that you cannot use standard methodologies (e.g. black box, white box, … whatever it is) and point somewhere in the system. BPMS is a system component that has “memory”. That means you cannot simply arbitrarily divide the process to parts which are you going to test in separation. Some systems can have something like “point of synchronization” (despite the execution path the system has defined data set) but this depends on a design and hence it isn’t mandatory.
Let’s have a look at possibilities. Product itself offers feature called BUnit what is alternative to JUnit in java world. It is feature facilitating process unit testing. All invoke activities within the process are mocked – the xml reply is recorded. Xml manipulation expressions and gathering data within flow ( aspect 1) can be tested this way by correct choice of recorded data. But the tests are still taking place in artificial conditions. Aspect 3 – testing fault recovery can be tested relatively easily by this approach if there is no awkward decision during design phase. Test analyst is the key role during this process. No need to talk about documentation of the system itself. Unit testing of BRE is completely separate chapter not discussed here.
Having verified basic functionality of the blocks – processes and subprocesses we can continue with integration testing. Usually this kind of systems are systems with high degree of integration so it is really handy to have all back-end systems under your control. Reason no. 1 – data driven system – behavior of your data depends on a data in those systems. Reason no. 2 – BPMS has “memory” (it is “state full”). If you wanna test from certain point in process you have to bring the system in this point. You need to do it repetitively and in a well-defined way. Approach used in web application testing – modification of data in DB to bring the order, application and etc. to certain state is not sufficient here. Having simulators of real beck-end systems was proved as really good practice. This way you simply isolate your system and time to error localization is significantly lower. This way you can conduct integration testing of bigger functional blocks up to end-to-end testing. There is no doubt that higher level of automation is a must.