We are looking into using loadrunner for performance testing of our web application. We currently have an in-house automated regression testing framework in place for functional testing of our application (tests are run through the browser). So rather than trying to rewrite test scripts using a new tool for load testing we would like to leverage our existing tool which includes a suite of functional tests.
Our initial thoughts are to put an automated system in place that would allow us to register a subset of our existing scripts to be used for load testing. And as a part of a nightly build, this system would run the registered tests using our existing framework and record their actions through loadrunner. Then for each recorded script it would generate a specified load against our application and profile the results. So as our test scripts evolve due to changes in the application our loadrunner test scripts will evolve respectively because they are generated at runtime.
Does loadrunner have an api that would allow us to bring it up, start recording, generate the scripts, read in our load generation requirements, start the actual load testing using the generated scripts, and record the results....all of this programmatically?
Has anyone tried using Ant or CruiseControl to automate loadrunner? If so, how much control is available?
Any help is greatly appreciated... thanks,
Re: automating loadrunner
I do not think it will be possible to completely automate the process as you describe it - simply because of the scripts failing to work.
For example, it took 1 days effort to work out the new correlation my scripts required with lots of investigation and iterative debugging. This was for an incremental release.
It is possible to generate a recording using other automated tools, but the initial script will then need all the other associated work and coding applied - correlation, parameterization, validation, etc.
If the scripts change little or there is a set pattern/rule that can be used for automating the incremental scripting required, then it could be possible.
Automatically record scripts and save them with pre-determined names
Automatically apply standard correlation/parametisation/coding - as long as there is a 'pattern'. This could take the form of a simple find/replace type program that scans through the relevant action.c
Controller scheduled to run pre-determined scripts and collate data.
Analysis automatically applies template.
So it is possible, but will rely on the complexity of the generated scripts.
Something simpler would be to find out the actual changes that are being implemented per release. If URLs are not changing, then your previous scripts may not require amendment, and you will be at the stage to automate from Controller onwards (after a shakeout of the scripts of course).
The resource required to develop and maintain the overall automation may be better used employing a performance engineer instead.