diff --git a/erpnext/healthcare/doctype/lab_test/test_lab_test.py b/erpnext/healthcare/doctype/lab_test/test_lab_test.py
index 4131ad9..d949c46 100644
--- a/erpnext/healthcare/doctype/lab_test/test_lab_test.py
+++ b/erpnext/healthcare/doctype/lab_test/test_lab_test.py
@@ -3,8 +3,204 @@
 # See license.txt
 from __future__ import unicode_literals
 import unittest
-
-# test_records = frappe.get_test_records('Lab Test')
+import frappe
+from frappe.utils import getdate, nowtime
+from erpnext.healthcare.doctype.patient_appointment.test_patient_appointment import create_patient
+from erpnext.healthcare.doctype.lab_test.lab_test import create_multiple
+from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account, get_income_account
+from erpnext.healthcare.doctype.patient_medical_record.test_patient_medical_record import create_lab_test_template as create_blood_test_template
 
 class TestLabTest(unittest.TestCase):
-	pass
+	def test_lab_test_item(self):
+		lab_template = create_lab_test_template()
+		self.assertTrue(frappe.db.exists('Item', lab_template.item))
+		self.assertEqual(frappe.db.get_value('Item Price', {'item_code':lab_template.item}, 'price_list_rate'), lab_template.lab_test_rate)
+
+		lab_template.disabled = 1
+		lab_template.save()
+		self.assertEquals(frappe.db.get_value('Item', lab_template.item, 'disabled'), 1)
+
+		lab_template.reload()
+
+		lab_template.disabled = 0
+		lab_template.save()
+
+	def test_descriptive_lab_test(self):
+		lab_template = create_lab_test_template()
+
+		# blank result value not allowed as per template
+		lab_test = create_lab_test(lab_template)
+		lab_test.descriptive_test_items[0].result_value = 12
+		lab_test.descriptive_test_items[2].result_value = 1
+		lab_test.save()
+		self.assertRaises(frappe.ValidationError, lab_test.submit)
+
+	def test_sample_collection(self):
+		frappe.db.set_value('Healthcare Settings', 'Healthcare Settings', 'create_sample_collection_for_lab_test', 1)
+		lab_template = create_lab_test_template()
+
+		lab_test = create_lab_test(lab_template)
+		lab_test.descriptive_test_items[0].result_value = 12
+		lab_test.descriptive_test_items[1].result_value = 1
+		lab_test.descriptive_test_items[2].result_value = 2.3
+		lab_test.save()
+
+		# check sample collection created
+		self.assertTrue(frappe.db.exists('Sample Collection', {'sample': lab_template.sample}))
+
+		frappe.db.set_value('Healthcare Settings', 'Healthcare Settings', 'create_sample_collection_for_lab_test', 0)
+		lab_test = create_lab_test(lab_template)
+		lab_test.descriptive_test_items[0].result_value = 12
+		lab_test.descriptive_test_items[1].result_value = 1
+		lab_test.descriptive_test_items[2].result_value = 2.3
+		lab_test.save()
+
+		# sample collection should not be created
+		lab_test.reload()
+		self.assertEquals(lab_test.sample, None)
+
+	def test_create_lab_tests_from_sales_invoice(self):
+		sales_invoice = create_sales_invoice()
+		create_multiple('Sales Invoice', sales_invoice.name)
+		sales_invoice.reload()
+		self.assertIsNotNone(sales_invoice.items[0].reference_dn)
+		self.assertIsNotNone(sales_invoice.items[1].reference_dn)
+
+	def test_create_lab_tests_from_patient_encounter(self):
+		patient_encounter = create_patient_encounter()
+		create_multiple('Patient Encounter', patient_encounter.name)
+		patient_encounter.reload()
+		self.assertTrue(patient_encounter.lab_test_prescription[0].lab_test_created)
+		self.assertTrue(patient_encounter.lab_test_prescription[0].lab_test_created)
+
+
+def create_lab_test_template(test_sensitivity=0, sample_collection=1):
+	medical_department = create_medical_department()
+	if frappe.db.exists('Lab Test Template', 'Insulin Resistance'):
+		return frappe.get_doc('Lab Test Template', 'Insulin Resistance')
+	template = frappe.new_doc('Lab Test Template')
+	template.lab_test_name = 'Insulin Resistance'
+	template.lab_test_template_type = 'Descriptive'
+	template.lab_test_code = 'Insulin Resistance'
+	template.lab_test_group = 'Services'
+	template.department = medical_department
+	template.is_billable = 1
+	template.lab_test_description = 'Insulin Resistance'
+	template.lab_test_rate = 2000
+
+	for entry in ['FBS', 'Insulin', 'IR']:
+		template.append('descriptive_test_templates', {
+			'particulars': entry,
+			'allow_blank': 1 if entry=='IR' else 0
+		})
+
+	if test_sensitivity:
+		template.sensitivity = 1
+
+	if sample_collection:
+		template.sample = create_lab_test_sample()
+		template.sample_qty = 5.0
+
+	template.save()
+	return template
+
+def create_medical_department():
+	medical_department = frappe.db.exists('Medical Department', '_Test Medical Department')
+	if not medical_department:
+		medical_department = frappe.new_doc('Medical Department')
+		medical_department.department = '_Test Medical Department'
+		medical_department.save()
+		medical_department = medical_department.name
+
+	return medical_department
+
+def create_lab_test(lab_template):
+	patient = create_patient()
+	lab_test = frappe.new_doc('Lab Test')
+	lab_test.template = lab_template.name
+	lab_test.patient = patient
+	lab_test.patient_sex = 'Female'
+	lab_test.save()
+
+	return lab_test
+
+def create_lab_test_sample():
+	blood_sample = frappe.db.exists('Lab Test Sample', 'Blood Sample')
+	if blood_sample:
+		return blood_sample
+
+	sample = frappe.new_doc('Lab Test Sample')
+	sample.sample = 'Blood Sample'
+	sample.sample_uom = 'U/ml'
+	sample.save()
+
+	return sample.name
+
+def create_sales_invoice():
+	patient = create_patient()
+	medical_department = create_medical_department()
+	insulin_resistance_template = create_lab_test_template()
+	blood_test_template = create_blood_test_template(medical_department)
+
+	sales_invoice = frappe.new_doc('Sales Invoice')
+	sales_invoice.patient = patient
+	sales_invoice.customer = frappe.db.get_value('Patient', patient, 'customer')
+	sales_invoice.due_date = getdate()
+	sales_invoice.company = '_Test Company'
+	sales_invoice.debit_to = get_receivable_account('_Test Company')
+
+	tests = [insulin_resistance_template, blood_test_template]
+	for entry in tests:
+		item_line = sales_invoice.append('items', {
+			'item_code': entry.item,
+			'item_name': entry.lab_test_name,
+			'description': entry.lab_test_description,
+			'qty': 1,
+			'uom': 'Nos',
+			'conversion_factor': 1,
+			'income_account': get_income_account(None, '_Test Company'),
+			'rate': entry.lab_test_rate,
+			'amount': entry.lab_test_rate
+		})
+
+	sales_invoice.set_missing_values()
+
+	sales_invoice.submit()
+	return sales_invoice
+
+def create_patient_encounter():
+	patient = create_patient()
+	medical_department = create_medical_department()
+	insulin_resistance_template = create_lab_test_template()
+	blood_test_template = create_blood_test_template(medical_department)
+
+	patient_encounter = frappe.new_doc('Patient Encounter')
+	patient_encounter.patient = patient
+	patient_encounter.practitioner = create_practitioner()
+	patient_encounter.encounter_date = getdate()
+	patient_encounter.encounter_time = nowtime()
+
+	tests = [insulin_resistance_template, blood_test_template]
+	for entry in tests:
+		patient_encounter.append('lab_test_prescription', {
+			'lab_test_code': entry.item,
+			'lab_test_name': entry.lab_test_name
+		})
+
+	patient_encounter.submit()
+	return patient_encounter
+
+
+def create_practitioner():
+	practitioner = frappe.db.exists('Healthcare Practitioner', '_Test Healthcare Practitioner')
+
+	if not practitioner:
+		practitioner = frappe.new_doc('Healthcare Practitioner')
+		practitioner.first_name = '_Test Healthcare Practitioner'
+		practitioner.gender = 'Female'
+		practitioner.op_consulting_charge = 500
+		practitioner.inpatient_visit_charge = 500
+		practitioner.save(ignore_permissions=True)
+		practitioner = practitioner.name
+
+	return practitioner
diff --git a/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py b/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
index e5a5e4c..aa85a23 100644
--- a/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
+++ b/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
@@ -34,7 +34,7 @@
 		self.assertTrue(medical_rec)
 
 		template = create_lab_test_template(medical_department)
-		lab_test = create_lab_test(template, patient)
+		lab_test = create_lab_test(template.name, patient)
 		# check for lab test
 		medical_rec = frappe.db.exists('Patient Medical Record', {'status': 'Open', 'reference_name': lab_test.name})
 		self.assertTrue(medical_rec)
@@ -66,7 +66,7 @@
 
 def create_lab_test_template(medical_department):
 	if frappe.db.exists('Lab Test Template', 'Blood Test'):
-		return 'Blood Test'
+		return frappe.get_doc('Lab Test Template', 'Blood Test')
 
 	template = frappe.new_doc('Lab Test Template')
 	template.lab_test_name = 'Blood Test'
@@ -76,7 +76,7 @@
 	template.is_billable = 1
 	template.lab_test_rate = 2000
 	template.save()
-	return template.name
+	return template
 
 def create_lab_test(template, patient):
 	lab_test = frappe.new_doc('Lab Test')
