http-rs / http-rs/tide

Food for thought: automatic testing based on specified routing information

Open
#95 1 comment 1 reaction 0 assignees View on GitHub
feature
Dominant language
Rust
Stars
5.1k
Forks
329
PR merge metrics
No merged PRs in 30d

Description

Routing systems often allow users to specify various parameters, paths, etc... that will cause a request to be routed to a given handler. Using this information, tests can be synthesized without additional user input:

* validation tests that use the specification as a basis for mutation (fuzzing)
* generation of sequences of calls to different endpoints using parameters that match the specification, remembering headers set by the response along the way etc...
* running through sequences of HTTP commands, but repeating certain commands without taking the responses into account etc... quickly finding heisenbugs relating to non-idempotent APIs that generally plague modern webdev

None of the above things require any additional user information to find crashing bugs relatively efficiently. If we additionally support things like pre/post conditions that check that an API behaved according to some given property, we can dramatically reduce the effort required to write tests of a wide range of complexity levels.

If a web framework finds tons of your bugs without you spending time writing tests, or lets you write low-bias model tests without writing hundreds of lines of boilerplate, that's a nice incentive to choose the framework over others.

We should build tools that make it easy to know when we have achieved success using them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.