## Integration tests

Driver authors should use the [driver_test_realm](https://fuchsia.dev/docs/development/drivers/testing/driver_test_realm)
for integration tests.

## Device enumeration tests

Driver authors should use
[device enumeration tests](https://fuchsia.dev/docs/development/drivers/testing/device_enumeration)
to verify system-level topology integration across the full board tree during driver development.

## Unit tests

Drivers authors should use the [driver testing library](https://fuchsia.dev/docs/development/sdk/driver-testing/driver-unit-testing-quick-start)
library for unit tests.

There are a number of helpful mock libraries:

- [fake-platform-device](https://cs.opensource.google/fuchsia/fuchsia/+/main:/sdk/lib/driver/fake-platform-device/cpp/fake-pdev.h) - Creates info for a fake pdev parent
- [fake-mmio-reg](https://cs.opensource.google/fuchsia/fuchsia/+/main:/sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h) Faking MMIO registers
- [mock-mmiog](https://cs.opensource.google/fuchsia/fuchsia/+/main:/sdk/lib/driver/mock-mmio/cpp/region.h) Mocking MMIO registers
- [fake-object](https://cs.opensource.google/fuchsia/fuchsia/+/main:/sdk/lib/driver/fake-object/cpp/README.md) - fake userspace versions of kernel objects

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/development/drivers/testing/overview.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/development/drivers/testing/overview.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/development/drivers/testing/overview.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/development/drivers/testing/overview.md "Edit the source code of this page")