I am a software architect
we use selenium tests with nunit and c# i am trying to run jmeter load testing using firefox jmeter recorder (for blazemeter)
i was sure selenium has its own cross platform language that you write to but looking at the tests my teams wrote i see it all 100% c# and typed c#
how can i take some of their tests and put them in the jmeter? does anyone know of a way to do this ?
3 Answers 3
Selenium WebDriver uses JSONWire protocol which is cross-platform. It provides different client libraries i.e. for C#, Java, Python, Ruby, JavaScript.
Once you have tests developed in C# - the easiest option to convert them into JMeter test is record and replay.
You can just record running Selenium tests with JMeter's Proxy Server
- Follow instructions from JMeter Proxy Step by Step guide to get recorder up and running. By default it launches proxy on port 8080
Configure Selenium tests to use JMeter proxy. C# and Firefox example:
FirefoxProfile profile = new FirefoxProfile(); string jmeterProxy = "localhost:8080"; OpenQA.Selenium.Proxy proxy = new OpenQA.Selenium.Proxy(); proxy.HttpProxy=jmeterProxy; proxy.SslProxy=jmeterProxy; profile.SetProxyPreferences(proxy); FirefoxDriver driver = new FirefoxDriver(profile);
- Add View Results Tree listener to check whether your test is doing what it should be doing
- Perform parametrization if required (like different usernames for different virtual users) it is usually being done via CSV Data Set config
- Add virtual users
- Run the load test
-
I will definitely check this out.Mickey Perlstein– Mickey Perlstein2015年11月25日 15:21:51 +00:00Commented Nov 25, 2015 at 15:21
If you are not locked to Blazemeter and JMeter, you can accomplish similar with Microsoft's own load testing tool (but there is a cost associated)
I found a tutorial on how to integrate the two, hopefully it will help as a starting point.
-
maybe we should reconsider this yet again. our main reason for using blazemeter was the selenium tests. not taht we now they are in compatible, maybe we should reconsiderMickey Perlstein– Mickey Perlstein2015年11月24日 10:53:49 +00:00Commented Nov 24, 2015 at 10:53
-
1"not taht we now" => "now that we know"Michael Durrant– Michael Durrant2015年11月24日 12:01:46 +00:00Commented Nov 24, 2015 at 12:01
As far as I am aware the answer is that its not possible. This mainly comes down to JMeter depending on JUnit.
Blazemeter themselves don't offer support for it
-
thanks @ECiuleo, this is what i found too. I hope someone will make a better observation or offer another more cross platform solution :(Mickey Perlstein– Mickey Perlstein2015年11月23日 17:45:16 +00:00Commented Nov 23, 2015 at 17:45