Have I just become the first advocate of Aspect-oriented Modelling ?![Quick check on Google shows not ... well, I came up with it on my own!]
I am presented with (numerous) Activity diagrams, each comprising various Activity elements linked by control flows.
Now, an Activity (and also incidentally Sequence) diagram, by its nature, shows the direction of execution of steps, and so explicitly indicates stages in a Scenario.
For Test purposes, I could write out step-by-step scenarios inside each Activity element to test that single element, with much of the preceding and following steps identical or similar.
But what I find myself
really wanting to do is to enumerate inside each Activity element, as Test Cases, just
those things which could be different for that element.So if one Activity element says 'parse command line parameters', the test cases could be:
- Basic path - valid parameters
- Alternate path - no parameters
- Alternate path - too many parameters
- Alternate path - invalid parameters
In this way, every element in the diagram would contain a set of Test Case alternatives to exercise the required different classes of behaviour
in that element - without having to state what was going on before or after, since that was inherent in the diagram itself.
All very good in terms of documentation and completeness - a Report itemises every variation at each element, but that does not now translate very well into something usable for assembling the end-to-end scenarios for exercising the paths through the diagram.
Worse still, there's no way in EA that I can visualise this, since all of the Test Cases Activity alternatives are locked away inside their individual elements, with no way of bringing them together to form a series of tests covering the alternatives.
I imagine I would be told "ah, well that's not the way to use EA", but perhaps Sparx could look at some way of improving this
aspect, because Test Cases for a Class element are all very well, but for diagrams that are inherently sequential, all you want to do is specify variations from the norm for any element - having entire test scenarios inside each element is overkill, as well as very tedious and bad for "reuse" !
[Yes, I have considered creating a 'shadow copy' of the original diagram, etc: unmaintainable !]
I guess all that I could realistically do would be to create another set of Test Scenario diagrams which step-by-step played out the required variations, with (perhaps) links back to the original diagram elements containing their Test Cases ...?
<Later> Well, I can live with the lists of alternatives - at least I will know that all the possibilities are covered, and then we can derive some scenarios from the Report by hand.