Popularity
5.8
Growing
Activity
7.2
-
612
5
58

Programming language: Rust
License: MIT License
Tags: Development Tools     Testing     HTTP     Webmocks     Webmock     Mock     Mocks    
Latest version: v0.28.0

Mockito alternatives and similar packages

Based on the "Testing" category.
Alternatively, view Mockito alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Mockito or a related project?

Add another 'Testing' Package

README

HTTP mocking for Rust!

Get it on crates.io.

Documentation is available at https://docs.rs/mockito.

Before upgrading, make sure to check out the changelog.

Contribution Guidelines

  1. Check the existing issues and pull requests.
  2. One commit is one feature - consider squashing.
  3. Format code with cargo fmt.
  4. :shipit:

Development

Tests

Run tests:

cargo test

...or run tests using a different toolchain:

rustup run --install 1.42.0 cargo test

...or run tests while disabling the default features (e.g. the colors):

cargo test --no-default-features

Code style

Mockito uses rustfmt as a general code style.

Install rustfmt:

rustup component add rustfmt

Format code:

cargo fmt

Some editors might provide a plugin to format your Rust code automatically.

Linter

Mockito uses clippy and it should be run always on the minimum supported Rust version, in order to ensure backwards compatibility.

Install clippy:

rustup component add clippy-preview

Run the linter on the minimum supported Rust version:

rustup run --install 1.42.0 cargo clippy --lib --tests --all-features -- -D clippy::complexity

Release

Release:

cargo publish

Benchmarks

Install rust nightly:

rustup install nightly

Run benchmarks:

rustup run nightly cargo bench

Logo courtesy to http://niastudio.net :ok_hand: