startJsUnitTests: Start JS Unit Tests

Description Usage Arguments See Also Examples

Description

Start your JavaScript unit tests on as many browsers as you like with a single request

Usage

1
2
startJsUnitTests(account, username = Sys.getenv("SLUSER"), platforms, url,
  framework, ...)

Arguments

account

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

username

SauceLabs username

platforms

A list of platforms (see example)

url

should point to the page that hosts your tests

framework

can be "qunit", "jasmine", "YUI Test", "mocha", or "custom"

...

Additonal function arguments - Currently unused.

See Also

Other jsUnitTestMethods: getJsUnitTestStatus

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# use test example from
#https://wiki.saucelabs.com/display/DOCS/JavaScript+Unit+Testing+Methods
platforms <- list(c("Windows 7", "firefox", "27"),
                    c("Linux", "googlechrome", "")
                    )
appUrl <- "https://saucelabs.com/test_helpers/front_tests/index.html"
framework <- "jasmine"
myAcc <- account()
myTest <- startJsUnitTests(myAcc, platforms = platforms, url = appUrl, framework = framework)

#> unlist(myTest, use.names = FALSE)
#[1] "bc8b9ef6e6184ed8a7e5270344115999" "bf43cef30bca429eaa2ed08da09dbdce"
testIds <- unlist(myTest, use.names = FALSE)
testRes <- getJsUnitTestStatus(myAcc,js_tests = testIds)


## End(Not run)

johndharrison/RSauceLabs documentation built on May 19, 2019, 4:22 p.m.