Search This Blog

Showing posts with label VSTS. Show all posts
Showing posts with label VSTS. Show all posts

June 13, 2019

Fixed the Visual Studio 2017 IDE Error when trying to use debug coded web performance test.


Today I used the Visual Studio Coded Web Performance test to record the web request and I generated the code to coded.cs file.

The interesting part was that when using 'debug Web Performance test' feature, the Visual Studio IDE showed the following error.




After looking into this issue, it is defenitely the product bug. How to fix it?

Go to Local.testsettings. In General Tab, just change it to “Run tests using local computer or a test controller” and you are all set.



March 10, 2016

Visual Studio 2015: Use the ordered test to run multiple coded web performance tests at a time.

This week, I installed Visual Studio 2015 update 1. After that, I notice that I can’t run selected tests including coded web performance tests in Test List Editor. I can’t run them in Test Explorer either.

However, In Visual Studio 2013, I can use Test List Editor to run selected tests without any issue (Please see The Feature Is Back- Visual Studio 2013 Can Run Selected Tests in Test List Editor).

In this situation, how do I run multiple coded web performance tests at a time in Visual Studio 2015 IDE directly?

  • In coded web performance tests, I need to add IncludeWebTest in the source code. Right Click on this test and choose "Run Coded Web Performance Test". It will run multiple tests at a time. (Note: this is not what I want because it is not user-friendly and coded web performance tests are not supported in Test Explorer.)
  •  Create a new Load Test that contains many coded web performance tests. (Note: This is not what I want because I don’t want to do the load test before coded web performance tests are working.)

  •  Add a new ordered test that contains many coded web performance tests. This time, I can use Test Explorer to run this order test.(Note: Don’t try to put all tests in one ordered test. We can put several tests in one ordered tests.)







I would say Visual Studio 2015 IDE doesn’t provide good design to run multiple coded web performance tests at a time.

November 26, 2014

Fixed the vsmdi issue : Root element is missing in Visual Studio 2013

Today I used my .vsmdi in Visual Studio 2013 to run unit tests, and I got the following error.

Error loading C:\TestProject\Test\Test.vsmdi: Root element is missing.

After looking into this issue, for some reason, it was empty in the .vsmdi file.

After adding the following elements in vsmdi and running the tests again, the error was going away.

February 26, 2014

Fixed the issue: Visual Studio 2012 IDE shows the error – Object reference not set to an instance of an object.

I have Visual Studio 2013 IDE and Visual Studio 2012 IDE installed in my work laptop.

Today when I used Visual Studio 2012 IDE to open one solution file, for some reason, all files were not showing up in Solution Explorer. I used File-Open ->Project/Solution to open the solution file, it showed the error- Object reference not set to an instance of an object.


What happened with Visual Studio 2012?  It must be one line code in Visual Studio 2012 that can’t handle very well and throw the error.  Visual Studio 2013 is working fine.

After looking into this issue, after I deleted all files in the following folder, opening solution file has no issue at all.

%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\11.0

February 21, 2014

Fixed the issue: LOAD TEST menu doesn’t appear in Visual Studio 2013

Today I opened one solution file via Visual Studio 2013 and noticed one interesting issue: LOAD TEST Menu doesn't appear in Visual Studio 2013, but it appears in another solution file.

After looking into this issue , I found out the difference between these 2 .csproj files.


Just add this missing  WebTest Project Type in the solution file, reopen it, and LOAD TEST menu appears again.


February 12, 2014

Fixed the issue : The C# Project is targeting .NET Framework, version=v4.5, which is not installed on this machine.

Today I logged in to Windows Server 2008 R2 and downloaded the latest code from TFS 2013. When opening the solution file, I saw the following screenshot error.

Change the target to .NET framework 4.5. You can change back to .NET Framework , version =v4.5 at a later time.


 After looking into this issue, here are my findings:

Another team member is using .NET framework 4.5.1 on his laptop via Visual Studio 2012.

When opening the solution file, for some reason, there is no .NET framework 4.5 for this project in the dropdown on this machine. That explained why I saw this error.


 Forgot that screenshot error,  moved on and used . NET framework 4.5.1 to build the project. It worked perfectly.

February 10, 2014

Turn off unimportant object types when doing database comparison in Visual Studio 2013

When using Visual Studio 2013 to do database comparison between 2 environments (DEV & TEST), I only care about the following things :

1.    Table names are identical.

2.    Table Column names are identical.

3.    Stored Procedures are identical.

However, when using Visual Studio 2013, I can still see something unimportant like users, index and other unrelated object types.  That’s because Visual Studio 2013 turns on these Object Types by default.


Just select Stored Procedures & Tables only and do database comparison again. That’s the information I really want to see.



Please see also:

SQL Server : Database Schema Comparison Tool for Different Environments

February 7, 2014

How to disable CodeLens in Visual Studio 2013?

If you use Visual Studio 2013 and you don’t like CodeLens in your source code, you can disable it easily. 



Here are the following steps:

Go to TOOLS-Options


Text Editor- All Languages-CodeLens- Uncheck Enable CodeLens and you are all set.


November 11, 2013

The Feature Is Back- Visual Studio 2013 Can Run Selected Tests in Test List Editor

On August 29, 2013, I wrote a post mentioning VSTS 2012 IDE update 3 doesn’t really support Coded Web Performance Tests at a time.

After I installed Visual Studio 2013 RTM, I upgraded my Visual Studio 2010 Test Project including VSMDI file. I would like to see if Visual Studio 2013 fixes the issue above.

From the screenshot, I could see Test List Editor is deprecated. This is expected because it has been deprecated since Visual Studio 2012.




Can I run Selected Tests in one of my Test Lists? The answer is yes.

Here are the simple steps:

Select Pending Test lists -> 7 tests are selected.

Go to TEST- Run -> Selected Tests



This feature can only build the solution file because I see “Build succeeds”.

Go to LOAD TEST-> Run -> Selected Tests



It will automatically run 7 tests at a time. This is really what I want.


I am very happy to say that this feature is finally back and it fixes the bad design issue I mention above.  

See Also

IE10 is not required for Visual Studio 2013 RTM 

November 10, 2013

IE10 is not required for Visual Studio 2013 RTM

Many people were complaining about one system requirement of Visual Studio 2013 RC and Visual Studio 2013 Preview: IE 10. I was complaining about it too because many companies still use IE9 or IE8. 

Today I downloaded it and when doing the install, I felt surprised to see the following screenshot. 



It means I can still install Visual Studio 2013 RTM without IE10. But some features might not work as expected. This time Visual Studio Team is listening to people’s voice.  I really appreciate their smart decision.

Just followed the instruction and the install was finished.





August 29, 2013

VSTS 2012 IDE update 3 can’t run multiple Coded Wed Performance Tests at a time [only MSTEST Matters]

I don’t understand why VSTS 2012 IDE update 3 doesn’t really support Coded Web Performance Tests. Is it because VSTS team doesn’t like web test team? J

After I upgrade my test projects (unit tests, coded web performance tests) from VSTS 2010 to VSTS 2012, it makes me think of still using VSTS 2010.

Per MSDN forum:

  1. VSTS 2012 Test Explorer doesn’t support coded Web performance tests via Test Category. Therefore, I can’t see coded web performance tests appear in Test Explorer [bad design]

  1. I would like to run 10 tests for every environment (DEV, TEST, and Stage) at a time. If I choose load test->run-> selected test, it will run all (30) web tests at a time.  MSDN forum mentions we need to use MSTEST to run 10 tests instead of using VSTS 2012 IDE. You can only use Run Coded Web Performance test for one test. [bad design].





If you are still using Coded Web Performance tests, VSTS 2010 is still the best choice. You can use VSTS 2010 IDE to run multiple coded web performance tests at a time in VSMDI file instead of using MSTEST. The new Test Explorer is not powerful in VSTS 2012.




July 24, 2013

OBIEE 10g Performance Testing: Tests without Indexes Run Faster

2 months ago, I worked with our BI team developers to do OBIEE 10g performance testing.  I asked them: what’s the scenario you would like to achieve?  They told me the following scenarios:

·         They provided 10+ dashboard & reports for me

·         They would like to measure the response time of a single user to login to OBIEE and view dashboard & reports successfully. Therefore, 10 + dashboard & reports meant 10+ different users.

·         The test result determined if the tests in OBIEE 10g with indexes or without indexes ran faster or not.

Since the scenarios were very straightforward, I used Visual Studio 2010 to create web performance tests to meet their needs. I also asked them: would you like to do load test that simulated concurrent users to login to OBIEE?  They said no.  That was for another project.  

Prerequisite:

·         They needed to create test users (20 users).

·         20 users had the permission to login to OBIEE to view dashboard & reports successfully.

·         Cleared user’s caches or turned off user sessions before running my web tests

·         Prepared for the scripts of adding or dropping indexes in the related tables in Oracle 10g.

Created Tests:

·         I used Visual Studio 2010 to create web performance tests to login to OBIEE and view the dashboard & reports they provided ( 13 tests for 13 users )

