Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmeter vs selenium

Hi, I want to get into test automation, and the two tools I found during my first web search are Selenium and Jmeter.

Which one do you think is the first to have a look at? Or do I need both tools as they're totally different?

What I would need is the possibility to do Clientside-Certificate-Authentication, filling forms with different Information, and checking result pages.

like image 454
icnivad Avatar asked Nov 05 '10 21:11

icnivad


People also ask

Which is best Selenium or JMeter?

JMeter and Selenium are both used for web application testing. But the main difference is that JMeter is mostly used to test the performance of web applications under load and stress. On the other hand, Selenium is best suited for automation and cross browser testing of a website.

Does JMeter use Selenium?

Jmeter can be integrated with Selenium via WebDriver Plugin support. Download the plugin and copy the jars in your “lib” folder and “ext” folder. The WebDriver sampler comes with config elements plugins for IE, Chrome, Mozilla and other browsers so that they can be invoked via selenium code written in your sampler.

Can we use JMeter for automation testing?

Page - JMeter. A range of automated testing tools are existing in the market to test application features in real time. We use Apache JMeter automation tool to perform load test and measure performance of web sites. Apart from the above we also offer performance, stress and scalability.

Which tool is better than JMeter?

Loadrunner from Micro Focus is a widely used Load Testing tool. It is one of the best alternatives to JMeter that offers a user-friendly monitoring and analysis interface with colored charts and graphics. Features: Supports continuous testing.


3 Answers

Apache JMeter is definitely tool for performance testing and load/stress tests. But you can use it also for functional tests as well (in your example: fill form ->check results but with checking if results are as expected - but better don't do functional testing with him)

For functional testing on the other hand there are Selenium and also Canoo web test.

So final answer will be to combine those two. (I was using JMeter for performance tests and canoo web test for functional testing, but I guess that Selenium is much better choice now)

like image 87
trix Avatar answered Nov 02 '22 13:11

trix


  • Use Selenium for your functional tests
  • Use JMeter for stress tests, and measure performance
like image 41
Bozho Avatar answered Nov 02 '22 13:11

Bozho


In both cases you can record a session, so you can start your Selenium or JMeter engine, do something in your browser and then stop recording. After that you can use Selenium or JMeter to run the session recorded again.

Selenium tests browser fields and buttons. In Selenium you can fill a input field and click a button, wait for the page load and then inspect the page.

Jmeter could be used for testing user-browser GET and POST communications. In Jmeter you can request an URL and post some parameters like the browser do and then inspect the page response.

PROS and CONS:

Selenium is good if you want to test javascript page functionalities.

Selenium is good if you want to have your test cases written in Java, Javascript, Python or simple html text files. Selenium can format your test cases in many programming languages. JMeter always uses an XML format for store test cases.

JMeter is good if you don't want to deal with browser versions. JMeter works in all browsers. Selenium has a wide list of supported browsers, but will always have browser requirements.

JMeter is good if you want to also record HTTP, SOAP and RESTFul protocols. JMeter can be used for record and test communications between servers. JMeter doesn't need a browser to run, Selenium does.

JMeter can run SQL queries, bash scripts, Java classes, ... from JMeter test. By the other hand, Selenium tests can be embedded in Java, Python, Javascript, ... programs.

Both supports xpath, html inspection, css inspection, ...

like image 25
Joaquim Perez Avatar answered Nov 02 '22 12:11

Joaquim Perez