Visual Studio 2017 Enterprise: Where is Load and Performance Testing Project Template


If you are running Visual Studio 2017 Enterprise and you can find the template to create a new Performance Test Project, it basically means that it wasn’t installed. Visual Studio 2017 comes with new installer and by default the Web Performance and Load Testing component is not installed. To install the component, go through the following instructions

  • Launch the Visual Studio 2017 Installer

  • Click on Modify

  • Click on Individual components

  • Check Web performance and load testing tools
  • Click the Modify button

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems.

Visual Studio Performance Testing #7: Unique Data


Some of your test scenarios require unique data. For example, if the script adds a new user account, company, personal information, address, etc, you should use unique data because most system won’t allow you to enter duplicate data.

With Visual Studio, most likely you will be using a data source with the prepared unique data. If you are using one Agent or Visual Studio to execute your load test, the tool may not reuse the data if you have enough data for your test. However, when using multiple Test Agents, it is almost guaranteed that the tool will use the data more than once. Visual Studio allows you to configure that behavior.

 

I am assuming that you have already added the data source. Expand the datasource node, expand the Tables node and select Unique from the Access Method list as shown below

 

 

With such configuration the Test Controller divides the data among the Test Agents

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems.

Visual Studio Performance Testing #6: User login Script


In the previous post, I showed how to instruct the tool to use a new user every time it executes a test iteration. But that might not be what you need when running your load test. Most of my load testing gigs have the following requirement:

-I want x number of users to login to the system

-I want those users to run the following test cases until the completion of the test duration

In other words, users should login once and keep executing test cases.

To fulfil the requirements, we need to create two scripts: one for login the user and the other contains the requests for the scenarios

In the load test file, right click on the scenario and click Edit Test Mix

At the bottom of the dialog, check “Select an initialize test to execute before other tests for each virtual user” and select the Login script. Your other scenarios should be at the middle of the dialog where my CreateCompany script is.

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems. Visit us at http://www.lajak.com.

Visual Studio Performance Testing #5: New User Per Test Iteration While Load Testing


While running a load test, Visual Studio or Test Agents iterate though the recorded requests. After the requests are completed, the tool will re-execute the requests using the same virtual user and session.

To change the default behavour and tell the tool to use a new user per test iteration you need to set the Percentage of New Users to 100

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems. Visit us at http://www.lajak.com.

Visual Studio 2017 Live Unit Tests


One of the best features in Visual Studio 2017 is Live Unit Tests. It allows you to see the lines of code that are covered by unit tests and the result of running those unit tests. Live unit tests also update the results of the unit tests and the lines on the code on the modification of the code without manually running the unit tests. By click on the red X icon on the left, you can see which unit test(s) are failing and you can quickly jump to it to fix it. The – icon indicates that the line is not covered by any unit tests. Live unit test supports MSTest, NUnit, and XUnit using C# and VB.NET.

 

For more info about Life Unit Tests, visit https://blogs.msdn.microsoft.com/visualstudio/2017/03/09/live-unit-testing-in-visual-studio-2017-enterprise/

About Lajak Technologies

A consulting firm in Ottawa, Ontario that provides services related to Microsoft technologies, Team Foundation Server, DevOps practices, security and more. Contact us today to help you solving your complex software problems.