I have developed automation scripts for end to end workflows using selenium webdriver io for my web application. I want to use same scripts for load testing. My requirement is to test web UI along with backend APIs for 20K users. Can you please suggest how I can achieve it with Selenium?
For 20K users you will need 20k browsers, for 20k browsers you will need I don't know how many in reality, but looking into Firefox 87 system requirements:
a CPU core per browser instance
2 GB of RAM per browser instance
If you have such a supercomputer somewhere or possess a budget to kick off that many machines in cloud - you can scale your Selenium tests using i.e. K8S cluster
However it might be a better idea considering converting your Selenium tests into HTTP-protocol-based load tests, the majority of load testing tools provide HTTP Proxy server for recording tests so you can replay your Selenium tests via this proxy and get them converted into a load testing tool script.
Protocol-based tests have much smaller footprint in terms of CPU and RAM so you should be able to use reasonably small hardware for conducting your tests.
Related
Finding a current-day Text-based Browser with Javascript support is a challenge. Can headless Chrome be used as a javascript processor while making use of piped throughput into Lynx's setup for human to html interface? If there is a simple functional way, or even a reliable convoluted functional way to enable both html and javascript in one text-based web browsing setup, please tell me. The available options for Ubuntu resulting from duckduckgo search and wikipedia list lookup all spell garbage when actually installed and run. The best hint was to use headless Chrome with a Lynx screen dump, but for the interactive quality a browser is built for, how can the two be combined in practical terms? If other current day options are better for this request, please feel free to kindly redirect. It seems that text-based browsing is boycotted by some free web server options, and javascript is needed to make for practical use of the services without denial of page serving. Please help if willing.
So far have only tried:
google-chrome --headless --disable-gpu --dump-dom https://stackoverflow.com | lynx -stdin -dump -nolist
from an Ubuntu terminal window, but lynx's interactivity is not utilized with this setup. How can it be?
A meteor.js 0.82 app is running on an Ubuntu 14.04 server with 2GB memory and 2 cpu cores. It was deployed using mup. However the CPU utilization is very high, htop reports 2.72 load average.
Question: How do I find out which part of the app is causing such a high CPU utilization? I used Kadira but it does not reveal anything taking up alot of CPU load afaik.
Does Meteor only use a single core?
I had a similar problem before with Meteor 0.8.2-0.8.3. Here are what I have done to reduce the CPU usage, hope you may find it useful.
double check your functions, ensure all function has proper return, and does properly catch errors
try to use a replicaSet and oplog mongo convert standalone to replica set
write scripts to auto kill and resprawn a node process if it exceeds 100% cpu usage
utilize multi-core capability by starting 2 processes (edit you have done already) and configure and setup load-balance and reverse proxy
make sure to review your publish and subscription and limit what data to be sent to client (simply avoid something like Collection.find();)
Personally I recommend Phusion Passenger, it makes deploying Meteor applications an ease, and I have used it for several projects without any major problems.
One more thing, avoid running the processes in root (or privilege user), you should be running your apps in another user like www-data. This is for obvious security reason.
P.S. and multiple mongo processes showing in htop are threads under a master process, you can view it in tree mode by pressing F5.
I came across Test Swarm which jQuery uses for running JSUnit (Qunit) tests across all browsers (real ones). I can download and install test swarm on my machine and get loads of VMs fired up to load and connect all browsers, but I was wondering if there is a service around it already?
Configuring all browsers (including mobile ones) and getting them connected to testSwamp to run my tests is a big pain. Is there a public community / swamp where I can get an access so that I can submit my jobs and get the results back by some callback something?
Any other alternative to this?
Thanks
Sparsh Gupta
You can integrate TestSwarm with a browser virtualization service as an alternative. Here are a few:
MogoTest
CrossBrowserTesting
SauceLabs
Browserling
Does anyone have any recommendations on how to get started with node.js "net" performance testing?
I want to see how my app will scale and want to test 10,000+ concurrent connections!
EDIT: I want to know so I can see if my Ubuntu server configs are correct, etc.
Professional performance testing tools are agnostic to your underlying technology (node.js / .NET), and see just the output (HTTP Requests and responses), so any tools can do.
There's HP's LoadRunner and a lot of others. I have used WebLOAD, which is more cost effective, and a bit easier to use.
10,000 concurrent connections. Hmmm. I would think that such a load would have to be tied to a user population for your app somewhere in the 500,000-2,000,000 range with a 2% to .5% level of concurrency respectively. If this was an internal facing corporate app then your user population expectations would be somewhere in the 83,333(12%) - 125,000 (8%). These concurrency models come from 15 years of observations in corporate and internet facing applications for levels of concurrency vs the defined user population for a given application facing model (internal corporate vs public internet).
The reason why I bring up the above is that you may be over stressing your component for its defined use and as a result you could have some engineering ghosts that you chase down to fix. This can impact your budget and availability to hit other issues that may show up in production use.
Just food for thought,
James Pulley
From the video it seems that memory usage doesn't budge because it doesn't spawn new processes, which is precisely the reason it has picked up a huge following. That's what event driven/non blocking can do
Please forgive a question that has been addressed in some form or fashion previously. I have numerous test applications that run on various platforms from Windows 95, Windows XP, SUSE, RedHat, and other forms of *NIX. Currently, the mechanism has a native application that queries a database for some information then launches the test application to perform the test. This said program is a "launcher application" which I am trying to convert to a "HTML/Javascript Launcher Application". In addition, this "launcher application" needs to known when the test application is completed, then collect the test result then store the results in a database.
I have read that launching an application (executable) from HTML is not permitted, but this is entirely true in the sense (if I understand correctly). From what I have read here on SO and other sites, I have the following possible solutions:
Registering a unique protocol to an test application (SO Link)
Using Java to launch the application
Adobe AIR or its opensource counter part, Titanium by Appcelerator
Using WSH, though this will only work on Windows platforms
What would be a good (or best ) approach to solution this problem? Ideally, I would like to just use HTML and Javascript, but this may not be possible? Thanks for any advice and any example/sample code would be greatly appreciated.
Mark
Hopefully many people will think, as I do, that this is a 'bad idea'™, simply because in order for it to work you must allow your browser to launch software, which would be a huge hole in security, allowing access for all sorts of nasties.
Given you are cross platform I'd suggest you stick with a dedicated laucher application, but code it in java. This is the most common solution used in the java applications world which regularly crosses os's.
You could give JNLP (java network launch protocol) a try... Really easy to distribute and deploy full fledged applications in a platform independent manner. More or less through the browser if you like...