December 2010 - Posts
Run Unit Tests in Parallel using Visual Studio 2010
Today almost each and every machine have multiple CPU’s or a CPU with multiple cores, so why not using them in order to speed up your tests runs and run more Tests in parallel.
In Visual Studio 2010 Microsoft added the ability to run Tests (Only for Unit Tests) in parallel.
- Data Collectors cannot be enabled if using Parallel execution.
- You must have multi-core/CPU machine

How To Enable Parallel Execution of Unit Tests
1. Create new Test Project in Visual Studio 2010
2. Right click on “Local.testsettings” and click “Open With”, choose “Xml (Text) Editor” and hit OK.


3. Expand the Execution Tag and add additional attribute called – parallelTestCount:
What’s are your options:
- 0 = Auto configure: We will use as many tests as we can based on your CPU and core count
- Define the number of tests to run in parallel – If you don’t want to use all cores/cpu’s

This is my code for that Demo:

As you can see from the picture below I have 4 unit tests running in parallel and another picture below you can see my computer finally working 


Enjoy
Microsoft Open Day–Testing in Visual Studio 2010
Two days a ago I had the honor to give 4 hours lecture on Testing using Visual Studio 2010 in Microsoft Israel for more than 100 people about the entire suite for Testers in Visual Studio 2010,
This wasn’t just another overview session but hand zone session on each subject:
-
-
-
-
-
-
You can download the presentation from Here
I hope you had fun and learn about the testing suite coming with Visual Studio 2010, for any questions please feel free to contact me.
Thanks for all participants!
Problems with MSSCCI and VB6
Doing some work at a customer working with Visual C++ , IAR, VB 6.0 and couple more I faced with some issues using MSSCCI and VB6.
(MSSCCI - The Team Foundation Server MSSCCI Provider enables integrated use of Team Foundation Version Control with products that do not support Team Explorer integration. [Read More])
After Installing MSSCCI I Can’t See TFS Menu

The solution is very easy, just edit vbaddin.ini
(start->run: vbaddin.ini (its in the windows dir)
Add the following line VBSCC=3, save the file and reopen VB6.

Run VSS 6.0 MSSCCI provider Alongside the TFS 2010 provider?
You can change your registry to fix this.
Create a toVSS.reg file and add below text.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider]
"ProviderRegKey"="Software\\Microsoft\\SourceSafe"
Add another one for TFS
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider]
"ProviderRegKey"="SOFTWARE\\Microsoft\\Team Foundation Server MSSCCI Provider"
Enjoy
VS 2010 SP1 Beta – Test and Lab Improvements
On my previous posts I’ve talked about VS/TFS 2010 SP1 Beta has Released, now available for everyone and not just MSDN Subscribers.
- Service Pack 1 Beta - General availability download
- Service Pack 1 Beta – MS DN Subscribers only download
In the last post I wrote about about Improvements comes with SP1 Beta for VS/TFS 2010 , but not all… from the Testers side there were also a lot improvements and here is some of them:
For the full article read Amit Chatterjee's
Microsoft Test Manager
- Support for Expression Encoder 4.0 in Manual testing
- Fixes we released as part of hotfix for Microsoft Test Manager
- ‘Configure Diagnostic Data Adapter-Event Log’ page is truncated in localized version of Microsoft Test Manager
- Analyzing test result causes it to become most recent result in the test point trend
- Remember Right-To-Left language settings across MTM sessions
- Query-based test suite repopulation takes too long for large suites
- Microsoft Test Runner : Crash after choosing browser type for FireFox playback
- Unable to collect Intellitrace data if application under test is launched as a part of action recording for the test case
- Parameterization: Can't bind parameter to password field when creating Action Recording
- Microsoft Test Runner: Show test case description in MTR
- API: Attachment count for test results returns 0 when iterating through large amount of test results
- Performance improvements for Microsoft Test Manager
FastForward/CodedUITest
- Fixes we released as part rollup hotfix
- Coded UI Test Project is incompatible with Setup/Deploy projects in the same solution
- UI Test Controls added to UIMap are case-insensitive
- Creating Coded UI Test from existing action recording does not show up alternate credentials dialog
- BrowserWindow.FindMatchingControls() throws UITestException
TFS Test Steps Editor – Multiline Support
Almost every tester I’m working with asked me that question at least once – Why There is No Multiline Support in Microsoft Test Manager?
This is not the best solution but if multiline is a showstopper you can download this tool to help you edit your tests include Multiline support, and if you are a developer want to edit Test Cases this also a good solution for you.
Download Test Steps Editor - http://teststepseditor.codeplex.com/

