Trendyol
www.trendyol.com
(opens in new tab)
Founded
2010
Onboarded
9月 2023
## The approach
After speeding up compilation, we turned our attention to tests, which we could further optimize by running them selectively. At the time we started exploring this, Tuist had not yet shipped [selective testing](https://tuist.dev/en/docs/guides/features/selective-testing), so we built a plugin leveraging `git diff` and `tuist graph` to identify only the modules affected by code changes. This allowed us to run a more focused set of unit and UI tests.
Integrating selective testing with binary caching can be a game-changer. Here's how the two work together:
1. **Change detection:** We identify which files and modules were changed since the last build.
2. **Targeted caching:** Modules not impacted by the recent changes are retrieved from the Tuist cache. Instead of rebuilding everything, these modules reuse cached outputs.
3. **Significant time savings:** After a month-long proof of concept, our build times were reduced by 65%. In controlled comparisons, setups with Tuist caching consistently outperformed those without it.
This synergy between selective testing and binary caching dramatically improved developer productivity. Where we once faced slowdowns, we now had a seamless, accelerated workflow.
Moving forward, we'll work closely with the Tuist team to integrate our solution with their selective testing feature. Their implementation, which relies on a more accurate change detection system based on file-system fingerprinting, will further enhance the precision and efficiency of our testing workflows.
## The results
From a developer's perspective, these enhancements have a tangible impact on everyday work. With selective testing and binary caching, developers spend less time waiting on builds and more time iterating on features or exploring solutions. Shorter feedback loops mean they can validate ideas quickly, focus on delivering quality, and better manage the complexities of a growing codebase without feeling slowed down by repetitive processes.
For example, consider a developer looking to write and run UI tests. Thanks to Tuist's caching capabilities, generating and opening a clean Xcode environment and starting to run UI tests now takes around 30 seconds, an experience that would have been nearly impossible before, when the same process took at least 15 minutes for a project of this scale.
Additionally, our CI build times have been reduced by 65%, decreasing from **30 minutes to just 10 minutes**. This significant improvement allows our CI pipelines to run faster, enabling quicker integrations and deployments.
> "Our CI build times have been reduced by 65%, decreasing from 30 minutes to just 10 minutes."
## What's next
Our Tuist instance is [self-hosted](https://tuist.dev/en/docs/guides/server/self-host/install) within our internal infrastructure. This setup ensures ultra-fast cache transfers over our internal network and guarantees compliance with our security standards. As a result, we enjoy the performance benefits of caching without any external dependencies or potential security concerns.
Our work with Tuist shows how investing in the right tools can lead to significant improvements in developer productivity and experience. We'll continue refining our strategies, exploring new techniques, and integrating with other testing methodologies. As we learn and evolve, we're committed to sharing our insights with the broader community.
> "Tuist shows how investing in the right tools can lead to significant improvements in developer productivity and experience."