Skip to content

meakbiyik/vscode-r-test-adapter

Repository files navigation

R Test Adapter for Visual Studio Code

Build Status

This extension is built to help you run R tests on VSCode. Currently only testthat and tinytest frameworks are supported. You can run and debug individual tests.

Requirements

This extension expects Rscript to be in the path, or pointed with the RTestAdapter.RscriptPath setting, and requires devtools>=2.3.2 to be installed for the environment Rscript is connected to. Additionally, in order to debug tests, you will need to install:

  1. the R Debugger extension
  2. the vscDebugger package in R

Configuration

The following parameters are supported .vscode/settings.json.

R package root

The following option is used in the devtools::load_all call in the R code entry point. Empty value means the current workspace folder in VSCode.

{
    "RTestAdapter.RPackageRoot": "" // default
}

Test search paths

The following two options define where to look for tests relative to the current workspace folder. After modifying those entries, please use the 'Rediscover tests' button in the top of the Testing Tab.

{
    "RTestAdapter.testthatSearchPath": "**/tests/testthat/**/test*.R",  // default
    "RTestAdapter.tinytestSearchPath": "**/inst/tinytest/**/test*.R"    // default
}

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages