diff --git a/test_linkfail/test_linkfail.py b/test_linkfail/test_linkfail.py
new file mode 100644
index 0000000..2d8afa9
--- /dev/null
+++ b/test_linkfail/test_linkfail.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python2
+
+import os
+import time
+import unittest
+import process_manager
+
+class test_linkfail(unittest.TestCase, process_manager.ProcessManager):
+    """Strategy link failure test scenario"""
+
+    def setUp(self):
+        os.chdir("test_linkfail")
+
+    def tearDown(self):
+        self.startProcess("stop", ["./stop.sh"], "-> Stopping NFD")
+        self.waitForProcessCompletion("stop", None)
+        os.chdir("..")
+
+    def run_strategy_test(self, key, strategy, expectLoss=False):
+        print "[linkfail] testing", key
+        self.startProcess("start", ["./start.sh", key, strategy], "-> Starting NFD and creating faces")
+        self.waitForProcessCompletion("start", None)
+        self.startProcess("pingserver", ["./pingserver.sh", key], "-> Starting ping server on B")
+        time.sleep(1)
+        self.startProcess("ping", ["./ping.sh", key], "-> Starting ping client on A")
+
+        time.sleep(5)
+        self.startProcess("ABfail", ["./linkfail.sh", "fail", "A1", "B1"], "-> Failing link A-B")
+        self.waitForProcessCompletion("ABfail", None)
+        time.sleep(5)
+        self.startProcess("ABrecover", ["./linkfail.sh", "recover", "A1", "B1"], "-> Recovering link A-B")
+        self.waitForProcessCompletion("ABrecover", None)
+        time.sleep(5)
+        self.startProcess("ACfail", ["./linkfail.sh", "fail", "A1", "C1"], "-> Failing link A-C")
+        self.waitForProcessCompletion("ACfail", None)
+        time.sleep(5)
+        self.startProcess("ACrecover", ["./linkfail.sh", "recover", "A1", "C1"], "-> Recovering link A-C")
+        self.waitForProcessCompletion("ACrecover", None)
+        self.waitForProcessCompletion("ping", None)
+        self.killProcess("pingserver")
+
+        if expectLoss:
+            if self.getProcessReturnCode("ping") == 0:
+                self.fail("EXPECTED loss or delay; ACTUAL no loss or delay")
+        else:
+            if self.getProcessReturnCode("ping") <> 0:
+                self.fail("ping loss or delay")
+
+    def test_broadcast(self):
+        self.run_strategy_test("broadcast", "ndn:/localhost/nfd/strategy/broadcast")
+
+    def test_ncc(self):
+        self.run_strategy_test("ncc", "ndn:/localhost/nfd/strategy/ncc")
+
+    def test_bestroute(self):
+        self.run_strategy_test("bestroute", "ndn:/localhost/nfd/strategy/best-route", True)
