Load Tests with Visual Studio

Load Tests:-

Hi Friends,

In the last section i have briefed about web tests. Now, one important piece I would like to demonstrate here is load test. So, basically a load test is a combination of Unit Test and Web Performance Test. So, as I said load test is going to simulate your application with lots of virtual users @ the same time. So, when you run the load test, some of the most crucial parts to look for are performance counters like perfmon, user statistics and many more things on the server. So, let’s go ahead and add load test in our application. So, we will do right-click on Web Test project and do the following things as shown below in the screen shot

1st

2nd

Now, click on next button. This will open a new page where in you can go ahead and set variety of test counters as shown below.

3rd

Now, as you can see in the left panel there is variety of test patterns or counters which you can set to test different scenarios. Currently for demo purpose I am good with default settings, till the point I reach the point Test Mix as shown below in the screen shot.

4th

Now, here I need to add test cases by clicking on Add button as shown below in the screen shot.

5th

Now, here you need to select the test cases which you are interested in by clicking the arrow button.

6th

Then I’ll click ok and I’ll just click on next button till the time I reach “Counter Sets”. Now, in Counter sets I would like to set couple of things like shown below

7th

Now, here I have done couple of things, 1st by clicking on Add Computer button I added two nodes, 1st node I have named as “Webserver” and added all the server side counters in that, then again I clicked on Add Computer and given the name “Database” Server and then added Sql settings in that. If you notice in the above screen shot, I have also given tag names to both the computers as it would be helpful to analyze when test is running. Now, in the next page I will set Run Settings as shown below

8th

So, here I have set the test duration for 1 minute. So, this test will run for 1 minute and capture all the data. Other things like Save the log even if test fails is set to true, that’s by default. Also I am keeping Validation rules High, as this is my 1st test so I want all the scenarios should get covered. So, now I am going to click on Finish. Once, I click on Finish button, it will generate the Load test for me with all the scenarios and counters which I have set in the wizard as shown below.

9th

Now, when I check certain properties like load pattern property, you will notice that default value is set, and that is set for “25 users” which we have chosen from the wizard.

10th

So, now we have everything in place, I’ll just go ahead and click the button on the top left and then it will produce the below result.

11th

Now, when you click on Graphs, it will display the how specific test scenarios behaved.

12th

You can also analyze the snapshot of the test counters which you have added like shown below

13th

Like this there are many more things which you will find interesting while reading the up coming book “Hands-On With ASP.NET MVC”, a complete guide to build an end to end application right from the scratch. Till then stay tuned and Happy Coding.

Thanks,
Rahul
Happy Coding

916 total views, no views today

ASP.Net MVC Poll

968 total views, no views today

Web Tests with Visual Studio

Hi Friends,

In today’s discussion I am going to discuss about Web tests. Now, web tests are part of Unit Testing. But, unit testing again test only the application logic and other things like validation rules, business rules etc, but it didn’t say anything about your application performance. Now, application performance depends on so many factors and one of the most important factor is number of HTTP Calls involved to load the page.

Now, using Visual Studio you can go ahead and configure your Visual Studio for the application in such a way, that it will record the application session and give you snapshot on application behavior. So, without wasting much time, let’s go ahead and add one additional project for Web Test project in our application as shown below.

1st

Now, when I click ok, it will create one new project for me in the solution explorer as shown below.

2nd

Now, I will delete this default template given to me by visual studio “WebTest1.webtest” and will add a new web test project as shown below. Now, as soon as I add a new web test project, it will automatically open the browser where in it will be recording your sessions. Also, if by default in your browser web test recorder won’t appear check your IE Add ONs setting and enable the same for web test recorder as shown below.

3rd

Now, since I have already enabled in my browser so, when I go ahead and click on below shown icon, it will open the browser with recording bar

4th

5th

So, as you can see in the left panel, it listed all the http requests when I clicked on various links in my application. Now, when I click on stop recording, it will take me to Visual Studio back with run results as shown below

6th

Now, when I click on the 1st icon as shown below, then it will run the test and give me snapshot as shown below.

7th

On running the test it will produce the below result.

8th

So, as you can see in the above screen shot, it has given page by page analysis, like status code, total time taken, request time and many more parameters necessary to decide your application performance. Now, like these you can test many more test like validation rule test, extraction rules test and many more. I leave this part on readers to delve more on testing part.

Like this there are many more things which is involved with any web development, you can find the same in upcoming book “Hands-on with ASP.NET MVC“. This book i have written completely case study based, started from the blank slate, completed the web development 1st, then optimized the same for Mobile browsers, then hosted on different platforms and many more tiny things which is crucial for End to End application development.  Till then stay tuned and happy coding.

Thanks,
Rahul

904 total views, 2 views today

HTML5 layout elements and their descriptions

Hi Friends,

I Have posted few of the important HTML 5 components. These are the few elements which we have been using on daily basis in our day to day development. These are the few settings which i am using during my MVC development.  so, i thought to share few of the setting name and it’s illustration.

Element Description
<article> Marks a section of the page that holds independent content
<aside> Holds content that is related in some fashion to the surrounding content
<figcaption> A tag used inside the <figure> tag that contains the caption for the figure
<figure> Defines an illustrative figure
<footer> Defines a footer for an HTML document or section
<header> Defines a header for an HTML document or section
<nav> Defines the section of the page, generally the set of links, that are used to navigate within the application
<section> Contains a group of content that is related; much like a chapter of a book

so, for the time being that’s it. so, in the next post we’ll discuss something new. Till then, stay tuned and Happy coding.

Thanks,
Rahul
Happy Coding

737 total views, 4 views today