DCSIMG
September 2008 - Posts - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

September 2008 - Posts

VSTS 2008 SP1 Think Time Bug

VSTS 2008 SP1 Think Time Bug

After installing SP1 I started running Tests and noticed that when I have a request that results in redirect response the think time for this request is ignored.

Don't worry there is now a hot fix available at http://hotfix.partners.extranet.microsoft.com/FixDetails.aspx?fixid=359339

Top 10 Visual Studio Team System (VSTS) and Team Foundation Server (TFS) Articles You Must Read

Top 10 Visual Studio Team System (VSTS) and Team Foundation Server (TFS) Articles You Must Read

Published on: http://www.dotnetcurry.com/(X(1)S(eyhx5h45oaagyt452an5ib3b))/ShowArticle.aspx?ID=195&AspxAutoDetectCookieSupport=1

If you have missed on some top articles of Visual Studio Team System (VSTS) and Team Foundation Server (TFS) on dotnetcurry.com, then this is a must read for you.
The Top 10 articles have been decided by our editorial panel based on the popularity of the article, user rating and top views of the articles. The articles have been arranged based on the total views and rating from top to bottom.

1. An Overview of Unit Testing using Visual Studio Team System

Unit testing is to test the custom code unit immediately after it is created or even as a part of its creation process. The reason to do the unit testing is to catch the errors in the code at an early stage. This improves the overall quality of the application being created. In this article, we will explore Unit Testing using VSTS

2. Developing Code using Visual Studio Team System

Microsoft has always been offering some good tools for developing code with high productivity. Continuing in the same tradition, Visual Studio 2005, working as client for Team Foundation Server, offers abundant features for developing quality code with high productivity. Not only does it allows code creation but also enables testing of that same code. In this article we will take an overview of some of those tools and concepts.

3. Introducing Web Testing Using VSTS

This article provides an overview of testing web application functionality using VSTS. It begins by providing a step-by-step approach on how to set up a Web test case and customize it without writing any code. This article demonstrates an approachability of VSTS Web Testing by all those participating in the development process, including non-developer types. Web test cases can easily be coded as well, and we will describe how to use coded Web tests or extend the built-in Web testing support.

4. An Overview of Source Control in Visual Studio Team System

This article provides an overview of source control used in Visual Studio Team System (VSTS). Source Control in VSTS does, not only standard version control task but also provides very important link between the Team Project which is managed by VSTS and the technology solution which uses Microsoft .NET

5. Process Template Modification in Visual Studio Team System

This article provides information about structure of the process template in Visual Studio Team System. It shows how a simple change which is most frequently required, that of deleting and adding the activities in the process can be achieved.

6. An Overview of Team Build in VSTS

In this article we will study Team Build which is the way to create and execute a build. We will also study the engine behind Team Build called MSBuild.

7. Team Foundation Server – Eventing Service - Part 1 (Subscribing to events)

Visual Studio Team System exposes number of opportunities to extend its features and functionality. Responding to events published by the Team Foundation Server (TFS) is one of the extensibility opportunities which may be used most extensively. In this two part series, we will take an overview of the events raised by TFS and how to subscribe to those events

8. Using Code Metrics in Visual Studio Team System 2008

Developers need to have feedback about the quality of code immediately after the code is written. Team Edition for Software Developers which is part of Visual Studio Team System provides an integrated tool named Code Metrics to calculate how the code is written based upon some quantifiable criterion and shows the results in a separate window. Calculations are based upon criterions like Cyclomatic complexity, number of lines in code and inheritance depth etc. all resulting in maintainability index of the code. In this article we will take an overview of Code Metrics built into VSTS.

9. Overview Of Team Foundation Server

With Visual Studio Team System (VSTS), Microsoft has made available an integrated set of tools which are used by members of the software development team. All the tools used by various roles work on the same data which makes them integrated. These tools also need to access some services for managing the data. The data storage and the common services are provided by a server component of VSTS which is called Team Foundation Server (TFS).In this article we will take an overview of TFS and services offered by TFS.

