#Logging configuration localLog = logging.getLogger(testName) ### START ### localLog.info("---Going to run %s test---", testName) # Init test status to fail generics.setTestStatus("TEST_INIT", 1, testName) #Log in to WebPAS WebPAS.access() WebPAS.accessInpatientSupervisor() WebPAS.ensureHospital(hospitalName) #Register patient name, UMRN = WebPAS.registerPatient() #Logout from WebPAS WebPAS.logOut() #Login to TMS TMS.access() TMS.verifyPatient(UMRN) TMS.close() #SET SUCCESS IF REACHED THIS POINT generics.setTestStatus("TEST_END", 0, testName)
import logging import time import config import generics from TMS import * #ENV SETTINGS testName = (inspect.getfile(inspect.currentframe()).split("\\", -1)[-1]).rsplit(".", 1)[0] #Extract current *.py file name TMS = TMS(testName) setBundlePath(config.bundlePath) setShowActions(TMS.debug) #Logging configuration localLog = logging.getLogger(testName) ### START ### localLog.info("### Going to run a test: %s ###", testName) # Init test status to fail generics.setTestStatus("TEST_INIT", 1, testName) # Access the application TMS.access(forceDirectLink=True) # Exit the application TMS.logOut() #SET SUCCESS IF REACHED THIS POINT generics.setTestStatus("TEST_END", 0, testName)