예제 #1
0
        public void Run()
        {
            var jobRunner = DefaultRunner.Create(output);

            var startTime = DateTime.Now;
            var build     = jobRunner.Run(jobName);
            var duration  = DateTime.Now.Subtract(startTime);

            output.WriteLine(string.Empty);
            output.WriteLine($"Result: {build.Result}");
            output.WriteLine($"Duration: {duration}");
        }
예제 #2
0
        public void Run()
        {
            var jobRunner = DefaultRunner.Create(TestContext.Out);

            var startTime = DateTime.Now;
            var build     = jobRunner.Run(jobName);
            var duration  = DateTime.Now.Subtract(startTime);

            TestContext.Out.WriteLine();
            TestContext.Out.WriteLine($"Result: {build.Result}");
            TestContext.Out.WriteLine($"Duration: {duration}");
        }
예제 #3
0
        public void GetConsoleText()
        {
            var jobRunner = DefaultRunner.Create(output, quiet: true);

            output.WriteLine("Running job...");
            var build = jobRunner.Run(jobName);

            output.WriteLine("Job complete.");

            Assert.Equal("SUCCESS", build.Result);
            Assert.True(jobRunner.BuildNumber.HasValue);

            var text = jobRunner.Client.Builds.GetConsoleText(jobName, jobRunner.BuildNumber.Value.ToString());

            output.WriteLine(text);

            Assert.Contains("[Hello World!]", text);
        }