Is it capable of doing load testing?
eggPlant can be used for load testing in a couple of different ways. If you’d like, I can send you a white paper outlining how you can use it, but it boils down to 3 different approaches:
- Using multiple eggPlant licenses, each representing a virtual user
- Using a single eggPlant license to rapidly switch between machines and start a long process (i.e. start a video playing)
- Using eggPlant to measure user actions, in conjunction with a traditional load generation tool.
Let me know if you have any questions or you want a copy of that white paper.
That’s not something I was looking for, but thanks for letting me know.
Thanks for the question. What kind of testing were you looking to accomplish? We might be able to help you out.
You certainly could load test a server, or application on a server via a number of protocols, http, ftp, ssh or other server type requests that either render a response or simply start a process and then finish (to be checked later by same script).
All these can be accomplished in the Sensetalk scripting language, called with a remote command (with system() or the url command) with response times looked at under load or seen via a ssh to the server in question. Times and load analysis can be done dynamic or static post completion.
There are plenty of ways to load test, the real question is what are you trying to test and conditions in which you are allowed to test. You mileage will vary, so clarity on your needs to best answer your question would help.
In my testing I am often asked to test response time of the UI. An action is performed and the system makes some indication in the UI that the action is complete.
Is there a good way for Eggplant to give me a time between these two actions, preferably in milliseconds? I understand how to test for being within my desired limits, but I don’t know how to get the time it took into a variable in Sensetalk so that I can perform calculations on it.
Up to now, I’ve been using the script logs to determine if the timing was successful. I would love to be able to automate it so that I can just look at pass / fails in the reports.
This question comes up frequently and eggPlant makes it really easy to handle:
put now into startTime -- do something put now minus startTime into elapsed if elapsed is more than .5 then logError "action took too long" end if
Executing the logError command causes the script to be logged as a failure, regardless of whether the rest of the script executes successfully.
Does that code log the TIME it took? I would try it out but my Eggplant is tied up…
And then my question is how to organize that information?
Let’s say I have an iPhone and I click on a VIEW ACCOUNT INFO button on the application I’m testing. I want to know how long it took for that account information to load. I use your code… I get the TIME? … but then I want to run this in a loop all night and graph it.
I could do a PUT to a file on my desktop? What would be cooler would be to PUT that TIME into an XLS… but I could probably use automator for that. Then I would get a handy graph showing my performance.
You know… my results need to be “Purty” for the client. And the higher up the food chain you go the more colors you need… e.g. Graphs.
I’m rambling. But what I’m getting at is… if you wanted to report the performance TIMES for a particular action in your UI. Over Time. And put those TIMES in some handy graph-able format… WWMD?
(What Would Matt Do? - has a nice ring! You should make bumper stickers.)
You don’t need to put the output into an Excel file, just into a file that Excel can read. Usually that means a comma or tab-delimited file, although if you’ve only got one column of data, it’s just going to be one entry per line. So you could have code like:
repeat 1000 times put now into startTime Click "View Account Info" Try WaitFor 30, "info loaded image" put now minus startTime into elapsed put elapsed & return after file "path/to/myfile.csv" Catch LogError "Account info failed to load within 30 seconds" put "1000" & return after file "path/to/myfile.csv" end try if elapsed is more than .5 then logError "action took too long" end if //do something here to reset the device state end repeat
Then you can open that file in Excel and use that to make a graph. On the Mac you could even have the file open from your script:
open "path/to/myfile.csv" with "Microsoft Excel"