Created
August 26, 2021 17:58
-
-
Save mbjoseph/7d19752ce4363ef1167352b14abe954b to your computer and use it in GitHub Desktop.
Visualizing execution time for tests within a file using testthat's ListReporter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(forcats) | |
library(ggplot2) | |
library(testthat) | |
path <- testthat_example("success") | |
l <- test_file(path, reporter = "list") | |
l %>% | |
as.data.frame() %>% | |
ggplot(aes(y = fct_reorder(test, real), x = real)) + | |
geom_point() + | |
xlab("Execution time") + | |
ylab("Test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment