Lately I been investigating the options Enterprise Architect offers to record Sequence Diagrams from code, because we want to learn for LieberLieber AMUSE.
And I found a pretty interesting result:
It only takes into account “Classes” and not “Instances”.
There is two links that proved helpful – a video tutorial from Sparx Systems and a Blog post from Tom Peplow.
Setting up works in a similar way than it does for NUnit – refer to this Posts for hints.
I used my very Simple Account Class from the NUnit sample.
Then I prepared a little runner that would record a Sequence Chart using Enterprise Architects Debugger.
The result I’m getting from Enterprise Architect looks like this:
It doesn’t take into account that I have two instances of the same class – I would have rather expected it to look like:
What do you think? Is there value in a Sequence Diagram based on classes rather than on instances?
I would say no, there is no value because of the danger that the diagram will not accurately represent the interaction. There are many cases where the results would be the same but at least in the scenario you are working with the first diagram creates confusion rather than eliminating it.