tests/testthat/testSuite001-basic-test001-testConnection.R

context("Test Suite 1 (Basic) --> Connection")

library(RSelenium)
library(testthat)
source("functions.R", local=TRUE)

drivers <- getRemDrivers("Test Suite 1 (Basic) --> Connection")
rD <- drivers$rDr
remDr <- drivers$remDr

openRemDriver(remDr)
tryCatch({
  test_that("can connect to app", {
    connectToApp(remDr)
  })

  test_that("app is ready within 30 seconds", {
    waitForAppReady(remDr)
  })
},
error = function(e) {
  closeRemDrivers(remDr, rD)
  stop(e)
})

closeRemDrivers(remDr, rD)
jstockwin/EpiEstimApp documentation built on June 10, 2020, 10:15 p.m.