diff --git a/docs/source/algorithms/DirectILLApplySelfShielding-v1.rst b/docs/source/algorithms/DirectILLApplySelfShielding-v1.rst
index 8d7f43e17d61174c5fb87cd88c2aac0907266cca..cec71400d684cf408c1a1c64881491e79aa10d54 100644
--- a/docs/source/algorithms/DirectILLApplySelfShielding-v1.rst
+++ b/docs/source/algorithms/DirectILLApplySelfShielding-v1.rst
@@ -22,6 +22,11 @@ Usage
 
 **Example - Absorption corrections and empty container subtraction**
 
+.. testsetup:: IN4Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN4Example
 
     import numpy
diff --git a/docs/source/algorithms/DirectILLCollectData-v1.rst b/docs/source/algorithms/DirectILLCollectData-v1.rst
index 3a7330a400d38b14c1527679f7dc1a72accaaa7d..9b544928e02d40a8d19ba90d7333e942306c8b29 100644
--- a/docs/source/algorithms/DirectILLCollectData-v1.rst
+++ b/docs/source/algorithms/DirectILLCollectData-v1.rst
@@ -120,6 +120,11 @@ Usage
 
 **Example - Basic usage as an advanced loader**
 
+.. testsetup:: IN4Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN4Example
 
     # It is recommended to use DirectILLCollectData over the basic Load
diff --git a/docs/source/algorithms/DirectILLDiagnostics-v1.rst b/docs/source/algorithms/DirectILLDiagnostics-v1.rst
index 15281023083b7a66f55e96bf5ee6e7e3aafcba8a..fbe08a8a5e07462a241cdec36a2acfc4bad7aee4 100644
--- a/docs/source/algorithms/DirectILLDiagnostics-v1.rst
+++ b/docs/source/algorithms/DirectILLDiagnostics-v1.rst
@@ -105,6 +105,11 @@ Usage
 
 **Example - Diagnostics on IN4 workspace**
 
+.. testsetup:: IN4Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN4Example
 
     DirectILLCollectData(
@@ -138,6 +143,11 @@ Output:
 
 **Example - Diagnostics on IN5 workspace**
 
+.. testsetup:: IN5Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN5Example
 
     # On IN5 we don't usually diagnose the pixels, but apply
diff --git a/docs/source/algorithms/DirectILLIntegrateVanadium-v1.rst b/docs/source/algorithms/DirectILLIntegrateVanadium-v1.rst
index 90f039437d89070b422b4fdc88f328c5d1072020..57868b99773c5aa46f8fe006ba7e038876e80165 100644
--- a/docs/source/algorithms/DirectILLIntegrateVanadium-v1.rst
+++ b/docs/source/algorithms/DirectILLIntegrateVanadium-v1.rst
@@ -31,6 +31,11 @@ Usage
 
 **Example - Integrating vanadium**
 
+.. testsetup:: IN4Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN4Example
 
     DirectILLCollectData(
diff --git a/docs/source/algorithms/DirectILLSelfShielding-v1.rst b/docs/source/algorithms/DirectILLSelfShielding-v1.rst
index 0f1230f207ffbea1bf907c2f5d931efe1c97bfb2..bd0309424c86a567a7ea476dbd983abdcef0b240 100644
--- a/docs/source/algorithms/DirectILLSelfShielding-v1.rst
+++ b/docs/source/algorithms/DirectILLSelfShielding-v1.rst
@@ -24,6 +24,11 @@ Usage
 
 **Example - Calculating absorption corrections**
 
+.. testsetup:: IN4Example
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: IN4Example
 
     preprocessed = DirectILLCollectData(Run='ILL/IN4/087294-087295')
diff --git a/docs/source/techniques/DirectILL.rst b/docs/source/techniques/DirectILL.rst
index fd9182f92db1f0b44a148268e5c90b3906b4458c..51667964a9f472d9de1e321bb553b3548c35f773 100644
--- a/docs/source/techniques/DirectILL.rst
+++ b/docs/source/techniques/DirectILL.rst
@@ -59,6 +59,11 @@ A very basic reduction would include a vanadium reference and a sample and follo
 
 On instruments like IN4 and IN6, these steps would translate to something like the following simple Python script:
 
+.. testsetup:: BasicIN4Reduction
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: BasicIN4Reduction
 
     # Uncomment to add a temporary data search directory.
@@ -187,6 +192,11 @@ A more complete reduction example would include corrections for self-shielding:
 
 The above workflow would translate to this kind of Python script for IN4 and IN6:
 
+.. testsetup:: SelfShieldingReduction
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: SelfShieldingReduction
 
     # Uncomment to add a temporary data search directory.
@@ -266,6 +276,11 @@ Mantid can be picky with binning when doing arithmetics between workspaces. This
 
 To alleviate the situation, the output workspaces of :ref:`algm-DirectILLCollectData` can be forced to use the same wavelength. The following Python script shows how to propagate the calibrated incident energy from the first loaded workspace into the rest:
 
+.. testsetup:: SampleContainerCompatibility
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: SampleContainerCompatibility
 
     # Sample
@@ -320,6 +335,11 @@ With empty container data, the steps to reduce the experimental data might look
 
 A corresponding Python script follows.
 
+.. testsetup:: ContainerSubtraction
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: ContainerSubtraction
 
     # Uncomment to add a temporary data search directory.
@@ -401,6 +421,11 @@ Interpolation of container data to different temperatures
 
 Sometimes the empty container is not measured at all the experiment's temperature points. One can use Mantid's workspace arithmetics to perform simple linear interpolation in temperature:
 
+.. testsetup:: ContainerInterpolation
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: ContainerInterpolation
 
     import numpy
@@ -479,6 +504,11 @@ Lets put it all together into a complex Python script. The script below reduces
 
   * Need to interpolate to 50K.
 
+.. testsetup:: FullExample
+
+   config['default.facility'] = 'ILL'
+   config['default.instrument'] = 'IN4'
+
 .. testcode:: FullExample
 
     # Uncomment to add a temporary data search directory.