visual studio 2015 - Fail load test when individual test cases fail -


i've implemented load test suite using mstest test cases visual studio 2015. can execute load test fine i'd fail load test run if there test failures. green success symbol text "test run completed results 1/1 passed" , have dig deeper load test report notice or test cases failed.

is possible?

update:

i vague in describing setup. clarify there are:

  • separate test project mstest classes (decorated testclass attributes) implemented can self-host wcf service or can use wcf service server,
  • a visual studio web performance , load test project and
  • a load test file (.loadtest) uses mstest classes.

i understand typically load tests use web performance tests (.webtest) can recorded using browser. opted use mstest tests instead because system under test wcf service , not web page tests hard create couldn't use browser recording.

i have setup , running , can see how system under test performs. problem if these mstest executions fail (e.g. assert.areequal fails), can see errors when read detailed test report if 1 glances @ report , sees "test run completed results 1/1 passed", might think performance test success though @ least or mstest executions failed.

the result of web test can set pass or fail in code, eg

public class xxx : webtestplugin // based on webtestrequestplugin  {     public override void postrequest(object sender, postrequesteventargs e)     {         e.webtest.addcommenttoresult("outcome " + e.webtest.outcome.tostring());         e.webtest.outcome = outcome.fail; // force failure     } } 

i have not found way of setting outcome entire load test. outcome individual tests accumulated.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -