0
votes

I am looking for a way to convert Selenium Browser automation scripts that already currently work, into Jmeter scripts. Baring in mind I have no load testing expereince only Browser UI automation. I know there is a tool called Blazemeter and taurus, but am looking for a simple solution that is free?

Thanks.

1
sounds like a recipe for disasterCorey Goldberg

1 Answers

1
votes

Just record them using JMeter's HTTP(S) Test Script Recorder

  1. Prepare JMeter for recording. The fastest way is using JMeter Templates Feature

    • From JMeter main menu choose File -> Templates -> Recording and click "Create"
    • Find HTTP(S) Test Script Recorder in the Test Plan and click "Start"
  2. Configure your Selenium tests to run through JMeter proxy. The code below is for Firefox

    org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
    proxy.setHttpProxy("localhost:8888");
    DesiredCapabilities cap = new DesiredCapabilities();
    cap.setCapability(CapabilityType.PROXY, proxy);
    WebDriver driver = new FirefoxDriver(cap);
    
  3. Run your test. JMeter will capture the requests and save them under Recording Controller