Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions mkcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def run(args):
if os.path.exists("test.rar"):
os.remove('test.rar')

#Remove logs directory and create a new one
if os.path.exists("logs"):
shutil.rmtree('logs')
os.mkdir("logs")

if os.path.exists(route):
print("copy dir")
Expand Down Expand Up @@ -237,6 +241,21 @@ def run(args):
except Exception as e:
print("Not connection to support Data Base")
print(e)

#Upload logs
try:
logPath=dirname+'/logs/'
if os.path.exists(dirname + '/logs/chrome.log'):
os.rename(logPath+'chrome.log', logPath+str(organizationId) + '_' + str(executionNumber) + '.log')
logFileName = logPath+ str(organizationId) + '_' + str(executionNumber) + '.log'
logFile = open(logFileName, 'r')
shutil.copytree("logs/", dest+"/logs")
files = {'file' : logFile}
requests.post( muuktestRoute + 'upload_log/' , headers=hed, files=files)
# requests.post( muuktestRoute + 'upload_log/' , headers=hed, files=files, verify=False)
except Exception as e:
print("Error on logs uploading")
print(e)
else:
print(field+': is not an allowed property')

Expand Down
7 changes: 6 additions & 1 deletion src/test/resources/GebConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ environments {
// run via “./gradlew chromeTest”
// See: http://code.google.com/p/selenium/wiki/ChromeDriver
chrome {
driver = { new ChromeDriver() }
ChromeOptions o = new ChromeOptions()
o.addArguments('enable-logging')
o.addArguments('v=1')
o.addArguments('log-level=0')
o.addArguments('log-file=logs/chrome.log')
driver = { new ChromeDriver(o) }
}

// run via “./gradlew chromeHeadlessTest”
Expand Down