# Parametrised tests in Rust with named parameters

DevFeed: [Parametrised tests in Rust with named parameters](<https://devfeed.tech/articles/parametrised-tests-in-rust-with-named-parameters-60386.md>)

Original publisher: [Read original article](<https://alexwlchan.net/2026/table-driven-rust/>)

Published: 2026-09-26T08:43:00Z

Content type: tutorial

Language: en

Sources: [alexwlchan](<https://devfeed.tech/sources/alexwlchan.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [table driven tests](<https://devfeed.tech/topics/table-driven-tests.md>), [test](<https://devfeed.tech/topics/test.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software-testing](<https://devfeed.tech/tags/software-testing.md>), [table-driven-tests](<https://devfeed.tech/tags/table-driven-tests.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

The article explains how to write table-driven tests in Rust using named parameters. It compares loops, positional-argument macros, and third-party testing libraries, then describes a custom macro designed to reduce repetition while preserving readability.

## Source excerpt

I wrote a macro that lets me define test cases with labelled inputs and outputs, so I can reduce repetition without affecting readability.