I need a reporter that gets the results of a testthat test file into JSON format. I'd like to write my own reporter for that, but don't find any documentation on reporters in testthat. Alternatively, if I can use eg the ListReporter or JUnitReporter and convert from there to JSON, that would be nice too. But I'd like to avoid that, as this needs to be incorporated in live code testing for an online teaching system.
Can you take the ListReporter in reporter-list.R in testthat, rename it to MyListReporter (in two locations) and use it from your package, e.g. via devtools::test(reporter = MyListReporter)? You should then be able to adapt it to your needs.