Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 778 |  Welcome, Guest!   Register  Login
Home > Articles > Visual Studio 2010/12 > Visual Studio Data Generation Plan

Visual Studio Data Generation Plan

2 vote(s)
Rating: 5 out of 5
Article posted by Ambily.raj on 2/8/2011 | Views: 8708 | Category: Visual Studio 2010/12 | Level: Intermediate | Points: 250 red flag


Visual Studio supports the performance testing of varies applications through different types of tests like Web Test, Load Test, etc. It also support the data generation for the performance testing. Data Generation Plan helps us to populate the database with bulk amount of test data.

 

You can refer the following articles for Web performance Test and Load Test.

Web Performance Test Using Visual Studio- Part I

Web Performance Test Using Visual Studio - Part II

 

Data Generation Plan

When the data volume increases, most of the applications fail to perform better. Increase in data volume may cause deadlock scenarios or performance degradation. Volume testing before release to production will reveal these kind of performance issues. In development or test environment, we may test the application using hundreds of rows of data. But in production environment, the data volume may be very high. With the lack of enough data volume in test environment, the performance issues may propagate to production environment.

Visual studio has the data generation plan feature which can be used to populate the database with required amount of test data for volume testing. Using the data generation plan, we can perform a very good performance testing and can avoid many of the performance issues. In this article we will discuss about how to generate data for our volume testing using Data Generation Plan.

1. Create SQL Server Porject

Create the SQL Server project using specified project template. Here, I selected SQL Server 2008 Database Project template for our sample application.


 
2. Import Database

Once the project is ready, import the database objects and settings to the project. This will connect our database with the SQL project.

Right click on the project and select the option “Import Database Objects and Settings”



This will open the Import Database Wizard. Specify the database connection or create a new connection to the database. Click Start.



Once the database schema import completes, select Finish.



3. Add Data Generation Plan

Now, add a new Data Generation Plan using the Context menu.

Right click on the Data Generation Plan folder and select Add-> Data Generation Plan.



Select the Data Generation Plan item template.



4. Select Tables

Once, the data generation plan added to the project, it opens the file with all the available table names. Select the required tables to populate data. If the database import is not completed, it will open a blank page without any tables.

Specify the number of rows required in each table. If the table is having foreign key, we can specify the related Table. Ratio to Related Table indicates the relationship type as one to one, many to one, one to many or many to many.

 
You can configure the data generation method or how to generate the data for each column. By default, it will configure the values depends on the data type of the column.



5. Generate Data

Once the configuration completes, select Generate Data icon or F5 to execute the Data Generation Plan. We can either delete the data from the tables or add data to existing table. 


  

  


6. Verify the Data

Open the Orders table to verify the data. Orders table have 1000 records with random data.


 

Conclusion

Data Generation Plan available in Visual Studio helps us to populate the database with bulk amount of data. This will help in volume testing the application and also able to find whether any deadlock scenario or performance degradation is there in the application with data volume increase.

 

If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:



Please Sign In to vote for this post.

About Ambily KK

Experience:9 year(s)
Home page:http://ambilykk.com/
Member since:Tuesday, May 18, 2010
Level:Silver
Status: [Member] [Microsoft_MVP] [MVP]
Biography:I have over 9 years of experience working on Microsoft Technologies. I am carrying the passion on Microsoft technologies specifically on web technologies such as ASP .Net and Ajax. My interests also include Office Open XML, Azure, Visual Studio 2010. Technology adoption and learning is my key strength and technology sharing is my passion.
 Responses
Posted by: Karthikanbarasan | Posted on: 09 Feb 2011 02:00:46 AM | Points: 25

Nice article!!!

Posted by: Ambily.raj | Posted on: 09 Feb 2011 11:10:02 PM | Points: 25

Thanks.

Ambily

Posted by: Samarmir | Posted on: 10 Feb 2011 08:04:39 AM | Points: 25

This is an excellent article.
Very interesting. It would be nice to see more on this subject.
Another thing, you mentioned: "through different types of tests like Web Test, Load Test, etc.."
Would it be possible for you to make articles on these subjects to (web test, load test, unit test)?

Again thanks for a nice article.

Sincerely
Mohammad

Posted by: Ambily.raj | Posted on: 10 Feb 2011 10:32:25 PM | Points: 25

Hi Mohammad

Thanks.
You can find my previous articles on web Test and Load test.

http://www.dotnetfunda.com/articles/article901-web-performance-test-using-visual-studio-part-i-.aspx
http://www.dotnetfunda.com/articles/article951-web-performance-test-using-visual-studio-part-ii-.aspx

I will be writing more on Unit Test, Ordered Test, etc.

Thanks
Ambily

Posted by: Ranjit.r200 | Posted on: 12 Aug 2011 05:43:38 AM | Points: 25

Hi
I have one issue regarding the test data generation with data generation plan.

How to control [number of rows/data] Ratio of possible generated values in a column?

For example:

"Visit" table has "Visit Type" with possible values 'InPatient','OutPatient','Emergency'.


I may want to generate the data in a manner like "20% of generated data should be 'Emergency'" ,

"60% 'InPatient'" and the rest "20% 'OutPatient'".

Regards,

Ranjeet



>> Write Response - Respond to this post and get points
Related Posts

In this article we will see how to create a new category for Custom Templates with a new entry to Install Templates for Visual Studio using Extensibility Project of VS2010 SDK

Disassemble code in Visual Studio instead of ILDASM disassembler

In this article, I am going to share some shortcuts of Visual Studio. Hope this will be helpful.

In this Article we are going to leaarn,how to do Spelling Check in Visual Studio 2010

Visual Studio 2012 introduced a new feature called SQL Server Object Explorer. In earlier versions of Visual Studio, we have Server Explorer, which opens up a particular connection and work with a single database data. Now with the new SQL Server Object Explorer, we are able to manipulate multiple databases from a database server.

More ...
About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/18/2013 10:32:23 AM