Sunday, May 17, 2009

What is new in Visual Studio 2010

Visual Studio 2010 Beta 1 will be available to customers on May 18.

On Monday, May 18th, Visual Studio 2010 Beta 1 (Professional, Suite and Team Foundation Server) will be available to MSDN [Microsoft Developer Network] Subscribers through MSDN Subscriber Downloads and to the general public on Wednesday, May 20th through Microsoft Downloads.

Aims to become a tool for everyone involved in Application Lifecycle Management (ALM) – from architects to developers, from project managers to testers. Not just for developers.

  1. Unified Development and Database product editions.

Design & Architecture
· Architecture Explorer – to discover and identify existing code assets and architecture in number of ways including graphs, stacked diagrams and dependency matrices.

· Ability to create and share various types of diagrams like use case, activity and sequence diagrams.

· Modeling tools that are tightly integrated with code and thus helps in keeping model and code in sync.

· Architectural Validations - Ways to put constraints on code using models and doing validations at the time of check-ins and builds.

· Architecture Layer Diagram – One of the most useful and simple tool getting introduced. It allows representing your application architecture in form of layers and showing dependencies between them. It also allows to map physical components like classes, namespaces etc. to map to these layers. After all mappings you can validate whether the code meets the expected mappings and constraints.

· Microsoft joins OMG and UML gets introduced in Visual Studio 2010.

· Support for UML 2.1.1 – 5 out of 13 diagrams – use case, component, activity, class and sequence diagrams.

· Ability to keep all the UML diagrams in sync so that a change in one automatically reflects on others.

· UML design tool is developed using DSL toolkit.

· Will be interoperable with Visio 1.1 templates.

· Supports Top to bottom design approach.

· Supports Bottom to top design approach – reverse engineer. Filter based on namespaces, number of level deep.

· Model Explorer – Similar to Solution Explorer, this allows you to explore all the models you have created which includes objects created as part of various UML diagrams – logical view.

· Ability to create a Sequence Diagram from existing source, simply by right clicking in the VS code editor and selecting "Generate Sequence Diagram..."

· Parallel Programming: To better utilize power of multi-processor and multi-core machines, .NET 4.0 will add support for parallel programming using PLINQ, Task Parallel Library and Coordination Data Structures. The debugger has been enhanced to identify concurrency issues. Two new features added are MultiStack and a Task List views. Introduction of concurrency analysis report for performance analysis of applications.
Quality/ Testing
· Test Impact View - Identify and run only the tests impacted by a code.

· Eliminating ‘no-repro’ bug i.e. bugs that can’t be reproduced by providing tools for better collection of test data.

· The Microsoft Test Runner Tool – a standalone tool that a tester uses to guide them through a series of steps to complete a test case. During the test run, this tool can take snapshot of test environment, application screenshots and even capture full video for assisting in reproducing bugs.

· Manual tester can breathe a lot better with VS2010 tools, log in all your test cases and select the test case to run and click record and then execute your test case as usual and see what you get. If test case passes, you get evidence (most clients in service based companies want that) as videos or if the test case fails, you get the steps to reproduce as videos.

· lot more in Unit Testing side
Source Code Management
· Enhanced version control capabilities including gated check-in, branch visualization and build workflow.

· Ability to perform constraints check on code during check-in based on Architecture Layer Diagram.
Project Management
· Integration with Project Server for enterprise wide project management and new features for Agile project scheduling with Excel.

Monday, May 4, 2009

Patterns Practices(.Net)

