diff --git a/test/test_session.py b/test/test_session.py
new file mode 100644
index 0000000..7219ffd
--- /dev/null
+++ b/test/test_session.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+
+
+class TestSession(VppTestCase):
+    """ Session Test Case """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestSession, cls).setUpClass()
+
+    def setUp(self):
+        super(TestSession, self).setUp()
+
+    def tearDown(self):
+        super(TestSession, self).tearDown()
+        self.vapi.session_enable_disable(is_enabled=1)
+
+    def test_session(self):
+        """ Session Unit Tests """
+        error = self.vapi.cli("test session all")
+
+        if error:
+            self.logger.critical(error)
+        self.assertEqual(error.find("Failed"), -1)
+
+if __name__ == '__main__':
+    unittest.main(testRunner=VppTestRunner)
diff --git a/test/test_tcp.py b/test/test_tcp.py
new file mode 100644
index 0000000..869ef1a
--- /dev/null
+++ b/test/test_tcp.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+
+
+class TestTCP(VppTestCase):
+    """ TCP Test Case """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestTCP, cls).setUpClass()
+
+    def setUp(self):
+        super(TestTCP, self).setUp()
+        self.vapi.session_enable_disable(is_enabled=1)
+
+    def tearDown(self):
+        super(TestTCP, self).tearDown()
+
+    def test_tcp(self):
+        """ TCP Unit Tests """
+        error = self.vapi.cli("test tcp all")
+
+        if error:
+            self.logger.critical(error)
+        self.assertEqual(error.find("Failed"), -1)
+
+if __name__ == '__main__':
+    unittest.main(testRunner=VppTestRunner)
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index c4b1601..c8954f8 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -2806,3 +2806,8 @@
         return self.api(self.papi.add_node_next,
                         {'node_name': node_name,
                          'next_name': next_name})
+
+    def session_enable_disable(self, is_enabled):
+        return self.api(
+            self.papi.session_enable_disable,
+            {'is_enable': is_enabled})
