Mink运行Selenium的新实例而不必手动运行独立服务器?

Mink运行Selenium的新实例而不必手动运行独立服务器?,selenium,selenium-webdriver,webdriver,mink,Selenium,Selenium Webdriver,Webdriver,Mink,我以前曾与Cucumber和Watir合作过,当我想在firefox中运行测试时,我只是通过以下方式创建了一个新的浏览器实例: client = Selenium::WebDriver::Remote::Http::Default.new client.timeout = 60 $browser = Watir::Browser.new :firefox , profile: $profile, :http_client => client 现在我正在使用Behat,当我想在Firefo

我以前曾与Cucumber和Watir合作过,当我想在firefox中运行测试时,我只是通过以下方式创建了一个新的浏览器实例:

client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 60
$browser = Watir::Browser.new :firefox , profile: $profile, :http_client => client
现在我正在使用Behat,当我想在Firefox中运行测试时,我必须首先在Behat.yml中定义Selenium参数:

Behat\MinkExtension:
  base_url:  'http://test.com'
  sessions:
    default:
      goutte: ~
      javascript:
        selenium2:
          wd_host: http://localhost:4444/wd/hub
但我还必须在单独的终端窗口中运行Selenium独立服务器:

java -jar selenium-server-standalone-2.44.0.jar
让它在后台运行

我的问题是:有没有办法让水貂像瓦蒂尔一样工作?在测试运行时启动一个新的浏览器实例,并在测试完成后终止它,而不必担心在后台运行服务