10.Team Foundation Server – Eventing Service - Part 2 (Publishing events)

In the first part of this article we discussed about how to subscribe to the events which are published by the Team Foundation Server (TFS). Although the events published by TFS are quite extensive, there still may exist need to subscribe to the events which are not covered by TFS. To publish such events we need to create a separate event class and an application to raise that event.

WPF Automation Overview Wizard

WPF Automation Overview Wizard

Published on:http://blogs.msdn.com/wpfsdk/archive/2007/03/07/big-ol-wpf-animation-wizard-sample.aspx

It's a very nice demo for learning WPF animation ability's.

To Run It: The project file is found in the CSharp folder (WPFAnimationsOverview.csproj). Open this file in Visual Studio and run it. Alternatively, to run from the command line (assuming you have the SDK installed) go to Start/All Programs/Microsoft Windows SDK/CMD Shell, change directory to where WPFAnimationsOverview is found and type "msbuild" and press Enter. Once you build from the command line, navigate into the "bin" directory and fire off the executable.

Download - AnimationOverview.zip

Enjoy

New TFS Sidekicks release available

New TFS Sidekicks release available

Published on:http://blogs.msdn.com/bharry/archive/2008/08/18/new-tfs-sidekicks-release-available.aspx

A few weeks ago, Attrice corporation released a new version of their TFS Sidekicks tools. 
They fill a similar need as the Power Tools that we release and I generally hear very good things about them.
There is some particularly positive buzz about their new Permissions sidekick.  Here's a screenshot of it...

permission_sk_screen

Download Page

How To: Create DB Unit Test With Team System

How To: Create DB Unit Test With Team System

In my last post I talked about What Is Database Unit Testing and Why? , in this post I'll show how to create DB Unit Test.

Building on the AdventureWorks sample project from VSTSRTM08-V7 VPC, I'll unit test a modified version of the uspLogError stored procedure.

--Removed the error check IF @dbVersion = '9.04.10.13.00' BEGIN IF ERROR_NUMBER() IS NULL RETURN; END ... INSERT [dbo].[ErrorLog] ( [UserName], [ErrorNumber], [ErrorSeverity], [ErrorState], [ErrorProcedure], [ErrorLine], [ErrorMessage], [DBVersion] ) VALUES ( CONVERT(sysname, CURRENT_USER), ISNULL(ERROR_NUMBER(),0), --Added ISNULL check for error ERROR_SEVERITY(), ERROR_STATE(), ERROR_PROCEDURE(), ERROR_LINE(), ISNULL(ERROR_MESSAGE(),''), --Added ISNULL check for error @dbVersion );

Adding a Unit Testing Project

Adding a test project is straightforward; simply add a project to the solution. Select a Test Project from the Project templates dialog

Add Test Project

Adding Database Unit Test

Like all Visual Studio projects, you right-click on the project and select "Add Test" or "Add Item" to create new items in the project. The dialog below appears when you select "Add Test"

Add DB Unit Test

Because I'm creating the first Database Unit Test in the project, I'll be prompted to set database configuration information for the whole project.
You must at least select a database connection to configure a project.
I selected the database maintained by the AdventureWorks database project.
Therefore, as I change and edit the project the underlying database I'm using in the unit test will also change.

Selecting DB

A database unit test can be quite sophisticated.
More advanced testing scenarios, though, are beyond the scope of this article.

Once you complete the configuration information the Database Unit test will look much like the test shown

DB Unit First Look

Add the following T-SQL to the main editor window in the designer:

DECLARE @ErrorLogID int SET @ErrorLogID =1 EXECUTE [dbo].[uspLogError] @ErrorLogID OUTPUT Select [ErrorLogID] ,[ErrorTime] ,[UserName] ,[ErrorNumber] ,[ErrorSeverity] ,[ErrorState] ,[ErrorProcedure] ,[ErrorLine] ,[ErrorMessage] FROM [dbo].[ErrorLog]

