Prepare test issue context for analysis
Source:R/PrepareTestIssueContext.R
PrepareTestIssueContext.RdCollect comprehensive information about tests and their potential related
issues using MapTestFilesToPotentialIssues(), and enrich with test code
and enriched issue details from GitHub.
Usage
PrepareTestIssueContext(
dfPotentialIssues = NULL,
strTestDir = "tests/testthat",
strOwner = GetGHOwner(strTestDir),
strRepo = GetGHRepo(strTestDir),
strGHToken = gh::gh_token()
)Arguments
- dfPotentialIssues
(
tibble) A data frame as returned byMapTestFilesToPotentialIssues().- strTestDir
(
length-1 character) Path to the directory containing test files. Defaults to"tests/testthat".- strOwner
(
length-1 character) GitHub username or organization name.- strRepo
(
length-1 character) GitHub repository name.- strGHToken
(
length-1 character) GitHub token with permissions appropriate to the action being performed.
Value
A tibble::tibble() with columns:
Test: Thedescfield of the test fromtestthat::test_that().File: Path to the file where the test is defined, relative to the package root.LineStart: Starting line number of test.LineEnd: Ending line number of test.Issues: List column containing integer vectors of issue numbers already tagged in the test description.PotentialIssueDetails: List column of tibbles with enriched issue details.TestCode: List column of character vectors containing test code.