diff --git a/library_helpers/process_manager.py b/library_helpers/process_manager.py
index fa2fdf3..204d61d 100644
--- a/library_helpers/process_manager.py
+++ b/library_helpers/process_manager.py
@@ -23,22 +23,50 @@
         self.subprocesses.clear()
         self.results.clear()
 
-    def runProcess(self, processKey, processCallFormat, message, subprocesses, results):
+    def runProcess(self,
+                   processKey,
+                   processCallFormat,
+                   message,
+                   subprocesses,
+                   results,
+                   inputFile,
+                   outputFile):
         print message
+        stdin = None
+        if inputFile is not None:
+            stdin = open(inputFile, "r")
+        stdout = subprocess.PIPE
+        if outputFile is not None:
+            stdout = open(outputFile, "w")
         process = subprocess.Popen(
-            processCallFormat, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
+            processCallFormat,
+            stdin=stdin,
+            stdout=stdout,
+            stderr=subprocess.PIPE)
         subprocesses[processKey] = process
         try:
             stdout, stderr = process.communicate()
             returnCode = process.returncode
             results[processKey] = (returnCode, stdout, stderr)
         except IOError as e:
+            print e
             pass
 
-    def startProcess(self, processKey, processCallFormat, message):
+    def startProcess(self,
+                     processKey,
+                     processCallFormat,
+                     message,
+                     inputFile=None,
+                     outputFile=None):
         self.processes[processKey] = mp.Process(
-            target = self.runProcess,
-                args = [processKey, processCallFormat, message, self.subprocesses, self.results])
+            target=self.runProcess,
+            args=[processKey,
+                  processCallFormat,
+                  message,
+                  self.subprocesses,
+                  self.results,
+                  inputFile,
+                  outputFile])
         self.processes[processKey].start()
 
     def killProcess(self, processKey):
diff --git a/test_ndnpeekpoke/README.md b/test_ndnpeekpoke/README.md
new file mode 100644
index 0000000..3f9b9d1
--- /dev/null
+++ b/test_ndnpeekpoke/README.md
@@ -0,0 +1,12 @@
+Test Case - ndnpeekpoke
+=======================
+
+## Objective ##
+
+To test the ndn-tlv-peek and ndn-tlv-poke applications on a single host.
+
+## Description ##
+
+This test case will run the NFD, ndn-tlv-peek and ndn-tlv-poke binaries.
+This will report SUCCESS if one interest/data is successfully exchanged between ndn-tlv-peek and ndn-tlv-poke.
+In all other scenarios, the test case will report FAILURE
diff --git a/test_ndnpeekpoke/__init__.py b/test_ndnpeekpoke/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test_ndnpeekpoke/__init__.py
diff --git a/test_ndnpeekpoke/test-poke-input.txt b/test_ndnpeekpoke/test-poke-input.txt
new file mode 100644
index 0000000..72d007b
--- /dev/null
+++ b/test_ndnpeekpoke/test-poke-input.txt
@@ -0,0 +1 @@
+ABCDEFGHIJKLMNOPQRSTUVWXYZ
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"
diff --git a/test_ndntraffic/README.md b/test_ndntraffic/README.md
index 7f95d2e..9baab20 100644
--- a/test_ndntraffic/README.md
+++ b/test_ndntraffic/README.md
@@ -8,5 +8,5 @@
 ## Description ##
 
 This test case will run the NFD, ndn-traffic and ndn-traffic-server binaries.
-This will report SUCCESS if one interest/data is successfully exchanged without any data inconsistency between the ndn-traffic and ndn-traffic-server.
+This will report SUCCESS if one interest/data is successfully exchanged without any data inconsistency between ndn-traffic and ndn-traffic-server.
 In all other scenarios, the test case will report FAILURE
