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 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.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 94fcac6e1..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 @@ -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.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/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/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..35431ab39 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 @@ -237,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)); + } } } @@ -316,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)); + } } } @@ -510,7 +521,43 @@ public void Start() this.CheckIfProxySetForSafari(); break; case BrowserType.RemoteWebDriver: - this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetCapabilities()); + var driverCapabilitiesConf = ConfigurationManager.GetSection("DriverCapabilities") as NameValueCollection; + NameValueCollection settings = ConfigurationManager.GetSection("environments/" + this.CrossBrowserEnvironment) as NameValueCollection; + switch (this.CrossBrowserEnvironment) + { + case BrowserType.Firefox: + FirefoxOptions firefoxOptions = new FirefoxOptions(); + 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); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(safariOptions).ToCapabilities()); + break; + case BrowserType.Edge: + EdgeOptions egEdgeOptions = new EdgeOptions(); + 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(); + this.SetRemoteDriverIEOptions(driverCapabilitiesConf, settings, internetExplorerOptions); + this.driver = new RemoteWebDriver(BaseConfiguration.RemoteWebDriverHub, this.SetDriverOptions(internetExplorerOptions).ToCapabilities()); + 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,42 +738,48 @@ private T SetDriverOptions(T options) return options; } - /// - /// Set web driver capabilities. - /// - /// Instance with set web driver capabilities. - private DesiredCapabilities SetCapabilities() + private Proxy CurrentProxy() { - DesiredCapabilities capabilities = new DesiredCapabilities(); + Proxy proxy = new Proxy + { + HttpProxy = BaseConfiguration.Proxy, + FtpProxy = BaseConfiguration.Proxy, + SslProxy = BaseConfiguration.Proxy, + SocksProxy = BaseConfiguration.Proxy + }; + return proxy; + } - switch (BaseConfiguration.TestBrowserCapabilities) + private void CheckIfProxySetForSafari() + { + // set browser proxy for Safari + if (!string.IsNullOrEmpty(BaseConfiguration.Proxy)) { - 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)); + throw new NotSupportedException("Use command line to setup proxy"); } + } - var driverCapabilitiesConf = ConfigurationManager.GetSection("DriverCapabilities") as NameValueCollection; + private FirefoxOptions AddFirefoxArguments(FirefoxOptions option) + { + var firefoxArguments = ConfigurationManager.GetSection("FirefoxArguments") as NameValueCollection; + // if there are any arguments + if (firefoxArguments != null) + { + // loop through all of them + for (var i = 0; i < firefoxArguments.Count; i++) + { + Logger.Trace(CultureInfo.CurrentCulture, "Setting FireFox Arguments {0}", firefoxArguments.GetKey(i)); + option.AddArgument(firefoxArguments.GetKey(i)); + } + } + + return option; + } + + private T SetRemoteDriverOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, T options) + where T : DriverOptions + { // if there are any capability if (driverCapabilitiesConf != null) { @@ -735,97 +788,88 @@ private DesiredCapabilities SetCapabilities() { string value = driverCapabilitiesConf.GetValues(i)[0]; Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); - capabilities.SetCapability(driverCapabilitiesConf.GetKey(i), value); + options.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value); } } - capabilities = this.CloudProviderCapabilities(capabilities); - - if (this.CapabilitiesSet != null) + foreach (string key in settings.AllKeys) { - this.CapabilitiesSet(this, new CapabilitiesSetEventArgs(capabilities)); + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); + + options.AddAdditionalCapability(key, settings[key]); } - return capabilities; + return options; } - /// - /// Set CloudProvider driver capabilities. - /// - /// The DesiredCapabilities. - /// Instance with set CloudProvider driver capabilities. - private DesiredCapabilities CloudProviderCapabilities(DesiredCapabilities capabilities) + private void SetRemoteDriverFireFoxOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, FirefoxOptions firefoxOptions) { - Logger.Debug(CultureInfo.CurrentCulture, "Cross Browser Profile '{0}'", this.CrossBrowserProfile); - if (!string.IsNullOrEmpty(this.CrossBrowserProfile)) + // if there are any capability + if (driverCapabilitiesConf != null) { - NameValueCollection caps = ConfigurationManager.GetSection("capabilities/" + this.CrossBrowserProfile) as NameValueCollection; - - foreach (string key in caps.AllKeys) + // loop through all of them + for (var i = 0; i < driverCapabilitiesConf.Count; i++) { - Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserProfile); - capabilities.SetCapability(key, caps[key]); + string value = driverCapabilitiesConf.GetValues(i)[0]; + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", driverCapabilitiesConf.GetKey(i)); + firefoxOptions.AddAdditionalCapability(driverCapabilitiesConf.GetKey(i), value, true); } } - 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]); - } - } - } + foreach (string key in settings.AllKeys) + { + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); - return capabilities; + firefoxOptions.AddAdditionalCapability(key, settings[key], true); + } } - private Proxy CurrentProxy() + private void SetRemoteDriverIEOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, InternetExplorerOptions internetExplorerOptions) { - Proxy proxy = new Proxy + // if there are any capability + if (driverCapabilitiesConf != null) { - HttpProxy = BaseConfiguration.Proxy, - FtpProxy = BaseConfiguration.Proxy, - SslProxy = BaseConfiguration.Proxy, - SocksProxy = BaseConfiguration.Proxy - }; - return proxy; - } + // 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); + } + } - private void CheckIfProxySetForSafari() - { - // set browser proxy for Safari - if (!string.IsNullOrEmpty(BaseConfiguration.Proxy)) + foreach (string key in settings.AllKeys) { - throw new NotSupportedException("Use command line to setup proxy"); + Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0} from {1}", key, this.CrossBrowserEnvironment); + + internetExplorerOptions.AddAdditionalCapability(key, settings[key], true); } } - private FirefoxOptions AddFirefoxArguments(FirefoxOptions option) + private void SetRemoteDriverChromeOptions(NameValueCollection driverCapabilitiesConf, NameValueCollection settings, ChromeOptions chromeOptions) { - var firefoxArguments = ConfigurationManager.GetSection("FirefoxArguments") as NameValueCollection; - - // if there are any arguments - if (firefoxArguments != null) + // if there are any capability + if (driverCapabilitiesConf != null) { // loop through all of them - for (var i = 0; i < firefoxArguments.Count; i++) + for (var i = 0; i < driverCapabilitiesConf.Count; i++) { - Logger.Trace(CultureInfo.CurrentCulture, "Setting FireFox Arguments {0}", firefoxArguments.GetKey(i)); - option.AddArgument(firefoxArguments.GetKey(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); } } - return option; + // if there are any capability + if (settings != null) + { + 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); + } + } } } } diff --git a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj index 00e44a409..30fecdbc6 100644 --- a/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj +++ b/Objectivity.Test.Automation.Common/Objectivity.Test.Automation.Common.csproj @@ -1,200 +1,203 @@ - - - - Debug - AnyCPU - - - 2.0 - {46FA4EDC-A114-4E8F-A545-996F99E31EA8} - Library - Properties - Objectivity.Test.Automation.Common - Objectivity.Test.Automation.Common - v4.5 - 512 - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - CodedUITest - ..\..\Objectivity.Test.Automation.Common\ - true - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Objectivity.Test.Automation.Common.XML - ..\fxcop-sonarqube.tests.ruleset - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - true - true - True - False - ..\fxcop-sonarqube.tests.ruleset - bin\Release\Objectivity.Test.Automation.Common.XML - false - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - Designer - - - - - - - ..\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\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll - - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll - - - - - CustomDictionary.xml - - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - - - - 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 -taskkill /F /IM chromedriver.exe 2>nul &set errorlevel=0 -taskkill /F /IM geckodriver.exe 2>nul &set errorlevel=0 -cd $(TargetDir) -del *.log - - - - - + + + + Debug + AnyCPU + + + 2.0 + {46FA4EDC-A114-4E8F-A545-996F99E31EA8} + Library + Properties + Objectivity.Test.Automation.Common + Objectivity.Test.Automation.Common + v4.5 + 512 + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + CodedUITest + ..\..\Objectivity.Test.Automation.Common\ + true + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\Objectivity.Test.Automation.Common.XML + ..\fxcop-sonarqube.tests.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + bin\Release\Objectivity.Test.Automation.Common.XML + false + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + Designer + + + + + + + ..\packages\Microsoft.AnalysisServices.AdomdClient.12.0.2000.8\lib\net40\Microsoft.AnalysisServices.AdomdClient.dll + True + + + + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + + + + + + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll + + + ..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll + + + + + CustomDictionary.xml + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + + + + + + + + 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 +taskkill /F /IM chromedriver.exe 2>nul &set errorlevel=0 +taskkill /F /IM geckodriver.exe 2>nul &set errorlevel=0 +cd $(TargetDir) +del *.log + + + + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.Common/packages.config b/Objectivity.Test.Automation.Common/packages.config index 382200b6d..2a26bf8bf 100644 --- a/Objectivity.Test.Automation.Common/packages.config +++ b/Objectivity.Test.Automation.Common/packages.config @@ -1,12 +1,12 @@ - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file 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 90897c70c..43b3f89a8 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 @@ -42,21 +42,27 @@ ..\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 - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + + - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll @@ -119,14 +125,14 @@ 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}. - - - - + + + + - - - + + + - - + + + @@ -87,35 +90,25 @@ add key="ChromePluginName.crx" value=""/--> - - - testingbot Settings/--> - - saucelabs Settings/--> - - - - - @@ -124,22 +117,33 @@ - - + + + + + + + + + + - + - + + + + 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 536c84d6c..097062b5f 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 @@ -55,13 +55,12 @@ true + - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll @@ -69,10 +68,14 @@ + + + + - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll @@ -119,7 +122,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}. - + - + + + + + + Debug + AnyCPU + {B97FEA9E-C131-4850-BC6D-563F60EE41FA} + Library + Properties + Objectivity.Test.Automation.Tests.Features + Objectivity.Test.Automation.Tests.Features + v4.5 + 512 + + ..\ + true + Settings.StyleCop + 4.7.44.0 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE;CODE_ANALYSIS + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + true + + + + + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + + + + + + + + ..\packages\SpecFlow.2.2.0\lib\net45\TechTalk.SpecFlow.dll + True + + + + + + + + SmokeTests.feature + True + True + + + + + Designer + + + Designer + + + + + SpecFlowSingleFileGenerator + SmokeTests.feature.cs + + + + + + + + + {46fa4edc-a114-4e8f-a545-996f99e31ea8} + Objectivity.Test.Automation.Common + + + {1ea997e6-b873-469f-8685-17f73ebb0b92} + Objectivity.Test.Automation.Tests.PageObjects + + + + + + + + + + + + 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}. + + + + + + + + + + + + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.Tests.Features/packages.config b/Objectivity.Test.Automation.Tests.Features/packages.config index 1d2de0c5e..011801298 100644 --- a/Objectivity.Test.Automation.Tests.Features/packages.config +++ b/Objectivity.Test.Automation.Tests.Features/packages.config @@ -1,19 +1,18 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file 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 2f1c818e0..477ccd0cf 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 @@ -1,156 +1,161 @@ - - - - - Debug - AnyCPU - {00D2DBBC-8C05-45B7-956E-9F01DEB9BACA} - Library - Properties - Objectivity.Test.Automation.Tests.MsTest - Objectivity.Test.Automation.Tests.MsTest - v4.5 - 512 - - ..\ - true - Settings.StyleCop - 4.7.44.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - true - true - True - False - ..\fxcop-sonarqube.tests.ruleset - false - - - pdbonly - true - bin\Release\ - TRACE;CODE_ANALYSIS - prompt - 4 - true - true - true - True - False - ..\fxcop-sonarqube.tests.ruleset - false - - - true - - - - False - ..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll - - - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True - - - - - - - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll - - - - - - Code - - - - - - - - - - - Designer - Always - - - Always - - - Designer - - - Designer - - - - Always - - - - - - - - - {46fa4edc-a114-4e8f-a545-996f99e31ea8} - Objectivity.Test.Automation.Common - - - {1ea997e6-b873-469f-8685-17f73ebb0b92} - Objectivity.Test.Automation.Tests.PageObjects - - - - - CustomDictionary.xml - - - Always - - - Always - Designer - - - - - - - - - - - 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}. - - - - - - - - - - + + + + + Debug + AnyCPU + {00D2DBBC-8C05-45B7-956E-9F01DEB9BACA} + Library + Properties + Objectivity.Test.Automation.Tests.MsTest + Objectivity.Test.Automation.Tests.MsTest + v4.5 + 512 + + ..\ + true + Settings.StyleCop + 4.7.44.0 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE;CODE_ANALYSIS + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + true + + + + + False + ..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll + + + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + + + + + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll + + + + + + Code + + + + + + + + + + + Designer + Always + + + Always + + + Designer + + + Designer + + + + Always + + + + + + + + + {46fa4edc-a114-4e8f-a545-996f99e31ea8} + Objectivity.Test.Automation.Common + + + {1ea997e6-b873-469f-8685-17f73ebb0b92} + Objectivity.Test.Automation.Tests.PageObjects + + + + + CustomDictionary.xml + + + Always + + + Always + Designer + + + + + + + + + + + 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}. + + + + + + + + + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.Tests.MsTest/packages.config b/Objectivity.Test.Automation.Tests.MsTest/packages.config index 9c65af9a7..b7a5bf618 100644 --- a/Objectivity.Test.Automation.Tests.MsTest/packages.config +++ b/Objectivity.Test.Automation.Tests.MsTest/packages.config @@ -1,10 +1,10 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file 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 @@ - + 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 fa6a4cbc8..c8c5ee8b2 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 @@ -1,192 +1,195 @@ - - - - - - Debug - AnyCPU - {74F9B9A8-0055-4C13-B3C9-FACED546CB43} - Library - Properties - Objectivity.Test.Automation.Tests.NUnit - Objectivity.Test.Automation.Tests.NUnit - v4.5 - 512 - - ..\ - true - Settings.StyleCop - 4.7.44.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - true - true - True - False - ..\fxcop-sonarqube.tests.ruleset - false - - - pdbonly - true - bin\Release\ - TRACE;CODE_ANALYSIS - prompt - 4 - true - true - true - True - False - ..\fxcop-sonarqube.tests.ruleset - false - - - true - - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - True - - - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True - - - ..\packages\NPOI.2.3.0\lib\net40\NPOI.dll - True - - - ..\packages\NPOI.2.3.0\lib\net40\NPOI.OOXML.dll - True - - - ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXml4Net.dll - True - - - ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXmlFormats.dll - True - - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True - - - - - - - - - - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll - - - - - - - - - - Code - - - - - - - - - - - - - - Designer - - - Always - - - Always - - - Designer - - - - - Always - - - Always - - - - - - - - - - {46fa4edc-a114-4e8f-a545-996f99e31ea8} - Objectivity.Test.Automation.Common - - - {1ea997e6-b873-469f-8685-17f73ebb0b92} - Objectivity.Test.Automation.Tests.PageObjects - - - - - Always - Designer - - - Always - - - Always - - - - - - - - - - - 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}. - - - - - - - - - - - + + + + + + Debug + AnyCPU + {74F9B9A8-0055-4C13-B3C9-FACED546CB43} + Library + Properties + Objectivity.Test.Automation.Tests.NUnit + Objectivity.Test.Automation.Tests.NUnit + v4.5 + 512 + + ..\ + true + Settings.StyleCop + 4.7.44.0 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE;CODE_ANALYSIS + prompt + 4 + true + true + true + True + False + ..\fxcop-sonarqube.tests.ruleset + false + + + true + + + + ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + True + + + + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.dll + True + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OOXML.dll + True + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXml4Net.dll + True + + + ..\packages\NPOI.2.3.0\lib\net40\NPOI.OpenXmlFormats.dll + True + + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + + + + + + + + + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll + + + + + + + + + + Code + + + + + + + + + + + + + + Designer + + + Always + + + Always + + + Designer + + + + + Always + + + Always + + + + + + + + + + {46fa4edc-a114-4e8f-a545-996f99e31ea8} + Objectivity.Test.Automation.Common + + + {1ea997e6-b873-469f-8685-17f73ebb0b92} + Objectivity.Test.Automation.Tests.PageObjects + + + + + Always + Designer + + + Always + + + Always + + + + + + + + + + + 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}. + + + + + + + + + + + \ No newline at end of file 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/Objectivity.Test.Automation.Tests.NUnit/packages.config b/Objectivity.Test.Automation.Tests.NUnit/packages.config index 608c19dbb..89b4f126e 100644 --- a/Objectivity.Test.Automation.Tests.NUnit/packages.config +++ b/Objectivity.Test.Automation.Tests.NUnit/packages.config @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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..8d0ec98ad 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 @@ -54,19 +54,25 @@ true + - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll + - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.141.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..e5482d8c8 100644 --- a/Objectivity.Test.Automation.Tests.PageObjects/packages.config +++ b/Objectivity.Test.Automation.Tests.PageObjects/packages.config @@ -1,8 +1,8 @@  - - - - + + + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.Tests.Xunit/packages.config b/Objectivity.Test.Automation.Tests.Xunit/packages.config index 4cb6c464a..ace39a1ba 100644 --- a/Objectivity.Test.Automation.Tests.Xunit/packages.config +++ b/Objectivity.Test.Automation.Tests.Xunit/packages.config @@ -1,6 +1,6 @@  - + diff --git a/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj b/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj index 3e16cd2f1..dcf91f4a5 100644 --- a/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj +++ b/Objectivity.Test.Automation.UnitTests/Objectivity.Test.Automation.UnitTests.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -40,24 +40,30 @@ 4 - - ..\packages\Magick.NET-Q16-AnyCPU.7.6.0.1\lib\net40\Magick.NET-Q16-AnyCPU.dll + + ..\packages\Magick.NET-Q16-AnyCPU.7.8.0\lib\net40\Magick.NET-Q16-AnyCPU.dll + - ..\packages\NLog.4.3.5\lib\net45\NLog.dll - True + ..\packages\NLog.4.5.10\lib\net45\NLog.dll - - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - True + + ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll + + - - ..\packages\Selenium.WebDriver.3.12.1\lib\net45\WebDriver.dll + + + + + + + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll - - ..\packages\Selenium.Support.3.12.1\lib\net45\WebDriver.Support.dll + + ..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll @@ -129,12 +135,12 @@ 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}. - - - - + + + + - - - + + + \ No newline at end of file diff --git a/Objectivity.Test.Automation.UnitTests/packages.config b/Objectivity.Test.Automation.UnitTests/packages.config index e697bb2b1..52de0e4d2 100644 --- a/Objectivity.Test.Automation.UnitTests/packages.config +++ b/Objectivity.Test.Automation.UnitTests/packages.config @@ -2,11 +2,14 @@ - - - + + + + - - - + + + + + \ No newline at end of file diff --git a/TestFramework.sln b/TestFramework.sln index b38ee7439..944006fea 100644 --- a/TestFramework.sln +++ b/TestFramework.sln @@ -34,6 +34,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuspec", ".nuspec", "{1A98C4E2-FE6C-4E95-BA56-5F6B4F088A44}" + ProjectSection(SolutionItems) = preProject + .nuspec\Objectivity.Test.Automation.Features.nuspec = .nuspec\Objectivity.Test.Automation.Features.nuspec + .nuspec\Objectivity.Test.Automation.MsTest.nuspec = .nuspec\Objectivity.Test.Automation.MsTest.nuspec + .nuspec\Objectivity.Test.Automation.Nunit.nuspec = .nuspec\Objectivity.Test.Automation.Nunit.nuspec + .nuspec\Objectivity.Test.Automation.Xunit.nuspec = .nuspec\Objectivity.Test.Automation.Xunit.nuspec + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -84,6 +92,9 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {1A98C4E2-FE6C-4E95-BA56-5F6B4F088A44} = {2CF5AF89-028E-4D81-B39E-A021B5C01C11} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2EB905F9-3273-4103-957E-84D778012D8C} EndGlobalSection diff --git a/appveyor.yml b/appveyor.yml index e16b84bb1..7d09d5ede 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: @@ -32,6 +36,8 @@ environment: APPVEYOR_RDP_PASSWORD: secure: 3OiDAcFLoSt3UCnmEU+XgM2d541PAqCNJAPqoiRqwRI= frameworkVersion: 3.1.3 + seleniumGridVersion: selenium-server-standalone-3.141.59.jar + 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: @@ -191,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 @@ -231,11 +233,9 @@ test_script: echo '********************************************BrowserStack tests********************************************' - cd .\\scripts + .\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" "browserstack.user|browserstack.key|build" "$env:browserstackuser|$env:browserstackkey|Objectivity.Test.Automation.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" - - 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 @@ -244,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.BrowserStackCrossBrowser$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 @@ -262,27 +259,93 @@ test_script: }#> echo '********************************************saucelabs tests********************************************' + + .\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" "//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" "//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 + + if($lastexitcode -ne 0) + { + echo $lastexitcode + } - cd .\\scripts + echo '********************************************Downloading Selenium Grid********************************************' - .\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 + $url = $env:seleniumGridUrl - .\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" + $grid = $env:seleniumGridVersion - .\set_AppConfig_for_tests.ps1 "..\Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser\bin\Release" "Objectivity.Test.Automation.Tests.CloudProviderCrossBrowser.dll.config" "//environments/Edge" "browser" "MicrosoftEdge" $true + $output = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\$grid" - .\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 + $outputLogs = $env:APPVEYOR_BUILD_FOLDER + "\Objectivity.Test.Automation.Tests.NUnit\bin\Release\" - .\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 + $start_time = Get-Date - cd .. + echo "Downloading Selenium Grid from:" $url - & $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 + $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****************************************' + + $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 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 started" + + echo '********************************************Run tests with Selenium Grid ****************************************' + + .\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 + + if($lastexitcode -ne 0) + { + echo $lastexitcode + } + + echo '*****************************Run CloudProviderCrossBrowser tests with Selenium Grid****************************' + + .\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 if($lastexitcode -ne 0) { echo $lastexitcode } + + echo '*****************************Stop Selenium Grid****************************' + + echo "Stop Selenium Grid node" + + Stop-Process -Id $appNode.Id + + echo "Stop Selenium Grid hub" + + 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 echo '********************************************Sending coverage test results********************************************'