Note that there are some explanatory texts on larger screens.

plurals
  1. POusing a test runner for web performance tests
    primarykey
    data
    text
    <p>We are writing an app in MVC/C# on VS2013.</p> <p>We use selenium web driver for ui tests and have written a framework around it to take make the process more declarative and less procedural. Here is an example</p> <pre><code> [Test, Category("UITest")] public void CanCreateMeasureSucceedWithOnlyRequiredFields() { ManageMeasureDto dto = new ManageMeasureDto() { Name = GetRandomString(10), MeasureDataTypeId = MeasureDataTypeId.FreeText, DefaultTarget = GetRandomString(10), Description = GetRandomString(100) }; new ManageScreenUITest&lt;MeasureConfigurationController, ManageMeasureDto&gt;(c =&gt; c.ManageMeasure(dto), WebDrivers).Execute(ManageScreenExpectedResult.SavedSuccessfullyMessage); } </code></pre> <p>The Execute method takes the values in the DTO and calls selenium.sendKeys and a bunch of other methods to actually perform the test, submit the form, assert the response contains what we want.</p> <p>We have happy with the results of this framework, but it occurs to me that something similar could also be used to create load testing scenarios.</p> <p>IE, I could have another implementation of the UI test framework that used a HTTPWebRequest to issue the requests to the web server. </p> <p>From there, I could essentially "gang up" my tests to create a scenario, eg:</p> <pre><code>public void MeasureTestScenario() { CanListMeasures(); CanSearchMeasures(); measureId = CanCreateMeasure(); CanEditMeasure(measureId); } </code></pre> <p>The missing piece of the puzzle is how do I run these "scenarios" under load? IE, I'm after a test running that can execute 1..N of these tests of parallel, hopefully do things like Ramp up time, random waits in between each scenario, etc. Ideally the count of concurrent tests would be configurable at run time too, ie, spawn 5 more test threads. Reporting isn't super important because I can log execution times as part of the web request.</p> <p>Maybe there is another approach too, eg, using C# to control a more traditional load testing tool?</p> <p>The real advantage to this method is handling more complicated screens, ie for a screen that contains collections of objects. I can get a random parent record from the DB, use my existing automapper code to create the nested dto, have code to walk that dto changing random values then use my test framework to submit that dto's values as a web request. Much easier then hand coding JMeter scripts. cheers, dave</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload