WCF Load Test

Just published on CodePlex  –WCF Load Test tool.

Project Description from the project home page on CodePlex:

This tool takes a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence of calls found in the trace file. The code generated is easily modifiable so that data variation can be introduced for the purpose of doing performance testing.
The tool generates code for both Visual Studio 2005 and Visual Studio 2008. It also installs a wizard into both editions of Visual Studio for creating the trace and processing it from inside Visual Studio. If both editions are present the tool is installed into both editions. The source code is a Visual Studio 2005 project.

Latest Release June 2009

A new beta was released in June 2009 adding support for ASMX web services. Download it from here.

Features

The tool has the following main features:

  • Replay of captured scenario in a unit test that can be included in a load test.
  • Support for the DataContractSerializer.
  • Support for message contracts.
  • ASMX support (beta)
  • Support for proxies generated using svcutil.
  • Support for clients that create proxies at run time from contract interfaces.
  • Supports calls to multiple services in a single scenario.
  • Supports multiple calls to the same service operation.
  • Filtering by SOAP action of which messages in the trace to replay.
  • Readable and modifiable code is generated.
  • Automatic association of trace message with proxy method (requires all operations to have a unique SOAP action).
  • Support for client and server side traces.
  • A command line tool for processing traces and generating code.
  • Visual Studio 2005/2008 integration (Team Developer, Team Test, Team Suite and for 2008 also Professional)) that can be used instead of the command line tool.

DebuggerDisplay Attribute

The DebuggerDisplay attribute (System.Diagnostics.DebuggerDisplayAttribute) controls how a class or field is displayed in the debugger variable windows. When a custom object is displayed, the name of the class or the result of ToString() is shown. This can be changed with a DebuggerDisplay attribute.

Look at the following demonstration. I added the DebuggerDisplay attribute:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace DebuggerView
{
    [DebuggerDisplay("User name={UserName} " +
        "& email={EmailAddress}")]
    class User
    {
        public string UserName { get; set; }
        public string EmailAddress { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {
            User u = new User()
            {
                UserName = "maor",
                EmailAddress = "maor@example.com"
            };
        }
    }
}

The DebuggerDisplay attribute has a single argument, which is a string to be displayed in the value column for instances of the type. This string can contain braces ({ and }). Text within a pair of braces will be evaluated as a field, property or method.

And the result is:

DebuggerDisplay

March Meeting – Web and Load Test

This month we had a testing specialist at the podium, Shai Raiten attracted over 50 listeners with a well built lecture and fascinating demos about Visual Studio Team System web testing. The original plan was to dedicate one lecture to web testing and the other one to load testing, but since the there was a lot of interaction with the audience and a lot of discussions we’ve decided to go with the flow and dedicate the entire meeting to web testing. Shai will join us again on April (exact date will be pubished here and on MS-Event feed) and will present some web testing left-overs and a Load session

For the presentation, code examples and much more pls see Shai’s blog

How to: Debug .NET Framework Source

Visual Studio 2008 provides new features for .NET Framework debugging.

To configure VS 2008 to debug .NET Framework:

Start Visual Studio 2008 and bring up Tools > Options > Debugging.

Set the following two settings:

  • Turn OFF the "Enable Just My Code" setting
  • Turn ON the "Enable Source Server Support" setting

EnableJustMyCode

Under the Debugging category, click Symbols.

Set the symbol file location to be: http://referencesource.microsoft.com/symbols

specify the cache location > check the "Search the above locations only when symbols are loaded manually" option. Enable the "Search the above locations only when symbols are loaded manually" option.

SymbolsWindow

That’s all, you are ready!

Now all you have to do is start debugging. set a breakpoint somewhere in the code and step into. if it’s .NET code, go to the call stack, In the Call Stack window, right-click a frame for which symbols are not loaded. The frame will be dimmed out.

Point to Load Symbols From and click Microsoft Symbol Servers or Symbol Path.

CallStack

That’s all.

Preview Of The Next TFS Power Tools Release

For a preview of the next TFS Power Tools release, please read Brian Harry’s blog.

The next version is really amazing!

From Brian’s post:

There are 3 major new components to the October Power Tools release and the usual incremental improvements.

  • Team Members – We’ve added a new node to the Team Explorer called "Team Members".  It appears under each Team Project and is used to identify who are the people who work on the project.  It serves as a "pivot point" for information about and operations on people and teams.
  • Windows Shell Extension – We’ve built a Windows shell extension that allows you to do the core version control operations directly inside the Windows Explorer without using the Team Explorer.
  • PowerShell Support – We’ve started working on a PowerShell pipeline and commandlets for TFS.  Our initial set support basic version control operations but over time we plan to add work item tracking, administration, build and more.

This is one of the best Power Tools releases so far.

Read Brian’s post for full details.

Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 Service Pack 1

Introduction

Visual Studio 2008 and the .NET Framework 3.5 enable developers to rapidly create connected applications that deliver high quality and rich user experiences. Visual Studio 2008 enables organizations of every size to rapidly create secure, manageable, and reliable applications that are optimized for Windows Vista™, SQL Server, the Microsoft 2007 Office system and the Web.

Visual Studio 2008 Service Pack 1 (SP1) and .NET Framework 3.5 SP1 continue Microsoft’s investment in market leading development tools and developer platform. SP1 addresses issues that were found through a combination of customer and partner feedback, as well as internal testing. These service packs offer customers improvements in responsiveness, stability and performance.

Overview

.NET-based Windows application development benefits from increased Windows Presentation Foundation (WPF) designer performance and updated components for Visual Basic and Visual C++ (including a MFC-based Office 2007 Ribbon).  Web development improvements include enhanced the client-side script tooling (JavaScript IntelliSense). In addition to IDE performance improvements SP1 fully supports SQL Server 2008 and the ADO.NET Entity Framework.

The .NET Framework 3.5 Service Pack 1 (SP1) delivers more controls, a streamlined setup, improved start-up performance, and powerful new graphics features for client development and rich data scaffolding, improved AJAX support, and other improvements for Web development. Additionally it introduces support for the ADO.NET Entity Framework and ADO.NET Data Services, which simplify data access code in applications by providing an extensible, conceptual model for data from any data source and enabling this model to closely reflect business requirements.

Visual Studio 2008 SP1 delivers:

  • Improved WPF designers
  • SQL Server 2008 support
  • ADO.NET Entity Designer
  • Visual Basic and Visual C++ components and tools (including an MFC-based Office 2007 style ‘Ribbon’)
  • Visual Studio Team System Team Foundation Server (TFS) addresses customer feedback on version control usability and performance, email integration with work item tracking and full support for hosting on SQL Server 2008
  • Richer JavaScript support, enhanced AJAX and data tools, and Web site deployment improvements

The .NET Framework 3.5 SP1 delivers:

  • Performance increases between 20-45% for WPF-based applications – without having to change any code
  • WCF improvements that give developers more control over the way they access data and services
  • Streamlined installation experience for client applications
  • Improvements in the area of data platform, such as the ADO.NET Entity Framework, ADO.NET Data Services and support for SQL Server 2008’s new features

Additional Details

WPF and visual designer improvements

Cold startup performance improvement ranging between 20-45% depending on application size without needing to modify any code.

Additional WPF support for text and graphics, and media to deliver better performance. For example, effects like DropShadow and Blur were implemented using software rendering; with SP1 these are now implemented using hardware acceleration. Other examples include:

  • Text, especially when used in Visual and DrawingBrush, is substantially faster,
  • Scrolling improvements with Container Recycling, improved working set with TreeView virtualization
  • A much improved WriteableBitmap that enables real-time bitmap updates from a software surface,
  • Designer support for the event tab within the property grid for control events,
  • Toolbox support within source mode.

.NET Framework 3.5 SP1 Optimized Client Runtime

SP1 provides a .NET Framework install version that is optimized for .NET-based client applications. The size of this optimized runtime is less than 28 MB.

New ADO.NET Data Features

ADO.NET Entity Framework

The ADO.NET Entity Framework is the next evolution of ADO.NET, raising the level of abstraction at which programmers work with data, and allowing the database structure or data source to evolve without significant impact to the application code.

Rather than coding against rows and columns, the ADO.NET Entity Framework allows the definition of a higher-level Entity Data Model over your relational data, and allows developers to then program in terms of this model. Developers get to deal with the data in the shapes that make sense for the application, and those shapes are expressed in a richer vocabulary that includes concepts like inheritance, complex types, and explicit relationships.

Use LINQ to Entities with the Entity Framework for queries that help create easy to maintain code that retrieves and works with strongly typed data objects or business entities.

ADO.NET Data Services

The Microsoft ADO.NET Data Services framework provides a first-class infrastructure for developing the next wave of dynamic internet applications by enabling data to be exposed as REST-based data services that can be consumed by client applications (ASP.NET, AJAX, Silverlight) in corporate networks and across the internet. Easily build applications using a comprehensive set of Microsoft .NET libraries and client components, accessing data through uniform URI syntax and using standard HTTP verbs to operate on the resource.

ADO.NET Data Services provides a framework to build data services for relational data sources, such as Microsoft SQL Server, MySQL, DB2, and Oracle, using the built-in support for the ADO.NET Entity Framework, or for non-relational data sources using the pluggable provider model.

TFS improvements

A number of improvements have been made to Visual Studio Team System 2008 Team Foundation including:

Version Control

  • Simplified the user experience through cleaner “Add to Source Control” dialogs, drag and drop support to the Source Control Explorer and a much easier to use “Workspace” dialog for working folder mappings.
  • Version control now automatically supports non-solution controlled files.
  • Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.

Work Item Tracking

  • Microsoft Office 2007 integration is now done using the standard Office “Ribbon” delivering a cleaner and easier to use integration to the different Microsoft Office 2007 products.
  • Email integration for work items and links for Team system Web Access to make it easier to use email as part of the development lifecycle.

Visual SourceSafe migration tool

  • The migration tool has been dramatically improved through many performance and reliability improvements. SP1 provides support for the elimination of namespace conflicts, automatic solution rebinding, improves timestamp coherency and increases the amount of migration logging information available.

Additional Features

  • Support for using SQL Server 2008 with Team Foundation Server.
  • Team System Web Access provides “live” links to work items and checkin emails. This improves the customer experience for users who do not use Team Explorer.
  • Scripting support for the creation of Team Projects.

Performance and scalability

  • With SP1 a large part of the focus was to improve the performance and scalability of Team Foundation Server through changes such as faster synchronization with Active Directory, improved checkin concurrency, a faster way to create source tree branches, online index rebuilding for less maintenance downtime and better support for very large checkin sets.
  • Improvements in the number of projects a server can support that make not only the scalability of the server better but also the client experience when connecting to a server with a large number of projects on it.

from http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx

Microsoft Source Analysis for C#

Microsoft announce the public release of a new developer tool –  Source Analysis for C#.

Inside Microsoft this tool’s name is StyleCop and it enforces code style guidelines on the code we write

Source Analysis comes with a set of default rules analyzers covering approximately 200 best practice rules. These rules are full compatible with the default layout settings in Visual Studio 2005 and Visual Studio 2008.

Specifically, these rules cover the following, in no particular order:

  • Layout of elements, statements, expressions, and query clauses
  • Placement of curly brackets, parenthesis, square brackets, etc
  • Spacing around keywords and operator symbols
  • Line spacing
  • Placement of method parameters within method declarations or method calls
  • Standard ordering of elements within a class
  • Formatting of documentation within element headers and file headers
  • Naming of elements, fields and variables
  • Use of the built-in types
  • Use of access modifiers
  • Allowed contents of files
  • Debugging text

After installation, Source Analysis can be run from within the Visual Studio IDE. You can set this up to be run as a part of your build process as documented here. Since this is plugged in as a MsBuild project you can use it in as a part of Team Foundation Build process as well.

Running Source Analysis:

sca1

And the results are:

sca2

Download it from: http://code.msdn.microsoft.com/sourceanalysis

Read full details:http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx

%d bloggers like this: