Test Organization - The Rust Programming Language
As mentioned at the start of the chapter, testing is a complex discipline, and different people use different terminology and organization. The Rust community thinks about tests in terms of two main categories: unit tests and integration tests. Unit tests are small and more focused, testing one module in isolation at a time, and can test private interfaces. Integration tests are entirely external to your library and use your code in the same way any other external code would, using only the public interface and potentially exercising multiple modules per test. Writing both kinds of tests is important to ensure that the pieces of your library are doing what you expect them to, separately and together. The purpose of unit tests is to test each unit of code in isolation from the rest of the code to quickly pinpoint where code is and isn’t working as expected. You’ll put unit tests in the src directory in each file with the code that they’re testing. The convention is to create a module na
Test Organization - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language Test Organization As mentioned at the start of the chapter, testing is a complex discipline, and different people use different terminology and organization. The Rust community thinks about tests in terms of two main categories: unit tests and integration tests. Unit tests are small and more focused, testing one module in isolation at a t
Explore this link on the map →related reading
- Unit and Integration Testsmatklad.github.io
- Reading 2: Testingweb.mit.edu
- Reading 3: Testingweb.mit.edu
- A half-hour to learn Rustfasterthanli.me
- Testing robotics systems in fast-paced startups | Michael Jae-Yoon Chungmjyc.github.io
- Rewriting Bun in Rust | Bun Blogbun.com
- CSC 151 - Unit Testingeikmeier.sites.grinnell.edu
- Software Engineering at Googleabseil.io
- Unit testing - Dive Into Python 3diveintopython3.net
- Google Testing Blogtesting.googleblog.com
- Why Good Developers Write Bad Unit Tests · mtlynch.iomtlynch.io
- Tao on “blue team” vs. “red team” LLMs | Hacker Newsnews.ycombinator.com