Data driven works on Performance testing but how will it work on load test - visual-studio

I have created Web performance testing using visual studio 2017, Most of the pages are data driven by Login, Change of lists etc is there
I have added extraction rule, and when i do load test of the same WPT it gives me errors 403 and fail's the test
My question here is how should I make it work
Thanks in advance

A 403 error usually means that your VS script is failing at login. It is most likely happens due to one or several dynamic values that VS plays back as recorded. To fix it you need to find and manually correlate them by creating extraction rules and parameters somewhere at the beginning of your script.
It looks like you already created some extractors, but if your script is still failing, chances are that you did not create all of them. Try the manual correlation technique described in my article.
Or check our Web Test Builder for Visual Studio referenced here to automatically create missing extractors and parameter.

Related

Coded UI Test Builder fails to generate code

The coded ui test builder is failed to generate code. i created the new test project and added the coded ui test file. i have chosed the option 1.Record options then the Test builder is running.
when i record the actions and trying to generate code
it is throwing error
"Object reference not set to an instance of an object"
Kindly help in this.
There is no simple answer to this from the very small amount of information in your question. Searching the web for the error message (eg searching for "coded ui Object reference not set to an instance of an object" and variations) provides many cases of people getting the same message plus, in some cases, their solutions.
One possible cause is that the UI Map file has been edited in a text editor, leaving XML that the Generate tool does not understand. Another possibility is that Visual Studio has become corrupted and should be reinstalled.
To narrow down the possibilities, determine whether the problem is specific to one project, to one computer or to one user. Try creating a new Coded UI test in a new Visual Studio solution to drive a simple application (eg the Windows Calculator) and see whether the generator works OK. Copy the failing project (and the whole solution) to another computer and see whether code can be generated there. Try logging in as a different user on the same computer and generating code for the same project and for different projects.

Web performance testing with datasource in vs 2012

I'm having some issues with my web performance test that I created in Visual Studio 2012. I've created a test to go through our order system, but on the first run of the test it has errors on the page where you select orders. If I run that same test again it seems to work.
Since I am using a data source containing usernames and passwords, I only have one performance test and it runs once for each user in the data source. When it runs it passes the first test, but each additional user causes errors on that page which results in an empty shopping cart. It seems like an issue with POST variables not being generated or passed for each user after the first in the test.
Does anyone know how to fix this without having to create a web performance test specifically for each user? Using one performance test with a data source is so much nicer.
Thanks!
The web performance system is intended to allow data driven tests in the style you want. Your web site probably has some parameters that Visual Studio has not detected. The mechanisms built in to Visual Studio for detecting dynamic parameters are good, but not infallible.
First step. Just read through the recorded test including form parameters looking for things that may have been missed. You learn what they are through experience.
Another step. Record two versions of the same test, as closely as possible perform identical steps. (But do not worry about think times.) Then compare the two recorded tests. Look for form post parameters and other values that differ and consider whether they should be taken from earlier responses. Find which responses the values come from and write the appropriate extraction rules to create the context parameter.
It can also be worth recording and comparing two tests that are identical expect for user name and password used.
As well as recording tests with Visual Studio and comparing the files, it can be worth recording with a program such as Fiddler.
I have found that comparing the ".webtest" files with a good text comparison program helps find the differences, then make the edits within Visual Studio. If you are confident and keep backups you might edit the XML in the ".webtest" files.
Update: Note on comparing the .webtest files. Look at where the RecordedValue="..." fields differ but the associated parameter fields are not replaced by context variables.

Web test details are not displayed when ran from an ordered test

I have an ordered test that contains 4 web tests. The problem is that Visual Studio seems to have a problem loading the test results for an individual test.
I included a screenshot to supplement for the 1000 words. :)
As you may see the 3rd test, called intuitively Webservice03, failed. The screenshot above was taken after I double-clicked on the corresponding line to open the detailed information about that test run. The panels with requests and other useful information are empty.
The issue is quite annoying, because the test is part of a bigger test suite that runs periodically, so when it fails, I have to manually disable the setup and cleanup scripts from the test configuration, run them manually, then run each of the tests manually, instead of just comfortably opening the test results.
Did anyone experienced this problem?
Thanks.
Version details:
Microsoft Visual Studio 2010 Ultimate
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel
I had the same problem and tryed to clarify it via Microsoft forum:
Web test details are not displayed when ran from an ordered test
According to the answer you can not have detailed test result for a web test run as a part of an ordered test.
Here is an alternative to Ordered Tests:
Add the web tests to a load test
In the test mix choose 'Test mix based on sequential test order'. This will achieve the same thing as an Ordered Test.
In the load test run settings, make sure 'Save Log on Test Failure' is set to True:
Set a Constant Load Pattern of 1 user
At the end of the "load" test you will be able to see the number of failures and on the Tables view you can click on the error count which takes you to a dialog that lets you browse the individual web test failures.

VSTS Load test reports

We've setup some different load tests and need to generate/send the result pr. e-mail, a link, pdf or similar. The output and metrics are saved to a database (resultstore), but I haven't been able to find too much information on how to generate a report without having visual studio. One thing that comes into mind, is creating a custom report in reporting service (any one know of existing reports I could use?).
Any thoughts?
Thanks
Ended up with creating a report myself using reporting services. If I can make generic enough, I'll post it here.

WebTesting using VSTS 2008

I've been trying to create and execute webtests for one of my websites using VSTS 2008 SP1. The problem is that during playback VSTS does not play back the javascript. How can i solve this and where can I find comprehensive information on configuring VSTS to do web tests exactly as i want.
Unfortunately webtests work on a request response basis and only validate based on the contents of those. VSTS is not going to be able to run the javascript in the context of the returned html response.
It is theoretically possible to instanciate a browser object from your coded webtest and feed it the returned html+javascript and check modifications made to the html after that, but I don't see that would really end happily.
The "correctness" of your Javascript is also highly browser dependant, so you really need to test this on each of the browsers you require. Like Css and look and feel, this is still going to require manual testing.
However, Visual Studio 2010 now has a coded UI test that will allow you to test your pages in the way you want.

Resources