This query will show all the errors in the AdventureWorks database.

My unit test will check if the Error Log is empty.

Click the inconclusive test condition in the Test Conditions panel, in the bottom half of the designer. Click the red "x" button to delete the test condition.

Remove Unit Test Condition

Add a row-count test condition by clicking Row Count in the Test Conditions list and clicking the + button.

Adding New Test Condition

In the Properties window, set the number of expected rows to 0.

Config Condition

On the Test menu, point to Windows, and click Test View.

Right-click the test, and click Run Selection.

Review the results in the Test Results window.

Test Results

And your test passed!

You have just successfully created your first database unit test.

Download TestProject.zip

What Is Database Unit Testing and Why?

What Is Database Unit Testing and Why?unit_testing

Unit testing is a well-understood concept in application development, but the database community has not yet embraced the advantages and strategies of this approach.
Therefore, I'd like to start by exploring the fundamental tenets of the unit-testing methodology.
Unit testing provides a structured and automated way of testing individual components of a system.
Unit tests are most often authored by the developer of the component that is being tested.
Each unit test tests a specific module of the code in an isolated fashion to ensure that the component behaves as expected.

How does this all relate to database development? The direct analog of application unit tests in the database world are tests of a database's programmability objects. These objects include, for example, a database's stored procedures, functions, and triggers.

What might a unit test for a stored procedure look like?
Let's say that you are trying to test the CustOrderHist stored procedure in the Northwind database.
The stored procedure should return the order history for a given customer ID.
To test this behavior, you can imagine writing a SQL script that executed the stored procedure and then verified whether the expected number of rows was returned. Such a script might resemble the following:

DECLARE @CustomerId nchar(5) SELECT @CustomerId = 'EASTC' EXEC dbo.CustOrderHist @CustomerId IF (@@ROWCOUNT <> 19) RAISERROR('Actual Rowcount not equal to expected 19',11,1)

So Why Perform Database Unit Tests?

As a methodology, unit testing has many advantages over manual, ad-hoc testing and debugging.
By developing database unit tests, you can create a collection of tests and run them during development to ensure that your features work as you expect
Because each unit test focuses specifically on an individual method, you can more easily determine the source of a failure for a failing unit test.
Therefore, database unit tests help you determine the sources of bugs in your code.

Such a collection of tests is very useful for regression testing.
As you implement new features, you can rerun existing tests to ensure that existing functionality has not been broken.
Such a regression test suite facilitates database changes, because you can now make changes knowing the implications of those changes.

Unit tests, in addition, serve as documentation for users of the methods under test. Developers can quickly review unit tests to determine exactly how particular components should be consumed.

Types of Database Unit Tests

Database unit testing is not limited merely to testing the database's programmability objects. You might want to author the four classes of tests that this section describes.

Feature Tests

The first and likely most prevalent class of database unit test is a feature test. In my mind, feature tests test the core features—or APIs, if you will—of your database from the database consumer's perspective. Testing a database's programmability objects is the mainline scenario here. So, testing all the stored procedures, functions, and triggers inside your database constitute feature tests in my mind. To test a stored procedure, you would execute the stored procedure and verify that either the expected results were returned or the appropriate behavior occurred. However, you can test more than just these types of objects. You can imagine wanting to ensure that a view, for example, return the appropriate calculation from a computed column. As you can see, the possibilities in this realm are large.

Schema Tests

One of the most critical aspects of a database is its schema, and testing to ensure that it behaves as expected is another important class of database unit tests. Here, you will often want to ensure that a view returns the expected set of columns of the appropriate data type in the appropriate order. You might want to ensure that your database does, in fact, contain the 1,000 tables that you expect.

Security Tests

In today's day and age, the security of the data that is stored within the database is critical. Thus, another important class of database unit tests are those that test the database security. Here, you will want to ensure that particular users exist in your database and that they are assigned the appropriate permissions. You will often want to create negative tests that attempt to retrieve data from restricted tables or views and ensure that the access is appropriately denied.

Stock-Data Tests

Many databases contain stock data, or seed data. This data changes infrequently and is often used as lookup data for applications or end users. ZIP codes and their associated cities and states are great examples of this kind of data. Therefore, it is useful to create tests to ensure that your stock data does, in fact, exist in your database.

Next Post on How To: Create DB Unit Test With Team System

Create WPF Windows without Activating It

Create WPF Windows without Activating It

Unfortunately there’s a known issue which preventing you from showing a Window without activating it by setting WS_EX_NOACTIVE in WPF, But there is Workaround...

Workaround

Basically, you’ll need to set a CBT(computer-based training) hook by calling the Win32 SetWindowsHookEx function.
This hook procedure will happen before activating, creating, destroying, etc… Thus you can use it to prevent the window from activating by set the return value to 1 (similar to RoutedEventArgs.Handled property). Try something like this:

First the native functions:

[DllImport("user32.dll")] static extern IntPtr SetWindowsHookEx(int code, HookProc func, IntPtr hInstance, int threadID); [DllImport("user32.dll")] static extern bool UnhookWindowsHookEx(IntPtr hhk); [DllImport("user32.dll")] static extern int CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);
We’ll need a delegate for the callback function:

private delegate int HookProc(int code, IntPtr wParam, IntPtr lParam); private HookProc cbtCallbackDelegate; private IntPtr hook;

Now in the Window’s constructor (or any place before the window is shown), let’s setup the hook:

public Window1() { InitializeComponent(); this.cbtCallbackDelegate = new HookProc(CbtCallbackFunction); hook = SetWindowsHookEx(5 /* wh_cbt */, this.cbtCallbackDelegate, IntPtr.Zero, AppDomain.GetCurrentThreadId()); }

Then in the callback function, we’ll check the code. If it is HCBT_ACTIVATE, we can unhook the hook, since we only want to prevent the first activation. For other codes, just let them pass in the normal way by calling CallNextHookEx function:

private int CbtCallbackFunction(int code, IntPtr wParam, IntPtr lParam) { switch (code) { case 5: /* HCBT_ACTIVATE */ UnhookWindowsHookEx(hook); return 1; /* prevent windows from handling activate */ } //return the value returned by CallNextHookEx return CallNextHookEx(IntPtr.Zero, code, wParam, lParam); }
Posted: Sep 08 2008, 03:17 AM by Shai Raiten | with no comments
תגים:,

Microsoft Surface

Microsoft Surface

surfacelogo Microsoft Surface turns an ordinary tabletop into a vibrant, interactive surface. It's the first commercially-available surface computing platform from Microsoft. The product provides effortless access to digital content through natural gestures, touch and physical objects. Today, it's a 30-inch diagonal display in a table-like form factor that's easy for individuals or multiple people to interact with in a way that feels familiar, just like in the real world. In essence, it's a surface come to life for exploring, learning, sharing, creating, buying and much more. Today consumers can interact with Surface at select AT&T retail locations and at the iBar located in the Rio All Suite Hotel & Casino. Other Surface deployments will continue in restaurant, retail, leisure and public entertainment venues in the coming weeks and months.

I can't talk about Surface SDK yet but I'll keep you all up to date with Surface news and updates.

Microsoft Surface Videos

Developer Features in Google Chrome

Developer Features in Google Chrome

Analyzes web pages and tells you why they're slow based on the rules for high performance web sites
(Yslow in FF)

image

In addition Google Chrome you can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page...
FireBug – FF
Developer Toolbar - IE

image

And very nice tools to debug and Javascript and other Errors on the page

image

image

Unit Testing with Silverlight 2

Unit Testing with Silverlight 2

From Jeff Wilcox post : MIX we released source code to the controls, unit tests, and including a unit test framework that runs in the web browser using Silverlight on the Mac and PC.

The Microsoft.Silverlight.Testing framework is simple, easy-to-use, and will give developers yet another way to increase their productivity and application quality.

The framework is familiar to anyone who’s used the desktop unit testing tools inside Visual Studio Team Test (and also now available with Visual Studio 2008 Professional): the same types and attributes are available for unit testing now in Silverlight.

A PDF of this tutorial is also available for download here.

Option 1: Adding a new project and manually hooking up the test framework

Add a New Silverlight Application to use as a test project

We’ll create a new test project by selecting the File->Add->Project menu item within Visual Studio 2008.  Inside the New Project dialog, drill down into the Silverlight project types and select “Silverlight Application”:

ut2

Note: Make sure not to accidentally select the “Test” project types, since that’s for the desktop framework and not Silverlight.  Silverlight unit test projects are not integrated with Visual Studio, so the integrated test features will not work-Silverlight unit tests run in the web browser host.

We’ll name the project “Test”, although if your solution has many discrete components, you may want to pick a better identifier.  When we click the “OK” button, Visual Studio will ask us to choose the type of application project.  To keep it simple, let’s just use the option to automatically generate an HTML test page:

ut3

After clicking “OK”, we’ll then have 2 projects within the ChatClient solution.  You can switch between the startup projects by right-clicking on either the ChatClient or Test project and choosing “Set StartUp Project”.  Next up, adding the unit test assemblies.

Adding references to the unit test framework

The unit test framework is being provided as a download separate from the SDK, as part of the control source code package that you can download here.

If we place the test framework assemblies in a directory within the solution, we can then add them as references to the test project by going to the Project->Add Reference menu item and then clicking on the “Browse” tab and finding that folder:

ut4

Select all three of the files and click “OK”.

Wiring up the test framework

We now need to make some quick changes to the default project to wire up the test framework:

  • Removing Page.xaml and the Page.xaml.cs code-behind file
  • Updating App.xaml’s code-behind file to create a unit test page

First, highlight the Page.xaml file within the Test project.  Go to the Edit->Delete menu item and when prompted to confirm the operation, select “OK”.

Your Visual Studio solution should now look like this:

ut5

Next, we need to replace the RootVisual with a call to create the test page.  The test page handles preparing the framework, starting up the unit test engine, and then running through test classes found and reporting results on the web page.

To wire up the framework,

  • Add a reference to the namespace Microsoft.Silverlight.Testing
  • Replace the RootVisual with a call to UnitTestSystem.CreateTestPage.  The parameter to the method enables the framework’s test engine to reflect on your test assembly.

Here’s the updated App.xaml.cs:

ut6

Now we’re ready to start adding tests.

Option 2: Adding a new test project using prebuilt templates

It’s much easier to use Visual Studio project templates to do all the work above.  Previously posted about here.

Download the templates
  • SilverlightTestProject.zip (project template, adds a test project Silverlight application to the solution)
    Copy this into your “%userprofile%\Documents\Visual Studio 2008\Templates\ProjectTemplates”
  • SilverlightTestClass.zip (item template, adds a test class to your Silverlight test project)
    Copy this into your “%userprofile%\Documents\Visual Studio 2008\Templates\ItemTemplates”
Add a test project to your solution

To create a new Silverlight test project, with your Silverlight application or class library open:

  • Right-click on the solution
  • Select the Add->New Project menu item
  • Click on the root “Visual C#” project type node
  • Under “My Templates”, select “Silverlight Test Project”, and give your test project a name

NewProjectWithTemplate2

There’s a default test.cs file that you can use as a starting point, or to add additional test classes to your test project in the future, you can:

  • Right-click on the test project
  • Select the Add->New Item menu option
  • Click on the root “Visual C#” category
  • Select “Silverlight Test Class” and provide a name for your new class

AddNewItemTemplate

Adding the first test

All that’s left for us to do now is start adding unit tests.  To verify that everything’s hooked up and we can start testing, let’s add a no-op test that will always pass.

Even if you haven’t used the Visual Studio unit test framework before, it’s really easy to pick up since the attributes are self describing:

Add a new class to the test project by going to the Project->Add Class menu item, provide the name “SampleTest.cs” and click “OK”.  Here’s a simple test file:

ut9

Although we’re building a C# test project today, here’s what the same test would look like in Visual Basic:

ut10

Run the unit tests

To run the test project, make sure that it is set as the StartUp project by going to the Project->Set as StartUp Project menu item.  Then, simply press F5 to start debugging (and your web browser).

Since this is a test without any Silverlight controls or interface, nothing is displayed on the plugin’s surface.  Only the test log, created by the HTML DOM bridge feature in Silverlight 2, is displayed.  The log shows the test classes and methods that run, any failures, and a clear indication of the number of tests that ran:

ut11

Soon I'll create Demo Solution from download.

Enjoy

Using Tfpt Command Line Tool

Using Tfpt Command Line Tool

I'm doing a lot demonstrations for clients and for each client I create a new Team Project.
Create new Team Project in Team System is very slow and long.

Today I said Enough!

I'll Create Team Project from now on from Command Line!

Beside creating New Team Project there is a lot of useful commands like:

Update workitem values from a file, Delete GlobalList, Destroy WIT and more....

Team Foundation Server 2008 Power Tool (tfpt.exe) is a command-line tool.

To use these commands, start tfpt.exe at the Command Prompt. Some of the commands will display a graphical user interface when used. Team Foundation Server Power Tool includes the following commands:

CreateTeamProject Command
Use the createteamproject command to create a team project on a TFS server. **Note: this command requires Team Foundation Server 2008 Team Explorer SP1 to be installed.

Example : tfpt /server:ServerName /teamproject:ProjectName /sitetitle:ProjectSiteTitle /sourcecontrol:New|None|BranchPath /processtemplate:templatesname

Scorch Command
Use the scorch command to ensure that source control and local disk are identical. Your local disk will be scanned for items which are not in source control. These items will be deleted from disk, just as in tfpt treeclean. Additionally, items determined to be different on disk from those in source control will be redownloaded from the server. Items with pending changes are exempted.

Workspace Command
Use the workspace command to update the computer name for a specific workspace.

Example: tfpt workspace /updatecomputername workspace

Unshelve Command
Use the unshelve command to unshelve and merge the changes in the workspace.

Example: tfpt unshelve [shelvesetname[;username]] [/nobackup] [/noprompt [/prefer:(local|shelved)] [/automerge:(all|none)] [/move] [/recursive] [itemspec...]]

Rollback Command
Use the rollback command to roll back changes that have already been committed to Team Foundation Server.

Example: tfpt rollback [/changeset:changesetnum] [/recursive]  [/noprompt [/automerge:(all|none)]] [filespec...]

Online Command
Use the online command to create pending edits on writable files that do not have pending edits.

Example: tfpt [/deletes] [/adds] [/diff] [/noprompt [/preview] [/purge]] [/exclude:filespec1,filespec2,...] [filespec...] [/recursive]

GetCS Command
Use the GetCS (Get Changeset) command to get the changes in a particular changeset.

Example: tfpt getcs /changeset:changesetnum

UU Command
Use the UU (Undo Unchanged) command to undo unchanged files, including adds, edits, and deletes.

Example: tfpt uu [/changeset:changesetnum] [/recursive] [/noget] [filespec...]

Annotate Command
Use the annotate command to download all versions of the specified files and show information about when and who changed each line in the file.

Example: tfpt annotate [/noprompt] filespec[;versionspec]

Review Command
Use the review command to optimize the code review process to avoid checking in or shelving.

Example: tfpt review [[filespec...] [/recursive] | /shelveset:shelvesetname[;username]]

History Command
Use the history command to display the revision history for one or more files and folders. The /followbranches option returns the history of the file branch’s ancestors.

Example: tfpt history [/version:versionspec] [/stopafter:number] [/recursive] [/user:username] [/followbranches] [/format:(brief|detailed)] [/slotmode] filespec

Workitem Command
Use the workitem command to create, update, or view work items.

Examples:

Creating a new Bug work item with a title of 'New' and assigned to Jason
tfpt workitem /new project1\Bug /fields:"Title=New;Assigned To=Jason"

Updating work item 123 with field values from a file
tfpt workitem /update 123 /fields:@myFieldValues.txt

Updating all work items assigned to me to be assigned to Jason (uses Query)
tfpt query /format:id "project1\public\My Work Items" | tfpt workitem
     /update @ /fields:"Assigned To=Jason"

fields:
   fieldN           The name of a field to update.
   valueN           The value to set on the fieldN.
   filename         The file that has the field/value pairs to use.

Query Command
Use the query command to run a work item query and display the results. If you do not provide a specific query, all the active work items assigned to you are displayed.

Example: tfpt query [/format:[tsv|xml|id]] [/include:header,data,count] [storedquery | /wiqfile:filename | /wiql:wiql]

Treeclean Command
Use the treeclean command to view and optionally delete files that are not under source control in the current directory and all subdirectories. This command is useful when you want to remove temporary files from your local workspace, such as files created by the compiler.

Example: tfpt treeclean -delete

DestroyWI Command
Use the destroywi command to destroy one or more work items. Currently, work items can only be deleted. Destroying a work item means the work item is physically deleted and cannot be restored.

Example: tfpt destroywi /server:tfsservername /workitemid:value1[,value2,...] [/noprompt]

DestroyWITD Command
Use the destroywitd command to destroy a work item type. Currently, work item types can only be deleted. Destroying a work item type means that work items of that type are physically deleted and cannot be restored.

Example: tfpt destroywitd /server:tfsservername /project:projname /workitemtype:witdname [/noprompt]

TweakUI Command
Use the tweakUI command to modify Team Explorer client connection values. This command enables you set various connection settings. In addition, this command enables you to define the client certificate needed to connect to a Team Foundation Server that has been configured to require client-side certificates.

Reset the Visual Studio Environment

Reset the Visual Studio Environment

After installing TFS 2008 SP1 I had some problem with the Team Explorer, When I clicked on the Team Explorer nothing happens.
I tried to Reinstall Team Explorer even reinstall the TFS but the only thing that save me is to reset TFS settings.

Tip: After installing TFS go to "Tools" > "Import and Export Settings…", and export your settings. If you hose it in the future, you can import those saved settings.

Reset Settings

  1. The command "devenv /resetsettings" will restore Visual Studio back to its original factory state. If you have previously saved your settings from option 1 above, you can pass them as a parameter: "devenv /resetsettings <SettingsFile>".

  2. The Command "devenv /setup" Forces Visual Studio to merge the resource metadata that describes menus, toolbars, and command groups from all VSPackages available.

  3. The command "devenv /ResetSkipPkgs"Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, then starts Visual Studio.

NSIS - Open Source System To Create Windows Installers

NSIS

I post before about Windows Installer XML (WiX) toolset that is a great tool and very powerful, but not so friendly.

Here is NSIS Install System,
NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.

NSIS is also very powerful, better UI and easy to modify and use.
You can easily create Installer from Zip files or NSI (There is a lot of examples in the folder)

*** NSIS does not support Command-Line, Wix Does!

image

Download Page

Screenshots:

  

Posted: Sep 02 2008, 04:10 PM by Shai Raiten | with 3 comment(s)
תגים:

When I Met SP1 for Visual Studio & TFS 2008

image_2When I Met SP1 for Visual Studio & TFS 2008

If you didn’t know about VS2008 SP1 read bharry's post - Team Foundation Server 2008 SP1 Preview

Before we start let me tell you one thing: Backup the entire TFS!
And download Visual Studio 2008 Service Pack Preparation Tool.

Microsoft Visual Studio 2008 Service Pack 1 (Installer)

Visual Studio 2008 Team Foundation Server Service Pack 1

I’ll tell briefly my case so you can avoid this or find the solution, should you have the same reason for the problem.

Install fails with the 1603 error code
untitled

When I tried to install the KB949786 (TFS SP1), the first part went always fine (TFS Build), but it ended in Fatal Error during the update of the actual TFS. TFS got into unusable state (clients couldn’t connect etc)

The errors in the Event Log were:

“Product: Microsoft Visual Studio 2008 Team Foundation Server - ENU - Update ‘KB949786′ could not be installed. Error code 1603. Additional information is available in the log file <file>”

After some googling, I found similar symptoms from the MSDN Forums.
Logins etc were alright in my case, The  Visual Studio 2008 SP1 installation was corrupt - Reinstall.
(Tip: don’t change TFS service accounts unless you have a very good reason and if you do, use the tools mentioned in the forum)

Client Cannot connect to TFS after installing sp1

Getting error :
TFS31001: Team Foundation cannot retrieve the list of team projects from Team Foundation Server
TFS2008: The Team Foundation Server returned the following error: Team Foundation services are not available from the server.
TF30059: Fatal error while initializing web service

Just Install Team Foundation Server 2008 SP1

HTTP code 503: TF30059: Fatal error while initializing web service" or "HTTP code 403: Forbidden

  1. Change the directory security in ISS from "deny access" to "granted access".
  2. Change the TFS SQL server databases (TfsActivityLogging, TfsBuild, TfsIntegration, and TfsVersionControl) from SINGLE_USER to MULTI_MODE.
  3. Restart IIS - and you should be fine.

Good Luck with the upgrade, feel free to ask me questions.

Test Mix Model in Visual Studio 2008

Test Mix Model in Visual Studio 2008

In Visual Studio Team System 2008 Test Edition, the Test Mix Model option were added to the load test feature to let you more easily create accurate load.

You use load modeling options to more accurately predict the expected real-world usage of a Web site or application that you are load-testing. It is important to do this because a load test that is not based on an accurate load model can generate misleading results.

image

 

Percentage Based on Tests Started

For each test in the mix, you can specify a percentage that determines how often the test is selected as the next test to run. For example, you might assign the following percentage values to three tests:

  • TestA (50%)

  • TestB (35%)

  • TestC (15%)

If you use this setting, the next test to start is based on the assigned percentages. This is done without taking into consideration the number of virtual users who are currently running each test.

Percentage Based on Virtual Users

This model of test mix determines the percentage of virtual users who will run a particular test. If you use this model of test mix, the next test to start is based not only on the assigned percentages but also on the percentage of virtual users who are currently running a particular test. At any point in the load test, the number of users who are running a particular test matches the assigned distribution as closely as possible.

When do you choose Percentage test mix and when do you choose Percentage based on virtual users?
The difference between these two choices is important when some tests in the test mix have a much longer duration than other tests. In this situation, you should probably choose Percentage based on virtual users. This choice helps avoid a test run in which the probability increases that too many users will be running long-duration tests.
However, if the tests all have similar durations, you can more safely choose Percentage test mix.

Pacing Test Mix

If you specify a pacing test mix, you set a rate of test execution for each virtual user for each test in the test mix. For each test, this rate is expressed as tests run per virtual user per hour. For example, you might assign the following pacing test mix to the following tests:

  • TestA: 4 tests per user per hour

  • TestB: 2 tests per user per hour

  • TestC: 0.125 tests per user per hour

If you use the pacing test mix model, the load test runtime engine guarantees that the actual rate at which tests are started is less than or equal to the specified rate. If the tests run too long for the assigned number to be completed, an error is returned.

The “Think Time Between Test Iterations” setting does not apply when you use a pacing test mix, so it is not displayed as a property on the scenario. Rather, it is a property on the Percentage Test Mix.

More Posts « Previous page - Next page »