Search This Blog

June 13, 2012

How to fix the scenario of No tests to execute via MSTEST in TFS Build 2010?

Currently I am working on TFS build 2010. I believe many of you have the same situation - the Build Controller doesn't have Visual Studio 2010 installed because it is the license issue.
In order to run some of my BVTs (2 unit tests and 1 coded web test) via mstest from TFS build, I need to install Visual Studio Test Agent 2010 to get mstest.exe first per the MSDN forum.
After kicking off a new TFS build, the interesting part is that TFS build can only execute 2 unit tests. This coded web test is never executed and the test result never appears. I can only see 2 unit tests passed in the TFS activity log (the section: Run MSTest for Metadata File).
I log in to the Build Controller and use the following command line, but this coded web test cannot be found; but 2 unit tests passed.
MSTest.exe /nologo /testmetadata:"C:\\test\qa\qatfs.vsmdi" /testlist: BVTTFS
Test XXX cannot be found.
No Tests to execute.

In my local machine, I add one basic webtest (record google.com), put all project files in the Build Controller and execute this basic webtest via the following command line:
MSTest.exe /nologo /testmetadata:"C:\\test\qa\qatfs.vsmdi" /test:webtest1
This time it shows the error.
Failed to load tests from 'c:\test\qa\qatfs\webtest1.webtest': Microsoft.VisualStudio.TestTools.TestManagement.InvalidStorageExtensionException: File extension specified '.webtest' is not a valid test extension.
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetTestTypeInfosForExtension(String ext)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetTestTypesNotManaged InStorage(String storage)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTestsFromTipsHelper(IEnumerable`1 locations, ProjectData projectData)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTests(IEnumerable`
1 locations, ProjectData projectData, TestConflictHandler vetoingHandler)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTests(String location, ProjectData projectData, TestConflictHandler vetoingHandler)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTestLinkStorageHelper.LoadTests(String fullStoragePath, ProjectData projectData)
   at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.SimpleLoadTestLinkStorageHelper.Load(String fullStoragePath, ProjectData projectData)
Test webtest1 cannot be found.
Test webtest1 cannot be found.
Starting execution...
No tests to execute.
It can explain why "No tests to execute" appears in my early testing.
After some testing, the above error of Microsoft.VisualStudio.TestTools.TestManagement.Tmi.XXXXX is gone after I install Visual Studio Test Controller in the Build Controller. It means that MSTEST can't execute webtest and coded web tests nicely if you only install Visual Studio Test Agent 2010. It could also explain why the log in TFS build has the information of No Tests to execute. 

Next time if you see "No tests to execute" in TFS Build, don't worry.  Installing Visual Studio Test Controller and Visual Studio Test Agent together in your Build Controller should solve your issue. 

Besides, does it mean if you want to execute your web tests via MSTEST without Visual Studio IDE install in the Build Controller ,Visual Studio Test Controller and Visual Studio Test Agent need to be installed in the same machine? From my perspective, the answer is yes.

How to handle Windows Authentication in Telerik Test Studio?

Our developers add Windows Authentication in our Silverlight Login Page. In my local machine, when I launch the Silverlight Application, no Windows Authentication popup appears. If I login to another machine, the Windows Authentication popup appears and using my username and password to login is required.

How to I handle Silverlight UI Automation via Telerik Test Studio? After doing some research, I use the following code to handle this scenario in IE 8 successfully.

var windowsAuth = LogonDialog.CreateLogonDialog(ActiveBrowser, "UserName","Password", DialogButton.OK);
Manager.DialogMonitor.AddDialog(windowsAuth);

October 7, 2011

The security database on the server does not have a computer account for this workstation trust relationship

Today I use System Center Virtual Machine Manager (SCVMM) to clone a new Machine. Unfortunately, when I login to the old VM, I got the following message:

The security database on the server does not have a computer account for this workstation trust relationship.


After investigation, I need to use local administrator account to login and rejoin the domain. This issue is resolved.

November 5, 2010

Fix the error- System.Xml.Serialization.IXmlSerializable is defined in an assembly that is not referenced.


My environment: Windows 7, VSTS 2010 and SQL Server 2008.

When I try to use ADO.NET to connect to SQL Server 2008, "DataSet myDataSet = new DataSet();" causes the following error.

The type 'System.Xml.Serialization.IXmlSerializable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I have "using System.Xml ;" in my source code, but it doesn't work at all. 

After adding reference of System.xml (v4.0.30319), it works.

July 9, 2009

IE8: this tab has been recovered

