Inheritance: ProjectInput
        private BatchRunResponse execute(Action<RunInput> configure)
        {
            var path = ".".ToFullPath().ParentDirectory().ParentDirectory().ParentDirectory()
                .AppendPath("Storyteller.Samples");


            var input = new RunInput
            {
                Path = path
            };

            configure(input);

            var controller = input.BuildRemoteController();
            var task = controller.Start(EngineMode.Batch).ContinueWith(t =>
            {
                var systemRecycled = t.Result;
                if (!systemRecycled.success)
                {
                    systemRecycled.WriteSystemUsage();
                    throw new Exception("Unable to start the system");
                }

                

                return input.StartBatch(controller);

            });

            task.Wait();

            task.Result.Wait();

            return task.Result.Result;
        }
Exemplo n.º 2
0
        public void exits_with_failure_if_workspace_does_not_exist()
        {
            var input = new RunInput
            {
                Path = Path,
                WorkspaceFlag = "Does-Not-Exist"
            };

            new RunCommand().Execute(input).ShouldBe(false);
        }
Exemplo n.º 3
0
        public void write_json_results()
        {
            var file = "perf-" + Guid.NewGuid().ToString() + ".csv";

            var input = new RunInput
            {
                Path = Path,
                JsonFlag = file
            };

            new RunCommand().Execute(input);

            File.Exists(file).ShouldBe(true);
        }
        public void SetUp()
        {
            var directory = ".".ToFullPath().ParentDirectory().ParentDirectory().ParentDirectory()
                .AppendPath("Storyteller.Samples");

            theController = new RemoteController(directory);

            theInput = new RunInput {Path = directory,RetriesFlag = 1};
            theController = theInput.BuildRemoteController();
            var task = theController.Start(EngineMode.Batch);
            task.Wait(3.Seconds());

            theFixtures = task.Result.fixtures;
        }
        public run_command_integration_specs()
        {
            TestUtility.CleanUpHangingProcesses();

            var directory = TestingContext.FindParallelDirectory("Storyteller.Samples");


            var project = Project.LoadForFolder(directory);
#if NET46       
            theController = new EngineController(project, new AppDomainSystemLauncher(project));
#else
            throw new NotImplementedException("Not done yet for CoreCLR");
#endif

            theInput = new RunInput { Path = directory, RetriesFlag = 1 };
            theController = theInput.BuildEngine();
            var task = theController.Start();
            task.Wait(3.Seconds());

            theFixtures = task.Result.fixtures;
        }
        private BatchRunResponse execute(Action<RunInput> configure)
        {
            var path = TestingContext.FindParallelDirectory("Storyteller.Samples");


            var input = new RunInput
            {
                Path = path
            };

            configure(input);

            var controller = input.BuildEngine();
            var task = controller.Start().ContinueWith(t =>
            {
                var systemRecycled = t.Result;
                if (!systemRecycled.success)
                {
                    systemRecycled.WriteSystemUsage();
                    throw new Exception("Unable to start the system");
                }

                

                return input.StartBatch(controller);

            });

            task.Wait();

            task.Result.Wait();

            controller.Dispose();

            return task.Result.Result;
        }