1# NixOS Tests {#sec-nixos-tests} 2 3When you add some feature to NixOS, you should write a test for it. 4NixOS tests are kept in the directory `nixos/tests`, and are executed 5(using Nix) by a testing framework that automatically starts one or more 6virtual machines containing the NixOS system(s) required for the test. 7 8```{=docbook} 9<xi:include href="writing-nixos-tests.section.xml" /> 10<xi:include href="running-nixos-tests.section.xml" /> 11<xi:include href="running-nixos-tests-interactively.section.xml" /> 12<xi:include href="linking-nixos-tests-to-packages.section.xml" /> 13```