Search This Blog

July 25, 2012

VSTS Web Performance Test: Fix the issue of Request failed: The request was aborted: Could not create SSL/TLS secure channel

Today my colleague told me if I can use VSTS 2010 to automate MicroStrategy 9 BI Web Portal over https protocol because he wants to run BVTs every day.




I tried 2 different ways:

Coded UI Test:

It can be automated without any issue. You need to logout first before you run the test again.

Web Performance Test:

After recording the test, it shows the error: Request failed: The request was aborted: Could not create SSL/TLS secure channel.

After spending some time investigating this issue, I need to add the following source code to let the test pass.

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; 

In this case, Coded UI Test is the best solution for MicroStrategy 9 BI Web Portal.

July 24, 2012

VSTS 2010: Add Config Transforms is disabled

Today I look at our developer’s Silverlight Project to debug the issue in Test Environment, and "Add Config Transforms" is disabled when I right click on Web.config .



In order to make Add Config Transforms enabled, I need to go to Build -> Configuration Manager->Active Solution Configuration->New and create a new solution configuration.




After that, Add Config Transforms is enabled.



July 12, 2012

How to turn on Temporary Internet Files Folder in Windows 7?


Yesterday I wrote the post about Silverlight .xap needs to be updated in the users’ laptops after pushing a new build. Someone asked me where “Temporary Internet Files” folder is. Good question. It is invisible by default, but you can use the command line to open the folder directly.

Here are the steps:

Click Start.

In Search Program and files, enter Folder and Folder Options appears

Click Folder Options. In View tab, uncheck “Hide Protected Operating Systems (Recommended)”. Click Apply.
























“Temporary Internet Files “Folder will appear.



July 11, 2012

Silverlight .xap needs to be updated in the users’ laptops after pushing a new build

We have pushed so many builds including important bug fixes since July 6. Today our business analysts opened their IE and found out why the bugs were not resolved. I talked to them: Please refresh your IE and make sure if you get the latest .xap file in your laptop.

The interesting part of Silverlight UI is that if users keep their IE open, after we push a new build and they don’t feel that, they can still use the old Silverlight UI. In order to make their individual .xap updated, the best way is to use F12 key to refresh IE, clear browser cache and go to the site again. I showed them how to do it. 

I also talked to them: Please make sure if you can see Silverlight loading progress indicator (1%-100%) every time when you launch IE. This indicates the latest .xap is loaded in your laptop. If not, the .xap might not be updated.













We can also use the following way to see if .xap is updated in our laptop.

Go to %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ and you will see sprint2.xap.

Last Modified: It is the time we have the new build (e.g. 7/11/2002 11:24 AM).

Last Accessed and Last Checked: It is the time we access the site (e.g. 7/11/2002 11:43 AM)


 
If your .xap is not updated, please use F12 key to refresh IE, clear browser cache and go to the site again. When Silverlight loading progress indicator appears, everything is working as expected later.

July 3, 2012

System Restore fixes Internet Explorer has stopped responding

Internet Explorer 8 on my work laptop (Windows 7 x64) crashed all the time yesterday when I browsed my Gmail and some sites I visited often. “Internet Explorer has stopped responding” dialog box appeared all the time. I tried the following ways and could not make Internet Explorer 8 work.

Disabling Add-Ons in Internet Explorer 8 didn’t work.

Resetting Internet Explorer 8 didn’t work.

Using sfc /scannow didn’t work.

When looking at the event logs, I saw 2 dlls (mshtml.dll and urlmon.dll) might crash.
  









Using regsvr32 urlmon.dll didn’t work.

Using regsvr32 mshtml.dll didn’t work.

After long investigation, I find our company pushed windows update yesterday and many machines had the issue. After doing system restore, Internet Explorer 8 works perfectly.

June 29, 2012

How to fix the scenario of No tests to execute via MSTEST in TFS build log?


On June 13, 2012, I wrote a post about How to fix the scenario of No tests to execute via MSTEST in TFS Build 2010?  But I forgot to mention another important thing. You might find this post helpful to you if you have the same issue.

