Esempio n. 1
0
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);
            if (ProfilerOptions.Type != StressTestOptions.ProfilerOptions.ProfilerType.Disabled)
            {
                if (ProfilerOptions.MlpdOutputPath == null)
                {
                    ProfilerOptions.MlpdOutputPath = Path.Combine(profilePath, "profiler.mlpd");
                }
                if (File.Exists(ProfilerOptions.MlpdOutputPath))
                {
                    File.Delete(ProfilerOptions.MlpdOutputPath);
                }
                profilerProcessor = new ProfilerProcessor(ProfilerOptions);
                string monoPath = Environment.GetEnvironmentVariable("PATH")
                                  .Split(Path.PathSeparator)
                                  .Select(p => Path.Combine(p, "mono"))
                                  .FirstOrDefault(s => File.Exists(s));
                TestService.StartSession(monoPath, profilePath, $"{profilerProcessor.GetMonoArguments ()} \"{MonoDevelopBinPath}\"");
                Console.WriteLine($"Profler is logging into {ProfilerOptions.MlpdOutputPath}");
            }
            else
            {
                TestService.StartSession(MonoDevelopBinPath, profilePath);
            }
            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench);

            scenario = TestScenarioProvider.GetTestScenario();

            ReportMemoryUsage(-1);
            for (int i = 0; i < Iterations; ++i)
            {
                scenario.Run();
                ReportMemoryUsage(i);
            }

            UserInterfaceTests.Ide.CloseAll(exit: false);
            ReportMemoryUsage(cleanupIteration);
        }
Esempio n. 2
0
        public void Start()
        {
            ValidateMonoDevelopBinPath();
            SetupIdeLogFolder();

            string profilePath = Util.CreateTmpDir();

            FoldersToClean.Add(profilePath);

            TestService.StartSession(MonoDevelopBinPath, profilePath);
            TestService.Session.DebugObject = new UITestDebug();

            TestService.Session.WaitForElement(IdeQuery.DefaultWorkbench);

            scenario = TestScenarioProvider.GetTestScenario();

            for (int i = 0; i < Iterations; ++i)
            {
                scenario.Run();
                ReportMemoryUsage(i);
            }
        }