···38383939## Interactive-only test configuration {#sec-nixos-test-interactive-configuration}
40404141-You can add configuration that is specific to the interactive test driver, by adding to the `interactive` option.
4242-`interactive` is a copy of the regular test options namespace, and is used by the interactive test driver.
4343-It can be helpful for troubleshooting changes that you don't want to apply to regular test runs.
4141+The `.driverInteractive` attribute combines the regular test configuration with
4242+definitions from the [`interactive` submodule](#opt-interactive). This gives you
4343+a more usable, graphical, but slightly different configuration.
4444+4545+You can add your own interactive-only test configuration by adding extra
4646+configuration to the [`interactive` submodule](#opt-interactive).
4747+4848+To interactively run only the regular configuration, build the `<test>.driver` attribute
4949+instead, and call it with the flag `result/bin/nixos-test-driver --interactive`.
···4242 <section xml:id="sec-nixos-test-interactive-configuration">
4343 <title>Interactive-only test configuration</title>
4444 <para>
4545- You can add configuration that is specific to the interactive test
4646- driver, by adding to the <literal>interactive</literal> option.
4747- <literal>interactive</literal> is a copy of the regular test
4848- options namespace, and is used by the interactive test driver. It
4949- can be helpful for troubleshooting changes that you don’t want to
5050- apply to regular test runs.
4545+ The <literal>.driverInteractive</literal> attribute combines the
4646+ regular test configuration with definitions from the
4747+ <link linkend="opt-interactive"><literal>interactive</literal>
4848+ submodule</link>. This gives you a more usable, graphical, but
4949+ slightly different configuration.
5050+ </para>
5151+ <para>
5252+ You can add your own interactive-only test configuration by adding
5353+ extra configuration to the
5454+ <link linkend="opt-interactive"><literal>interactive</literal>
5555+ submodule</link>.
5656+ </para>
5757+ <para>
5858+ To interactively run only the regular configuration, build the
5959+ <literal><test>.driver</literal> attribute instead, and call
6060+ it with the flag
6161+ <literal>result/bin/nixos-test-driver --interactive</literal>.
5162 </para>
5263 </section>
5364</section>
+21-1
nixos/lib/testing/interactive.nix
···66 options = {
77 interactive = mkOption {
88 description = mdDoc ''
99- Tests [can be run interactively](#sec-running-nixos-tests-interactively).
99+ Tests [can be run interactively](#sec-running-nixos-tests-interactively)
1010+ using the program in the test derivation's `.driverInteractive` attribute.
10111112 When they are, the configuration will include anything set in this submodule.
12131314 You can set any top-level test option here.
1515+1616+ Example test module:
1717+1818+ ```nix
1919+ { config, lib, ... }: {
2020+2121+ nodes.rabbitmq = {
2222+ services.rabbitmq.enable = true;
2323+ };
2424+2525+ # When running interactively ...
2626+ interactive.nodes.rabbitmq = {
2727+ # ... enable the web ui.
2828+ services.rabbitmq.managementPlugin.enable = true;
2929+ };
3030+ }
3131+ ```
3232+3333+ For details, see the section about [running tests interactively](#sec-running-nixos-tests-interactively).
1434 '';
1535 type = moduleType;
1636 visible = "shallow";