filmov
tv
End-to-end testing your Rust backend - Rafael Epplée - EuroRust 2022
Показать описание
Rafael Epplée
Software Engineer and Artist
More and more, Rust is used to write web backends. It has excellent testing support out of the box, but end-to-end testing web backends can bring new challenges. Database access needs to be isolated, leading to slow test suites. The sheer amount of features to test and Rust’s low-level style can make test code large and hard to read. In the relatively young ecosystem, there are no widely known patterns or libraries to address these problems.
We’ll look at approaches to improving test performance and developer experience around end-to-end tests for Rust web backend applications:
- Various techniques for managing and isolating requests to SQL databases without sacrificing parallel test execution
- Building domain-specific tools to simplify test code and automatically provide tests for new features
- Using the rstest crate to simplify test setup and fixtures
The content is suited for beginning and intermediate backend developers looking for ideas to increase the robustness of their web applications through easy and enjoyable testing. Due to Rust’s focus on correctness, testing for web applications has received less attention than it deserves, so I hope this talk will also spark some discussion around this topic.
Software Engineer and Artist
More and more, Rust is used to write web backends. It has excellent testing support out of the box, but end-to-end testing web backends can bring new challenges. Database access needs to be isolated, leading to slow test suites. The sheer amount of features to test and Rust’s low-level style can make test code large and hard to read. In the relatively young ecosystem, there are no widely known patterns or libraries to address these problems.
We’ll look at approaches to improving test performance and developer experience around end-to-end tests for Rust web backend applications:
- Various techniques for managing and isolating requests to SQL databases without sacrificing parallel test execution
- Building domain-specific tools to simplify test code and automatically provide tests for new features
- Using the rstest crate to simplify test setup and fixtures
The content is suited for beginning and intermediate backend developers looking for ideas to increase the robustness of their web applications through easy and enjoyable testing. Due to Rust’s focus on correctness, testing for web applications has received less attention than it deserves, so I hope this talk will also spark some discussion around this topic.