The Patterns & Practices team at Microsoft provides a collection of resources to help developers apply best practices to the development, deployment and
operation of enterprise applications. Guidance comes in four primary forms: Software Factories, Application Blocks (including Enterprise Library), Reference
Implementations and Guidelines.
Software Factories are configurable tools your architects and developers use to build applications. Application Blocks are reusable application components that implement software design patterns and are built with best practices for enterprise use.
Reference Implementations are full, working applications that you can use as a starting point for your own applications, or simply use as examples.
Guidelines appear as architectural and prescriptive guidance (wizards, how-tos, and documentation).
The Patterns & Practices code is available in source form so you can extend it, and there are active developer communities around many of the tools that
offer additional guidance and support. Start using the tools today, join the communities, and become more productive as an architect and/or developer!
Web Client Software Factory (WCSF), Smart Client Software Factory (SCSF)Web Service Software Factory (WSSF)
Smart Client Software Factory (SCSF):Architects and developers can quickly incorporate many of the proven practices and patterns of building composite smart client applications. These practices
and patterns have been identified during the development of many smart client applications and their components.
By using the software factory, architects and developers can focus their efforts on business opportunities and create smart client applications that
effectively address the needs of their organizations.
The Smart Client Software Factory provides an integrated set of guidance that assists architects and developers create composite smart client applications.
These applications have one or more of the following characteristics:
They have a rich user interface that takes advantage of the power of the Microsoft Windows desktop. They connect to multiple back-end systems to exchange data with them. They present information coming from multiple and diverse sources through an integrated user interface, so the data looks like it came from one back-end
system. They take advantage of local storage and processing resources to enable operation during periods of no network connectivity or intermittent network
connectivity. They are easily deployed and configured.
This software factory provides proven solutions to common challenges found while building and operating composite smart client applications. It helps
architects and developers build modular systems that can be built and deployed by independent teams. Applications built with the software factory use proven
practices for operations, such as centralized exception logging.
The software factory contains a collection of reusable components and libraries, Visual Studio 2008 solution templates, wizards and extensions, How-to
topics, automated tests, extensive architecture documentation, patterns, and a reference implementation. The software factory uses Windows Forms, Windows
Presentation Foundation, Windows Communication Foundation, and the Enterprise Library 3.1 – May 2007 release. With this release, the Composite UI Application
Block is included in the software factory
******************************************Web client applications and their components:
These applications have one or more of the following characteristics:
They are developed by multiple collaborating development teams. They are composite applications that present information from multiple sources through an integrated user interface. They support XCopy deployment of independently developed modules. They support online business transaction processing Web sites. They deliver a responsive user experience. Note The software factory is optimized to create online business transaction processing Web sites. It is not optimized for Web content sites or collaboration
sites.
This software factory provides proven solutions to common challenges found while building and operating large transaction processing enterprise Web sites. It
helps architects and developers build modular systems. A module is a functionally complete and independent component. Modularity allows independent teams to
work on different aspects of the application and also improves security and testability. Applications built with the software factory use proven practices
for operations like centralized exception logging and can be XCopy deployed.
The software factory contains a collection of reusable components and libraries, Visual Studio 2008 solution templates, wizards and extensions, How-to
topics, automated tests, extensive architecture documentation, patterns, and a reference implementation. The software factory uses ASP.NET, ASP.NET AJAX, the
AJAX Control Toolkit, and the Enterprise Library
*******************Application Blocks-(Enterprise Library)
Caching Application Block. Developers can use this application block to incorporate a local cache in their applications. Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications. Data Access Application Block. Developers can use this application block to incorporate standard database functionality in their applications. Exception Handling Application Block. Developers and policy makers can use this application block to create a consistent strategy for processing exceptions
that occur throughout the architectural layers of enterprise applications. Logging Application Block. Developers can use this application block to include standard logging functionality in their applications. The Policy Injection Application Block. Developers can use this application block to implement interception policies that streamline the implementation of
common features, such as logging, caching, exception handling, and validation, across an application. Security Application Block. Developers can use this application block to incorporate authorization and security caching functionality in their applications. Unity Application Block. Developers can use this application block to implement a lightweight, extensible dependency injection container with support for
constructor, property, and method call injection. The Validation Application Block. Developers can use this application block to create validation rules for business objects that can be used across different
layers of their applications.
Design-time configuration classes that support the configuration tools and allow developers to specify and persist configuration information for the library
and the application blocks Run-time configuration classes and providers that expose configuration data to the library, the application blocks, and users' applications at run time Common utility functions for tasks such as serialization, used in many places throughout the library and the application blocks and available for developers
to use in their code Instrumentation features that allow developers and administrators to monitor the behavior and performance of the application blocks at run time
Composite UI Application Block:
The application block is designed to support the development of smart client line-of-business applications such as the ones found in the following scenarios:
Online transaction processing (OLTP) front-ends, in areas such as stock distribution centers or data entry applications Rich client portals to back-end services, such as portals to government services or bank teller applications UI intensive information-worker standalone applications, such as those used by call center staff, IT support desks, or stock traders All these scenarios require rich user interaction, a shell architecture that can host the user interface and business logic "parts," and varying degrees of
centralized control of the functionality and behavior that the application exposes to its users.
The Composite UI Application Block facilitates the design and implementation of your client applications in three areas:
It allows your application to be based on the concept of modules or plug-ins. It allows developers with shell expertise to build components that hide user interface complexity from the business logic development. It facilitates development using patterns for loose coupling between modules.
For example you are devloping call center application. In this call center application, the main screen is built using multiple collaborating parts, each one
addressing a specific aspect of a business process (for example, billing, claims, or customer information). All of these parts could potentially be developed
by different teams. The parts may interact with different back-end systems and can be independently versioned, deployed, and updated. However, they are
integrated to provide a consistent user experience, share information between each other, and communicate to help the end user complete a specific task.
Shell developers are responsible for building the components that give this application its custom, yet consistent, appearance and behavior (look and feel).
The Composite UI Application Block implements the underlying architecture that helps build these types of applications.
Reference Implementation:
(1) Developed concurrently with spec and test suite;(2) Verifies that specification is implementable;(3) Enables the test suite to be tested;(4) Serves as Gold Standard against which other implementations can be measured; (5) Helps to clarify intent of specification where conformance tests are
inadequate

