Exemplo n.º 1
0
'''

import common, config


import sys, os
reload(sys)
sys.setdefaultencoding('utf-8')

'''
    Report file path & naming rules
'''  
REPORT_DIR = config.REPORT_DIR      

REPORT_NAME = "Report_" + common.stamp_datetime2() + ".txt"   # Report_ naming rules
REPORT_ABS = common.pathJoin(REPORT_DIR, REPORT_NAME)

groupDir = os.getcwd()
caseSuite = os.path.basename(groupDir)
caseName = ""
caseRunNth = -1

'''
     Report directory and files initial
''' 
common.mkdirs(REPORT_DIR)
with open(REPORT_ABS,"w") as f:             
    pass
print "[Report]\t\t" + REPORT_ABS 

Exemplo n.º 2
0
import common, config

import sys, os
reload(sys)
sys.setdefaultencoding('utf-8')

'''
    log file path & naming rules
'''  
LOG_DIR = config.LOG_DIR      
HTML_DIR = config.HTML_DIR
PIC_DIR = config.PIC_DIR

LOG_NAME = "log_" + common.stamp_datetime2() + ".txt"   # Log naming rules
LOG_ABS = common.pathJoin(LOG_DIR, LOG_NAME)

USERLOG_NAME = "userlog_" + common.stamp_datetime2() + ".txt"   # user's Log naming rules
USERLOG_ABS  = common.pathJoin(LOG_DIR, USERLOG_NAME)

HTML_NAME = common.stamp_datetime2() + ".html"          # HTML naming rules             
HTML_ABS = common.pathJoin(HTML_DIR,HTML_NAME) 


'''
    db log (to mongo)
'''  
groupDir = os.getcwd()
caseSuite = os.path.basename(groupDir)

Exemplo n.º 3
0
BROWSER             = common.getConf("browser", "browser")   
BROWSER_X           = common.getConfInt("browser", "x")           
BROWSER_Y           = common.getConfInt("browser", "y")

# Run
sleepTime           = common.getConfInt("run", "sleepTime")    
imWaitTime          = common.getConfInt("run", "imWaitTime")    

# Path
PROJECT_PATH        = common.getConf("path", "PROJECT_PATH")

LOG_DIRNAME         = common.getConf("path", "LOG_DIRNAME")
HTML_DIRNAME        = common.getConf("path", "HTML_DIRNAME")
PIC_DIRNAME         = common.getConf("path", "PIC_DIRNAME")

LOG_DIR             = common.pathJoin(PROJECT_PATH, LOG_DIRNAME)
HTML_DIR            = common.pathJoin(PROJECT_PATH, HTML_DIRNAME)
PIC_DIR             = common.pathJoin(PROJECT_PATH, PIC_DIRNAME)

# Environment
ENV                 = common.getConf("env", "url_env")

# Test report
REPORT_DIRNAME      = common.getConf("report", "REPORT_DIRNAME")
REPORT_DIR          = common.pathJoin(PROJECT_PATH, REPORT_DIRNAME)



if __name__ == "__main__":
    pass