Exemple #1
0
        protected string GetTestResultsPath(bool createFolder)
        {
            string retString = CurrentTestTypeName.Replace(TestBaseNamespace, "").Replace(".", @"\").SanitisePath();

            /* need to sanitise the path before passing in to OutputPath method as it combines the paths
             * and throws an exception if illegal characters exist when combining paths.
             */
            retString = ExecutionSettings.OutputPath(
                $@"{TestResultsBaseFolder}\{retString}\{DateTime.Now.ToString("yyyyMMdd")}\{DateTime.Now.ToString(
                    "HHmmss")}", createFolder);

            return(retString.SanitisePath());
        }
Exemple #2
0
 private void _SetNameCapability()
 {
     if (!string.IsNullOrEmpty(TestBaseNamespace) && CurrentTestTypeName.StartsWith(TestBaseNamespace))
     {
         if (TestSuiteSettings.WebDriverSettings.AdditionalCapabilities.Exists(ac => ac.Id == "name"))
         {
             TestSuiteSettings.WebDriverSettings.AdditionalCapabilities.Find(ac => ac.Id == "name").Value =
                 CurrentTestTypeName;
         }
         else
         {
             var testNameCapability = new AdditionalCapability {
                 Id = "name", Value = CurrentTestTypeName
             };
             TestSuiteSettings.WebDriverSettings.AdditionalCapabilities.Add(testNameCapability);
         }
     }
 }