diff --git a/bin/testing/findtests.py b/bin/testing/findtests.py
index c1f970addda1d837ff8a39c46b57431c67196ac0..aa9bf51557a9c46e3ad3aeb00d10563902da2ab2 100755
--- a/bin/testing/findtests.py
+++ b/bin/testing/findtests.py
@@ -14,7 +14,7 @@ from subprocess import PIPE
 import os
 
 
-# Whether the two lists a and b have a common member
+# Check if the set a contains a member of list b
 def has_common_member(myset, mylist):
     return not myset.isdisjoint(mylist)
 
@@ -82,6 +82,9 @@ if __name__ == '__main__':
                         help='The source tree (default: `HEAD`)')
     parser.add_argument('-t', '--target', required=False, default='master',
                         help='The tree to compare against (default: `master`)')
+    parser.add_argument('-f', '--outfile', required=False,
+                        default='affectedtests.json',
+                        help='The file in which to write the affected tests')
     args = vars(parser.parse_args())
 
     # find the changes files
@@ -110,5 +113,5 @@ if __name__ == '__main__':
             count += 1
     print("Detected {} affected tests".format(count))
 
-    with open('affectedtests.json', 'w') as jsonFile:
+    with open(args['outfile'], 'w') as jsonFile:
         json.dump(affectedTests, jsonFile)