Validation of R libraries for FDA/EMA submissions

R/Pharma talk about quarto, gherkin, and cucumber
pharmaverse
agile
Author

Brian Repko

Published

November 6, 2025

Since R/Pharma 2023 in Chicago, I’ve wanted to look into using the techniques of ATDD (or BDD… or Specification by Example) for testing sets of R packages (aka - an R library). This was a topic that came up as part of the R Validation Hub work that was presented at that conference. Particularly around the discussion on how can multiple pharma companies share their R library validation tests. It was a chance to bring a technique from software engineering that I was familiar with (in Java and Python) to the world of R and in particular the pharmaverse.

It’s now 2 years later and I will have a pre-recorded talk at the (free!) virtual R/Pharma 2025 conference today (Nov 6, 2025). R/Pharma makes all the sessions available in about a month on YouTube - this is a community that shares and grows together after all - but here are the early links to where I host things.

While putting this together, I found this link from Gojko Adzic, author of “Specification by Example” on where this technique sits in our bag of software engineering tools after 10 years - now 15 years - later. It validates that software quality is enhanced by the use of this technique - even if used for requirements only - versus being used for both requirements and automated testing. It also validates that the use of the Gherkin-based frameworks - Given/When/Then - are the norm - and fortunately, for R, we now have Jakub Sobolewski’s {cucumber} package.

The more I think about what this could look like - and potentially integrated into Quarto - I see the following:

I’m super interested in people’s thoughts on this - please reach out via links at the end of the slides.