diff --git a/test_ndnpeekpoke/test_ndnpeekpoke.py b/test_ndnpeekpoke/test_ndnpeekpoke.py
new file mode 100644
index 0000000..257cfbc
--- /dev/null
+++ b/test_ndnpeekpoke/test_ndnpeekpoke.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python2
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2014 University of Arizona
+# Author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
+# See COPYING for copyright and distribution information.
+#
+
+import os
+import time
+import unittest
+import process_manager
+
+class test_ndnpeekpoke(unittest.TestCase, process_manager.ProcessManager):
+    """Test case for testing ndn-tlv-peek and ndn-tlv-poke applications"""
+
+    def setUp(self):
+        print "\nTesting ndn-tlv-peek & ndn-tlv-poke"
+        print "***********************************"
+
+    def tearDown(self):
+        self.killNfd()
+        self.killProcess("ndn-tlv-poke")
+        self.killProcess("ndn-tlv-peek")
+        self.cleanupProcesses()
+
+    def test_peekpoke(self):
+        self.startNfd()
+        time.sleep(1)
+        pokeInputFile = os.path.abspath("test_ndnpeekpoke/test-poke-input.txt")
+        self.startProcess("ndn-tlv-poke",
+            ["ndn-tlv-poke", "ndn:/test/peekpoke"],
+            "-> Starting Poke",
+            inputFile=pokeInputFile)
+        time.sleep(1)
+        peekOutputFile = os.path.abspath("/tmp/test-peek-output.txt")
+        self.startProcess("ndn-tlv-peek",
+            ["ndn-tlv-peek", "ndn:/test/peekpoke"],
+            "-> Starting Peek",
+            outputFile=peekOutputFile)
+        time.sleep(1)
+        self.waitForProcessCompletion("ndn-tlv-peek", 10)
+        self.waitForProcessCompletion("ndn-tlv-poke", 10)
+        if self.hasProcessCompleted("ndn-tlv-peek"):
+            if self.getProcessReturnCode("ndn-tlv-peek") != 0:
+                print self.getProcessReturnCode("ndn-tlv-peek")
+                print self.getProcessError("ndn-tlv-peek")
+                print self.getProcessOutput("ndn-tlv-peek")
+                self.fail(">> TEST FAILED - received non-zero return code from ndn-tlv-peek")
+        else:
+            self.fail(">> TEST FAILED - ndn-tlv-peek failed to complete")
+        if self.hasProcessCompleted("ndn-tlv-poke"):
+            if self.getProcessReturnCode("ndn-tlv-poke") != 0:
+                print self.getProcessError("ndn-tlv-poke")
+                self.fail(">> TEST FAILED - received non-zero return code from ndn-tlv-poke")
+        else:
+            self.fail(">> TEST FAILED - ndn-tlv-poke failed to complete")
+        print ">> TEST SUCCESSFUL"
