jmeter + WebDriver: start Browser web automation

Whether it is web automation or automated phone app, WebDriver Selenium is a core module, jmeter WebDriver only supports Firefox, Chrome and HTML Unit drive, IE does not support the drive.

First, download the plug-in and configure JMeterPlugins-WebDriver
      Share my network disk download address: https: //pan.baidu.com/s/1Im3c9e3bNJHDskl3r9zpeA extraction code: 6clp 
    • After extracting JMeterPlugins-WebDriver.zip, copy all the jar package lib lib directory adhered to the directory path installation jmeter
After JMeterPlugins-WebDriver.zip extracting, copying JMeterPlugins-WebDriver.jar ext directory of the paste into the lib / ext installation directory path jmeter
Second, after the restart jmeter, can be created in the thread group WebDriver sampler: jp @ gc - WebDriver Sampler, as shown:
  • Write test scripts in WebDriver-Script inside (can choose their own familiar language)

      

      

Third, adding configure browser driver element, note needs to be placed in front of the sampler WebDriver
  • Set your browser startup drive configuration elements proxy, where chosen Chrome Driver Config
  • Proxy:选择“User system proxy settings”
  • Chrome: Path to complete the path under Chrome Driver chromedriver.exe the full path of the local computer Chrome installation path, such as: C: \ Program Files (x86) \ Google \ Chrome \ Application \ chromedriver.exe
 
Fourth, run jmeter, the jmeter start Chrome browser through a proxy automatic way, and to execute test cases based on scripts written script WebDriver Sampler.
 
Note: After starting the implementation of test cases jmeter script, click the button to stop the test, if you have opened multiple Chrome browser, Chrome will be reminded to close all processes, then will start the Chrome browser test automation, as shown:

 

 

Guess you like

Origin www.cnblogs.com/luihengk/p/11403867.html