Pex White box Testing

Team,

* Pex is a microsoft's free product

* Pex systematically hunts for bugs – exceptions at the design time

* Pex generates the test data automatically

* Tests can be saved as test suite

* Test suite can serve as a regression test suite in the future

* Pex can be used all type of .net Applications


Visual studio white box testing************************************ In visual studio team system, You can create unit test for all methods or selected in a particular class file.

Steps

* create a new test project* Select your assembly (dll/exe)* System will show all classes* System automatically generate unit test for you
* You have to configure the input parameters & mock objects* Run your test

* Directly write your hand written code for unit test

Note : Mock objects creation is difficult.

Using Pex:

For any method, Pex computes and displays interesting input-output pairs. Pex systematically hunts for bugs – exceptions or assertion failures. As Pex discovers boundary conditions in code,Pex generates new tests that target these conditions. The result is a small test suite with high code coverage. Pex enables Parameterized Unit Testing, an extension oftraditional unit testing that reduces test maintenance costs. Pex has been used in Microsoft to test core .NET components (Windows/Web .net Applications).

Developer Point of view:

* Pex is used to find bugs in an existing .Net assemblies.

* Pex will run your code, possibly many times with different inputs.

* Input Generator(constraint solver to determine what the relevant input values of a test and the program-under-test).

* Pex shows the results of its analysis in a separate Pex Exploration Results window as a table.

* Pex gives a precondition suggestion also.it can be added in your source code.

* we can not only save individual tests, but we can save the entire table as a test suite. This test suite can serve as a regression test suite in the future, or as a fast-running build verification test (BVT) suite, a test suite that can be executed every time a code change is submitted to the source depository.

* Code coverage results window shows what are the blocks covered and not covered details.

Tester Point of View:

* Pex shows the detailed automated steps(Create project,Test,Add reference) to create a test for a current selection.

* All .Net testing frameworks having white box testing only (MS Test,NUnit,CSUnit and other functional testing tools)

* Pex supports the following test frameworks:
MSTest,
Visual Studio test framework,
xUnit.Net,
Repro Test Framework
NUnit, MbUnit

Saturday, March 21, 2009

Visual studio 2010 Testing

Visual studio team system 2010 is more concentrating on generic testers.
Microsoft Test Runner Testing tool "Code name Camano" is a great tool for test teams.