Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

What are differences between JMeter script and selenium script?

Solved 1 Answers 71 Views
0 1
I learn 2 method's

1) By recording script and apply load on it  -> view result .

2) Selenium java code -> convert  into jar -> include that  jar in jmeter  -> add junit sampler script -> apply load  -> view result.

which method will give exact performance result.

and what is the difference b/w these 2 method's

1 Answer

Best answer
If you talk about the results vs performances, both are used for entirely different purpose.

With JMeter, you can speedup the communication with the server and so you can make sure that specific function works fine or not based on the response. But, it does not really gaurrentee you that your UI works as expected.

Selenium simply helps you imitates user actions on the browser of your choice. So, you can write your code once and execute it on different set of browsers to make sure that all functionality works fine on all browser.

I will give you an example here.

Say, you have an application which has many Ajax calls. Now, you have a change password functionality that changes password through AJAX call. It is very important for you to verify that this AJAX works across all different browsers. So, if you would have used Selenium, you can easily say that your JavaScript code works fine.

But, using JMeter, it might complete the AJAX call. But, it does not say that your JavaScript function works across all browsers.

Hope I am clear.
answered by
selected by
commented by (188 points)
using selenium we can do functionality testing but we can't do performance testing .
commented by (877 points)
No, that's why we do have JMeter. Using JMeter you can trigger 1000s of users at the same time. You can do the same with Selenium as well. But, the amount of resources it requires will not make any sense to the business.
commented by (748 points)
@ Chris, can you tell me how to test selenium code using jmeter

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.