title: How can i use my Junit test (selenium webdriver) with Jmeter
body: <p>I created my functional tests with JUnit 4 and Selenium Webdriver and it works.<br>
  Now I want to use this test with JMeter for performance tests.</p>
  
  <p>I copied <code>selenium-server-standalone-2.0b2.jar</code> at JMeter’s library, then I exported my test from Eclipse to .jar file.</p>
  
  <p>And this my selenium test</p>
  
  <pre><code>public class TestLoginWithFF {   
    private WebDriver driver;
    private String baseUrl;
    private StringBuffer verificationErrors = new StringBuffer();
  
    @Before
    public void setUp() throws Exception {
      driver = new FirefoxDriver();
      baseUrl = "http://localhost:8080/";
      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
    }
  
    @Test
    public void test() throws Exception {
      driver.get(baseUrl + "/pages/accueil/login.xhtml#loaded");
  
      driver.findElement(By.id("login")).clear();
      driver.findElement(By.id("login")).sendKeys("admin");
      driver.findElement(By.id("password")).clear();
      driver.findElement(By.id("password")).sendKeys("admin");
      driver.findElement(By.id("loginButton")).click();
    }
  
    @After
    public void tearDown() throws Exception {
      //driver.quit();
      String verificationErrorString = verificationErrors.toString();
      if (!"".equals(verificationErrorString)) {
        fail(verificationErrorString);
      }   
    } 
  }
  </code></pre>