Home Explore Blog Models 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
e0fed34a (1st chunk of `nixos/doc/manual/development/nixos-tests.chapter.md`)
Title: NixOS Tests
Summary
NixOS tests are essential for validating new features added to NixOS. These tests are located in the `nixos/tests` directory and are executed by a testing framework that automatically provisions virtual machines running NixOS. The documentation also covers various aspects of NixOS tests, including how to write, run (both regularly and interactively), and link them to packages, as well as how to test hardware features.