Thursday, July 30, 2009

Data Driven Web Tests with VSTS2008

Recently, I was asked if a recorded WebTest can be link to the external datasource for data feed. For example if we would like to pass different search parameters into a search page to test the logic and data of the search, we definitely do not want to have multiple tests that do the same thing. It totally make sense to have a single test that will feed different data and will aggregate/reports results back to us.

My second attempt at the webcasting runs through example on how to accomplish data bounding to the web test:


Visual Studio Team System Testers Edition has an option of recording a Web Test, once the test is created we can easily add a data source to it, by doing following steps:

1. Right Click on the web test, Select Add Data Source.
From here you will a Wizard with multiple choices:





I think that you may want to use CSV,XML types:


  • if you want BA or End Users to easily provide you with a test data

  • if the amount of data is small

  • you need a version history of data evolution (the file can be checked in into Source Control and deployed as part of the build process).


The Database choice is good:


  • large amount of data (thousand/million data points).

  • re-use the same data across multiple test/projects/teams/environments.


Once the data source is created, all is left is to replace hard coded values for the data from bound source.

2. Find a Post Parameter by expanding Request Form Post Parameter

3. Select Properties by Right Click on ContentPlaceHolder

4. Select created DataSource by Clicking on the drop down menu of the Value property.

5. Expand Datasource and Navigate to the needed column.





This is it, you know can run web test and feed the data from the external source.

But what if you want to add Validation and Extraction rules to your test and be able to run positive and negative tests, how do you do it with external data source?

You may take a similar approach and try to bind the value properties of the rules to data source, but you may run into a problem of setting the "Pass if Found" Boolean property.





In my opinion it would be better to convert the test to coded version and then you will have control over all aspects of the test.

6. Select Generate Code by right Clicking on the web test.





7. Make changes to the "PassIfFound" property of the rule.



Web Test Coded file from my demo can be downloaded from here

Tuesday, July 28, 2009

Missing Demo from SDLC KY: Branching and Merging with TFS Source Control

This webcast is a brief demo of how one may use TFS Source Control and its rich set of features like: Branching, Merging, and Shelving to manage production and development code.

I have collapsed the 90 minute demo into 35 minute webcast.
This is my first webcast, so any feedback is appriciated.
At some point I will re-record it at lower resolution.


Sunday, July 19, 2009

Columbus Give Camp on June 17th - 19th.

Working with great number of people at Columbus Give Camp, check out our live feed.

Friday, July 17, 2009

KY SDLC Day 2 Summary

It was a pretty full day, it is very unfortunate that Mike and I have run out of time and were not able to cover all the topics in needed details. In the upcoming days (weeks), I will a set of the recordings to capture testing and source control in greater details, meanwhile you may visit Team System Cafe for a great variety of information on VSTS/TFS.

On Day 2 we have covered following topics:

1. VSTS Architect
We talked about Physical, Logical, and Deployment diagrams. In the demo we have used VSTS as architects (infrastructure & software) and build master to generate/validate diagrams; model the application and to have generated code based on our models.

2. VSTS Database Professional, aka "DataDude"
Is probably one of the most under-used edition of VSTS, which by the way, is now became a part of the VSTS Developer Edition. As a DBA we have covered topics of Managing, Developing, and Deploying database. We reviewed schema compare/validation/refactoring/deployment, data compare, data generation with Data Generation Plans, visioning of database, and creation of database unit tests.

3. VSTS Developer
Since were short on the time we have skipped demoing some of the development tools and concentrated demos on how the developer can use Code Coverage, Code Analysis, and Code Profiling (Instrumentation and Profiling) to troubleshoot and improve the quality of created code.

4. Creating Unit Tests, Test Driven Development, and Data Driven Tests.
In this portion of the SDLC presentation we have talked about the importance of testing and various ways one may start doing it. It can be as easy as "right click" and "generate test" (as I heard at the PDC08: Even a VP Can Do It), to getting into xDD (where x is Test/Behavior/Domain/etc Driven Development). TDD is all about Red-Green-Refactor!

In this section we have also expanded on Code coverage and demonstrated that hooking the test to data source can significantly reduce amount of tests a developer needs to write, while still maintaining a reasonable code coverage.

5. TeamBuild
On all the projects that I have a privilege to be part of, we have also setup a Continuous Server (CI) to establish an environment for automated code build and verification. I try to have a CI setup and go on day one of the project. TeamBuild is an excellent tool for creating and maintaining solution builds, we have demonstrated build can be setup under 2 minutes and perform all kings of tasks including test execution, code analysis, build failure notifications. Since TeamBuild sits on top of the MSBuild one may use a variety of created MSBuild tasks to perform additional actions like: code promotion to QA/Testing environments (only if it passes all other validations), creation of website, registration of DLL, file updates. Using Community MSBuild Tasks from TIGRIS, we were able to change the keys of the web.config file to reflect the changes between development and QA database connection strings. There are many other good collections of MSBuild tasks, like MSBuild Extension Pack.

6. VSTS Tester
Since we had limited time we showed only only Web and Load Tests in details. VSTS Tester edition has a set of powerful tools to allow us to create and manage a variety of test types. One of the greater features is an ability to capture user interactions between the browser and the server on the TCP layer stack and being able to replay it back as a WebTest or convert it to the .NET code.

I will be putting an additional posting to cover Testing in greater details, to cover other type of tests like: manual and ordered.

7. First look into VSTS 2010
Mike has given us a teaser into what Microsoft will be releasing soon, VSTS 2010, TFS 2010, .NET 4.0 all of those tolls has many new and improved features. You may get Mike's presentation from here.

You may find a lot of material on 10-4 (VSTS2010 and .NET4.0) on:


8. Advance Source Control, for the 4 people that waited patiently for it :)
We have talked about Branching and Merging strategies. We have run through a real-life example on how one may work on the production V1.0 code performing hot fixes, at the same time continue development of the V2.0 application , and how merge can be completed between application branches.

Since mostly of the people missed this demo due to time constrains, I will be putting a recording of it in a very close future.

Here is a great white paper on Branching Strategy

Thursday, July 16, 2009

KY SDLC Day 1 Summary

On the first day we have covered the following topics (SDLC deck):

1. Application Lifecycle Management
Mike has talked about the business value of the ALM, here is a link to the Power Point deck.

2. VSTS & TFS Overview
We have covered how Microsoft addresses the need for the robust set of tools for the ALM, the PowerPoint presentation is here.

3. Team Explorer Overview (Security, Collaboration, Alerts, Source Control)

  • Team Foundation Administration Tool was used to show how to simplify user management in TFS.
  • TFS Power Tools "Alerts Editor" was used to customize alert setup, a user interface to BisSubscribe.exe.
  • Team System Web Access and Work Item Web Access were briefly shown as alternatives to default sharepoint site and WIWA a free (no license required) workitem creation tool.
4. Customization / Setup
We have covered some of the popular TFS Templates for Agile Development
  • eSCRUM, used by some teams at Microsoft (by some reason the download link is broken, I do have a copy of it somewhere and will post the download link shortly)
  • VSTS Scrum on Codeplex, maintained by a group of MVPs, a light version of scrum implementation. It is a great starting point for customization.
  • SCRUM for Team Systems from Conchango, out of box fully implemented scrum template with a great set of features.

I have used TFS Power Tools "Process Editor" to modify template during my demos.

5. Work Item Management (Tools for Managing Requirements)
Besides showing a variety of ways one may create and manage work items in TFS (Team Explorer, Excel, Project, Web Access, WIWA) I also briefly demoed: TeamLook and TeamSpec.

Wednesday, July 15, 2009

What Software did I use for the SDLC presentation

to save time and to make the demos easily reproducible I have used a trial version of Visual Studio Team System 2008 Team Foundation Server SP1 VPC Image, you may download from here. The image will not expire till the end of 2009, so happy exploring!

After booting into it and applying all the security patches, I have also downloaded and installed additional software and tools:
1. Team Foundation Administration Tool - to simplify permission management
2. TeamLook, from Team System Solutions - an Outlook add-on for Work Item Management (will work with TFS2005/2008 and Outlook 2003/2007)
3. TeamSpec, from Team System Solutions - a Word add-on for managing Work Items in the word (again will work with TFS 2005/2008 and Word 2003/2008)
4. Ravenflow - great tool for round trip requirements and work items management.
5. Teamprise plugin for Eclipse - java development TFS integrated development toolset
6. Sparx Enterprise Architect, UML modeling tool.
7. I do not remember if TFS Power Tools were part of the image, but in case you are missing them you may get them from here
8. Tigris MSBuild tasks - a collection of MSBuild tasks to help with TeamBuild automations

[UPDATE]
9. I forgot to include VSTS 2008 Database Edition GDR R2 setup and
10. VSTS 2008 Database Edition Power Tools, I did not use any of the features during the demos, but it has a few great improvements.


Alternatively, if you want to try some of the demos/features for the VSTS2008 and TFS2008 you may want to try to use Team System Virtual Labs, it is truly a great resource.

Monday, July 6, 2009

A Two Day Event: SDLC in a Box on July 15-16, 2009

WHAT:
This 2 day event will focus on application life-cycle management, we will review how one may leverage TFS and VSTS on a project, from initial conception through requirements gathering, design, development, testing, build & review processes. We will demonstrate integration with non-Microsoft development and best-of-breed partner solutions & offerings for Visual Studio 2008 Team System.

For additional information please see http://www.sdlcinabox.com/

Target Audience:
This two day sessions is targeted for Developers, Architects, Project Managers, DBAs and Business Analysts looking for ALM and researching Team Foundation Server.

Speakers:
1. Alexei Govorine:
Co-Founder of the
Central Ohio ALM Group
ALM/.NET Practice Manager for Quick Solutions
2. Mike Gresley:
MS SLG Dev Tools team
3.
David Baliles:
MS SLG Dev Tools team
Co-Founder of the SDLC in a Box program


WHERE:
Capitol Annex Bldg: Room 171, 700 Capital Avenue Frankfort, KY 40601

WHEN:
July 15-16, 2009 from 9-4:30 PM

Registration Link: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032418198&Culture=en-US


Draft Agenda of the event topics:
Day 1:

  1. Introductions
  2. SDLC in a Box: Background
  3. Application Lifecycle Management
  4. VSTS & TFS Overview
  5. Customization / Setup
  6. Team Explorer Overview (Security, Collaboration, Alerts, Source Control)
  7. Work Item Management (Tools for Managing Requirements)
  8. Architecture


Day 2:

  1. Database
  2. Development
  3. Unit Testing & Test-Driven (TDD)
  4. Code Promotion: Building & Deploying code
  5. Functional Testing
  6. Branching & Hotfix Demonstration
  7. Reports
  8. Q&A
  9. (optional) Lap Around VSTS 2010