コード例 #1
0
        public void GenerateTest1()
        {
            List <IElement>          allElements = new RanorexRxrepAnalyzer().Analyze(@"C:\Users\duongtd\Desktop\samples\Ranorex\Sample1\NewRepository-V20170822.rxrep");
            MyLog                    myLog       = new MyLog();
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();
            List <SpecScreen>        specScreens = excelSpecificationParser.ParseWithRootElements(
                @"C:\Users\duongtd\Desktop\samples\Ranorex\Sample1\TSDV-Sample-UserCode-Spec.xlsx",
                //@"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, myLog);

            UserActionSpecAnalyzer specAnalyzer = new UserActionSpecAnalyzer();

            specAnalyzer.Expand(specScreens, @"C:\MyApp.exe", myLog);

            CSharpScriptsGeneration scriptsGeneration = new RanorexScriptsGeneration();

            scriptsGeneration.Generate(
                specScreens,
                @"D:\temp\out\project1",
                @"D:\temp\ElementsRepo.xml",
                @"D:\temp\ImageCapture.xml",
                @"D:\temp\app.exe",
                "MyTestProjectDefinition",
                "MyTestProject",
                "Instance",
                myLog);
        }
コード例 #2
0
        public void GenerateRanorexProjectTest()
        {
            string                   repoFilePath             = @"C:\Users\duongtd\Desktop\samples\Ranorex\Sample1\NewRepository.rxrep";
            List <IElement>          allElements              = new RanorexRxrepAnalyzer().Analyze(repoFilePath);
            MyLog                    myLog                    = new MyLog();
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();
            List <SpecScreen>        specScreens              = excelSpecificationParser.ParseWithRootElements(
                //@"C:\Users\duongtd\Desktop\samples\Ranorex\Sample1\TSDV-Sample-UserCode-Spec.xlsx",
                @"C:\Users\duongtd\Desktop\samples\Ranorex\Sample1\TSDV-Sample-Test.xlsx",
                //@"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, myLog);

            UserActionSpecAnalyzer specAnalyzer = new UserActionSpecAnalyzer();

            specAnalyzer.Expand(specScreens, @"C:\MyApp.exe", myLog);

            ProjectGeneration projectGeneration = new ProjectGeneration();

            projectGeneration.GenerateRanorexProject(allElements,
                                                     specScreens,
                                                     repoFilePath,
                                                     @"C:\Users\duongtd\Desktop\samples\Ranorex\exported",
                                                     @"C:\MyApp.exe",
                                                     myLog);
            System.Diagnostics.Debug.WriteLine(String.Join(",\n", myLog.GetErrorLogs().ToArray()));
        }
コード例 #3
0
        public void GenerateTest()
        {
            List <IElement> allElements = XmlFilesLoader.Load(
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest2\ToDoTest2\ToDoTest2Repo.xml",
                @"C:\Users\duongtd\Desktop\samples\exported\ToDoTest2\ToDoTest2\ToDoTest2ImageCapture.xml");
            MyLog myLog = new MyLog();
            ExcelSpecificationParser excelSpecificationParser = new ExcelSpecificationParser();
            List <SpecScreen>        specScreens = excelSpecificationParser.ParseWithRootElements(
                @"C:\Users\duongtd\Desktop\samples\TODO_spec_sample.xlsx",
                //@"D:\Research\projects\GUI-Testing-Automation\ProjectGenTemplate\Copy of TSDV-Sample-Mapping-Spec.xlsx",
                allElements, myLog);

            UserActionSpecAnalyzer specAnalyzer = new UserActionSpecAnalyzer();

            specAnalyzer.Expand(specScreens, @"C:\MyApp.exe", myLog);

            CSharpScriptsGeneration scriptsGeneration = new CSharpScriptsGeneration();

            scriptsGeneration.Generate(
                specScreens,
                @"D:\temp\out\project1",
                @"D:\temp\ElementsRepo.xml",
                @"D:\temp\ImageCapture.xml",
                @"D:\temp\app.exe",
                "MyTestProjectDefinition",
                "MyTestProject",
                "Instance",
                myLog);
        }