Beispiel #1
0
        public static List <string> GetTestLabExplorer(string PathNode)
        {
            string[]      separatePath    = PathNode.Split('\\');
            List <string> testlabPathList = new List <string>();

            separatePath[0] = ExploredTestLabFolder.ContainsKey("Root") ? ExploredTestLabFolder["Root"] : QcRestClient.GetTestSetRootFolder().Id;

            if (!ExploredTestLabFolder.ContainsKey("Root"))
            {
                ExploredTestLabFolder.Add("Root", separatePath[0]);
            }

            for (int i = 1; i < separatePath.Length; i++)
            {
                separatePath[i] = GetTestLabFolderId(separatePath[i], separatePath[i - 1]);
            }

            QCTestSetFolderColl foldersToExplor = QcRestClient.GetTestSetTreeLayerByFilter(separatePath[separatePath.Length - 1], "");

            foreach (QCTestSetFolder folders in foldersToExplor)
            {
                testlabPathList.Add(folders.Name);
            }

            return(testlabPathList);
        }
Beispiel #2
0
        public static List <string> GetTestLabExplorer(string PathNode)
        {
            string[]      separatePath    = PathNode.Split('\\');
            List <string> testlabPathList = new List <string>();

            try
            {
                separatePath[0] = ExploredTestLabFolder.ContainsKey("Root") ? ExploredTestLabFolder["Root"] : QcRestClient.GetTestSetRootFolder().Id;

                if (!ExploredTestLabFolder.ContainsKey("Root"))
                {
                    ExploredTestLabFolder.Add("Root", separatePath[0]);
                }

                for (int i = 1; i < separatePath.Length; i++)
                {
                    separatePath[i] = GetTestLabFolderId(separatePath[i], separatePath[i - 1]);
                }

                QCTestSetFolderColl foldersToExplor = QcRestClient.GetTestSetTreeLayerByFilter(separatePath[separatePath.Length - 1], "");

                foreach (QCTestSetFolder folders in foldersToExplor)
                {
                    testlabPathList.Add(folders.Name);
                }
            }
            catch (Exception ex)
            {
                Reporter.ToLog(eLogLevel.ERROR, "Failed to get Test Lab with REST API", ex);
            }
            return(testlabPathList);
        }