Search This Blog

June 5, 2013

Load Test: Mimic multiple users to login to Silverlight Application

I use my work laptop to hit our Silverlight Application via my credential automatically. Therefore, I cannot see the Windows Authentication popup. 

If I would like to mimic multiple test users to login to Silverlight Application via different credential, how can I do that? It is pretty easy.

Open IE-> Internet Options-> Security-> Custom Levels -> Check Prompt for user name and password inside User Authentication.



Put 20 different usernames with passwords in the file.  

Open Visual studio IDE.

Create a new web performance test that can randomly pick up the different user to login to Silverlight Application.  

Create a Load test that adds this web performance test.

Run the load test and you are all set.

May 24, 2013

Fixed the issue: Background Color in Different Browsers

My wife is the graphic designer. 2 days ago, she told me to take a look at her company website after she updated it.

The interesting part was that when I used chrome to view it, the color was fluorescent green as follows: 




When she used iPhone 5 to view it, it was the same as above.

When she used IE9 and Safari, the color is lime green and it is the expected result.  




I talked to her: is this image a JPG file when you design it in Adobe Photoshop? She said: Yes.

After looking into this issue, she changed JPG to PNG and updated the site.  It works the same in different browsers. 

May 13, 2013

Fixed the issue- Burn Down Chart shows reporting service error.

Today when I came to the office and looked at our project dashboard, the burn down chart showed the reporting service error. Besides, the burn down chart was not sent to the people who subscribe on the daily basis. I don’t have permission to login to  TFS server and I talked to my manager about this issue.

After looking into the issue, we found out SSAS service stopped for some reason. After restarting SSAS, everything is back to normal.

April 30, 2013

Fix the PDF issue: A-PDF Password Security can make Print enabled easily


Today I downloaded one useful PDF file online and I would like to print some pages. I noticed that print function was disabled.





I spent some minutes looking for a useful tool that can enable Print function.


After installing A-PDF Password Security, I can make Print enabled easily.

April 28, 2013

Fix the issue: Sound is not working in Chrome


Yesterday when I used Chrome to watch videos on YouTube, there was no sound in my laptop. After looking into this issue, there is no issue with my sound card because I can still use IE9 to watch videos with the clear sound. What happened to Chrome? Finally, I find the main issue is from Shockware Flash.

How to fix the sound issue in Chrome?

Go to Chrome Plugins

Disable Shockware Flash (11.7.700.179)

Close Chrome

Go to YouTube again

Click the video and it can lead you to install the version (11.7.700.169)


After that, sound is working in Chrome.

April 12, 2013

Fixed the issue: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'


Today, I wrote a unit test to consume one web service method and I got the following error.

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'.

After looking into this issue, in app.config , it uses security mode =None and clientCredentialType =None.

<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>


After using the following code, everything is working perfectly.

<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>

March 25, 2013

A basic SQL query to validate the distance via two Latitude / Longitude Points


In this Sprint, we add a new feature called Relocation. Developers complete this feature in C# and I need to validate if the distance between stores is correct when doing relocation. No one told me how to validate the distance. As a SDET, it is important to know how to test in my own way.

After doing some research, the following Excel formula works well if you have 2 Latitude and Longitude points.

ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371

However, this is not what I want. What I want to do is:

Enter one Lat/ Long store information and the nearby stores within 16 Kilometers (about 10 Miles) appear in the database. I can use the result set to compare the data in Silverlight Application.

I can’t write a Store Procedure and a User-Defined function in SQL Server because after we push to Production, those can’t be implemented in Production and I still need to validate this scenario for my smoke test. Therefore, writing a basic SQL query is a good way.  Here is my solution:

·         We have the Longitude and Latitude Columns in the table for each store.
·         The Excel Formula is still working in SQL Server 2008 R2.
·         I need to manually enter Lat1 and Long1 as my baseline to validate the distance between stores. That being said, I don’t have to enter Lat2 and Long2 information.

After my several attempts, the following SQL Query is helpful to find the nearby stores after I enter the values of Lat1 and Long1. 



Next time if I want to use another store (Lat/Long) as a baseline to search the nearby stores within 16 Kilometers, it is easy for me to get the list of data. 

March 21, 2013

Fixed the issue: Microsoft PowerPivot for Excel 2010 breaks the feature of TFS Open Selection in Microsoft Excel


I installed Microsoft Data Explorer for Excel 2010 successfully last week and I can still use TFS 2010 to export work items to Excel without any issue. Today after I installed Microsoft PowerPivot for Excel 2010, the interesting part is that I could not export TFS work items to Excel.  I got the following error:

The document cannot be opened because there is a problem with the installation of the Microsoft Visual Studio v10.0 Team foundation Office integration components…….

(My Environment: Windows 7 X64 SP1 + Visual Studio 2010 SP1 + Office 2010 SP1)



That being said, Microsoft PowerPivot for Excel 2010 breaks the feature of TFS Open Selection in Microsoft Excel.



After looking into this issue, I tried the following command line and it was still not working.

Regsvr32 "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\TFSOfficeAdd-in.dll"

I tried another one and it is working as expected.

Regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\TFSOfficeAdd-in.dll"

If Microsoft PowerPivot for Excel 2010 breaks the feature of TFS Open Selection in Microsoft Excel, you can try the way above. It should work for you.


March 20, 2013

Burn Down Chart: Let’s Subscribe!


My manager just gave me the permission to update the Project Dashboard where team members can see the Burn Down Chart, Bug Stats, Build Status, recent check-ins and work items in TFS for every Sprint.

In previous Sprints, project managers sent the Project Dashboard link to team members and reminded them of updating the hours in their own tasks every morning.  It was good, but manual.

After I got the permission, I have one thing in my mind: why not subscribe to the Burn down Chart? Team members can open their emails and take a look at it directly every morning after they come to the office.

It is easy to subscribe as follows:

Open Visual Studio IDE and connect to TFS.

In the Reports, right click and “Show Report Site” appears. Click it and it goes to the Report site.



Click Dashboard and you can see many burn down chart reports for different projects.


Choose your report and click “Subscribe”



Enter Email Addresses, Subjects and enter 8:00 AM weekday inside Select Schedule button.


Every morning at 8:00 AM, the Burn Down Chart will be sent to all related people.

You can also add a new subscription to remind people of updating their hours in TFS before they leave in the evening. 

March 19, 2013

SQL Server : Database Schema Comparison Tool for Different Environments


My colleague asked me: how do you validate the discrepancy of database Schemas in different environments (DEV, TEST, STAGE, and PROD) in SQL Server?

The reason why she asked me is that from our previous experience of pushing the code from DEV/TEST to STAGE, the features in our Silverlight Application will not work well.

Why are the features broken often?

·        The code is based on the Entity Framework. If table structure changes, after pushing code to STAGE, but forget to update the table structure (add/delete columns), the features will not work well.

·        Silverlight Application is using ArcGIS Rest Services. If the changes are in GIS level, but not applied in STAGE, the feature will not work well.

·         DB change will cause the missing primary keys in some tables often.

I talked to her: If you have Visual Studio Ultimate installed, it is easy to compare the discrepancy in different environments such as missing columns in some tables, missing Stored Procedures and Views.



It is easy for her to see the discrepancy of database Schemas in different environments. I don’t have to bother her so much in the future.