getJobs: Get Jobs

Description Usage Arguments Value See Also Examples

View source: R/jobMethods.R

Description

List recent jobs belonging to a specific user

Usage

1
2
getJobs(account, username = Sys.getenv("SLUSER"), limit = 100L,
  getFullJobs = FALSE, skipJobs = 0L, to = NULL, from = NULL, ...)

Arguments

account

An object of class "account". An account object see account.

username

SauceLabs username

limit

Specifies the number of jobs to return. Default is 100 and max is 500.

getFullJobs

Get full job information, rather than just IDs. Default is FALSE.

skipJobs

Skips the specified number of jobs. Default is 0.

to

Get jobs until the specified time (POSIXct)

from

Get jobs since the specified time (POSIXct)

...

Additonal function arguments - Currently unused.

Value

returns a named list. "data" is the job data minus the tags and custom-data. tagsAndCD are a list of tags and custom-data for each job. If getFullJobs = FALSE then data only contains the job ids and tagsAndCD contains empty lists for each job.

See Also

Other jobMethods: deleteJobAssets, deleteJob, getJobAssetFiles, getJobAssetNames, stopJob, updateJob

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
myAcc <- account()
myJobs <- getJobs(myAcc)
#> myJobs$data[1,]
#id
#1: 4152e0a185f945bfa43e091eef1e7c30
myJobs <- getJobs(myAcc, getFullJobs = TRUE)
#> myJobs$data[1,.(id, browser)]
#id      browser
#1: 4152e0a185f945bfa43e091eef1e7c30 googlechrome
testId <- myJobs$data[1, id]

#> myJobs$data[1,.(build, passed)]
#build passed
#1:    24  FALSE

# update this job
updateJob(myAcc, jobID = testId, passed = TRUE, build = 20)
myJobs <- getJobs(myAcc, getFullJobs = TRUE)
#> myJobs$data[1,.(build, passed)]
#build passed
#1:    20   TRUE
# deleteJob(myAcc, jobID = testId)
stopJob(myAcc, jobID = testId)

jobAssets <- getJobAssetNames(myAcc, jobID = testId)
#> jobAssets[["selenium-log"]]
#[1] "selenium-server.log"

jobLog <- getJobAssetFiles(myAcc, jobID = testId)
# deleteJobAssets(myAcc, jobID = testId)

## End(Not run)

RSauceLabs documentation built on May 29, 2017, 3:24 p.m.