HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

Is it possible to design headless tests with JMeter/Selenium? (and Docker)

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
jmeterwithdockerdesignseleniumtestspossibleheadlessand

Problem

There are of course Dockerizations of Selenium and JMeter - but can they work together? All the tutorials I can find discuss desktop solutions so not headless.

Solution

JMeter supports headless operation, in fact it's even the recommended mode for best load testing results. From Non-GUI Mode (Command Line mode):


For load testing, you must run JMeter in this mode (Without the GUI)
to get the optimal results from it. To do so, use the following
command options:


-n
This specifies JMeter is to run in non-gui mode

As for Selenium, things are a bit debatable, the Does Selenium support headless browser testing? SO post is probably interesting, personally I find Ross Patterson's and General Redneck's answers most useful - basically recommending the use of a virtual X server (Xvfb, for example) instead of a headless browser.

A nice related post: How To Run Your Tests Headlessly with Xvfb.

Context

StackExchange DevOps Q#2196, answer score: 3

Revisions (0)

No revisions yet.