Test Attachment Cleaner
Download Test Attachment Cleaner
Overview:
In Visual Studio 2010, with the introduction of Visual Studio Test Professional 2010 & Visual Studio Premium/Ultimate 2010 SKUs, testers can author manual and automated Test cases, configure the different diagnostic data collectors (as part of Test Settings), associate the Test Settings with Test Plan/Suites and then execute these test cases as part of Test Runs. The execution of a Test Run (whether automated or manual) generates a bunch of diagnostic data, which may be captured either automatically by the system or manually by the tester. This diagnostic data is critical in eliminating the “no repro” bug scenarios between the testers and developers.
However, the downside of this rich diagnostic data captures is that the system/user generated diagnostic data, over a period of time, can grow at a rapid pace and start taking up database space. With Visual Studio 2010, the database administrator has little or no control over what data gets attached as part of Test Runs – i.e., there are no policy settings he can control to limit the size of the data capture OR no retention policy to determine how long to hold this data before initiating a cleanup. In such scenarios, the Admin has no mechanism to:
1. Determine which set of diagnostic captures is taking up how much space AND
2. Reclaim the space for runs which are no longer relevant from business perspective.
The “Test Attachment Cleaner” powertool fills this void by serving both the above points.
Usage:
The Test Attachment Cleaner is a command line powertool (tcmpt.exe attachmentcleanup), which accepts the following parameters:
Tcmpt.exe attachmentcleanup
/collection: TeamProjectCollectionUrl
/project: TeamProject
/settings: SettingsFilePath
[/out: ReportFilePath]
[/mode: Preview/Delete]
Sample Setting files for core scenarios: As part of the package, sample setting files are provided which cater to the following 5 core scenarios. The readme document contains additional details around the different knobs used within the sample setting files.
- Scenario#1: Identify list of attachments taking up database space of more than 1 GB per attachment
- Scenario#2: View/Delete IntelliTrace log files over a size of 500 MB
- Scenario#3: View/Delete all Video log files with Test run creation date older than specific date with no active bugs
- Scenario#4: View/Delete all TRX & COV log files for test runs that happened between 30 and 90 days in age & do not perform the Linked Bugs lookup query
- Scenario#5: View/Delete all custom/user attachments over size of 5 MB with no active or resolved bugs on test runs between 2 dates
Download Test Attachment Cleaner
Team Foundation Server 2010 and Project Server Integration Feature Pack is now in Beta
We at Sela Group already working with a customer working with TFS-PS Feature Pack CTP for Integration between TFS 2010 and Project Server 2010, now all customers can get this support as “Go Live” Beta.
I’ve post about VS/TFS 2010 SP1 Beta has Released and Here is another great news from Brian Harry for TFS 2010 and Project Server Users:
The TFS-PS Feature Pack is being released to MSDN subscribers today as a “go-live” Beta. That means Microsoft believe it is ready to be installed and used in a production environment.
What Does it Do?
In short, TFS <-> Project Server integration is a server side synchronization/workflow tool that enables project managers who use Project Server to share up to date project status and resource availability with development teams who use Team Foundation Server whether they use formal or Agile development processes. It enables the two constituencies to work in the tools of their choice and at a granularity that is most comfortable to them. Project managers can work in fairly high level tasks using a long range plan. Developers can see the plan and decompose the high level tasks into detailed assignments in whatever fashion works best for them. As tasks are decomposed and work is completed, Project Server is updated with both resource availability and task progress. Of course, all of this ties into the standard Project Server work approval process so that the project manager maintains some control over the high level plan and changes can be deliberate rather than random. If a project manager wants to deal with all of the detail of the development team, they can configure the integration to import all task breakdown – but for projects that are very large, it’s likely to be overwhelming.
Read More at Brian Harry Blog
Enjoy
VS/TFS 2010 SP1 Beta has Released
Brian Harry just post some wonderful news for TFS and Visual Studio 2010 Users, the SP1 for VS/TFS 2010 Is out for MSDN Subscribers and on Thursday for everyone else.
Download links for MSDN Subscribers (Note all 3 of these links are the same. You’ll find the 3 downloads and more on the subscriber site at this link):
Download links for everyone else (available on Thursday):
Full Information at Brian’s Harry Blog
Here is some of the thing included in the Service Pack:
Local help viewer - We got ample feedback during the VS 2010 Beta 2 period that people really missed having a local help viewer. The help team has been working hard and had some previews of a new local help viewer. It is now incorporated into SP1.
Silverlight 4 tools - The Silverlight 4 tools are now included along with Silverlight 3 support.
Unit Testing on .NET 3.5 - In VS 2010, you can only run unit tests against .NET 4.0 and must rely on Framework compatibility to trust that your app will actually work if deployed on .NET 3.5. While Framework compatibility is VERY good, it's not perfect and we've heard focused but strong feedback that unit testing on the actual .NET 3.5 Framework is a must. In SP1, you can.
Intellitrace for 64-bit and Sharepoint - Intellitrace is the revolutionary new debugging technology in VS 2010 that allows you to move forward and backwards through a debug session. With it being a V1 offering at RTM, we just didn't have time to make it work in all scenarios. In SP1, we've rounded it out with a couple of important ones - 64-bit and Sharepoint. We still don't have Silverlight or unmanaged C++ support but we'll continue to make progress on important scenarios.
Performance Wizard for Silverlight - With SP1, you will be able to profile your Silverlight code to tune your app performance. Also, because so much of Silverlight is about rendering performance and a traditional code profiler is a blunt tool for tuning that kind of thing, we have included a number of higher level profiling abstractions to make is easier to understand where your app is really spending the time.
VB Compiler runtime switch (/vbruntime) – VB.NET relies on some VB specific runtime libraries. In the past this has made support for VB.NET on new .NET platforms come to market more slowly than C#. For instance support for VB.NET was enabled on Windows Phone 7 when we released the Visual Basic for Windows Phone Developer Tools. This new switch and the underlying VB runtime refactoring will enable you to include the key VB runtime components as references in your application, making it easier for you to target new platforms as they are released.
Enjoy