Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Rust- Automated Testing

The Dev Method via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore automated testing in Rust through this 23-minute video tutorial. Learn the fundamental tools for writing effective tests, including test function anatomy, assertion macros, custom failure messages, and panic checks. Discover how to use Result in tests, run tests in parallel or consecutively, and manage test output. Gain insights into organizing tests, creating submodules for integration testing, and implementing tests for binary crates. Practice writing robust automated tests to ensure your Rust programs function as intended beyond basic compiler checks.

Syllabus

intro
Anatomy of a Test Function
Checking Results with the assert! Macro
Testing Equality with the assert_eq! and assert_ne! Macros
Adding Custom Failure Messages
Checking for Panics with should_panic
Using Result in Tests
Running Tests in Parallel or Consecutively
Showing Function Output
Running a Subset of Tests by Name
Ignoring Some Tests Unless Specifically Requested
Test Organization
Submodules in Integration Tests
Integration Tests for Binary Crates

Taught by

The Dev Method

Reviews

Start your review of Rust- Automated Testing

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.