Byte Engine
  • welcome
  • Design
    • Rendering
      • material_assets
      • Render Models
        • Visibility
    • Resource Management
      • assets
  • Testing
  • References
    • Byte Engine Shader Language
    • JSON Shader Program Description
  • Sample Project
    • Creating Components
    • input
    • Project Setup
  • Setup
    • Environment Setup
    • installation
Powered by GitBook
On this page
  • Run tests
  • Code coverage

Testing

Run tests

To run the tests use the following command:

cargo test

This will run all tests in the engine. But sometime you may wish to skip some tests, specially the rendering ones. To do this you can use the --skip flag. For example, to skip the rendering tests you can run:

cargo test -- --skip render --skip graphics

Code coverage

To generate test code coverage we recommend using the cargo-llvm-cov crate. To install it run:

cargo install cargo-llvm-cov

Then, to run the tests and generate a coverage report file run:

cargo llvm-cov --lcov --output-path coverage/lcov.info

To see the coverage report inline in VSCode you can use the markis.code-coverage extension.

PreviousassetsNextReferences

Last updated 10 months ago