https://jakubsobolewski.com
Staff Engineer @ Appsilon.
That’s a red flag your tests don’t build confidence. Tests should help you ship faster, not add overhead. Rethink your test strategy to reduce manual effort.
That’s a red flag your tests don’t build confidence. Tests should help you ship faster, not add overhead. Rethink your test strategy to reduce manual effort.
Look for external dependencies like timers, APIs, or asynchronous events. If you own the code, inject and substitute those dependencies. If not, stub them. In Shiny apps, wait properly before asserting.
Look for external dependencies like timers, APIs, or asynchronous events. If you own the code, inject and substitute those dependencies. If not, stub them. In Shiny apps, wait properly before asserting.
Test public interfaces, the ways your code is actually used. This keeps tests stable, meaningful, and cuts down on brittle failures. Focus on testing behavior, not implementation details.
Test public interfaces, the ways your code is actually used. This keeps tests stable, meaningful, and cuts down on brittle failures. Focus on testing behavior, not implementation details.
Don’t get lost in code no one asked for. Take control of what gets built.
Ready to change your workflow?
Don’t get lost in code no one asked for. Take control of what gets built.
Ready to change your workflow?
How it works:
→ Start every feature as a user story, not a wish list.
→ Write specs from your users’ words.
→ Write only the code users need.
→ Automate checks along the way.
How it works:
→ Start every feature as a user story, not a wish list.
→ Write specs from your users’ words.
→ Write only the code users need.
→ Automate checks along the way.
1. APIs are versioned: you track the API version (or version of a package that wraps an API). Your contracts should be safe until you upgrade to new version.
2. Schedule a test run that checks if real APIs still return the shapes you expect. Run it periodically for extra safety.
1. APIs are versioned: you track the API version (or version of a package that wraps an API). Your contracts should be safe until you upgrade to new version.
2. Schedule a test run that checks if real APIs still return the shapes you expect. Run it periodically for extra safety.
Fast tests ✅
Reliable tests ✅
Cheap tests ✅
Better dev experience ✅
Fast tests ✅
Reliable tests ✅
Cheap tests ✅
Better dev experience ✅
1. Abstract the dependency with an interface
2. Use fakes or mocks in tests
3. Test your code's behavior *against* the fake
4. Plug in the real dependency only in production
1. Abstract the dependency with an interface
2. Use fakes or mocks in tests
3. Test your code's behavior *against* the fake
4. Plug in the real dependency only in production
How? Simulate the external system in tests. You don’t need the real thing.
How? Simulate the external system in tests. You don’t need the real thing.
🐢 Slow (waiting for responses)
🎲 Flaky (unreliable availability/results)
💸 Expensive (API costs add up)
Or worse, tests don’t get written at all.
🐢 Slow (waiting for responses)
🎲 Flaky (unreliable availability/results)
💸 Expensive (API costs add up)
Or worse, tests don’t get written at all.
Repeat in minutes what might take days by hand.
Your specs become abstract, clear, and future-proof—no matter how the app evolves.
Give it a go. Cut through legacy fog with AI-powered BDD.
Repeat in minutes what might take days by hand.
Your specs become abstract, clear, and future-proof—no matter how the app evolves.
Give it a go. Cut through legacy fog with AI-powered BDD.
Check this post to see how to use AI to iterate on writing specifications faster: jakubsobolewski.com/blog/ai-assi...
Check this post to see how to use AI to iterate on writing specifications faster: jakubsobolewski.com/blog/ai-assi...
👉 Start on a “Data” page with steps: Upload → Filtering → Mapping → Preview
👉 User uploads or picks a default dataset, then moves through steps
👉 Submit variable mappings → data preview appears
👉 “Visualization” unlocks to view plots
👉 Start on a “Data” page with steps: Upload → Filtering → Mapping → Preview
👉 User uploads or picks a default dataset, then moves through steps
👉 Submit variable mappings → data preview appears
👉 “Visualization” unlocks to view plots
🤔 Have a specific case you want covered? Leave a comment or submit a request, let's build something great, together!
🤔 Have a specific case you want covered? Leave a comment or submit a request, let's build something great, together!
→ A growing collection of focused R test examples
→ Step-by-step breakdowns showing what to do and why it works
→ Real code ready to drop into your project with confidence
So far, there’s only one example, but many more are on the way! 🚀
→ A growing collection of focused R test examples
→ Step-by-step breakdowns showing what to do and why it works
→ Real code ready to drop into your project with confidence
So far, there’s only one example, but many more are on the way! 🚀
The patterns featured come straight from real projects I’ve worked on, if they helped me, maybe they’ll help you too!
The patterns featured come straight from real projects I’ve worked on, if they helped me, maybe they’ll help you too!
Want to learn more about testing strategies for R? Check out my packages and resources for comprehensive testing approaches.
jakubsobolewski.com/blog
Want to learn more about testing strategies for R? Check out my packages and resources for comprehensive testing approaches.
jakubsobolewski.com/blog