https://github.com/shikokuchuo/testbot
Bring package test coverage to 100%
https://github.com/shikokuchuo/testbot
r testing-tools
Last synced: 3 months ago
JSON representation
Bring package test coverage to 100%
- Host: GitHub
- URL: https://github.com/shikokuchuo/testbot
- Owner: shikokuchuo
- License: other
- Created: 2025-06-18T11:43:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-19T14:52:22.000Z (4 months ago)
- Last Synced: 2025-06-19T15:40:59.628Z (4 months ago)
- Topics: r, testing-tools
- Language: R
- Homepage: https://shikokuchuo.net/testbot/
- Size: 1.01 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r}
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# testbot
[](https://github.com/shikokuchuo/testbot/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/shikokuchuo/testbot)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)Testbot aims to bring package test coverage up to 100%.
This allows for packages with compiled code:
(i) To catch segfaults along error paths / in edge cases
(ii) To catch memory leaks, memory access errors and undefined behaviour by giving diagnostic tooling such as Valgrind and ASAN/UBSAN a wider surface to work on> Important! This package is highly experimental and its API is subject to change at any time.
## Installation
Install the development version of testbot:
``` r
pak::pak("shikokuchuo/testbot")
```
Testbot is built on the btw and ellmer packages and leverages the current state of the art in LLM agentic tool-calling. Hence, a pre-requisite is an Anthropic or OpenAI API key in a location that can be picked up by ellmer.## Instructions
Just run `testbot()` in your package working directory.
```{r}
#| label: instructions
#| eval: false
r <- testbot::testbot()
```An ellmer chat object is returned.
The test file is generated as "tests/testthat/test-bot.R".## Example
Example output of testbot running on itself:
```{r}
#| label: example
testbot::testbot()
```