VS2010 Load Test Failing - Cannot Open Database - NOT The Load Test Results database - visual-studio-2010

Hi I have been battling with this issue all day. I have a vs2010 load test which consists of three scenarios which are composed of three different web performance tests.
Each of the web performance tests select urls from a database which is configured correctly and runs locally. However when the load test is run remotely it fails with the error:
Could not run load test 'Load Test' on agent 'AGENTSERVER'. Could not open the database 'URLSDB' requested by the login. login failed for useraccount
In an attempt to get this working the agents and controller are set to run under a domain admin account, I can login to the database through Management Studio. I've checked the connection string and can run the test locally but not remotely. Does anyone have any ideas? My next step is to set the connection string to the UrlsDB to use SQL Authentication

Finally managed to resolve it at 01:20AM. When checking the datasources of three individual tests which made up the mixes in the scenario, I found that the UI was showing that once one had been updated all three updated the connection string so that is why I was baffled as to why I was getting these errors, plus the error doesn't indicate which connection was having the issue.
So to eliminate the tests as being the issue I removed the datasource from each test and created individually named brand new datasources all till effectively pointing to the same sql server and the same database. Then I ran the tests and all performed correctly, finally!!
So the core issue was the connection strings in the underlying tests were incorrect. Will be testing the UI further to check if I was just my own error or there may actually be a bug in the UI, if I find a bug I'll report it.
Thanks to those who took the time to try to help me solve it, gutted that the issue was so minor when it had me baffled for nearly 20 hours :/

The domain admin account you are running the test from cannot connect to the database server from the agent machine.
Log into the agent and debug the database connection from there.
Please be aware that a thread blocking call inside a web test, such as this may cause issues with your load test. I recommend that you load all test url's during the test instanciation if at all possible.
Essentially minimise the database calls to as few as possible.

Related

Distributed JMeter test fails with java error but test will run from JMeter UI (non-distributed)

My goal is to run a load test using 4 Azure servers as load generators and 1 Azure server to initiate the test and gather results. I had the distributed test running and I was getting good data. But today when I remote start the test 3 of the 4 load generators fail with all the http transactions erroring. The failed transactions log the following error:
Non HTTP response message: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory (Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory)
I confirmed the presence of commons-logging-1.2.jar in the jmeter\lib folder on each machine.
To try to narrow down the issue I set up one Azure server to both initiate the load and run JMeter-server but this fails too. However, if I start the test from the JMeter UI on that same server the test runs OK. I think this rules out a problem in the script or a problem with the Azure machines talking to each other.
I also simplified my test plan down to where it only runs one simple http transaction and this still fails.
I've gone through all the basics: reinstalled jmeter, updated java to the latest version (1.8.0_111), updated the JAVA_HOME environment variable and backed out the most recent Microsoft Security update on the server. Any advice on how to pick this problem apart would be greatly appreciated.
I'm using JMeter 3.0r1743807 and Java 1.8
The Azure servers are running Windows Server 2008 R2
I did get a resolution to this problem. It turned out to be a conflict between some extraneous code in a jar file and a component of JMeter. It was “spooky” because something influenced the load order of referenced jar files and JMeter components.
I had included a jar file in my JMeter script using the “Add directory or jar to classpath” function in the Test Plan. This jar file has a piece of code I needed for my test along with many other components and one of those components, probably a similar logging function, conflicted with a logging function in JMeter. The problem was spooky; the test ran fine for months but started failing at the maximally inconvenient time. The problem was revealed by creating a very simple JMeter test that would load and run just fine. If I opened the simple test in JMeter then, without closing JMeter, opened my problem test, my problem test would not fail. If I reversed the order, opening the problem test followed by the simple test then the simple test would fail too. Given that the problem followed the order in which things loaded I started looking at the jar files and found my suspect.
When I built the script I left the jar file alone thinking that the functions I need might have dependencies to other pieces within the jar. Now that things are broken I need to find out if that is true and happily it is not. So, to fix the problem I changed the extension on my jar file to zip then edited it in 7-zip. I removed all the code except what I needed. I kept all the folders in the path to my needed code, I did this for two reasons; I did not have to update my code that called the functions and when I tried changing the path the functions did not work.
Next I changed the extension on the file back to jar and changed the reference in JMeter’s “Add directory or jar to classpath” function to point to the revised jar. I haven’t seen the failure since.
Many thanks to the folks who looked at this. I hope the resolution will help someone out.

Unable to get performance counters from certain servers when running load tests