Today I used my VPC (Windows XP 3, latest windows update, IE8, clean machine) to test one site in the company, and I found IE8 sometimes showed "this tab has been recovered" and the page redirected to the error URL.

Besides, Compatibility View Settings of IE 8 was not helpful for me to solve this issue. When I went to programs->accessories->system tools-> Internet Explorer 8 (no adds-on), launched this Internet Explorer 8 (no adds-on) and pasted our test site, I could see IE8 running adds-ons disabled.

When I disabled Shockware flash object (adobe 2006 version) in IE8 , the page looked pretty well. But the page still gave me the hint to enable this add-on. If I enabled this add-on, the issue showed up again. It means that there is something wrong with add-ons and IE8.

Next time if you see this issue, try to disable add-ons . Your issue should be resolved.

June 23, 2009

To install virtual machine additions on Windows 7 VPC gets the blue screen

I downloaded Windows XP VPC with IE6 from Microsoft.com last year. Today I download Windows 7 RC (iso) and wanted to upgrade from Windows XP to Windows 7. I found it was not allowed to upgrade directly due to Microsoft policy.

During the install, I got 2 points:

1. Windows XP was installed in C drive. The folder’s name is Windows. When I installed Windows 7 directly, it also installed in C drive. It changed Windows to Windows. old and got a new Windows folder.

2. After the install of Windows 7, it reset my virtual machine additions. Therefore, I needed to install virtual machine additions again. After I installed it, I needed to restart Windows 7. During the reboot, I saw the blue screen.

After long investigation, I found I didn’t install Virtual PC 2007 SP1. After Installing SP1 , the blue screen was gone.

If you see the blue screen next time, install Virtual PC 2007 SP1 first. Your issue will be fixed.

June 18, 2009

"Document cannot be printed" is fixed by installing Adobe Reader 9

Today I tried to print my PDF document in the office, it didn’t work and it showed “Document cannot be printed”. I even tried print as images and it still didn’t work.

I found it should be an issue of Adobe Reader 8. Therefore, I installed Adobe Reader 9 directly. After installing Adobe Reader 9 and restarting my laptop, I printed my PDF document successfully.

Next time if you see the error message -Document cannot be printed, just install Adobe Reader 9. It should work.

March 22, 2009

IE 8: Can’t copy words from MS Word to Blogger

Today I downloaded IE 8 in my PC with Windows XP SP3 to surf some websites. One interesting fact I found today was that if I wrote some keywords in .docx or .txt and wanted to copy them to my blog, I couldn't paste them to blogspot on IE 8 because "paste" is disabled when I right clicked the mouse. Crtl+ v is not working , either.

If I went to Tools, Compatibility View Settings, and checked Display all websites in compatibility view, I could paste the words from .txt or .docx to BlogSpot on IE 8.

Uploading the images using IE 8 makes UI look so ugly in blogger.

Do you think it is an interesting issue?

February 20, 2009

Windows Update failed (0x80072733): Got the virus

Today when I did the windows update, it didn’t work. It also showed the following message and the error code -0x80072733

Windows Update has encountered an error and cannot display the requested page.

When I tried to google some information, the link redirected to windowsclick.com. At that time I knew I got the virus. Therefore, I downloaded Trojan Remover trial version online to give it a try to see if I could kill the virus.

The tool scanned my laptop immediately and found out the virus. I needed to restart my laptop. During the reboot, the blue screen showed up and it checked the file consistency. After 2 minutes, I could login to my laptop.

When I viewed my log file, I found 6 files were deleted as follows

C:\WINDOWS\system32\UACsehbippe.dll - deleted
C:\WINDOWS\system32\UACntpvauln.dat - deleted
C:\WINDOWS\system32\UACsrsudnth.dll - deleted
C:\WINDOWS\system32\UACklyfvkbm.dll - deleted
C:\WINDOWS\system32\UAClwxvmtal.dll - deleted
C:\WINDOWS\system32\UACnmevpjie.log - deleted

After that, I could do the windows update again and everything seems normal as usual.

Next time if you can’t do the windows update and get the error code, just try this Trojan Remover free software. Hope your issue will be disappeared.

February 15, 2009

To upload the file fails in VSTS 2008 web test ?

If you use VSTS 2008 web test to upload the file, after you record and run the test, your web test fails. That's because when you upload the file , VSTS web test doesn't know where your file is. After you record the test, you need to manually modify your web Request.

If your file path is c:\test.txt, VSTS only knows the file name, test.txt, not the file path: c:\test.txt.

You just change the file path and run the test again. Your test will pass.