I have been given the task of using JMeter for performance testing for our web application.
Until now I was using selenium for UI testing and I have selenium test (testNG framework) ready, which I have executed using Selenium RC.
Is any migration from selenium to JMeter possible? Failing that, some helpful tutorials on JMeter would be much appreciated.
Once upon a time, I use jmeter for load testing and had much trouble for just login to our asp.net web application. After lot of searching I write the blog asp.net login testing with jmeter.
If you are not using asp.net, then it may not be very helpful. In that case, you may visit build web test plan using jmeter
Other Links:
http://jmeterperftest.blogspot.com/
http://jmeter.apache.org/usermanual/glossary.html
Jmeter Summary Report analysis
I understand you are told to use JMeter.
Nevertheless, you could quickly evaluate other tools to check if another would not fit your needs.
I just tried gatling and could easily
record a stress test by running manually my scenario in the browser
customize the script to fit my needs
run it with multiple configuration (number of users, length of the test etc.)
You might want to take a look : https://github.com/excilys/gatling/wiki/Getting-Started
Related
I am creating basic .NET webpages as a UI, to invoke WCF service and display the result. I feel many web developers must have come across this situation, earlier.
Is there any existing tool out there, which could take WSDL as input and generate input fields either in HTML or .NET webpages.
There is also a tool named storm that I read about but I don't have direct experience with.
http://storm.codeplex.com/
Testing a service from a web page is definetely a bad practice.
Depending of your service, there are many tools available like WcfTestClient, soapUI, WCFStorm, ... but is also a bad usage.
From my point of view, you will never find any better tool than your favorite unit test framework. The test client, nor soapUI will create a test that can run in a Continuous Integration scenario.
The question in short is that we are stumbling upon BDD definitions that more or less require different states - which leads to the necessity for a mock of sorts for ASP.NET/MVC - I know of none, which is why I ask here
Details:
We are developing a project in ASP.NET (MVC3/Razor engine) and are using SpecFlow to drive our development.
We quite often stumble into situations where we need the webpage under test to perform in a certain manner so that we can verify the behavior, i.e:
Scenario: Should render alternatively when backend system is down
Given that the backend system is down
And there are no channels for the page to display
When I inspect the webpage under test
Then the page renderes an alternative html indicating that there is a problem
For a unit test, this is less of an issue - run mock on the controller bit, and verify that it delivers the correct results, however, for a SpecFlow test, this is more or less requiring alternate configurations.
So it is possible at all, or - are there some known software patterns for developing webpages using BDD that I've missed?
Even when using SpecFlow, you can still use a mocking framework. What I would do is use the [BeforeScenario] attribute to set up the mocks for the test e.g.
[BeforeScenario]
public void BeforeShouldRenderAlternatively()
{
// Do mock setups.
}
This SO question might come in handy for you also.
You could use Deleporter
Deleporter is a little .NET library that teleports arbitrary delegates into an ASP.NET application in some other process (e.g., hosted in IIS) and runs them there.
It lets you delve into a remote ASP.NET application’s internals without any special cooperation from the remote app, and then you can do any of the following:
Cross-process mocking, by combining it with any mocking tool. For example, you could inject a temporary mock database or simulate the passing of time (e.g., if your integration tests want to specify what happens after 30 days or whatever)
Test different configurations, by writing to static properties in the remote ASP.NET appdomain or using the ConfigurationManager API to edit its entries.
Run teardown or cleanup logic such as flushing caches. For example, recently I needed to restore a SQL database to a known state after each test in the suite. The trouble was that ASP.NET connection pool was still holding open connections on the old database, causing connection errors. I resolved this easily by using Deleporter to issue a SqlConnection.ClearAllPools() command in the remote appdomain – the ASP.NET app under test didn’t need to know anything about it.
I use visual studio 2005 and now my team wants me to try my hand at some testing frameworks for asp.net websites.I'm completely new to testing. I want to know what kind of automated testing can I do.Can I test my business logic,Can I test my UI.I just started using NUnit and I am getting a hang of it. For Web UI testing I've tried Nunit asp.Somewhere I found about Selenium, which of this is better.Also is there an add-in to test Javascript code with NUnit.Is there an better alternative to NUnit. I kind of find difficult to figure out why should I use this tools.
One option is to use Watin: http://watin.sourceforge.net/
There is a nice Test Recorder, which allows you to record and save your tests.
The only problem I have had with it is that it doesn't always play well with Cruise Control as it loads a browser engine in the background. If the CI server is running in an environment without the correct browsers installed and enabled, then the tests will fail. In this case we ended up using HtmlUnit, which is a java app that runs on the Cruise Control server.
http://htmlunit.sourceforge.net/
Q. We're looking for a way to automate
build process, run test cases and
store build results.
A problem could be raise as the application on which we want to setup this process is an ajax application -- a one page operation application highly rely on JavaScript. The QA team is using QTP to automate their testing.
Q. Now as we're moved to Team Foundation
Server we would like to be in the box
instead to use some other tool for
functions that can also be done in
Team Foundation. Will it a good choice to use Team Foundation instead
of other tool for defining test cases.
Once, they adopt and will generate test cases for the app.
Q. We would like to attach the test
cases with the daily build and also
like to have log/report for monitoring
build progress.
This, I assume, but you can also suggest a practice which can make the aforementioned process more effective and quick.
Thanks.
TFS has a built in test runner but it is aimed at MSTest. What test framework are you using? TFS uses MSBuild in the background and has a template build script with hooks to allow you to customize the process. Read up more about it here.
There is an TFS Web Test but I haven't looked into it much there is nothing stopping you hooking in some open source framework like Selenium into the build process
3.TFS keeps a log of all the builds done much the same as CruiseControl would.
I would recommned "Team Foundation Server 2008 in Action" as it is a very good book that explains a lot about TFS.
I'm trying to do load testing against an ASP.NET web site and I need to be able to parametertise field value of a page to test different code paths.
I had great success with JMeter when load testing a JSP web site before. However, because ASP.NET encodes all form values in the ViewState, changing control values does not really work.
I Googled this problem and people said the web testing tool in Visual Studio Team Tester Edition works well with ASP.NET pages. However, it cost quite a bit so I am just wondering does anyone know how to get around the ViewState issue with JMeter or WAPT?
I've used WebLoad before. Its scripting language is basically JS, so you may be able to find controls on the page using JS and invoke them as part of your load script.
WebLoad is free.
I've figured out how to do this, basically you cannot simply record a static script with JMeter. What you need to do is to record a request, send it, capture the viewstate in the response and send the viewstate back in next request.
If you need more details, I've documented how to do this along with some screenshots on my blog post
As webapps get more complex (ViewState, AJAX, etc) it is tougher and tougher to use traditional load testing tools. That's because they try to jam a ton of virtual users on a very small amount of hardware resources.
My company, BrowserMob, took a different approach. We build a load testing service that uses real web browsers to drive load. Your scripts end up being essentially functional tests (specifically Selenium scripts). My background has been in Selenium for some time (I created Selenium RC and founded OpenQA.org), so as soon as cloud computing made it possible to rent the 5TB+ of RAM necessary to do this, I jumped on the idea :)