Eran Ruso

This blog is about Team System, QA methodologies, Development methodologies and more...

News

Eran Ruso
MCPD Certification

How To Investigate Existing Code Using The Visual Studio 2010 Architect Tools

How many times you have spent hours on code just to understand what it does?

How many of these times it was your own code?

From my experience the answer to both of these questions is A LOT!

In Visual Studio 2010 we can find a set of tools that can help us understand the code a lot faster.

On This post I will show some of the abilities we get with the Visual Studio 2010 Architect Tools when investigating an existing code.

Note: The Architect Tools is in the Visual Studio Ultimate Edition only.

Lets start with ways to investigate an existing code, for that I will use a common solution called “TailSpinToys”.

Step 1: Go to the “Architect” menu item on the main menu

Step 2: Choose “Generate Dependency Graph”

Step 3: Choose “By Assembly”

Step_1__Dependency_graph_by_assembly

What we get is an Assemblies graph that shows all the dependencies between the Assemblies in our solution and two more very important groups:

  • Generics
  • Externals

The thickness of the links shows how strong is the link between the assemblies.

Step_2__Dependancy_Graph_by_Assembly

Lets continue and play with it a little, I will extract the Generics group.

Its little hard to see but what we get is all the generics that we use in our solution

Step_3__etract_Generics

I will now extract the Externals group.

You can see here all the references that we use in the solution.

Step_4__Extract_Externals

I will now extend the System.dll

You can now see all the workspaces in the System.dll, these are not all the workspaces that exist but only the workspaces that are used.

Step_5__Extract_System_DLL

You can continue to dig in and see all the methods that are in the classes that are in the namespaces.

That is nice, but what if I like to be more specific in my Graph creation?

The answer to this need comes from the Architecture Explorer:

Step_10_Architecture_Explorer

Here you can choose what to investigate and set the scope for the graph.

Step_11_First_View

In my example I have done the following steps:

Step 1: Choose “Solution View”

Step 2: Click the filter to see only the “Projects”

Step_12__Clicking_on_Solution

Step_13__Choose_Project

You can see that the view is filtered by a Filter Icon.

 Step_14__Result

Step 5: Choose the Projects that are shown in the screenshot

Step 6: Click the “Files” bar and choose “References”

By choosing References you will see only the reference files

Step_15__Choose_projects

Step_16_Referances

Step 7: Filter by Project

Step_17_Filter_to_projects

Step_18_Filter

Step 8: Choose all and click the Generate a Graph button on the left

Step_19_choose_all

 Step_20_The_result

There are many more options in the architect tools that I will cover in future posts.

Have Fun!!!

How Do I Manage Documents In Team System? (SharePoint)

I have been asked that question almost in each project I am doing.

The answer is very simple: with SharePoint.

When I give this answer I get a curious look, and the following question will be: “Why?”

SharePoint is a huge product that does many wonderful things, in this post I like to show how it can help us manage our documents.

First thing that you will need to know is that when you create a Team Project you also create a SharePoint site, actually what you create is Windows SharePoint Services (WSS) site which is a free edition of SharePoint.

In each site you have a Documents Section that contains Document Libraries.

From the Team Explorer you have an interface to the Documents Section I will show how to use it in one of my future posts.

Documents_Interface

So how do I get to the site?

In order to get to the site you can just right click the Team Project and choose: “Show Project Portal…”, you can also get to it using its URL.

Step_1__Get_to_site

In the sites menu you will see the Documents Section, Click on it to get to the Documents Section.

Step_2_Get_to_documents_section

Now you will get to the Document Section:

Step_4__Documents_Section

You can do the following and more in SharePoint:

  • Create new Libraries
  • Manage Security for libraries
  • Manage Versioning for libraries
  • Manage folders and documents in each library
  • Upload documents
  • Set template document for each library
  • View history of each document
  • Check-Out and Check-in documents
  • Set Work space
  • Alert On Changes
  • Compare different versions of word documents

In this post I will show how you compare different versions of word documents.

I will start with creating the prerequisites for the example, uploading a document and creating versions for it:

Step 1: I have created a new Document Library called “Demo Doc”

Step_5_create_a_demo_doc_library

Step 2: I have uploaded a document by clicking the “Upload”, browsed to it and checked it in as shown in the following pictures

Step_6_upload_file

Step_7_add_file

Step_8_checlk_in

Step 3: I have created history versions for the document

step_9_view_history

Step_10_history

You can see that there are 3 versions 2 major versions (0.1 is a major version because it it starts from 0) and one minor version 0.2, now I will compare the latest version with version 0.2 and I will see what was changed.

Now we will make the documents comparison:

Step 1: Open the word document using word.

Step 2: Choose the “Review” tab.

Step 3: Open the “Compare” menu and choose “Specific Version…”

step_11_compare_versions

Step 4: Choose version 0.2

step_13_compare_to_

In the result page you can see the changes made since the chosen version up to the current version.

It is easy to see that only one line was added since the chosen version (Marked in Red), on the left hand you can see the details of each change and on the right hand you can see a version with the change (Current) and with out the change.

Step_14_the_result_for_the_compare

You can see that it is easy to compare between two different versions of a document, SharePoint gives a very strong tools that will satisfy all you need for documents management.

Have Fun!!!

How To Get To The Web Access In TFS 2010

In TFS 2008 the Web Access was a different installation and it came as a Power Tool to the TFS.

In TFS 2010 the Web Access is installed automatically and is part of the TFS.

In order to get to the Web Access in TFS 2010 do the following:

In your preferred browser type:

http://[YourServerName]:8080/tfs/web/

YourServerName is the tfs name for example: http://tfs-srv:8080/tfs/web/

Or you can get to it from the Team Project SharePoint Site:

Web_Access 

Have Fun!!!

Visual Studio 2010 Coded UI Test User Guide - Introduction

In Visual Studio 2010 Microsoft has added the Coded UI Test.

Back to history:

In Visual Studio 2005 Microsoft presented the Tester Edition, it contained the following parts:

  1. Web Test Automation Test
  2. Performance Test
  3. Unit Test
  4. Something that should have been a Manual Test, it was word or text documents contained the Test Cases. Practically no one used it.

In Visual Studio 2008 tester edition no significant changes has been made.

In Visual Studio 2010 Microsoft added more parts to the Tester Edition and created a new tool for the Tester called Microsoft Test and Lab Management (MTLM).

I will not get into all the new functionality added to Team System 2010 but I will list the main parts:

  1. Web
  2. Web Test Automation Test
  3. Performance Test
  4. Unit Test
  5. Test Cases management
  6. Manual tests
  7. Coded UI Tests
  8. Lab Management

In the following 4 posts of the user guide  I will focus on the main tasks using the Coded UI Test, best practices with the tool and with automation tests in general.

These are the Blog Posts subjects:

  1. Create A Simple Coded UI Test
  2. Get A Coded UI Test Created In Manual Test Using The MTLM Tool
  3. Add Validation To Your Coded UI Tests
  4. Run Coded UI Tests From The MTLM Tool

The Guide will be published in my codeplex project: “TFS Guides” when finished, you can also find there more TFS guides.

Have Fun!!!

The Power Tools For The Team Explorer 2010 RC Are Now Available

The Power Tools For the Team Explorer 2010 RC are available.

you can download the Power Tools from here.

I have installed the new Power Tools and it looks good!!!

One thing that always surprise me in the Power Tools installation: In the installation process the progress bar move fast until it gets to “Removing Backup Files”, it looks like the process stuck, they have this bug since the Team Explorer 2008 October release and its there to stay.

One of the new things they have done in this release of the Power Tools is update the BPA (Best Practice Analyzer) tool that checks the Server installation and configuration and advise on problems it finds.

I have used the new BPA (Best Practice Analyzer) tool on my RC machine and it worked well.

Note: In order to use the BPA tool you will need to choose the “Customize” option when installing the Power Tools and add it.

The VS2010beta2 is the name of the computer and not the version, the version is RC.

2010-02-24_1030

Have Fun!!!

Problem Installing Visual Studio 2010 Ultimate Edition RC On Windows XP With Service Pack 3

There is a problem I have seen when installing Visual Studio 2010 Ultimate Edition RC On Windows XP with SP3, the screen just disappears in the middle of the installation.

At first I have seen it in one of my clients computers, the problem repeated itself on two computers both were Dell computers.

What we did is upgrading the Windows version to windows 7 and the installation succeeded.

Lately I am seeing the same problem on computers of different customers coming from different manufactures, same problem and same solution upgrade to Windows 7 and reinstall.

Some more problems I have seen in the installation is with Silverlight installation error, but it ended with the error all worked fine after the installation.

Besides these errors the RC version is a lot faster and much more stable in big projects.

Have Fun!!!

Delete TFS 2010 Work Items

