DGML, the new VS2010 visualization technology has capabilities to render graphs. Graphs like dependencies between classes, inheritance graphs, custom graph, you actually can visualize any relation you want. Cameron Skinner has posts about DGML and Chris Lovett has some great video’s.
[class dependencies uml2doc.codeplex.com]
Now the interesting thing is that you can analyze these graphs. In the image below you see the analyzers; Circular References – Hub – Unreferenced.
The purple classes are unreferenced which probably means dead code or entry point of the application. The kind of blue-green nodes are hub, classes which are important and heavy used, and no strongly connected classes in this solution.
Make your own analyzer.
You also can make your own analyzer. For example code coverage or naming conventions or … whatever you can imaging. In the example below I created an analyzer which marks the nodes green with the string ‘Clemens’… (code you know is great:)
Ok, maybe not that interesting analyzer, more interesting is the creation… in the /PrivateAssemblies/Providers folder there are already several analyzers available, actually the ones mentioned above.
A small analyze of this assembly tells us that all the analyzers are using the IProvider interface and the ProviderAttribute [see below]. After some more exploration you will find that the prgroesion.common assembly has a method ‘ProviderDiscovery’ which looks for classes in the provider directory.
so, making a assembly with the code below is a good start:
[Provider(Name = "ClemensAnalyzer")]
public class TestAnalyzer : IProvider
In the void Initialize(IServiceProvider serviceProvider); you have to initialize your provider, register the actions and action handler [action.ActionHandlers.Add(new ActionHandler(this.OnAnalyzeTests));]… which calls your analysis…
foreach (Node node in this._graph.VisibleNodes)
{
if (node.Label.Contains("Clemens"))
{
node[HasClemens] = true;
outputObjects.Add(node);
this.ThrowIfCancelled();
}
}
the node[HasClemens] = true; is some additional meta data you add to your diagram: private static GraphProperty HasClemens = GraphProperty.Register("HasClemens", typeof(bool), new GraphMetadata("Clemens","This one contains Clemens",null,GraphMetadataFlags.Default), typeof(TestAnalyzer));
All this and a bit more [didn’t finished the analysis completely, there is a lot more possible] result in your own analyzer…

Now, let’s start making a useful one :-)
Another delivery from the VS ALM Rangers is public available… the Requirements Management Guidance.
Very useful guidance, with a small contribution from me with the Enrich VSTA 2010 Use case diagram with SketchFlow Screens post. [see the Requirements Elicitation part].

Broke my leg during ice skating last Sunday [see picture]. Had to stay in the hospital for surgery. A nail is put in my bone [see pdf below, also contains operative techniques.. very interesting :-)].
After a few nights I’m back home. Have to recover for several months, the first six weeks I’m not allowed to put any pressure on my leg… no MVP summit for me this year, even worse also had to cancel two ski –telemark- vacations [Skieda] and it’s still freezing in the Netherlands.
Tibial Nailing System [pdf]
| Engineering World 2010 Wil jij ook in één dag op de hoogte zijn van de ontwikkelingen binnen jouw engineering vakgebied? Aarzel niet en meld je dan nu aan voor Engineering World 2010. De volgende stap in volwassenheid en productiviteit Zaterdag, 6 februari 2010, Achmea Conferentie Center in Zeist Voor de derde keer op rij organiseert Sogeti in samenwerking met het Software Development Network dit unieke evenement. Programma Het engineering vakgebied is volop in beweging en gaat een nieuwe volwassenheidsfase in, waarbij de productiviteit zich enorm snel ontwikkeld. We zijn er trots op dat tijdens Engineering World 2010 Key Note spreker Taco Oosterkamp een lezing geeft over time- en stressmanagement nieuwe stijl. In die lezing vertelt hij over principes voor effectief én ontspannen werken. Hij laat daarbij een serie tips en trucs zien – alles bij elkaar een interessant, praktisch verhaal. Taco is dé productiviteitsgoeroe van Nederland en mede-initiator van www.lifehacking.nl. Naast Taco Oosterkamp, wordt de dag gevuld met presentaties en workshops. De inhoud van de verschillende sessies kun je nalezen op www.engineeringworld.nl. We gaan je op deze zaterdag ook uitdagen! Want… Ben jij de beste programmeur van het event? Tijdens Engineeringworld 2010 schrijven we een programmeerwedstrijd uit. Je krijgt een programmeeropdracht die ter plekke moet worden uitgevoerd, alleen of in een team. Je krijgt voldoende tijd om aan je oplossing te werken zodat er ook nog ruimte is om presentaties bij te wonen. Neem je laptop mee met jouw favoriete programmeeromgeving. De winnaar krijgt een mooie prijs. Meer informatie over de wedstrijd kun je binnenkort vinden op www.engineeringworld.nl. Kortom, een evenement dat jij als engineer niet mag missen. Je kunt je kosteloos inschrijven via www.engineeringworld.nl. Graag tot ziens op 6 februari 2010 in Zeist. |
Always an interesting question, how does traceability work in VS2010?
To often asked without any context, or only asked from a requirements perspective. Still way too open to answer in a tweet. So, a post to canalize those questions a little bit more…
[see the image below for the numbers]
you can take two directions when talking about traceability. The first is focused on “work”, the work items repository part of TFS [on the left side of the green dotted line]. with work related traceability we can answer questions like “did we completed all tasks for that requirement?” [for more see the red list]. Information which is very important for every roll in the Application Lifecycle. A tester want to know if he can start testing, so he want to see if the developer is ready. A project manager wants to plan the work. Developers want to know if designers are ready to start with a stabile set of needs… and many more. All work related information, and information which can be tracked/ traced by using work item and its repository.
VS2010 main capability for work related traceability are the TFS work item repository [see image below from MSDN] and linking of work items, setting up a hierarchy.

We can breakdown requirements, or user stories, in tasks.
tasks that needs to be executed to get the requirement done. These tasks can have a parent-child relation [and other see Working with Link Types on MSDN]. Giving us the information we need in any kind of way, for example reports.

So far the work related traceability. The other kind of traceability
is based on artifacts, things we make during the application lifecycle, I will call them ALM artifacts. ALM artifacts are used to create the solution/ application. For example the source, XAML and configuration files which make the solution. But, also the diagrams which we created to make a correct, consistent and good communicated application architecture, we use them to drill down from the needs to code. And also test cases belong to the things we make during the application lifecycle [I can imaging when you get confused now, test cases are within VS2010 work item types, but they definitely belong to the artifacts section].
Use case – user story what is the difference… I often use both [see this piece of MSDN documentation for modeling requirements]. User stories are work item types and use cases are ALM artifacts. So, they are a great bridge between the ‘work-world’ and ‘artifact-world’. The good thing is the capability of VS2010 to link diagrams, and other model elements to work items. [How to: Link Work Items to Model Elements], this give us the capability to create a trace.
From the description and diagrams of the requirements, the often called problem domain, we have to make a big jump into the solution domain.
Diagrams are created like the component diagram and layer diagrams visualizing the high level pieces of the solution with the dependency and interfaces between these components and layers. [used this image in this post; the modeling world].
It is also a big gap for traceability, to get this a little bit better a solution can be the replaying of scenarios written down in the user stories and drawn in activities as described in this post; VS2010 Modeling; Create Lifeline from Component.
A trace back from component/layer to requirement can be a link from model element to the user story work items in where he is used. Never did this, it’s a manual process and probably people will forget the links, maybe with some kind of notification this would be valuable…
An interesting VS2010 capability is the connection between the layer diagram and the sources. This makes a trace possible between the high level design and the sources. See image below.
Because test cases are work item types in VS2010 they can be connected to any other ALM artifact, giving us the possibility to connect for example test cases to use case diagrams. Easier to accomplish and to maintain is the connection with test tasks and corresponding user story. But this doesn’t answers questions like; “which code is touched by this test”. VS2010 answers this question with Test Impact, see “Determining Which Builds Have Bug Fixes, New Features, or Requirements”, “Recommending Tests to Run That are Affected by Code Changes” and “Developing Tests from a Model”.
Another interesting traceability scenario can be build with test case generation, see this ‘old’ Model Based Testing beta 1 video. [some more info on MBT can be read on Rob’s blog]
Next, 



all have a work related task. So, not only traceability within the two sections is possible also traceability between the two sections is possible. answering questions like; “which task created this line of code?”… creating this link / trace is a manual task but it can be controlled by a check-in policy.

So, when someone asks you the question; “what about traceability in VS2010?” you now can canalize this and guide him/ her to the real traceability question they want to have answered [and tell the solution]….
< probably more to come on this interesting topic, also because the extensibility model of the diagrams is powerful enough to create your own required traceability between artifacts with notifications and work item linking… very very interesting >
From the VS2010 MSDN sequence diagram documentation…
Relationship to other diagrams
You can use UML sequence diagrams together with other diagrams in several ways.
Lifelines and types
The lifelines you draw in a sequence diagram can represent typical instances of the components or classes in your system. You can create lifelines from types, and types from lifelines, and show the types on UML class diagrams and UML component diagrams. For more information, see Classes and Lifelines.
Beside we can create lifelines from/for classes we also can create lifelines for/from components… which is actually a very interesting feature.
Context menu on a component shows the create lifeline option [not available when clicking on a part ]

After the creation of several lifelines, you can draw the interactions between the components. There isn’t functionality like the bi-directional method creation in the class-sequence diagram interaction for the component-sequence diagram. Kind of logic, a component only has interfaces.
Why would you want to do this, create sequence diagrams for components?
While the component diagram
is a static view of your system the sequence diagram is dynamic, it visualizes the flow in your application, the sequence of actions that occur in the system. So, you could use sequence diagrams to validate your system, your component design. Take a scenario, a requirement scenario, and create a sequence of actions from in a sequence diagram
. By doing this you create a kind of simulated behavior of the component structure, which you can check on correctness and consistency.
The scenarios used for this can be found in the use case diagrams
, which describe the actions that take place on/in the system. Now describes a use case diagram not really a scenario, you better can use an activity diagram for that
, which can be based on the use case diagram as a kind of use case realization. Now the interesting thing is, testers use activity diagrams to create test cases, they have specific technologies to extract the right amount and type of scenarios [see http://robkuijt.nl/index.php?entry=entry080423-135750 ], these scenarios we can use to validate our component design which actually closes the loop.

It would be even more interesting and powerful if we not only could link sequence and component diagrams but also use case and activity diagrams making notification when an activity changes and a scenario can’t be run anymore on the purposed component… hard to accomplish, but interesting, versioning would be hard…
Within TFS you can set permissions, what people are aloud to do within projects and with 2010 in place also within project collections and within Microsoft Test and Lab Manager.
In some situations, project settings, you want to set these permissions. For example in the TMap process template there are different rolls responsible for different tasks. The Test Manager is responsible for the Master test plan, the Test infrastructure coordinator for the test infrastructure and tools, the test coordinator for the test plans, the runs and reports and the tester for creating and execution of the tests cases.
These rolls/ groups you also can find in the TMap Process Template.

All rolls have there specific restrictions. For example a Test Infrastructure Coordinator is aloud to setup lab environments but a Tester isn’t, and a test coordinator can create a test plan but a tester isn’t. A test manager and coordinator can edit test runs results. A tester can execute test cases but a developer can’t, a developer can change sources but a tester can’t… etc, etc… A frequent ask question by test organizations is: how can a set this restrictions…. the answer is it is easy but you need to have project edit permissions :-)
On several places you can set security permissions.
In the Team Foundation Admin Console, the same settings can be set within Visual Studio menu Team—> Team Project Collections Setting
You only can set project collection and TFS specific setting at this level, not that interesting for test management.
Within Visual Studio, right mouse click on within Team Explorer or by using the Team menu.
This is a more interesting place to set permissions for the test organization. For example in this setting a test coordinator is aloud to create test runs, but can’t change configurations and environments.
This results in the fact that he must contact the test infrastructure coordinator to maintain the test infrastructure. And he got a message when he tries to change a setting in Lab Center.

A hidden security setting [I call it hidden because its hard to find in my opinion and I had to search for the projectplan permissions] is a the Area and Iteration menu item, just below the ‘Group Membership’ item.
When clicking the ‘Areas and Iteration’ menu item and click on the bottom right of the dialog what appears you can set permissions for the selected Area node or Iteration node. For the test organization important manage test plan permissions can be set.
When you set this permission so a tester isn’t aloud to manage test plans he gets nice an clean messages when he tries to save one.

But, it gets even more interesting. When a tester isn’t aloud to manage test plans he also can’t add test cases to a test plan. So, the create new test case in the plan tab of MTLM also will result in a ‘Not Aloud Message’. While the tester is aloud to create test cases he isn’t aloud to add them to a test plan, within MTLM he has to create test cases in the ‘organize’ tab –> test case manager. So a test coordinator, or some one else who has the manage test plan permission can add it to the test plan.
I have spoken with test organizations who prefer this way of restrictions also have spoken with who don’t want this. Within the TMap Process Template, you will find a light weight implementation of these permissions settings. [not yet in the download ]
To mention all the permission settings locations, right click on the source control treeview and select properties, you can set permissions for source control in that dialog [ you also have to maintain the reporting server and the SharePoint server separately]. ping me if I forgot a security settings location…
A structured test management process template for VS2010…
Still a lot to do to get it at the quality level we want, but this is a preview and as I call it… for discussion purpose only.
The planning is to get it somewhere next week at a level we can call it beta and ready for us within projects [we want to get RTM when VS2010 gets the RTM state].

The best way to get started, to get familiar with TMap and the process template for VS2010 is to take a look at the documentation. The documentation behind the template contains an almost completely filled wiki, how to execute a high quality test management approach with VS2010. Also the main reason it was that quiet on this blog lately, I created more then hundred pages of content in the documentation section of the CodePlex site. [which also can be downloaded for onsite guidance]
The actually process template is connected with this wiki and specific work items and work streams redirect to the specific topic.
Feel free to leave any comment you want, but don’t forget its work in progress there are still numbers of holes in the template, the guidance, the reports and so on…
location: TMap.CodePlex.com