Example #1
0
        public void DeviceFarmListJobs()
        {
            #region to-get-information-about-jobs-1471642228071

            var client   = new AmazonDeviceFarmClient();
            var response = client.ListJobs(new ListJobsRequest
            {
                Arn = "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" // You can get the project ARN by using the list-jobs CLI command.
            });


            #endregion
        }
Example #2
0
        private List <Job> GetJobs(Run run)
        {
            string     nextToken = null;
            List <Job> jobs      = new List <Job>();

            do
            {
                var resp = DFClient.ListJobs(new ListJobsRequest()
                {
                    NextToken = nextToken, Arn = run.Arn
                });
                nextToken = resp.NextToken;
                jobs.AddRange(resp.Jobs);
            } while (nextToken != null);
            return(jobs);
        }
Example #3
0
        private Dictionary <string, string> CreateArtifactsDirectoryStructure()
        {
            var structure = new Dictionary <string, string>();

            // Jobs
            var jobList = client.ListJobs(new ListJobsRequest {
                Arn = runArn
            });

            foreach (var job in jobList.Jobs)
            {
                var jobPath = SanitizeFilename(job.Name);
                var jobId   = ExtractArnId(job.Arn);

                // Suites
                var suiteList = client.ListSuites(new ListSuitesRequest {
                    Arn = job.Arn
                });

                foreach (var suite in suiteList.Suites)
                {
                    var suiteId   = ExtractArnId(suite.Arn);
                    var suitePath = SanitizeFilename(suite.Name);

                    // Tests
                    var testList = client.ListTests(new ListTestsRequest {
                        Arn = suite.Arn
                    });

                    foreach (var test in testList.Tests)
                    {
                        var testId   = ExtractArnId(test.Arn);
                        var testPath = Path.Combine(options.ArtifactsSavePath, jobPath, suitePath, SanitizeFilename(test.Name));
                        Directory.CreateDirectory(testPath);
                        structure[$"{jobId}/{suiteId}/{testId}"] = testPath;
                    }
                }
            }

            return(structure);
        }