Many customers ask me about deleting Work Items from the TFS.

Here is how to do it for TFS 2010:

Step 1: Log-in to the TFS using a TFS administrator user.

Step 2: Open a command line and go to:

32bit machine - “X:\Program Files\Microsoft Visual Studio 10.0\Common 7\IDE”
64bit machine - “X:\Program Files (x86)\Microsoft Visual Studio 10.0\Common 7\IDE”

Step 3: Use the “witadmin.exe destroywi” command in the following way:

witadmin.exe destroywi /Collection:http:\\[ServerName]:8080\tfs\[CollectionName] /id:[WI ID]

you can add as many Work Item IDs as you like using [,] for example 54,88,92 etc.

You can disable the prompt message by using /noprompt.

For deleting work items in TFS 2008 see:
http://blogs.microsoft.co.il/blogs/eranruso/archive/2009/08/10/delete-tfs-work-items.aspx

Have Fun!!!

TFS 2010 RC And Visual Studio 2010 RC Are Available To The Public

From now on the TFS 2010 RC and Visual Studio 2010 RC are available to the public.

The link to download is: http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

Also after customers pressure to have Power Tools RC Brian Harry promised that it will be released by the end of next week no later than 02/19 so thank you Brian for the rescue.

Have Fun!!!

TFS 2010 RC and Visual Studio 2010 RC Are Available

The TFS 2010 Release Candidate and the Visual Studio 2010 Release Candidate are now available to MSDN subscribers and in a few days they will be available to the public.

I have already installed the TFS 2010 and the Team Explorer 2010, the installation was smooth but it is to early to give a feedback regarding the performance and changes made in the RC.

If you decide to install it or to upgrade to the RC version take in account the following considerations:

  1. You will need to use the Server RC and the Client RC as well
  2. The Power tools for the RC will not be available only for the release
  3. It is not recommended to use Beta 2 parts with RC parts

If the above sections are not “Show Stoppers” for you than I believe you will enjoy using the RC.

Have Fun!!! 

Lets Talk About Chickens And Pigs (SCRUM)

Yesterday I have talked with one of my customers that does SCRUM so I have asked him about the pigs and chickens in the company, he looked at me and asked What???

So lets talk about Chickens and Pigs…

It started with a joke on a pig and a chicken:
A pig and a chicken are walking down a road. The chicken looks at the pig and says, “Hey, why don’t we open a restaurant?” The pig looks back at the chicken and says, “Good idea, what do you want to call it?” The chicken thinks about it and says, “Why don’t we call it ‘Ham and Eggs’?” “I don’t think so,” says the pig, “I’d be committed, but you’d only be involved.”

The pigs in SCRUM are committed to the deliveries, the roles in SCRUM that are committed to the deliveries are: Product Owner, SCRUM Master and the teams.

The Chickens in SCRUM are the roles that only pushes requests and bother the “Pigs” while the “Pigs” are trying to fill there commitments, part of these roles are the Management, Marketing, Customer Support etc.

If you like to hear more about SCRUM come to see me on February 8th 2010 in the ALM user group.

For more information and registration: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032440602&culture=he-IL

Have Fun!!!

SCRUM With TFS 2010 – My Presentation On Monday

Hello Everyone!!!

On Monday 08/02/2010 I will present SCRUM with TFS 2010 in the ALM User Group.

I will talk about the way TFS 2010 supports SCRUM process using Conchango’s Free Template.

For more information and to save a sit follow this link: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032440602&culture=he-IL

Looking forward to see you all…

Have Fun!!!

TFS 2010 Work Items Basic User Guide Is Published

I am glad to announce that the TFS 2010 Work Items Basic User Guide Is finally and available to download.

I have worked hard to create this guide and I will be glad to hear what you think of it.

It is available to download from the TFS Guides site.

I will also like to know what other user guides you need.

Have Fun!!!

How To Configure Build Services To A Specific TFS 2010 Collection

In TFS 2010 we use collections, collections act as different “Servers” that the team can use in order to create separation between different groups of projects.

The build services can service one collection at a time.

In order to change the collection that  the Build Services is servicing do the following:

Step 1: Launch the “Team Foundation Administration Console”

Step 2: Choose the “Team Foundation Build Configuration” menu item

1_console_menue

You can see the collection that is being served at point 1.

Step 3: Stop the build service. (Point 2)

2_configure_build

Sep 4: Click on the build “Properties” option

3_click_properties

Step 5: In the properties window click the “Browse…” button.

4_browse_for_collection

Step 6: To choose the target collection mark it and click the “Connect” button

5_connect_to_a_collection

Step 7: Now that you have all in place start the build service.

Note: Some times it will fail to restart, just retype the Password of the account that runs the build service and try again.

6_Click_Start

At this point you will have the build service up and running, if it is the first time you specify the build services to service this collection you will need top create a controller and an agent.

Step 8: Click the “New Controller”.

7_New_controller

Step 9: Choose a name for the controller and click “OK”.

8_Controller_name

Step 10: Wait until the controller will be ready and add a new Agent

9_add_new_agent

Step 11: Choose a name for the Agent, you can also add tags and set the working folder for the agent, when done click “OK”

10_add_new_agent

Step 12: See that all are in read state in order to start creating builds, you can also add more agents for this controller.

11_done

Now all is done you can go to the collection’s projects and use the build services.

Have Fun!!!

How To Connect To The TFS 2010 With Team Explorer 2008

Many users don’t like to work with the Visual Studio 2010 because it is still a Beta or just because they are not ready to upgrade there Visual Studio yet but still they like to use the TFS 2010.

Microsoft has release a forward compatibility update that lets Team Explorer 2008 with SP1 connect to the TFS 2010, the compatibility installation file can be downloaded from here.

After you install the compatibility add-in launch the Visual Studio 2008 and follow the steps:

Step 1: Open the Team Explorer by clicking its icon

1_open_TE

Step 2: Click the plus icon

2_Add_server  

Step 3: Click the Servers… button

 

3_Add_servers

Step 4: Click the Add… button

4_add_servers

Step 5: Add the server URL and click OK

5_Adding_URL

You can see in my example that I have connected to the “vs2010beta2” server and to the “defaultcollection” collection.

6_server_url

Step 6: you can see that the server was added, click Close

7_The_server_was_added

Step 7: In this window you can choose one or more of the collection’s projects

9_The_server_was_added_choose_project

You can now start working with the chosen projects.

10_the_project_presented

Have Fun!!!

LESS Is More When It Comes To Software Performance Testing

Lately I here many people talk about the need for Performance Testing.

It seems that Performance Testing gets a lot of popularity based on the “Need For Speed” of the customers, people today don’t like to wait… 

In this post I will talk about the most common types of Performance Testing.

I will start with LESS Approach, Less is the initials of: Load, Endurance, Stress and Spike.

Load Testing

The test target is to check that the system can handle expected load of users doing different scenarios in the system.

Lets take for example two scenarios in a blog:

  1. User that knows the URL to a specific post so he gets to it immediately. (From RSS for example)
  2. User that gets to the blog’s home page and searches for posts in the blog’s Tag List.

Tags list in my blog:

Topics

Lest continue with the blog’s example and estimate a load of 200 concurrent users during a regular day at the pick hours that 75% are using the first scenario and 25% are doing the second scenario.

First we will need to record the scenarios with there think times and then we will run the performance test with the correct percentage of users using each of the scenarios.

The load we will use will be 20 users and then we will use steps up to 200 users.

Endurance Testing

The test target is to check the reliability of the system.

In this test we like to check that the system can handle an expected load of users doing different scenarios in the system for long periods of time.

If we will take the blog example I will use the 200 users that 75% are using the first scenario and 25% are doing the second scenario for a period of 48 hours, I will check that the system still gives me the same performance after this period of time.

Stress Testing

The test target is to find the upper limit that the system can handle.

What I like to know now is with how many users or requests the system will stop giving me reasonable performance.

One of the most common mistakes is to try to make the system fail,  long before the system fails you will get unacceptable performance, for example what use can you do with a system that shows you a web page after 2 minutes?

Again with the blog example, I will use the same scenarios, this time with no think times in order to create a grater load on the system, I will start with 200 users which I already know that works and add steps of 20 users each time until I will get responses grater than 10 seconds.

Spike Testing

The test target is to check that the system can handle spikes of users and can gracefully handle a sudden load in the system.

One last time the blog example, I will use again the same scenarios, I will start with the load of 200 users and after a few minutes I will suddenly add 50 users for a short time and reduce it back to 200 users, I will repeat the procedure a few more times.

Summary

There are more types of Performance Tests but these four types can give you a good perspective over the system under test and can be a good start for decision making.

In order to succeed in your performance testing effort the use of LESS approach should be done after planning your performance testing effort, more on Planning Performance Testing in different post.

Have Fun!!!

More Posts Next page »