My Open Source

Feature: View Sales Trends
  Scenario: User views the sales trend for a product category
    Given the user can view product sales information
    When they view the sales trend for "Electronics"
    Then they should see the sales trend plot for "Electronics"

  Scenario: User views the sales trend for a specific product
    Given the user can view product sales information
    When they view the sales trend for "Smartphone"
    Then they should see the sales trend plot for "Smartphone"

Human-readable tests
01

Write tests in plain language that stakeholders and users can understand, review, and validate.

Bridge communication gaps
02

Enable collaboration between developers, testers, and business analysts by using a common language.

Living documentation
03

Your tests become executable documentation that always stays up-to-date with your code.

Behavior-driven development
04

Focus on the behavior of your software rather than its implementation details.

Reusable step definitions
05

Create a library of reusable test steps that can be combined to create complex scenarios.

plan <- muttest::plan(
  mutators = list(
    muttest::operator("+", "-"),
    muttest::operator("-", "+"),
    muttest::operator("*", "/"),
    muttest::operator("/", "*"),
    muttest::operator("==", "!="),
    muttest::operator("!=", "==")
  )
)
muttest::muttest(plan)

Identify test gaps
01

Discover weak spots in your test suite by introducing small changes to your code and checking if tests catch them.

Quality over quantity
02

Focus on test effectiveness rather than just coverage percentages. Muttest reveals if your tests actually validate behavior.

Automated mutation testing
03

Systematically introduce mutations to your code and run tests to measure how well they detect changes.

Improve test reliability
04

Build more robust test suites that actually catch bugs and regressions in your R code.

Confidence in refactoring
05

Refactor code with confidence knowing your tests will catch any breaking changes.

Tutorials

# tests/acceptance/test-budget.R
test_that("Scenario: I can inspect my net balance", {
  # Given
  dsl$record_income(2000)
  dsl$record_expense(500)
  # When
  dsl$inspect_finances()
  # Then
  dsl$verify_total_income(2000)
  dsl$verify_total_expenses(500)
  dsl$verify_net_balance(1500)
  dsl$teardown()
})

Start with user stories
01

Transform vague requirements into clear, testable user stories that define what users want to accomplish.

Executable specifications
02

Turn user scenarios into working code that validates your application behaves as expected.

Domain-specific language
03

Create a testing vocabulary that bridges technical implementation with business language.

UI independence
04

Focus on behavior, not implementation details, allowing your UI to evolve without breaking tests.

Shiny best practices
05

Learn practical techniques for building more maintainable, testable Shiny applications.

Test inside-out or outside-in
01

Learn different testing strategies and when to apply them for maximum effectiveness in Shiny apps.

Automate acceptance criteria
02

Convert business requirements into automated tests that validate your application meets user needs.

Isolate Shiny modules
03

Test each Shiny module independently to ensure they function correctly before integration.

Inject fake dependencies
04

Use dependency injection to replace external services with test doubles for faster, more reliable tests.

Structured testing approach
05

Apply a systematic testing methodology that improves code quality and development speed.

I'm Jakub Sobolewski

I’m a software engineer specializing in R with 5+ years of experience.

I believe automated testing is the key to building quality software.

My journey into R testing began with a project where to develop code, you had to be connected to the production environment. Turns out, it was a terrible developer experience.

I'm particularly passionate about knowledge sharing, which is why I maintain an active blog and R Tests Gallery. I believe that when we share our testing experiences—both successes and failures—we all become better developers.

I approach testing with a practical mindset: tests should make development faster and more confident, not slower and more burdensome. My goal is to help teams find testing strategies that actually enhance their workflow.