Using Decision Trees in SAP Test Automation
Test automation as part of a company´s quality assurance measures has to comply with principles, methods and measures of acknowledged test methodology and testing practice, in order to deliver an objective and reliable evaluation of SAP systems´ quality, just like all other components of this highly sensitive professional discipline.
Our blog article today covers the topic application of decision trees in SAP test automation which is often subject of controversial discussion between the experts.
Definition Decision Trees
Decision trees, in programming context If-ElseIf-Else clauses or If-Then conditions, are used when processes behave differently from a specific point on depending on the specification of a criteria (e.g. type of material).
Thus, applying decision trees in a test case leads to the fact that not only the test case process itself but also the result can be different depending on the execution.
Your first reaction may be: That must not be! A test case has to be conclusive and distinct in its behavior regarding process and result.
Before we amplify our approach to decision trees and their application in SAP test automation, let us look briefly at a practical example and some approved testing guidelines which we think are particularly important.
Practical Example Variant Configuration
We test the variant configuration of our SAP systems and want to equip them with the highest test coverage possible.
Now, our variants differ in certain parts based on the required data and input fields.
Therefore, particular process flows come about at certain points which quite differ from each other.
In terms of quality assurance, this means: a test case must be created
for each explicit process flow.
Testing Methods and Guidelines as Fundament for Evaluating the Application of Decision Trees
Two guidelines of renowned international testing methods provide us with a fundament for our problem:
- Test cases must be deterministic. This means that a test case has to deliver the same result in repeated executions with consistent preconditions.
- Acceptance criteria must be explicit and measurable and thus enable a test result without room for interpretation.
Let us strike a Blow for Decision Trees
Based on the two presumptions above, we now want to outline why in our opinion decision trees definitely have the right to exist in test automation and this conforms to approved testing practice. However, it is important that both stated guidelines above are fulfilled.
As already stated above, without the application of decision trees a separate test case has to be created for each version of our practical example.
These separate and explicit test cases meet all criteria of approved testing practice:
- conclusive preconditions
- conclusive process which will be run through
- conclusive, expected result
When applied to test automation, this is linked to a certain effort, since all different variants of the process cycle have to be represented in single test cases.
Decision trees provide us with a possibility to represent processes which differ in some parts from each other in one single test case.
So far, so good! But is this with regards to a neat test method valid as well?
Following aspects have to be clearly and precisely determined for each iteration of our decision tree test case BEFORE the execution:
it must be clear which
- explicit process path
will be run through and which
- explicit expected result will happen
so that we can qualify the test case iteration as successful.
Are all these 3 aspects considered, then decision tree test cases fulfil all quoted guidelines of testing practice:
- Each test iteration is deterministic for itself – the test case delivers the same result with equivalent input data (equivalent preconditions).
- The acceptance criteria are conclusively determined for each combination of preconditions, the path of the iteration is conclusively defined and the result is conclusively measurable.
In conclusion, we think that decision trees in compliance with the determined rules fulfil all criteria of testing methodology in the application of test automation.
Decision trees, if used correctly, help to optimize the effort of creating but as well the maintenance of test cases and thus manage complex and extensive test scenarios more easily, such as those for variant configuration.
Do you want to know more about the application of decision trees in test automation with suxxesso Tool Suite? Then contact us for a non-committal talk or for a live demonstration of this feature on a SAP system.