1# Running Tests {#sec-running-nixos-tests} 2 3You can run tests using `nix-build`. For example, to run the test 4[`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix), 5you do: 6 7```ShellSession 8$ cd /my/git/clone/of/nixpkgs 9$ nix-build -A nixosTests.login 10``` 11 12After building/downloading all required dependencies, this will perform 13a build that starts a QEMU/KVM virtual machine containing a NixOS 14system. The virtual machine mounts the Nix store of the host; this makes 15VM creation very fast, as no disk image needs to be created. Afterwards, 16you can view a log of the test: 17 18```ShellSession 19$ nix-store --read-log result 20```