From 1cc3b72b3661c63019c99c39c255596afbc25c22 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Sun, 16 Sep 2018 22:02:29 +0200 Subject: [PATCH 01/48] Removed driverCapabilities --- .../CapabilitiesSetEventArgs.cs | 47 ------- .../DriverContext.cs | 129 ++++-------------- .../Objectivity.Test.Automation.Common.csproj | 1 - .../App.config | 5 - .../ProjectTestBase.cs | 41 ++++-- 5 files changed, 57 insertions(+), 166 deletions(-) delete mode 100644 Objectivity.Test.Automation.Common/CapabilitiesSetEventArgs.cs diff --git a/Objectivity.Test.Automation.Common/CapabilitiesSetEventArgs.cs b/Objectivity.Test.Automation.Common/CapabilitiesSetEventArgs.cs deleted file mode 100644 index 5bf60b770..000000000 --- a/Objectivity.Test.Automation.Common/CapabilitiesSetEventArgs.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) Objectivity Bespoke Software Specialists. All rights reserved. -// -// -// The MIT License (MIT) -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// - -namespace Objectivity.Test.Automation.Common -{ - using System; - using OpenQA.Selenium.Remote; - - /// - /// Before Capabilities Set Handler. More details on wiki - /// - public class CapabilitiesSetEventArgs : EventArgs - { - /// - /// Initializes a new instance of the class. - /// - /// The existing capabilities - public CapabilitiesSetEventArgs(DesiredCapabilities capabilities) - { - this.Capabilities = capabilities; - } - - /// - /// Gets the current capabilities - /// - public DesiredCapabilities Capabilities { get; } - } -} \ No newline at end of file diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index 67e862018..d81325797 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -64,11 +64,6 @@ public class DriverContext private TestLogger logTest; - /// - /// Fires before the capabilities are set - /// - public event EventHandler CapabilitiesSet; - /// /// Occurs when [driver options set]. /// @@ -95,7 +90,7 @@ public class DriverContext /// /// Gets or sets the Environment Browsers from App.config /// - public string CrossBrowserEnvironment { get; set; } + public BrowserType CrossBrowserEnvironment { get; set; } /// /// Gets Sets Folder name for ScreenShot @@ -510,7 +505,29 @@ public void Start() this.CheckIfProxySetForSafari(); break; case BrowserType.RemoteWebDriver: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetCapabilities()); + switch (this.CrossBrowserEnvironment) + { + case BrowserType.Firefox: + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.FirefoxOptions)); + break; + case BrowserType.Chrome: + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.ChromeOptions)); + break; + case BrowserType.Safari: + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.SafariOptions)); + break; + case BrowserType.Edge: + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.EdgeOptions)); + break; + case BrowserType.IE: + case BrowserType.InternetExplorer: + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.EdgeOptions)); + break; + default: + throw new NotSupportedException( + string.Format(CultureInfo.CurrentCulture, "Driver {0} is not supported", BaseConfiguration.TestBrowser)); + } + break; case BrowserType.Edge: this.driver = new EdgeDriver(this.SetDriverOptions(this.EdgeOptions)); @@ -691,104 +708,6 @@ private T SetDriverOptions(T options) return options; } - /// - /// Set web driver capabilities. - /// - /// Instance with set web driver capabilities. - private DesiredCapabilities SetCapabilities() - { - DesiredCapabilities capabilities = new DesiredCapabilities(); - - switch (BaseConfiguration.TestBrowserCapabilities) - { - case BrowserType.Firefox: - capabilities = (DesiredCapabilities)this.SetDriverOptions(this.FirefoxOptions).ToCapabilities(); - break; - case BrowserType.InternetExplorer: - case BrowserType.IE: - capabilities = (DesiredCapabilities)this.SetDriverOptions(this.InternetExplorerOptions).ToCapabilities(); - break; - case BrowserType.Chrome: - capabilities = (DesiredCapabilities)this.SetDriverOptions(this.ChromeOptions).ToCapabilities(); - break; - case BrowserType.Safari: - capabilities = (DesiredCapabilities)this.SetDriverOptions(this.SafariOptions).ToCapabilities(); - this.CheckIfProxySetForSafari(); - break; - case BrowserType.Edge: - capabilities = (DesiredCapabilities)this.SetDriverOptions(this.EdgeOptions).ToCapabilities(); - break; - case BrowserType.CloudProvider: - break; - default: - throw new NotSupportedException( - string.Format(CultureInfo.CurrentCulture, "Driver {0} is not supported with Selenium Grid", BaseConfiguration.TestBrowser)); - } - - var driverCapabilitiesConf = ConfigurationManager.GetSection("DriverCapabilities") as NameValueCollection; - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - capabilities.SetCapability(driverCapabilitiesConf.GetKey(i), value); - } - } - - capabilities = this.CloudProviderCapabilities(capabilities); - - if (this.CapabilitiesSet != null) - { - this.CapabilitiesSet(this, new CapabilitiesSetEventArgs(capabilities)); - } - - return capabilities; - } - - /// - /// Set CloudProvider driver capabilities. - /// - /// The DesiredCapabilities. - /// Instance with set CloudProvider driver capabilities. - private DesiredCapabilities CloudProviderCapabilities(DesiredCapabilities capabilities) - { - Logger.Debug(CultureInfo.CurrentCulture, "Cross Browser Profile '{0}'", this.CrossBrowserProfile); - if (!string.IsNullOrEmpty(this.CrossBrowserProfile)) - { - NameValueCollection caps = ConfigurationManager.GetSection("capabilities/" + this.CrossBrowserProfile) as NameValueCollection; - - foreach (string key in caps.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserProfile); - capabilities.SetCapability(key, caps[key]); - } - } - - Logger.Trace(CultureInfo.CurrentCulture, "Cross Browser Environment '{0}'", this.CrossBrowserEnvironment); - if (!string.IsNullOrEmpty(this.CrossBrowserEnvironment)) - { - NameValueCollection settings = ConfigurationManager.GetSection("environments/" + this.CrossBrowserEnvironment) as NameValueCollection; - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - if (key == "browser") - { - capabilities.SetCapability(CapabilityType.BrowserName, settings[key]); - } - else - { - capabilities.SetCapability(key, settings[key]); - } - } - } - - return capabilities; - } - private Proxy CurrentProxy() { Proxy proxy = new Proxy diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index ab6edaaac..8a424e640 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -60,7 +60,6 @@ - diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index ed49b39f6..6492d3456 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -103,19 +103,16 @@ - - - @@ -124,13 +121,11 @@ - - diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs index 10e9e9dfe..98bc496a0 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs @@ -23,6 +23,8 @@ namespace Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser { using System; + using System.Collections.Specialized; + using System.Configuration; using System.Globalization; using global::NUnit.Framework; using global::NUnit.Framework.Interfaces; @@ -44,8 +46,14 @@ private readonly DriverContext public ProjectTestBase(string environment) { - this.DriverContext.CrossBrowserEnvironment = environment; - this.driverContext.CapabilitiesSet += this.DriverContext_CapabilitiesSet; + bool supportedBrowser = Enum.TryParse(environment, out BrowserType browserType); + + if (supportedBrowser) + { + this.DriverContext.CrossBrowserEnvironment = browserType; + } + + this.driverContext.DriverOptionsSet += this.DriverContext_DriverOptionsSet; } /// @@ -148,17 +156,34 @@ private void SaveAttachmentsToTestContext(string[] filePaths) } } - private void DriverContext_CapabilitiesSet(object sender, CapabilitiesSetEventArgs args) + private void DriverContext_DriverOptionsSet(object sender, DriverOptionsSetEventArgs args) { - if (args == null || args.Capabilities == null) + if (args == null || args.DriverOptions == null) { throw new ArgumentNullException(); } - // Set the capability -#pragma warning disable CS0618 // Type or member is obsolete - args.Capabilities.SetCapability("name", TestContext.CurrentContext.Test.FullName); -#pragma warning restore CS0618 // Type or member is obsolete + var driverCapabilitiesConf = ConfigurationManager.GetSection("DriverCapabilities") as NameValueCollection; + + // if there are any capability + if (driverCapabilitiesConf != null) + { + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) + { + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + args.DriverOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value); + } + } + + NameValueCollection settings = ConfigurationManager.GetSection("environments/" + this.DriverContext.CrossBrowserEnvironment) as NameValueCollection; + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.DriverContext.CrossBrowserEnvironment); + + args.DriverOptions.AddAdditionalCapability(key, settings[key]); + } } } } From 1ceed182f65d3949cb16035fcc04cfbaa19ed2d3 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Sun, 16 Sep 2018 22:07:32 +0200 Subject: [PATCH 02/48] fixed build issue --- .../ProjectTestBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs index 98bc496a0..e48caa70e 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs @@ -46,7 +46,8 @@ private readonly DriverContext public ProjectTestBase(string environment) { - bool supportedBrowser = Enum.TryParse(environment, out BrowserType browserType); + BrowserType browserType; + bool supportedBrowser = Enum.TryParse(environment, out browserType); if (supportedBrowser) { From e81bc3e6376fac99f85bd6714462b1e775af9b57 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 18 Sep 2018 10:36:04 +0200 Subject: [PATCH 03/48] Set url to GRID server with username and password --- Objectivity.Test.Automation.Common/DriverContext.cs | 13 +++++++++---- .../Objectivity.Test.Automation.Common.csproj | 8 ++++---- Objectivity.Test.Automation.Common/packages.config | 4 ++-- ...Objectivity.Test.Automation.Tests.Angular.csproj | 8 ++++---- .../packages.config | 4 ++-- .../App.config | 8 ++------ .../ProjectTestBase.cs | 10 +++++----- ...bjectivity.Test.Automation.Tests.Features.csproj | 8 ++++---- .../packages.config | 4 ++-- .../Objectivity.Test.Automation.Tests.MsTest.csproj | 8 ++++---- .../packages.config | 4 ++-- .../Objectivity.Test.Automation.Tests.NUnit.csproj | 8 ++++---- .../packages.config | 4 ++-- .../Objectivity.Test.Automation.UnitTests.csproj | 8 ++++---- .../packages.config | 4 ++-- appveyor.yml | 12 +++++------- 16 files changed, 57 insertions(+), 58 deletions(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index d81325797..8aa214468 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -508,20 +508,25 @@ public void Start() switch (this.CrossBrowserEnvironment) { case BrowserType.Firefox: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.FirefoxOptions)); + this.SetDriverOptions(this.FirefoxOptions); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.FirefoxOptions.ToCapabilities()); break; case BrowserType.Chrome: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.ChromeOptions)); + this.SetDriverOptions(this.ChromeOptions); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.ChromeOptions.ToCapabilities()); break; case BrowserType.Safari: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.SafariOptions)); + this.SetDriverOptions(this.SafariOptions); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SafariOptions.ToCapabilities()); break; case BrowserType.Edge: + this.SetDriverOptions(this.EdgeOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.EdgeOptions)); break; case BrowserType.IE: case BrowserType.InternetExplorer: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(this.EdgeOptions)); + this.SetDriverOptions(this.InternetExplorerOptions); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.InternetExplorerOptions.ToCapabilities()); break; default: throw new NotSupportedException( diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 8a424e640..07117dc88 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -175,9 +175,9 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + taskkill /F /IM IEDriverServer.exe 2>nul &set errorlevel=0 @@ -186,9 +186,9 @@ taskkill /F /IM geckodriver.exe 2>nul &set errorlevel=0 cd $(TargetDir) del *.log - - + + - + + - @@ -87,8 +87,6 @@ add key="ChromePluginName.crx" value=""/--> - - @@ -97,8 +95,6 @@ saucelabs Settings/--> - - diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs index e48caa70e..66e4c93b2 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs @@ -179,12 +179,12 @@ private void DriverContext_DriverOptionsSet(object sender, DriverOptionsSetEvent } NameValueCollection settings = ConfigurationManager.GetSection("environments/" + this.DriverContext.CrossBrowserEnvironment) as NameValueCollection; - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.DriverContext.CrossBrowserEnvironment); + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.DriverContext.CrossBrowserEnvironment); - args.DriverOptions.AddAdditionalCapability(key, settings[key]); - } + args.DriverOptions.AddAdditionalCapability(key, settings[key]); + } } } } diff --git a/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj b/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj index 78a4f834c..626321f34 100644 --- a/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj +++ b/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj @@ -128,13 +128,13 @@ - - + + - - + + - .NET Framework 4.6 + .NET Framework 4.5 Help\ Objectivity.Test.Automation.Common en-US diff --git a/Objectivity.Test.Automation.Common.Documentation/packages.config b/Objectivity.Test.Automation.Common.Documentation/packages.config index 7c7619dc7..6b8deb9c9 100644 --- a/Objectivity.Test.Automation.Common.Documentation/packages.config +++ b/Objectivity.Test.Automation.Common.Documentation/packages.config @@ -1,5 +1,3 @@  - - \ No newline at end of file diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index f8d7b565a..fb2be4ccc 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -481,7 +481,6 @@ public Screenshot TakeScreenshot() /// Starts the specified Driver. /// /// When driver not supported - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "Workaround for DesiredCapabilities")] [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Driver disposed later in stop method")] public void Start() { @@ -512,123 +511,28 @@ public void Start() { case BrowserType.Firefox: FirefoxOptions firefoxOptions = new FirefoxOptions(); - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - firefoxOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); - } - } - - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - - firefoxOptions.AddAdditionalCapability(key, settings[key], true); - } - + this.SetRemoteDriverFireFoxOptions(driverCapabilitiesConf, settings, firefoxOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(firefoxOptions).ToCapabilities()); break; case BrowserType.Chrome: ChromeOptions chromeOptions = new ChromeOptions(); - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - chromeOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); - } - } - - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - - chromeOptions.AddAdditionalCapability(key, settings[key], true); - } - + this.SetRemoteDriverChromeOptions(driverCapabilitiesConf, settings, chromeOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(chromeOptions).ToCapabilities()); break; case BrowserType.Safari: SafariOptions safariOptions = new SafariOptions(); - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - safariOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value); - } - } - - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - - safariOptions.AddAdditionalCapability(key, settings[key]); - } - + this.SetRemoteDriverOptions(driverCapabilitiesConf, settings, safariOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(safariOptions).ToCapabilities()); break; case BrowserType.Edge: EdgeOptions egEdgeOptions = new EdgeOptions(); - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - egEdgeOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value); - } - } - - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - - egEdgeOptions.AddAdditionalCapability(key, settings[key]); - } - + this.SetRemoteDriverOptions(driverCapabilitiesConf, settings, egEdgeOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(egEdgeOptions).ToCapabilities()); break; case BrowserType.IE: case BrowserType.InternetExplorer: InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions(); - - // if there are any capability - if (driverCapabilitiesConf != null) - { - // loop through all of them - for (var i = 0; i < driverCapabilitiesConf.Count; i++) - { - string value = driverCapabilitiesConf.GetValues(i)[0]; - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - internetExplorerOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); - } - } - - foreach (string key in settings.AllKeys) - { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - - internetExplorerOptions.AddAdditionalCapability(key, settings[key], true); - } - + this.SetRemoteDriverOptions(driverCapabilitiesConf, settings, internetExplorerOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(internetExplorerOptions).ToCapabilities()); break; default: @@ -854,5 +758,76 @@ private FirefoxOptions AddFirefoxArguments(FirefoxOptions option) return option; } + + private T SetRemoteDriverOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, T options) + where T : DriverOptions + { + // if there are any capability + if (driverCapabilitiesConf != null) + { + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) + { + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + options.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value); + } + } + + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); + + options.AddAdditionalCapability(key, settings[key]); + } + + return options; + } + + private void SetRemoteDriverFireFoxOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, FirefoxOptions firefoxOptions) + { + // if there are any capability + if (driverCapabilitiesConf != null) + { + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) + { + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + firefoxOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); + } + } + + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, + this.CrossBrowserEnvironment); + + firefoxOptions.AddAdditionalCapability(key, settings[key], true); + } + } + + private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, ChromeOptions chromeOptions) + { + // if there are any capability + if (driverCapabilitiesConf != null) + { + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) + { + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + chromeOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); + } + } + + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, + this.CrossBrowserEnvironment); + + chromeOptions.AddAdditionalCapability(key, settings[key], true); + } + } } } From 0095d3e03f58d52f7ada6b1c920dd5393515b9fa Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 9 Oct 2018 09:01:52 +0200 Subject: [PATCH 09/48] fixed small build issue --- Objectivity.Test.Automation.Common/DriverContext.cs | 6 ++---- .../ProjectTestBase.cs | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index fb2be4ccc..df9e5fa55 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -800,8 +800,7 @@ private void SetRemoteDriverFireFoxOptions(NameValueCollection driverCapabilitie foreach (string key in settings.AllKeys) { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, - this.CrossBrowserEnvironment); + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); firefoxOptions.AddAdditionalCapability(key, settings[key], true); } @@ -823,8 +822,7 @@ private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilities foreach (string key in settings.AllKeys) { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, - this.CrossBrowserEnvironment); + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); chromeOptions.AddAdditionalCapability(key, settings[key], true); } diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs index f8aa54b10..9ca3629a5 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs @@ -48,6 +48,7 @@ public ProjectTestBase(string environment) { BrowserType browserType; bool supportedBrowser = Enum.TryParse(environment, out browserType); + Logger.Info(CultureInfo.CurrentCulture, "supportedBrowser {0} : {1}", supportedBrowser, browserType); if (supportedBrowser) { From dfd70d719f5ab826d374705313a8246a5daba77a Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 9 Oct 2018 09:32:22 +0200 Subject: [PATCH 10/48] Updated NUNIT to version 3.11.0 --- .nuspec/Objectivity.Test.Automation.Features.nuspec | 4 ++-- .nuspec/Objectivity.Test.Automation.Nunit.nuspec | 8 ++++---- .../Objectivity.Test.Automation.Tests.Angular.csproj | 9 ++++----- .../packages.config | 10 +++++----- ...t.Automation.Tests.CloudProviderCrossBrowser.csproj | 9 ++++----- .../packages.config | 10 +++++----- .../Objectivity.Test.Automation.Tests.Features.csproj | 8 ++++---- .../packages.config | 10 +++++----- .../Objectivity.Test.Automation.Tests.NUnit.csproj | 9 ++++----- .../packages.config | 10 +++++----- .../Objectivity.Test.Automation.UnitTests.csproj | 9 ++++----- Objectivity.Test.Automation.UnitTests/packages.config | 2 +- 12 files changed, 47 insertions(+), 51 deletions(-) diff --git a/.nuspec/Objectivity.Test.Automation.Features.nuspec b/.nuspec/Objectivity.Test.Automation.Features.nuspec index 2e1d0feb9..a20db8e7e 100644 --- a/.nuspec/Objectivity.Test.Automation.Features.nuspec +++ b/.nuspec/Objectivity.Test.Automation.Features.nuspec @@ -16,8 +16,8 @@ selenium webdriver testautomation tests specflow Objectivity.Test.Automation.Common template - - + + diff --git a/.nuspec/Objectivity.Test.Automation.Nunit.nuspec b/.nuspec/Objectivity.Test.Automation.Nunit.nuspec index bd838c411..11430f9d8 100644 --- a/.nuspec/Objectivity.Test.Automation.Nunit.nuspec +++ b/.nuspec/Objectivity.Test.Automation.Nunit.nuspec @@ -15,14 +15,14 @@ Copyright 2015 selenium webdriver testautomation tests nunit Objectivity.Test.Automation.Common - - - + + + - + diff --git a/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj b/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj index 4c0988383..edbfd6ebd 100644 --- a/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj +++ b/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -46,9 +46,8 @@ ..\packages\NLog.4.3.5\lib\net45\NLog.dll True - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll @@ -119,10 +118,10 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/Objectivity.Test.Automation.Tests.Angular/packages.config b/Objectivity.Test.Automation.Tests.Angular/packages.config index 07e04c500..974513ff5 100644 --- a/Objectivity.Test.Automation.Tests.Angular/packages.config +++ b/Objectivity.Test.Automation.Tests.Angular/packages.config @@ -3,14 +3,14 @@ - - + + - - - + + + diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj index f281965cb..e43edc549 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj @@ -1,6 +1,6 @@  - + Debug @@ -59,9 +59,8 @@ ..\packages\NLog.4.3.5\lib\net45\NLog.dll True - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll @@ -119,7 +118,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index 24b8cc542..89af447f5 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -53,14 +53,14 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose True - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ From 857072da0446adb7d11bcd73ec381c06b1354f27 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 9 Oct 2018 09:58:08 +0200 Subject: [PATCH 12/48] fixed build issue --- .../Objectivity.Test.Automation.Common.Documentation.shfbproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj index ba3ffc22d..b63a7eefc 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj @@ -13,7 +13,7 @@ Objectivity.Test.Automation.Common.Documentation Objectivity.Test.Automation.Common.Documentation - .NET Framework 4.5 + .NET Framework 4.6 Help\ Objectivity.Test.Automation.Common en-US From 8d9314b121db1c5c4e3c518245a6f207adf7d27d Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 9 Oct 2018 10:11:55 +0200 Subject: [PATCH 13/48] Installed "EWSoftware.SHFB" version="2017.12.30.2" --- .../Objectivity.Test.Automation.Common.Documentation.shfbproj | 4 ++-- .../Selenium.shfbproj | 4 ++-- Objectivity.Test.Automation.UnitTests/packages.config | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj index b63a7eefc..582595871 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj @@ -53,7 +53,7 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ + ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose @@ -76,7 +76,7 @@ - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index 89af447f5..24b8cc542 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -53,14 +53,14 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ + ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose True - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ diff --git a/Objectivity.Test.Automation.UnitTests/packages.config b/Objectivity.Test.Automation.UnitTests/packages.config index 9a619ea2d..04be3a4d3 100644 --- a/Objectivity.Test.Automation.UnitTests/packages.config +++ b/Objectivity.Test.Automation.UnitTests/packages.config @@ -1,7 +1,7 @@  - + From ecb4e7e3f581947a6b0898b6a23756b6f3e7e118 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 9 Oct 2018 10:16:44 +0200 Subject: [PATCH 14/48] Update packages.config --- Objectivity.Test.Automation.UnitTests/packages.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objectivity.Test.Automation.UnitTests/packages.config b/Objectivity.Test.Automation.UnitTests/packages.config index 04be3a4d3..b824ac43b 100644 --- a/Objectivity.Test.Automation.UnitTests/packages.config +++ b/Objectivity.Test.Automation.UnitTests/packages.config @@ -2,6 +2,7 @@ + @@ -9,4 +10,4 @@ - \ No newline at end of file + From 365b48d07d76dec534fdf680aa1ebd406af9e933 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 10 Oct 2018 20:17:32 +0200 Subject: [PATCH 15/48] Removed setting user and password for Browserstack, saucelabs in url of remotedriver --- .../App.config | 4 ++++ appveyor.yml | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index 64b074446..db82de819 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -87,6 +87,8 @@ add key="ChromePluginName.crx" value=""/--> + + @@ -95,6 +97,8 @@ saucelabs Settings/--> + + diff --git a/appveyor.yml b/appveyor.yml index 1d6078fce..e16b84bb1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -233,9 +233,7 @@ test_script: cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" - - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "browserstack.user|browserstack.key|build" "$env:browserstackuser|$env:browserstackkey|Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" cd .. @@ -267,9 +265,13 @@ test_script: cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:saucelabsusername):$($env:saucelabsaccessKey)@ondemand.saucelabs.com:80/wd/hub" + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://ondemand.saucelabs.com:80/wd/hub" $true + + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "username|accessKey|build" "$env:saucelabsusername|$env:saucelabsaccessKey|Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" + + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Edge" "browser" "MicrosoftEdge" $true - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" $true + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/IE" "browser" "Internet Explorer" $true .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true From 9d3b91955b876391511a6f5750ef87f0d6916543 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 10 Oct 2018 20:56:28 +0200 Subject: [PATCH 16/48] Updated "Selenium.WebDriver" version="3.14.0 --- .../Selenium.shfbproj | 8 ++++---- .../Objectivity.Test.Automation.Common.csproj | 8 ++++---- .../Objectivity.Test.Automation.Tests.Angular.csproj | 8 ++++---- .../App.config | 10 +++++++--- ...t.Automation.Tests.CloudProviderCrossBrowser.csproj | 4 ++-- .../Objectivity.Test.Automation.Tests.MsTest.csproj | 4 ++-- .../Objectivity.Test.Automation.Tests.NUnit.csproj | 4 ++-- ...bjectivity.Test.Automation.Tests.PageObjects.csproj | 8 ++++---- .../packages.config | 4 ++-- .../Objectivity.Test.Automation.UnitTests.csproj | 8 ++++---- appveyor.yml | 4 ---- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index 94fcac6e1..36d3708fc 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -27,10 +27,10 @@ - - - - + + + + 100 OnlyWarningsAndErrors Website diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 3539a6c8f..96142ee41 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -126,11 +126,11 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.14.0\lib\net45\WebDriver.Support.dll diff --git a/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj b/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj index 122c21094..edbfd6ebd 100644 --- a/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj +++ b/Objectivity.Test.Automation.Tests.Angular/Objectivity.Test.Automation.Tests.Angular.csproj @@ -51,11 +51,11 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.14.0\lib\net45\WebDriver.Support.dll diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index db82de819..e5d623f71 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -9,7 +9,7 @@
-
+
@@ -34,6 +34,7 @@ + @@ -134,7 +135,10 @@ - + - + + + + diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj index 1851b7e58..e43edc549 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.csproj @@ -70,8 +70,8 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll diff --git a/Objectivity.Test.Automation.Tests.MsTest/Objectivity.Test.Automation.Tests.MsTest.csproj b/Objectivity.Test.Automation.Tests.MsTest/Objectivity.Test.Automation.Tests.MsTest.csproj index 9bf5dbb7c..7e9d7d587 100644 --- a/Objectivity.Test.Automation.Tests.MsTest/Objectivity.Test.Automation.Tests.MsTest.csproj +++ b/Objectivity.Test.Automation.Tests.MsTest/Objectivity.Test.Automation.Tests.MsTest.csproj @@ -67,8 +67,8 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll diff --git a/Objectivity.Test.Automation.Tests.NUnit/Objectivity.Test.Automation.Tests.NUnit.csproj b/Objectivity.Test.Automation.Tests.NUnit/Objectivity.Test.Automation.Tests.NUnit.csproj index 77a1668c4..4e279007f 100644 --- a/Objectivity.Test.Automation.Tests.NUnit/Objectivity.Test.Automation.Tests.NUnit.csproj +++ b/Objectivity.Test.Automation.Tests.NUnit/Objectivity.Test.Automation.Tests.NUnit.csproj @@ -90,8 +90,8 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll diff --git a/Objectivity.Test.Automation.Tests.PageObjects/Objectivity.Test.Automation.Tests.PageObjects.csproj b/Objectivity.Test.Automation.Tests.PageObjects/Objectivity.Test.Automation.Tests.PageObjects.csproj index f961751cf..0181bda9b 100644 --- a/Objectivity.Test.Automation.Tests.PageObjects/Objectivity.Test.Automation.Tests.PageObjects.csproj +++ b/Objectivity.Test.Automation.Tests.PageObjects/Objectivity.Test.Automation.Tests.PageObjects.csproj @@ -62,11 +62,11 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.14.0\lib\net45\WebDriver.Support.dll diff --git a/Objectivity.Test.Automation.Tests.PageObjects/packages.config b/Objectivity.Test.Automation.Tests.PageObjects/packages.config index 4c19ac4e3..95c0ac91b 100644 --- a/Objectivity.Test.Automation.Tests.PageObjects/packages.config +++ b/Objectivity.Test.Automation.Tests.PageObjects/packages.config @@ -2,7 +2,7 @@ - - + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj b/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj index 8252ebd9d..72330e003 100644 --- a/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj +++ b/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj @@ -52,11 +52,11 @@ - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.14.0\lib\net45\WebDriver.Support.dll diff --git a/appveyor.yml b/appveyor.yml index e16b84bb1..9accab009 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -269,10 +269,6 @@ test_script: .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "username|accessKey|build" "$env:saucelabsusername|$env:saucelabsaccessKey|Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Edge" "browser" "MicrosoftEdge" $true - - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/IE" "browser" "Internet Explorer" $true - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true cd .. From a949031df984357d774dd9241a813d5e1a1c3599 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 10 Oct 2018 21:18:06 +0200 Subject: [PATCH 17/48] fixed build issue --- .../App.config | 4 ---- appveyor.yml | 8 +++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index e5d623f71..679f3a182 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -88,8 +88,6 @@ add key="ChromePluginName.crx" value=""/--> - - @@ -98,8 +96,6 @@ saucelabs Settings/--> - - diff --git a/appveyor.yml b/appveyor.yml index 9accab009..1d6078fce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -233,7 +233,9 @@ test_script: cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "browserstack.user|browserstack.key|build" "$env:browserstackuser|$env:browserstackkey|Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" + + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true cd .. @@ -265,9 +267,9 @@ test_script: cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://ondemand.saucelabs.com:80/wd/hub" $true + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:saucelabsusername):$($env:saucelabsaccessKey)@ondemand.saucelabs.com:80/wd/hub" - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "username|accessKey|build" "$env:saucelabsusername|$env:saucelabsaccessKey|Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" $true .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true From 7b6814ba77cdc0ce8b8ba2b20c9db66580c83c6d Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Thu, 11 Oct 2018 08:35:25 +0200 Subject: [PATCH 18/48] fixed build issue --- .../App.config | 3 --- appveyor.yml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index 679f3a182..742bfa5c3 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -92,9 +92,6 @@ - testingbot Settings/--> - - saucelabs Settings/--> diff --git a/appveyor.yml b/appveyor.yml index 1d6078fce..e1bb3bac6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -252,7 +252,7 @@ test_script: .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://hub.testingbot.com/wd/hub/" $true - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "key|secret|build|browserstack.user" "$env:testingbotkey|$env:testingbotsecret|Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version|empty" + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "key|secret|build|browserstack.user" "$env:testingbotkey|$env:testingbotsecret|Objectivity.Test.Automation.Tests.TestingBotCrossBrowser$env:appveyor_build_version|empty" cd .. @@ -269,7 +269,7 @@ test_script: .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:saucelabsusername):$($env:saucelabsaccessKey)@ondemand.saucelabs.com:80/wd/hub" - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser$env:appveyor_build_version" $true + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.SauceLabsCrossBrowser$env:appveyor_build_version" $true .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true From abc6b5053b98eb59816d994f45ff03fa3c7398a6 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Thu, 11 Oct 2018 09:15:15 +0200 Subject: [PATCH 19/48] pgraded EWSoftware.SHFB version="2018.7.8.1, EWSoftware.SHFB.NETFramework version="4.7.2", Magick.NET-Q16-AnyCPU version="7.8.0", NLog version="4.5.10", Selenium.WebDriver.GeckoDriver.Win64 version="0.23.0" --- ...t.Automation.Common.Documentation.shfbproj | 4 ++-- .../Selenium.shfbproj | 4 ++-- .../Objectivity.Test.Automation.Common.csproj | 12 ++++++++---- .../packages.config | 6 +++--- ...ivity.Test.Automation.Tests.Angular.csproj | 15 +++++++++++---- .../packages.config | 6 +++--- ...ion.Tests.CloudProviderCrossBrowser.csproj | 8 ++++++-- .../packages.config | 4 ++-- ...tivity.Test.Automation.Tests.MsTest.csproj | 13 +++++++++---- .../packages.config | 6 +++--- ...ctivity.Test.Automation.Tests.NUnit.csproj | 12 ++++++++---- .../packages.config | 6 +++--- ...y.Test.Automation.Tests.PageObjects.csproj | 10 ++++++++-- .../packages.config | 4 ++-- .../packages.config | 2 +- ...jectivity.Test.Automation.UnitTests.csproj | 19 +++++++++++++------ .../packages.config | 12 ++++++------ 17 files changed, 90 insertions(+), 53 deletions(-) diff --git a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj index 582595871..b63a7eefc 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Objectivity.Test.Automation.Common.Documentation.shfbproj @@ -53,7 +53,7 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose @@ -76,7 +76,7 @@ - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index 36d3708fc..ba7da0ccd 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -53,14 +53,14 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose True - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 96142ee41..1dde5025c 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -115,14 +115,18 @@ ..\packages\Microsoft.AnalysisServices.AdomdClient.12.0.2000.8\lib\net40\Microsoft.AnalysisServices.AdomdClient.dll True + - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + + @@ -177,7 +181,7 @@ - + taskkill /F /IM IEDriverServer.exe 2>nul &set errorlevel=0 @@ -188,7 +192,7 @@ del *.log - + - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index 36d3708fc..ba7da0ccd 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -53,14 +53,14 @@ Framework to automate tests using Selenium WebDriver TestAutomationGroup%40objectivity.co.uk http://www.objectivity.co.uk/ - ..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + ..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ ..\packages\ Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose True - $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2017.12.30.2\tools\ + $(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2018.7.8.1\tools\ diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 96142ee41..1dde5025c 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -115,14 +115,18 @@ ..\packages\Microsoft.AnalysisServices.AdomdClient.12.0.2000.8\lib\net40\Microsoft.AnalysisServices.AdomdClient.dll True + - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + + @@ -177,7 +181,7 @@ - + taskkill /F /IM IEDriverServer.exe 2>nul &set errorlevel=0 @@ -188,7 +192,7 @@ del *.log - + - + + diff --git a/Objectivity.Test.Automation.Tests.NUnit/App.config b/Objectivity.Test.Automation.Tests.NUnit/App.config index 035efd5aa..59acadffa 100644 --- a/Objectivity.Test.Automation.Tests.NUnit/App.config +++ b/Objectivity.Test.Automation.Tests.NUnit/App.config @@ -25,7 +25,7 @@ - + From 3965ccd799ac44bc12228843f8aec06318a662c6 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Fri, 19 Oct 2018 16:40:20 +0200 Subject: [PATCH 22/48] Added SetRemoteDriverOptions method --- .../DriverContext.cs | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index df9e5fa55..62808c511 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -532,7 +532,7 @@ public void Start() case BrowserType.IE: case BrowserType.InternetExplorer: InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions(); - this.SetRemoteDriverOptions(driverCapabilitiesConf, settings, internetExplorerOptions); + this.SetRemoteDriverIEOptions(driverCapabilitiesConf, settings, internetExplorerOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(internetExplorerOptions).ToCapabilities()); break; default: @@ -806,6 +806,28 @@ private void SetRemoteDriverFireFoxOptions(NameValueCollection driverCapabilitie } } + private void SetRemoteDriverIEOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, InternetExplorerOptions internetExplorerOptions) + { + // if there are any capability + if (driverCapabilitiesConf != null) + { + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) + { + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + internetExplorerOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); + } + } + + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); + + internetExplorerOptions.AddAdditionalCapability(key, settings[key], true); + } + } + private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, ChromeOptions chromeOptions) { // if there are any capability From b4443a027389f167ccb97564ebd27a243789b21d Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Fri, 19 Oct 2018 16:41:27 +0200 Subject: [PATCH 23/48] New version of NuGet.targets to download latest version of Nuget.exe from https://gist.github.com/bradwilson/2014238#file-nuget-targets-xml --- .nuget/NuGet.targets | 141 +++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 84 deletions(-) diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets index b41f3b7c2..646310904 100644 --- a/.nuget/NuGet.targets +++ b/.nuget/NuGet.targets @@ -2,70 +2,26 @@ $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - true - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - - - - - $(SolutionDir).nuget - - - - $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config - $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config - - - - $(MSBuildProjectDirectory)\packages.config - $(PackagesProjectConfig) - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 "$(NuGetExePath)" - + $(NuGetToolsPath)\NuGet.exe + $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) + $([System.IO.Path]::Combine($(SolutionDir), "packages")) $(TargetDir.Trim('\\')) - -RequireConsent - -NonInteractive + + "" - "$(SolutionDir) " - "$(SolutionDir)" + + false + + + false - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) - $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols + "$(NuGetExePath)" install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)" > NUL + "$(NuGetExePath)" pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols - + RestorePackages; $(BuildDependsOn); @@ -79,36 +35,18 @@ - - - - - - - - + - - - + + Condition="Exists('$(PackagesConfig)')" /> - - + LogStandardErrorAsError="true" /> @@ -117,28 +55,63 @@ + + + + + p.Uri.ToString().ToLowerInvariant() == "/tools/nuget.exe").Single(); + using (Stream inputStream = exePart.GetStream(FileMode.Open, FileAccess.Read)) + using (Stream outputStream = File.Create(OutputFilename)) { + byte[] buffer = new byte[16384]; + while (true) { + int read = inputStream.Read(buffer, 0, buffer.Length); + if (read == 0) { + break; + } + outputStream.Write(buffer, 0, read); + } + } + } return true; } catch (Exception ex) { Log.LogErrorFromException(ex); return false; } + finally { + if (zipTempPath != null) File.Delete(zipTempPath); + } ]]> - + \ No newline at end of file From d095f7acd58358d26b122d480fc9ba395e609bd3 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Fri, 19 Oct 2018 16:42:33 +0200 Subject: [PATCH 24/48] Cleaned packages version in Features sub project --- .../Objectivity.Test.Automation.Tests.Features.csproj | 9 ++------- .../packages.config | 7 +++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj b/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj index 137b62bff..2d5facd48 100644 --- a/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj +++ b/Objectivity.Test.Automation.Tests.Features/Objectivity.Test.Automation.Tests.Features.csproj @@ -56,13 +56,8 @@ - - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - True - - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll @@ -129,7 +124,7 @@ - + diff --git a/Objectivity.Test.Automation.Tests.Features/packages.config b/Objectivity.Test.Automation.Tests.Features/packages.config index 3f5100791..1e94a2f93 100644 --- a/Objectivity.Test.Automation.Tests.Features/packages.config +++ b/Objectivity.Test.Automation.Tests.Features/packages.config @@ -1,8 +1,7 @@  - - - + + @@ -12,7 +11,7 @@ - + From fd1197c29c65ee8fd5e3d623271a0a15e08509db Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 23 Oct 2018 12:10:29 +0200 Subject: [PATCH 25/48] Fixed problem with starting FireFox or Chrome with extension --- .../DriverContext.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index 62808c511..5683e96e2 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -232,7 +232,15 @@ private FirefoxOptions FirefoxOptions for (var i = 0; i < firefoxExtensions.Count; i++) { Logger.Trace(CultureInfo.CurrentCulture, "Installing extension {0}", firefoxExtensions.GetKey(i)); - options.Profile.AddExtension(firefoxExtensions.GetKey(i)); + try + { + options.Profile.AddExtension(firefoxExtensions.GetKey(i)); + } + catch (FileNotFoundException) + { + Logger.Trace(CultureInfo.CurrentCulture, "Installing extension {0}", this.CurrentDirectory + FilesHelper.Separator + firefoxExtensions.GetKey(i)); + options.Profile.AddExtension(this.CurrentDirectory + FilesHelper.Separator + firefoxExtensions.GetKey(i)); + } } } @@ -311,7 +319,15 @@ private ChromeOptions ChromeOptions for (var i = 0; i < chromeExtensions.Count; i++) { Logger.Trace(CultureInfo.CurrentCulture, "Installing extension {0}", chromeExtensions.GetKey(i)); - options.AddExtension(chromeExtensions.GetKey(i)); + try + { + options.AddExtension(chromeExtensions.GetKey(i)); + } + catch (FileNotFoundException) + { + Logger.Trace(CultureInfo.CurrentCulture, "Installing extension {0}", this.CurrentDirectory + FilesHelper.Separator + chromeExtensions.GetKey(i)); + options.AddExtension(this.CurrentDirectory + FilesHelper.Separator + chromeExtensions.GetKey(i)); + } } } From 10f4a7b42a5fa0b227d9e4b85b1523b1c752e764 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 10:34:34 +0100 Subject: [PATCH 26/48] Fixed ProjectTestBase if test run on Selenium Grid, added downloading Selenium Grid to appveyor.yml --- .../DriverContext.cs | 11 ++++++++--- .../ProjectTestBase.cs | 6 +++++- .../Tests/HerokuappTestsNUnit.cs | 1 + appveyor.yml | 16 ++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index 5683e96e2..2d96036a7 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -858,11 +858,16 @@ private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilities } } - foreach (string key in settings.AllKeys) + // if there are any capability + if (settings != null) { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, + this.CrossBrowserEnvironment); - chromeOptions.AddAdditionalCapability(key, settings[key], true); + chromeOptions.AddAdditionalCapability(key, settings[key], true); + } } } } diff --git a/Objectivity.Test.Automation.Tests.NUnit/ProjectTestBase.cs b/Objectivity.Test.Automation.Tests.NUnit/ProjectTestBase.cs index 4db0062dd..e5fe1966d 100644 --- a/Objectivity.Test.Automation.Tests.NUnit/ProjectTestBase.cs +++ b/Objectivity.Test.Automation.Tests.NUnit/ProjectTestBase.cs @@ -22,7 +22,6 @@ namespace Objectivity.Test.Automation.Tests.NUnit { - using System.Linq; using Common; using Common.Logger; using global::NUnit.Framework; @@ -69,6 +68,11 @@ protected DriverContext DriverContext [OneTimeSetUp] public void BeforeClass() { + if (BaseConfiguration.TestBrowser == BrowserType.RemoteWebDriver) + { + this.DriverContext.CrossBrowserEnvironment = BaseConfiguration.TestBrowserCapabilities; + } + this.DriverContext.CurrentDirectory = TestContext.CurrentContext.TestDirectory; this.DriverContext.Start(); } diff --git a/Objectivity.Test.Automation.Tests.NUnit/Tests/HerokuappTestsNUnit.cs b/Objectivity.Test.Automation.Tests.NUnit/Tests/HerokuappTestsNUnit.cs index f0279c310..34d3df605 100644 --- a/Objectivity.Test.Automation.Tests.NUnit/Tests/HerokuappTestsNUnit.cs +++ b/Objectivity.Test.Automation.Tests.NUnit/Tests/HerokuappTestsNUnit.cs @@ -30,6 +30,7 @@ namespace Objectivity.Test.Automation.Tests.NUnit.Tests using OpenQA.Selenium; [TestFixture] + [Category("BasicNUnit")] [Parallelizable(ParallelScope.Fixtures)] public class HerokuappTestsNUnit : ProjectTestBase { diff --git a/appveyor.yml b/appveyor.yml index e1bb3bac6..81584ae64 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -282,6 +282,22 @@ test_script: echo $lastexitcode } + echo '********************************************Downloading Selenium Grid********************************************' + + $url = "https://bit.ly/2TlkRyu" + + $grid = "selenium-server-standalone-3.141.59.jar" + + $output = $env:APPVEYOR_BUILD_FOLDER + "Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" + + $start_time = Get-Date + + Import-Module BitsTransfer + + Start-BitsTransfer -Source $url -Destination $output + + Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" + echo '********************************************Sending coverage test results********************************************' $coveralls = (Resolve-Path ".\packages\coveralls.net.*\tools\csmacnz.coveralls.exe").ToString() From 2deada94d303de89496beea620bc391b94fd9557 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 11:18:36 +0100 Subject: [PATCH 27/48] fixed small build issue --- Objectivity.Test.Automation.Common/DriverContext.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index 2d96036a7..007c04d2f 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -863,8 +863,7 @@ private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilities { foreach (string key in settings.AllKeys) { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, - this.CrossBrowserEnvironment); + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); chromeOptions.AddAdditionalCapability(key, settings[key], true); } From a8d10d0c4faecc09fc8ca30324650371fcee3805 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 14:14:30 +0100 Subject: [PATCH 28/48] added downloading Selenium Grid to appveyor.yml --- appveyor.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 81584ae64..625b35d75 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -292,11 +292,13 @@ test_script: $start_time = Get-Date - Import-Module BitsTransfer - - Start-BitsTransfer -Source $url -Destination $output - - Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" + echo "output" $output + + $wc = New-Object System.Net.WebClient + + (New-Object System.Net.WebClient).DownloadFile($url, $output) + + echo "Time taken to download $($grid): $((Get-Date).Subtract($start_time).Seconds) second(s)" echo '********************************************Sending coverage test results********************************************' From 1adc95e1d837598dc775e8fc2a6b383bb2c993c8 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 14:35:45 +0100 Subject: [PATCH 29/48] fixed small build issue --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 625b35d75..37b814157 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -288,7 +288,7 @@ test_script: $grid = "selenium-server-standalone-3.141.59.jar" - $output = $env:APPVEYOR_BUILD_FOLDER + "Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" + $output = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" $start_time = Get-Date From 1170b00edb2be283616f4b4ed035cb4cda8483bf Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 15:10:12 +0100 Subject: [PATCH 30/48] Start Selenium Grid in background --- appveyor.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 37b814157..fa1cf7c8f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -299,6 +299,18 @@ test_script: (New-Object System.Net.WebClient).DownloadFile($url, $output) echo "Time taken to download $($grid): $((Get-Date).Subtract($start_time).Seconds) second(s)" + + echo '********************************************Start Selenium Grid in background****************************************' + + Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput '.\console_hub.out' -RedirectStandardError '.\console_hub.err' + + Start-Sleep -s 5 + + Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput '.\console_node.out' -RedirectStandardError '.\console_node.err' + + Start-Sleep -s 5 + + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\console_*.* echo '********************************************Sending coverage test results********************************************' From 80e99b9a306b96b2d9de07401686c4f1d303cab3 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 15:38:10 +0100 Subject: [PATCH 31/48] Run tests with Selenium Grid --- appveyor.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index fa1cf7c8f..c1df59231 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -310,7 +310,24 @@ test_script: Start-Sleep -s 5 - 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\console_*.* + echo '********************************************Run tests with Selenium Grid ****************************************' + + cd .\\scripts + + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" "Objectivity.Test.Automation.Tests.NUnit.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" $true + + cd .. + + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.NUnit\bin\Release\Objectivity.Test.Automation.Tests.NUnit.dll --where (cat==BasicNUnit) --workers=5 --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + + if($lastexitcode -ne 0) + { + echo $lastexitcode + } + + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err + + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out echo '********************************************Sending coverage test results********************************************' From c04f703745771dc73c52e18885d36254d9c1556c Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 16:04:47 +0100 Subject: [PATCH 32/48] Added variables seleniumGridVersion: selenium-server-standalone-3.141.59.jar, seleniumGridUrl: https://bit.ly/2TlkRyu --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c1df59231..c078ab942 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,6 +32,8 @@ environment: APPVEYOR_RDP_PASSWORD: secure: 3OiDAcFLoSt3UCnmEU+XgM2d541PAqCNJAPqoiRqwRI= frameworkVersion: 3.1.3 + seleniumGridVersion: selenium-server-standalone-3.141.59.jar + seleniumGridUrl: https://bit.ly/2TlkRyu GithubAuthToken: secure: x9uTnOFLUnZ6DiVhpBBxIJxij33Sz9uAIe+qef6M3sj9+J/AUmpfBmiGgqRabTqs COVERALLS_REPO_TOKEN: @@ -284,9 +286,9 @@ test_script: echo '********************************************Downloading Selenium Grid********************************************' - $url = "https://bit.ly/2TlkRyu" + $url = $(seleniumGridUrl) - $grid = "selenium-server-standalone-3.141.59.jar" + $grid = $(seleniumGridVersion) $output = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" From cf3877874729391635b5a3c41d97295738886ab3 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 16:23:12 +0100 Subject: [PATCH 33/48] Added variables seleniumGridVersion: selenium-server-standalone-3.141.59.jar, seleniumGridUrl: https://bit.ly/2TlkRyu --- appveyor.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c078ab942..b17443ad0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,6 +20,10 @@ init: echo 'frameworkVersion' $env:frameworkVersion echo 'version' $env:appveyor_build_version + + echo 'seleniumGridVersion' $env:seleniumGridVersion + + echo 'seleniumGridUrl' $env:seleniumGridUrl assembly_info: @@ -286,12 +290,14 @@ test_script: echo '********************************************Downloading Selenium Grid********************************************' - $url = $(seleniumGridUrl) + $url = $env:seleniumGridUrl - $grid = $(seleniumGridVersion) + $grid = $env:seleniumGridVersion $output = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" + $outputLogs = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" + $start_time = Get-Date echo "output" $output @@ -304,11 +310,11 @@ test_script: echo '********************************************Start Selenium Grid in background****************************************' - Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput '.\console_hub.out' -RedirectStandardError '.\console_hub.err' + Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' Start-Sleep -s 5 - Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput '.\console_node.out' -RedirectStandardError '.\console_node.err' + Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' Start-Sleep -s 5 From c71df58ec20b0935b59f515d61147bc3cf45a998 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 16:42:42 +0100 Subject: [PATCH 34/48] changed way of publishing logs for selenium grid --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b17443ad0..8aa110806 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -333,9 +333,9 @@ test_script: echo $lastexitcode } - 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err + appveyor PushArtifact .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err - 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out + appveyor PushArtifact .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out echo '********************************************Sending coverage test results********************************************' From a3a6f36d9bb1e39b4b27b82dcc69d8bcce896985 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 19 Nov 2018 19:54:50 +0100 Subject: [PATCH 35/48] Kill Selenium Grid in background --- appveyor.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8aa110806..ba6b9268c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -310,11 +310,11 @@ test_script: echo '********************************************Start Selenium Grid in background****************************************' - Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' + $appHub=Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' -passthru Start-Sleep -s 5 - Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' + $appNode=Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' -passthru Start-Sleep -s 5 @@ -332,10 +332,14 @@ test_script: { echo $lastexitcode } + + Stop-Process -Id $appNode.Id + + Stop-Process -Id $appHub.Id - appveyor PushArtifact .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err - appveyor PushArtifact .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out echo '********************************************Sending coverage test results********************************************' From 71b748334ac7ff30a24588cbeb137a50e2349808 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 20 Nov 2018 08:33:17 +0100 Subject: [PATCH 36/48] Added possibility to run test on Android and iPhone with CloudProviders, fixes #89 --- Objectivity.Test.Automation.Common/BrowserType.cs | 10 ++++++++++ Objectivity.Test.Automation.Common/DriverContext.cs | 2 ++ .../App.config | 10 ++++++++++ .../Tests/HerokuappTestsNUnit.cs | 2 ++ 4 files changed, 24 insertions(+) diff --git a/Objectivity.Test.Automation.Common/BrowserType.cs b/Objectivity.Test.Automation.Common/BrowserType.cs index 848460bba..171b1eefc 100644 --- a/Objectivity.Test.Automation.Common/BrowserType.cs +++ b/Objectivity.Test.Automation.Common/BrowserType.cs @@ -72,6 +72,16 @@ public enum BrowserType ///
CloudProvider, + /// + /// Browser type to run test on Android with CloudProviders + /// + Android, + + /// + /// Browser type to run test on Iphone with CloudProviders + /// + Iphone, + /// /// Not supported browser /// diff --git a/Objectivity.Test.Automation.Common/DriverContext.cs b/Objectivity.Test.Automation.Common/DriverContext.cs index 007c04d2f..35431ab39 100644 --- a/Objectivity.Test.Automation.Common/DriverContext.cs +++ b/Objectivity.Test.Automation.Common/DriverContext.cs @@ -530,11 +530,13 @@ public void Start() this.SetRemoteDriverFireFoxOptions(driverCapabilitiesConf, settings, firefoxOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(firefoxOptions).ToCapabilities()); break; + case BrowserType.Android: case BrowserType.Chrome: ChromeOptions chromeOptions = new ChromeOptions(); this.SetRemoteDriverChromeOptions(driverCapabilitiesConf, settings, chromeOptions); this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(chromeOptions).ToCapabilities()); break; + case BrowserType.Iphone: case BrowserType.Safari: SafariOptions safariOptions = new SafariOptions(); this.SetRemoteDriverOptions(driverCapabilitiesConf, settings, safariOptions); diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index 28fbab47b..01c04340f 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -16,6 +16,8 @@
+
+
@@ -124,6 +126,14 @@ + + + + + + + + diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Tests/HerokuappTestsNUnit.cs b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Tests/HerokuappTestsNUnit.cs index b9699817f..d60f7253e 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Tests/HerokuappTestsNUnit.cs +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/Tests/HerokuappTestsNUnit.cs @@ -26,6 +26,8 @@ namespace Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.Tests using PageObjects.PageObjects.TheInternet; [TestFixture("Chrome")] + [TestFixture("Android")] + [TestFixture("Iphone")] [TestFixture("Firefox")] [TestFixture("Safari")] [TestFixture("Edge")] From abea04ca78f275fb6b3857aeb48aa60c61e14eb8 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 20 Nov 2018 13:21:00 +0100 Subject: [PATCH 37/48] Added where for saucelabs test execution --- .../App.config | 2 ++ appveyor.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config index 01c04340f..c761a690d 100644 --- a/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config +++ b/Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser/App.config @@ -129,10 +129,12 @@ + + diff --git a/appveyor.yml b/appveyor.yml index ba6b9268c..02129dc25 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where `"test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari`" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml if($lastexitcode -ne 0) { From 70f6d9cb09d2756f6b9237e06d4c090e6595cfae Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Tue, 20 Nov 2018 20:35:07 +0100 Subject: [PATCH 38/48] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 02129dc25..7764a6add 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where `"test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari`" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where \"test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari\" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml if($lastexitcode -ne 0) { From 278c7af591800bf97545bbdb2b56b9f66b138d06 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 09:11:39 +0100 Subject: [PATCH 39/48] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7764a6add..d62d026be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where \"test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari\" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where `"test `=`~ Chrome `|`| test `=`~ Firefox `|`| test `=`~ IE `|`| test `=`~ Safari`" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml if($lastexitcode -ne 0) { From bad35969de6709bf54e43e63d73485df7bfd92e8 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 09:30:56 +0100 Subject: [PATCH 40/48] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d62d026be..9e6a09e5a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where `"test `=`~ Chrome `|`| test `=`~ Firefox `|`| test `=`~ IE `|`| test `=`~ Safari`" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where \"test =~ Chrome \|\| test =~ Firefox \|\| test =~ IE \|\| test =~ Safari\" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml if($lastexitcode -ne 0) { From 21826da8854d487e0f7fc136880af2297d582123 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 10:24:38 +0100 Subject: [PATCH 41/48] Added where for saucelabs test execution --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9e6a09e5a..408ded3df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where \"test =~ Chrome \|\| test =~ Firefox \|\| test =~ IE \|\| test =~ Safari\" --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where "test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari" --result=myresults.xml`;format=AppVeyor if($lastexitcode -ne 0) { From 4d353972806984f65a563c25ede4b775438f253d Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 10:51:18 +0100 Subject: [PATCH 42/48] Run CloudProviderCrossBrowser tests with Selenium Grid --- appveyor.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 408ded3df..22af11288 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -281,7 +281,7 @@ test_script: cd .. - & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where "test =~ Chrome || test =~ Firefox || test =~ IE || test =~ Safari" --result=myresults.xml`;format=AppVeyor + & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where "test =~ Chrome || test =~ IE || test =~ Safari" --result=myresults.xml`;format=AppVeyor if($lastexitcode -ne 0) { @@ -326,7 +326,22 @@ test_script: cd .. - & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.NUnit\bin\Release\Objectivity.Test.Automation.Tests.NUnit.dll --where (cat==BasicNUnit) --workers=5 --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.NUnit\bin\Release\Objectivity.Test.Automation.Tests.NUnit.dll --where (cat==BasicNUnit) --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml + + if($lastexitcode -ne 0) + { + echo $lastexitcode + } + + echo '********************************************Run CloudProviderCrossBrowser tests with Selenium Grid********************************************' + + cd .\\scripts + + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" $true + + cd .. + + & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --where "test =~ Chrome" --result=myresults.xml`;format=AppVeyor if($lastexitcode -ne 0) { From 6b235979b76796ae901b6f8ea9048dcaf050ffb7 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 19:23:28 +0100 Subject: [PATCH 43/48] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 22af11288..5cc53d742 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -322,7 +322,7 @@ test_script: cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" "Objectivity.Test.Automation.Tests.NUnit.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" $true + .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" "Objectivity.Test.Automation.Tests.NUnit.dll.config" "//appSettings" "browser|RemoteWebDriverHub" "RemoteWebDriver|http://localhost:4444/wd/hub" $true cd .. From 100a0ef89908019c5bb60ff4f75996c7642d5018 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 19:53:47 +0100 Subject: [PATCH 44/48] Update appveyor.yml --- appveyor.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5cc53d742..5c2a48326 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ environment: secure: 3OiDAcFLoSt3UCnmEU+XgM2d541PAqCNJAPqoiRqwRI= frameworkVersion: 3.1.3 seleniumGridVersion: selenium-server-standalone-3.141.59.jar - seleniumGridUrl: https://bit.ly/2TlkRyu + seleniumGridUrl: http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar GithubAuthToken: secure: x9uTnOFLUnZ6DiVhpBBxIJxij33Sz9uAIe+qef6M3sj9+J/AUmpfBmiGgqRabTqs COVERALLS_REPO_TOKEN: @@ -300,12 +300,14 @@ test_script: $start_time = Get-Date - echo "output" $output + echo "Downloading Selenium Grid from:" $url $wc = New-Object System.Net.WebClient (New-Object System.Net.WebClient).DownloadFile($url, $output) + echo "Selenium Grid downloaded to:" $output + echo "Time taken to download $($grid): $((Get-Date).Subtract($start_time).Seconds) second(s)" echo '********************************************Start Selenium Grid in background****************************************' @@ -313,11 +315,15 @@ test_script: $appHub=Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' -passthru Start-Sleep -s 5 + + echo "Selenium Grid hub app Id:" $appHub.Id $appNode=Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' -passthru Start-Sleep -s 5 + echo "Selenium Grid node app Id:" $appNode.Id + echo '********************************************Run tests with Selenium Grid ****************************************' cd .\\scripts @@ -333,7 +339,7 @@ test_script: echo $lastexitcode } - echo '********************************************Run CloudProviderCrossBrowser tests with Selenium Grid********************************************' + echo '*****************************Run CloudProviderCrossBrowser tests with Selenium Grid****************************' cd .\\scripts @@ -348,8 +354,12 @@ test_script: echo $lastexitcode } + echo "Stop Selenium Grid node" + Stop-Process -Id $appNode.Id + echo "Stop Selenium Grid hub" + Stop-Process -Id $appHub.Id 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err From b2a028ea1a2fb4afa5a8871b7cb15cfc6205bd29 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 21 Nov 2018 20:49:17 +0100 Subject: [PATCH 45/48] Update appveyor.yml --- appveyor.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5c2a48326..e9b4e6b09 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -316,13 +316,13 @@ test_script: Start-Sleep -s 5 - echo "Selenium Grid hub app Id:" $appHub.Id + echo "Selenium Grid hub started" $appNode=Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' -passthru Start-Sleep -s 5 - echo "Selenium Grid node app Id:" $appNode.Id + echo "Selenium Grid node started" echo '********************************************Run tests with Selenium Grid ****************************************' @@ -353,6 +353,8 @@ test_script: { echo $lastexitcode } + + echo '*****************************Stop Selenium Grid****************************' echo "Stop Selenium Grid node" @@ -362,6 +364,8 @@ test_script: Stop-Process -Id $appHub.Id + echo '*****************************Add Selenium Grid logs to testresults****************************' + 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.err 7z a testresults_$env:appveyor_build_version.zip .\Objectivity.Test.Automation.Tests.NUnit\bin\Release\*.out From bc1c97d04d924ba9ea81985806ceba4e258e373f Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Thu, 22 Nov 2018 08:51:23 +0100 Subject: [PATCH 46/48] changed way of using set_AppConfig_for_tests --- appveyor.yml | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e9b4e6b09..7d09d5ede 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -197,11 +197,7 @@ test_script: echo '********************************************Unit tests for Firefox********************************************' - cd .\\scripts - - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.UnitTests\bin\Release" "Objectivity.Test.Automation.UnitTests.dll.config" "//appSettings" "browser" "Firefox" - - cd .. + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.UnitTests\bin\Release" "Objectivity.Test.Automation.UnitTests.dll.config" "//appSettings" "browser" "Firefox" & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.UnitTests\bin\Release\Objectivity.Test.Automation.UnitTests.dll --where:cat=TakingScreehShots --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml @@ -237,13 +233,9 @@ test_script: echo '********************************************BrowserStack tests********************************************' - cd .\\scripts - - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true - - cd .. + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml @@ -252,15 +244,12 @@ test_script: echo $lastexitcode } - <#echo '********************************************testingbot.com tests********************************************' - - cd .\\scripts + <#echo '********************************************testingbot.com tests********************************************' - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://hub.testingbot.com/wd/hub/" $true + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "https://hub.testingbot.com/wd/hub/" $true - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "key|secret|build|browserstack.user" "$env:testingbotkey|$env:testingbotsecret|Objectivity.Test.Automation.Tests.TestingBotCrossBrowser$env:appveyor_build_version|empty" + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "key|secret|build|browserstack.user" "$env:testingbotkey|$env:testingbotsecret|Objectivity.Test.Automation.Tests.TestingBotCrossBrowser$env:appveyor_build_version|empty" - cd .. & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml @@ -270,16 +259,12 @@ test_script: }#> echo '********************************************saucelabs tests********************************************' - - cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:saucelabsusername):$($env:saucelabsaccessKey)@ondemand.saucelabs.com:80/wd/hub" + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://$($env:saucelabsusername):$($env:saucelabsaccessKey)@ondemand.saucelabs.com:80/wd/hub" - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.SauceLabsCrossBrowser$env:appveyor_build_version" $true + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//DriverCapabilities" "build" "Objectivity.Test.Automation.Tests.SauceLabsCrossBrowser$env:appveyor_build_version" $true - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true - - cd .. + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Safari" "platform" "macOS 10.13" $true & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --workers=5 --where "test =~ Chrome || test =~ IE || test =~ Safari" --result=myresults.xml`;format=AppVeyor @@ -326,11 +311,7 @@ test_script: echo '********************************************Run tests with Selenium Grid ****************************************' - cd .\\scripts - - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" "Objectivity.Test.Automation.Tests.NUnit.dll.config" "//appSettings" "browser|RemoteWebDriverHub" "RemoteWebDriver|http://localhost:4444/wd/hub" $true - - cd .. + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" "Objectivity.Test.Automation.Tests.NUnit.dll.config" "//appSettings" "browser|RemoteWebDriverHub" "RemoteWebDriver|http://localhost:4444/wd/hub" $true & $OpenCover -target:nunit3-console.exe -mergeoutput -targetargs:".\Objectivity.Test.Automation.Tests.NUnit\bin\Release\Objectivity.Test.Automation.Tests.NUnit.dll --where (cat==BasicNUnit) --result=myresults.xml`;format=AppVeyor" -filter:"+[Objectivity.Test.Automation.Common]*" -register:user -output:opencoverCoverage.xml @@ -340,12 +321,8 @@ test_script: } echo '*****************************Run CloudProviderCrossBrowser tests with Selenium Grid****************************' - - cd .\\scripts - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" $true - - cd .. + .\scripts\set_AppConfig_for_tests.ps1 ".\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//appSettings" "RemoteWebDriverHub" "http://localhost:4444/wd/hub" $true & nunit3-console.exe .\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll --where "test =~ Chrome" --result=myresults.xml`;format=AppVeyor From f08deb124a5ccaec7f739bbd24f3acb11ce8fa26 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Mon, 17 Dec 2018 08:47:44 +0100 Subject: [PATCH 47/48] Updated Selenium to version 3.141.0 --- .../Selenium.shfbproj | 8 ++++---- .../Objectivity.Test.Automation.Common.csproj | 16 ++++++++-------- .../packages.config | 8 ++++---- ...ectivity.Test.Automation.Tests.Angular.csproj | 16 ++++++++-------- .../packages.config | 8 ++++---- ...mation.Tests.CloudProviderCrossBrowser.csproj | 4 ++-- .../packages.config | 2 +- ...ctivity.Test.Automation.Tests.Features.csproj | 9 +++++---- .../packages.config | 4 ++-- ...jectivity.Test.Automation.Tests.MsTest.csproj | 12 ++++++------ .../packages.config | 6 +++--- ...bjectivity.Test.Automation.Tests.NUnit.csproj | 12 ++++++------ .../packages.config | 6 +++--- ...vity.Test.Automation.Tests.PageObjects.csproj | 8 ++++---- .../packages.config | 4 ++-- .../Objectivity.Test.Automation.UnitTests.csproj | 16 ++++++++-------- .../packages.config | 6 ++++-- TestFramework.sln | 11 +++++++++++ 18 files changed, 85 insertions(+), 71 deletions(-) diff --git a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj index ba7da0ccd..51799a0b2 100644 --- a/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj +++ b/Objectivity.Test.Automation.Common.Documentation/Selenium.shfbproj @@ -27,10 +27,10 @@ - - - - + + + + 100 OnlyWarningsAndErrors Website diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 1dde5025c..0a8fa4875 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -130,11 +130,11 @@ - - ..\packages\Selenium.WebDriver.3.14.0\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.14.0\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll @@ -179,9 +179,9 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + taskkill /F /IM IEDriverServer.exe 2>nul &set errorlevel=0 @@ -190,9 +190,9 @@ taskkill /F /IM geckodriver.exe 2>nul &set errorlevel=0 cd $(TargetDir) del *.log - - + +