kasiprasad/performance.testing.utilities
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
----------------------------------------------------------------------------------------- Performance.Testing.Fluent.WebTesting.Framework Includes some tools helpful when working on performance testing using Visual Studio 2010 Web Performance Tests & Load Tests FluentRequest - A utility class with extension methods for Microsoft.VisualStudio.TestTools.WebTesting.WebTestRequest i.e. - FluentRequest.Create("http://mywebsite/customers") .POST() .WithJson(new Customer { FirstName = "John" , LastName = "Doe" }); BaseWebTest - A very light base class which sets the PreAutheticate property to true on all requests ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- Performance.Testing.Utilities.ReportConsole This tool was designed specifically to parse Micorosoft Visual Studio 2010 TRX report files for the purpose of generating a customized request centric Load Test report model (perserved in a MongoDB) which can be displayed using the Performance.Testing.Utilities.ReportWebsite This tool was intended to aid in the automation of web application performance test runs during the continuous integration process by producing a more detailed and customizable model projected from the default Microsoft Visual Studio 2010 Load Test Database. TUTORIAL: One of the required inputs to this tool is a Microsoft Visual Studio 2010 Test Report File (.trx). An easy way to reliably produce one of these using automation is from the command line. Here's an example of my typical mstest.exe command mstest.exe /testmetadata:performance.testing.utilities.vsmdi /testlist:Benchmar�k /resultsfile:TestResults\PerformanceTestingExample.Benchmark.trx /runconfig:local.testsettings Please see http://msdn.microsoft.com/en-us/library/ms182489%28v=vs.100%29.aspx for more information on executing mstest.exe from the command line. The important part of this step is to produce a TRX file containing at least one LoadTestRun and one inner LoadTestResult xml element. IDENTIFYING THE APPLICATION-UNDER-TEST'S VERSION In order to identify the application-under-test's version number, this program expects that the .vsdi and inner TestList you specified when executing mstest.exe includes not only the list of Load Tests you would like to exectute during the run, but a single Web Performance Test pointed at your target application's Version.txt file (a Version.txt file is a convention we use on all of the web apps which we produce allowing us to make an HTTP Request to our web application and quickly learn the application's version number, for example 1.2.3.4-12345. We generate this file during the build process and place it in the web applications root output directory). When this tool detects the presence of a WebTestResult (the result of executing the Web Performance Test) in the resulting Test Report (.trx), it will assume that this result is for your Version.txt file and it will attempt to parse this result into a version number (the format expected is A.B.C.D-[CHANGESET]). NOTE: All Web Performance Test's executed as part of your mstest.exe run will be ignored from the generated report. If you do not include a Web Performance Test at all this tool will skip version number identification and continue. ENHANCING VISUAL STUDIO 2010'S LOAD TEST REPORT Next, we will need to add a few customized stored procedures to the Microsoft Visual Studio 2010 Load Test Database that comes out of the box with Microsoft Visual Studio 2010 Ultimate Edition. These stored procedure scripts can be located at: src\Performance.Testing.Utilities.Data\LoadTestDB\Scripts Reporting_GetRequestDetails.sql Reporting_GetRequestsBySec.sql Reporting_GetRequestSummary.sql These scripts will make it possible to generate the request centric load test reports for which this application was purposed (breaking down the number of requests per second so that it can be displayed easily, etc) Next set the Performance.Testing.Utilities.ReportConsole.exe.config's ConnectionString definition for the name: Performance.Testing.Utilities.ReportConsole.Properties .Settings.MongoLoadTestReportDatabaseConnectionString (Ensure your MongoDB has a LoadTestReports database, the app will ensure the proper collections are availalble) Execute Performance.Testing.Utilities.ReportConsole.exe Usage: Performance.Testing.Utilities.ReportConsole.exe --i:[INPUT_DIRECTORY] --o:[OUTPUT_DIRECTORY] --app:[APPLICATION_NAME] --url:[ReportViewer_aspx_Web_Url] --i: Input directory - a directory containing .TRX report's (the tools will iterate through all available TRX files found in this location --o: Output directory - a directory in which you would like a performance_testing_results.html file generated (the expectation is that you will publish this file to your CI server as build artifact which when viewed in a browser can be used to compare this report with the previous report from the ReportViewer website. --app: Application Name - used to display the application's name on the top of report's but most importantly, its used to identify previous test runs against the same application (please be consistent with the application name parameter, between test runs --url: ReportViewer Url - the url of ReportViewer.aspx from the ReportWebsite When executed, this application will generate a Report model object and place it in MongoDB for usage by the ReportViewer application. Additionally, it will generate an html file referencing the report generated compared with its most recent execution ----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- Performance.Testing.Utilities.ReportWebsite This web site hosts the ReportViewer.aspx page which is designed as follows: -Checks for the existence of a querystring parameter named: report uses the value provided to search the LoadTestReports (MongoDB) database for a matching record (on LoadTestDBId) -Displays a customized request centric load test report (based on a Test Run) TUTORIAL: Simply create web.config ConnectionStrings entry named: Performance.Testing.Utilities.ReportConsole.Properties .Settings.MongoLoadTestReportDatabaseConnectionString (this ConnectionString value should most likely be the same you used when you executed: Performance.Testing.Utilities.ReportConsole.exe see above for more details) NOTE: This is a traditional web forms web site, built using .NET 3.5 however there is only a single feature implemented requiring server-side .NET (a MongoDB query - findone on a specific LoadTestDBId). This site could very easily be ported to almost any .NET web based framework (i.e. - MVC2/MVC3/MonoRails/Fubu.NET/ServiceStack.NET/etc) or any other platform supporting communication to MongoDb Server (Rails/PHP/Java/Node/etc). All of the rendering/view logic is implemented client-side using KnockoutJS (with JQuery & JQueryUI) (also wijmo charts but I will probably need to migrate). ----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published