load_test_metadata: Load test suite metadata from a file

Description Usage Arguments Details Value

View source: R/ottr.r

Description

Executes the script FILE expression-by-expression and extracts the global variable test_metadata. This string is run through a YAML parser to construct a list containing the metadata specifications for that test suite. The global key name should be defined and cases should be a list of dictionaries with keys name and hidden. The key case[[int]][["name"]] should match a name passed to a call to test_that.

Usage

1

Arguments

file

Path to a test suite file

Details

For example, the test suite might have the following contents:

library(testthat)

test_metadata = "
name: q1
cases:
  - name: q1a
    hidden: false
  - name: q1b
    hidden: true
"

test_that("q1a", {...})

test_that("q1b", {...})

Value

The parse test suite metadata


supark-uncc/ottr documentation built on Dec. 23, 2021, 6:41 a.m.