How to Ensure Your Business Rules are Working Properly
So, you’ve finished authoring your business rules, or at least a significant portion of them. What’s next? You need to make sure they work correctly. Let’s dive into QA testing, a crucial step in the decision management process. This article will focus on traditional QA testing methods, and in the coming weeks we will review other testing methods such as Business Performance Testing.
What is QA Testing?
In decision management, QA testing refers to testing your decision logic (ex. business rules). The goal is to verify that your rules produce the expected outcomes. While you could manually create test cases, it’s much more efficient to leverage historical transactions with expected outcomes.
For instance, you know that “Jane’s” application was approved with X terms, “John’s” application was approved with Y terms, and “Doe’s” application was declined. You can automate the execution of the rules on those applications and check that they match the expected results.
Why is QA Testing Important?
QA testing makes sure your decision logic is working as intended before they impact the real world. The more historical transactions, the more comprehensive your testing will be. However, your historical transactions may not cover all edge cases. Therefore, your business rules may pass QA testing and yet still have errors in production. Or, you may not have any historical data yet. In these situations, you should produce test cases by hand, using tools such as Mockaroo. Excel (spreadsheets) can be very useful too. Many of our customers copy one test case into Excel and then create different variations.
How Does QA Testing Work?
On a high-level, here are the steps involved:
- Compile test cases
- Run business rules on test cases
- Compare the test outcomes with the expected outcomes
QA flags are a way to perform step 3. Here are a few ways you can leverage them:
- Create an individual QA flag for each field of your decision outcome
- Create an individual QA flag for each field of your decision outcome and another “global” one that checks that all individual flags pass
- Create an individual QA for a subset of the fields that matter to you and another “global” one that checks that all individual flags pass
Regardless how you set up your QA flags, you should use them to create a report to easily visualize which cases are failing. Our SMARTS™ decision management platform enables you to create QA flags, report on them, and filter on failed test cases. In my client consulting projects, I like to work exclusively on the failed test cases. Rather than having to review each test case one by one, I can focus on only the failed test cases. Sometimes, business rules caused the errors. Other times, the data in the test cases caused the errors. This is why SMARTS™ enables you to view the data and the business rules side-by-side. The worst thing you can do is to modify a business rule based on faulty data!
Troubleshooting with RedPen™
Once you identify the error(s), fix the rules, or, if applicable, fix the test case data and then move to the next failed test case. I highly recommend taking advantage of our SMARTS™ RedPen™ rules authoring tool. Our tool will highlight in red what data fields in your test cases are referenced in a rule. RedPen™ will help you quickly pinpoint where the error is coming from which is a huge time-saver, especially when you’re dealing with large object models.
Conclusion
QA testing is must-do to validate your business rules. With the right approach and tools, QA testing can be simple and even enjoyable. Once you have finished testing, make sure you package your decision logic in a release before you push it to production.
Continue reading my Rules Authoring Best Practices series:
- Rules Writing Pitfalls
- Making Decisions or Not?
- Decision Design
- Release Management
- Decisions in Production
- Business Testing
- Object Model First
- Rules Requirements 101
- Data-Centric Approach to Rules Authoring
- Rules for Data Validation
Learn more about Decision Management and Sparkling Logic’s SMARTS™ Data-Powered Decision Manager

