Automating Software Testing: Generating Test Cases from Business Process Models
Automating Software Testing: Generating Test Cases from Business Process
Models
Software teams are under
constant pressure to release features faster. Yet every new feature must be
tested, and writing test cases by hand is slow and repetitive. A growing number
of tools now promise to automate this work by reading business process diagrams
and turning them into user stories and test scenarios automatically.
This approach connects two
worlds that often stay separate: business analysts who design processes, and
developers and testers who build and verify software. When the link between
them is automated, teams save time and reduce misunderstandings.
The Problem with Manual Test Design
In many organizations, business
processes are drawn using BPMN (Business Process Model and Notation). Testers
then read these diagrams and manually write test cases. This handoff creates
several problems:
•
Important paths in the process are sometimes missed
•
Test cases become outdated when the process diagram
changes
•
Different testers interpret the same diagram in
different ways
•
A lot of time is spent on repetitive writing instead of
exploratory testing
Farley (2021) argues that modern
software engineering should focus on fast feedback and working in small,
verifiable steps. Manual test design slows this feedback loop and makes it
harder to change software with confidence.
Key Concepts: BPMN, DMN and Gherkin
To understand automated test
generation, it helps to know three standards:
•
BPMN: a visual language for describing business
workflows, such as "receive order," "check stock" and
"ship goods"
•
DMN (Decision Model and Notation): a standard
for describing business rules and decisions, such as credit scoring rules
•
Gherkin: a simple, structured language for
writing test scenarios using "Given," "When" and
"Then" statements
Gherkin is widely used in
behavior-driven development (BDD) because both business people and developers
can read it. For example: "Given a customer has an approved credit score,
When the order is submitted, Then the order is confirmed."
How Automated Generation Works
An automated tool typically
follows these steps:
1.
Read the BPMN file and extract tasks, gateways and
events
2.
Identify all possible paths through the process
3.
Read DMN tables to understand decision rules at each
gateway
4.
Apply pattern matching to convert each path into a user
story
5.
Generate Gherkin scenarios that testers can run with
BDD frameworks
Research from Telkom University
Riskiana, Wibowo and Yonathan
(2024) developed a prototype called FlowForge that generates user stories and
Gherkin test cases from BPMN models with DMN integration. They tested it on
four business process models and reported encouraging results:
•
Element extraction reached an average completeness of
98.25%
•
Path accuracy averaged 87.5%, with two models reaching
100%
•
Generation was fast, averaging only 0.36 seconds per
model
•
FlowForge supported all three Gherkin components and
all basic BPMN elements in the authors' comparison
The study also revealed a common
limitation. One model with a looping structure was not fully detected, which
lowered its accuracy. This shows that complex loops remain a challenge for
automated path analysis.
Benefits for Development Teams
Automated test generation fits
well with DevOps practices. Kim et al. (2021) emphasize that automated testing
is a foundation of continuous delivery because it allows teams to deploy
changes safely and frequently. Tools like FlowForge extend automation to the
earliest stage of testing: designing the test cases themselves.
Practical benefits include:
•
Speed: test scenarios are produced in seconds
instead of hours
•
Consistency: every path is described using the
same structure
•
Traceability: each test links directly to a
process step or business rule
•
Collaboration: business analysts can review
Gherkin scenarios easily
•
Maintenance: when the BPMN diagram changes,
tests can be regenerated
Limitations to Keep in Mind
Automation does not remove the
need for skilled testers. Teams should be aware of these limitations:
•
Poorly drawn BPMN diagrams lead to poor test cases
•
Loops and complex parallel flows may not be handled
correctly
•
Generated tests still need human review for business
meaning
•
Edge cases and non-functional tests, such as
performance and security, require separate design
A good strategy is to use
generated tests as a strong starting point and then let testers add creative,
risk-based scenarios.
Tips for Getting Started
•
Standardize how your team draws BPMN models
•
Keep decision rules in DMN tables rather than hidden in
text
•
Integrate generated Gherkin files into your BDD
framework
•
Review generated scenarios during sprint planning
•
Track coverage to see which process paths are tested
Key Takeaways
•
Automated tools can turn BPMN diagrams into Gherkin
test scenarios in seconds.
•
Complex loops are still a weak point, so human review
remains essential.
Conclusion
Generating test cases from
business process models is a practical step toward faster and more reliable
software delivery. Research from Telkom University shows that a prototype like
FlowForge can extract process elements with high completeness and produce
Gherkin scenarios in less than a second. While complex loops and human judgment
still matter, this technology helps teams spend less time writing repetitive
tests and more time improving software quality.
FAQ
What is Gherkin in software testing?
Gherkin is a plain-language
format for test scenarios using "Given," "When" and
"Then" steps.
Can automated tools replace software testers?
No. They speed up test design,
but testers are still needed to review scenarios and explore risks.
What is BPMN used for?
BPMN is used to draw business
workflows in a standard visual format that both business and IT teams
understand.
References
Farley, D. (2021). Modern
software engineering: Doing what works to build better software faster.
Addison-Wesley.
Kim, G., Humble, J.,
Debois, P., Willis, J., & Forsgren, N. (2021). The DevOps handbook: How
to create world-class agility, reliability, & security in technology
organizations (2nd ed.). IT Revolution Press.
Riskiana, R. R.,
Wibowo, R. O. S., & Yonathan, A. (2024). FlowForge: A prototype for
generating user stories and Gherkin test cases from BPMN with DMN integration
and pattern matching. International Journal on Information and Communication
Technology (IJoICT), 10(2), 195–213. https://doi.org/10.21108/ijoict.v10i2.1015
Comments
Post a Comment