On June 12, 2012, I created a test project that contains unit tests and web tests.  In Visual Studio 2010, I created a new test list called BVT and put all of the tests in BVT and then I checked in the code to TFS source control. After I kicked off a new build in TFS, the build succeeded, but all of the tests in BVT never got executed in the build log (No Tests to execute.)

I logged in to the build server and opened the .sln file of my test project. The interesting part was that all of the tests in BVT were not enabled. I needed to manually click refresh in the test list editor to make them enabled. How did I make those tests enabled in BVT Test List without clicking refresh manually? 

After long investigation , I must check in the bin folder and can’t check in the obj folder. This is  very important!  If I put more tests in BVT, I need to check in bin folder again to make those tests changed. 

After I kicked off a new build again, all tests passed in the build log. After logging to the build server again, all tests were enabled in BVT Test List as well.

June 27, 2012

Coded UI tests have the huge limitation for Silverlight Application and cross browser testing

For Silverlight 5 Application, Coded UI test is not supported in Visual Studio 2010, Visual Studio 11 and Visual Studio 2012 RC.
For Silverlight 4 Application in Firefox, Coded UI test is only supported in Firefox 3.5 and 3.6.  For higher version of Firefox, it is not supported.
For Silverlight Application in Chrome, Coded UI test is not supported.
For Silverlight Application in Safari, Silverlight is never supported on Windows platform. It is only supported on Mac OS. However, Coded UI test is not supported for Safari.
 As a SDET, I would like to say this is not good news for Coded UI test because it has the huge limitation for Silverlight Application and cross browser testing.
Telerik Test Studio can handle Silverlight 5 Application in different browser easily.

June 21, 2012

Coded UI tests don’t support Silverlight 5 at this moment


I have used Telerik Test Studio to do Silverlight UI Automation more than 2 years. It is a very powerful tool. In my last Microsoft Project, I tried to use Coded UI tests for Silverlight 4 applications, and I couldn’t record and run tests very well. However, Telerik Test Studio worked very well. My current project is related to Silverlight 5, and Telerik Test Studio is still a powerful tool.

Today I would like to try Coded UI tests to test Silverlight 5, but the non-supported dialog box appears as follows:




After doing some research, Coded UI tests in Visual Studio 2010 and Visual 11 don’t support Silverlight 5. I give up Coded UI tests and still use my favorite testing tool -Telerik Test Studio.

Just one thought: If I can’t use Coded UI Tests for Silverlight 5, I don’t think Microsoft Test Manager can play an important role in the testing tool.

June 19, 2012

Unhandled Error in Silverlight Application - ESRI.ArcGIS.Client.Layer.OnInitializationFailed


Our Silverlight Project is based on ArcGIS Map Services and the site is for internal use only in the company.

I can use my local machine to access the sites outside the company successfully such as google.com , but for Windows Server 2008 R2 machines,  I can only browse the internal sites including our Silverlight Application.

When I launch our Silverlight Application, the site is good and has no JavaScript error. But when I run my Silverlight UI automation on Windows Server 2008 R2 machine, the site has the following JavaScript error and it is related to ArcGIS error.

Message: Unhandled Error in Silverlight Application A security exception occurred while trying to connect to the REST endpoint. Make sure you have a cross domain policy file available at the root for your server that allows for requests from this application.   at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e)
   at ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer.<>c__DisplayClass1a.b__18()


After investigation, our map service needs to have the Internet connection first. When I get the values of proxy server configuration from my QA manager and configure it correctly in IE, the JavaScript error is gone after launching Silverlight Application again.

MSBUILD needs to build the solution file successfully in the Build Controller


Every time when I go to MSDN forum, I see some people asking why after they queue a new build in TFS 2010 and TFS build fails due to some errors. That’s because there are missing components in the Build Controller. The environment in the Build Controller is different from the one in your local machine.

The best way for you is to login to the Build Controller and validate if you can use MSBUILD to build the solution file successfully.

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
msbuild C:\Test\TestA\TestA.sln

If the above simple MSBUILD command line has the error, whatever you queue a new build in TFS, TFS build will fail.

When you see the errors, you can copy the missing components from your local machine to Build Controller and try it again.