Home Explore Blog CI



nixpkgs

nixos/doc/manual/development/nixos-tests.chapter.md
c0f3a45446263c01ebedc632cbe82327262f3a5bd87da2290000000300000214
# NixOS Tests {#sec-nixos-tests}

When you add some feature to NixOS, you should write a test for it.
NixOS tests are kept in the directory `nixos/tests`, and are executed
(using Nix) by a testing framework that automatically starts one or more
virtual machines containing the NixOS system(s) required for the test.

```{=include=} sections
writing-nixos-tests.section.md
running-nixos-tests.section.md
running-nixos-tests-interactively.section.md
linking-nixos-tests-to-packages.section.md
testing-hardware-features.section.md
```

Chunks
5f64c1ef (1st chunk of `nixos/doc/manual/development/nixos-tests.chapter.md`)
Title: NixOS Tests Overview
Summary
This section introduces NixOS tests, which are located in the `nixos/tests` directory. These tests are crucial for verifying new features in NixOS. The tests are executed using Nix within a testing framework that automatically manages virtual machines running the required NixOS systems.