·         When creating tests, it took me much longer (didn’t know how much time) to see the data showing up in dashboard completely. Therefore I used for loop for the specific WebTestRequest (I set Baseline 5 times and I adjusted it at any time if tests failed)

·         Validated if data was really showing up after dashboard & reports were completely loaded.

Ran the tests with indexes:

When running 13 tests in serialization, some tests failed because it took a lot of time to load the report completely and validation failed.  After talking to BI developers, they investigated some SQL queries and found it was really slow to get the data back.  Therefore I changed for loop from 5 times to 10 times. This time all tests passed.



Ran the tests without indexes:

When running 13 tests in serialization, all tests passed compared to the tests with indexes.


Conclusion: Tests without indexes run faster than tests with indexes in our Oracle 10g platform.

Decision:  They decided to use OBIEE 10 g without indexes in their next release.  

Current situation: I asked one of our BI developers: is OBIEE 10g without indexes running very smoothly? He said: pretty good and it has been running smoothly since last release.

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.

February 24, 2013

Data source name for Oracle 11g in Visual Studio is host name and service name

Before I worked on this project, I talked to my colleagues to provide the data source for Oracle 11g database because I wanted to use Visual Studio 2010 to connect to Oracle 11g and wrote a simple unit test.




They didn’t know what data source name looked like in Oracle 11g.  They showed me the configuration in Oracle SQL Developer. I talked to them: In SQL Server, you can use server name\instance name (ie. Test1\sst01) as a data source name. How about Oracle?  They felt so confused.

I can see host name and service name in Oracle SQL Developer. But what the data source name looks like in Oracle 11g ?

After several attempts, I found data source name = host name/ service name  and connection name can be anything else.

The interest part is that SQL Server uses “\”, but Oracle uses “/” as a data source name.

Next time if you like to connect to Oracle 11g via Visual Studio, you can try this way.

January 23, 2013

Visual Studio 2012- Disable All Caps Menu


If you open Visual Studio 2012, you can see all-caps interface.  Do you like it?  If you don’t like it, you can disable it in registry key. 

Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General\

Add a DWORD (32-bit ) value ( in my Windows Server 2008 R2 X64)





Enter SuppressUppercaseConversion and Enter 1





Open Visual Studio 2012 and all-caps menu is disabled.


December 27, 2012

Test List Editor of VSTS 2010 is deprecated in VSTS 2012


In Visual Studio 2005/2008/2010, we can drag the selected tests from the Test List Editor into the test list. This is a good feature, but it is deprecated in VSTS 2012. The new feature is called Test Explorer.

If you have 1,500+ unit tests in Test List Editor  in VSTS 2010, it is not easy to upgrade those tests in VSTS 2012 because it is deprecated. 

Do you think Test Explorer is user friendly compared to Test List Editor? 

August 22, 2012

VSTS 2010 Web Performance Test -Fix the issue of A connection attempt failed because the connected party did not properly respond

Today I used VSTS 2010 web performance test to validate if passing city code to API provided by ARCGIS Online Service can return the expected result. I noticed that running the test was slow and I got the following error

Request failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 58.68.148.182:443

I added the following proxy setting.

this.PreAuthenticate = true
this.Proxy = “XXX.XXX.com";
I noticed that running the test was slow and I got the following error.
Request failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.5.18.19:80

It made me think of the following proxy setting I used before. Finally it works.
  this.PreAuthenticate = true;
  NetworkCredential credential = (NetworkCredential)CredentialCache.DefaultCredentials;
  WebProxy proxy = new WebProxy("Proxy", 8080);
  proxy.Credentials = credential;
  this.WebProxy = proxy;

August 8, 2012

Coded UI test and Web Performance Test

Here is my thought about Coded UI test and Web Performance Test.


Test Run

Pros
Cons
Coded UI Test
(Client Side)
Launch IE and simulate User Mouse Click Action.




Regression Test/ Functional Test
We can visually see the report /dashboard in IE

It takes time to finish the test run
Load Test:  simulate 100 users in 10 minutes ; the machine will launch 100 IEs in 10 minutes (not good)
Web Performance test (Server side)
Doesn’t need to launch IE and VSTS can capture the screenshot automatically. Very powerful.



Regression Test/ Functional Test
Run the test very quickly.

Load Test:  simulate 100 users in 10 minutes ; the machine will not launch 100 IEs in 10 minutes and easily run the test

Regard report / dashboard as the binary data and in the screenshot; we are not easy to see the dashboard after the tests run.


My Preference

Regression Test (BVTs) : Coded UI Test /Web Performance Test (depend on the situation)

Load Test: add some Web Performance Tests into one Load Test