Configuração de teste de regras
Um Decision Flow invoca regras com entradas definidas em uma Tabela de Decisão de configuração separada e informa quais testes foram aprovados e quais foram reprovados.
David Škarka
Template author
This Decision Flow functions as an automated testing engine that calls rules with inputs defined in a separate configuration Decision Table, and tells you which tests passed and which did not.
Solution components:
A Decision Table named 'Test Data Sets' defines the set of tests (ruleAlias), inputs, and appropriate expected outputs, which will be called from the workflow.
Two Decision Tables named 'To power of 2' and 'Add 10' serve as sample logical units, containing intentional mistakes for specific input values to demonstrate how the system handles and reports testing failures.
A Decision Flow named Testing orchestrates the validation process:
It prepares inputs for dynamic evaluation by retrieving the rows from the Test Data Sets Decision Table.
It iterates through the data sets and dynamically calls the specific rule (e.g., "To power of 2" or "Add 10") defined in each test case.
It compares the actual output from the rule against the expected output defined in the dataset; if the values match, the test is recorded in the passedTests list.
If the values do not match, the workflow captures the discrepancy (expected vs. got) and appends it to the failedTests list.
Use this Decision Flow as a regression testing tool to ensure your business rules maintain logic consistency by simply adding new test scenarios to the configuration table and running the workflow.
More Templates
See Other Templates
Teste A/B
Descubra uma maneira simples de atribuir um grupo de teste para realizar testes A/B em suas decisões.
Precificação baseada em risco
Descubra uma maneira simples de aplicar uma matriz de precificação baseada em risco adequada ao tipo de cliente.
Critérios de Elegibilidade e Regras da Política
Descubra uma maneira simples de definir e executar vários conjuntos de regras e obter o resultado da decisão final.