3

JenkinsでSelenium WebDriverを使用することを検討しています。Windows Server 2008 で実行されている Jenkins サーバーがあり、すべてのテスト ケースを実行したいと考えています。また、mstest を使用しており、Windows サーバーに VS をインストールしています。サーバーにインストールしたプラグインのリストは次のとおりです。 :

Selenium Auto Exec Server(AES) plugin
This plugin is for continuous regression test by Selenium Auto Exec Server (AES).      0.5          

Jenkins Selenium Builder plugin
1.1         

Hudson Seleniumhq plugin
This plugin integrates Seleniumhq to Hudson.
0.4         

Selenium HTML report
0.94            

SeleniumRC plugin
This plugin allows you to create Selenium server instance for each project build.
1.0 

Jenkins にインストールするプラグインはありますか?

編集

これは、ドライバーをインスタンス化するために使用しているものですが、使用する必要がありますRemoteDriverか?

public static IWebDriver GetDriver()
{
    string _url = new Uri(Common.Url).DnsSafeHost.ToString(); 

     switch (Common.BrowserSelected)
     {
         case "ff":
         FirefoxProfile profile = new FirefoxProfile();
         profile.SetPreference("network.http.phishy-userpass-length", 255);
         profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", _url);
         drv = new FirefoxDriver(profile);
                    break;
          case "ie":
          var options = new InternetExplorerOptions();
           options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
           DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.SetCapability(CapabilityType.AcceptSslCertificates, true);
                    drv = new InternetExplorerDriver(options);
                    break;
                case "chrome":
                    //_driver = new ChromeDriver();
                    break;
            }
            return drv;
        }
4

1 に答える 1

1

Jenkins にインストールするプラグインはありますか?

- いいえ、これらのプラグインは必要ありません。

これは、ドライバーをインスタンス化するために使用しているものですが、使用する必要がありますRemoteDriverか?

RemoteDriverテストを実行する必要があり、この関数の初期化を追加する必要がRemoteDriverあるGetDriver()と思います。

このリンクこれを手伝ってもらえますか

私の設定:

firefox {
    capability = DesiredCapabilities.firefox()
    capability.setPlatform(Platform.LINUX)
    driver = {new RemoteWebDriver(new URL("http://some.domain:4444/wd/hub"), capability)}
}

なのでテストにはGebを使っていますが、違いはないと思います。

于 2013-03-19T21:43:45.517 に答える