I am running load tests using the built in system in Visual Studio 2010. The setup is a test controller with four agents. The tests that I am running will put load on an application server and a database server. The problem I am having is that I am unable to get values from the performance counters on the application server and the database server. I have followed the instructions on http://msdn.microsoft.com/en-us/library/ms404661%28v=vs.100%29.aspx and http://blogs.catapultsystems.com/tlingenfelder/archive/2009/06/18/performance-counters-timeouts-and-load-testing-with-visual-studio-2008.aspx in order to troubleshoot, but to no avail.
Using Performance Monitor (perfmon) I can connect and get values from the performance counters on the application server and database, tested from several computers. But when running the load tests, I get nothing.
I am trying to get system performance counters like CPU% and memory usage, so there are no custom counters involved.
Any hints as to what I shoud do next?
The main problem was that I was not aware of that in order to get performance data from a computer during load testing it should have a test agent (or controller) installed on it.
Install test agents and register them with the controller on all machines used for load testing (for me, the appserver and the database, those did not have test agents installed)
In the actual load test in Visual Studio, remove the appserver and database from the counter sets
Add them again
Run the test!
Seems like the old reference to the appserver and database in the load test did not work as expected, hence the need to remove and add them again.
Voila! Performance counters appears and returns values!
I have also the same problem.
The only solution I found is to remove some counters in counter sets and also increase the sampling interval (see here).
Another things that i have in my rig are Roles : agents will run tests but not collect data ; this will be done by my web server (installed a test agent on it). Please look at the link.

Oracle 12519 : Issues while running integration test suite

I have a test suite which contains about 4000 tests in it. We use Oracle as our database .
When i run the test suite , some tests run fine and after some time i get ORA-12519 TNS:no appropriate service handler found
When i run the tester in isolation , it works correctly , so guess the issue is with the connection to the oracle database located on my machine
I followed couple of posts online and did Run the command “alter system set processes=150 scope=spfile;” in the SQL*Plus but that did not help too
Did some one experience this issue before and what do i need to do to get if fixed?
I would be awesome if some one could explain the cause and the required action
Thanks
Sql*Plus as system and use this
alter system set processes=600 scope=spfile; (instead of 150 , i set it to 600)
Make sure that you restart your database.
This is answered here
What can cause intermittent ORA-12519 (TNS: no appropriate handler found) errors
Thanks

Load Testing in VS2010 doesn't seem to report results

I do the following:
Create a Web Performance Test. Browse around cnn.com while the recorder records the steps.
Create a Load Test. Go through the wizard, attach the Web Perf Test created in the previous step.
Run the Load Test. It seems to run fine with all kinds of colorful statistics and I can see requests going out via TcpView utility. The screen looks like this, while running:
When it's all done, I get a blank screen without any results (see below).
Am I missing something simple?
Load Tests results need to be stored in a database. Have you configure the connection string for the sql server where the LoadTests2010 database exists?
If not, check these links to see how to create the database and configure the connection string:
How to: Create a Load Test Results Repository Using SQL
How to: Select a Load Test Results Repository

Problems with Database Deployment using VS2010 (Package/Publish SQL tab)

Background:
I am using the deployment tools in Visual Studio 2010.
I right clicked my project and selected Package/Publish settings. Put all my settings in there ...
I am then using "web deploy" to tranfer the files to my remote server running a remote agent service and this is working fine. The transforms i have on my Web.Release.config do their thing and the server can access the database I created manually.
Problem:
My next step was to get the Database Deployment working too.
I went into the Package / Publish SQL tab and entered my Connection string for the destination database.
(Data Source=MyDBServer;Initial Catalog=Database2;User ID=User;Password=pass)
This database is empty ready to accept the import.
I also enter in the connection string for the source database. This lives on the same server.
(Data Source=MyDBServer;Initial Catalog=Database;User ID=User;Password=pass)
Database Scripting options are set to Schema and Data (changing this makes no difference) and the database scripts are set to [Auto Generated Schema and Data]
When i deploy this now, i get the error:
Error 4 Web deployment task
failed.((09/06/2010 16:41:51) An error
occurred when the request was
processed on the remote computer.)
(09/06/2010 16:41:51) An error
occurred when the request was
processed on the remote computer. The
entry type 'Unknown' was not expected
at this time. The serialization stream
may be corrupted.
Additional Info:
I can successfully create a package with no problems. I looked at the contents in the zip and can see the SQL is generated fine (so no problems connecting to the database). I can then copy this SQL and run it as a new query on the new database and the tables and data are created fine.
I can not seem to work out where this is going wrong, i googled the error and there are no entries on the whole internet. Anyone have any ideas?
Addendum:
To get some further idea of what might be going on, i sent the package across to the server and imported it using IIS. It told me i needed SQL Server Management Objects. So I installed that.
Next attempt it told me my user did not have permission to create the database, I thought excellent this must be the problem. :Granted access - Re-run. Passed!
So i deleted all the tables and went back to VS2010 clicked publish and i get the same error. :(
Sorted it!
Thank goodness, i was totally out of ideas when i went back to a video by hanselman. He mentioned that the Web Deployment Agent can have permissions. I went in had a look and there was a tab in it's properties called log on.
I entered the detials of an account with a decent level of access and clicked okay.
I then restarted the service as requested to enable the changes.
I then went back to VS 2010 and clicked Publish Web.
Music to my eyes, i see the words "Publish succeeded", I check the database and the tables are there. Excellent!
I think i scared the office by getting a little over excited, if you get this problem and this solution fixes it for you, try to hold in the temptation to shout out "YES!, yes, get in!" while laughing maniacally or people will think you're weird like me.

Resources