无法从Katalon执行python文件

2024-06-09 18:01:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从Katalon studio执行一个python脚本。在

下面是我试图从Katalon执行的代码。在

def scriptPath = "/Users/amiteshshukla/Documents/Work/highRoads/docgen_validation/docgen_validation.py"
def command = "python $scriptPath"
def result = command.execute().text
println result
return result

这是我要执行的python脚本。在

^{2}$

但在输出中,我看到的是:

SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

2019-05-15 13:48:09.562 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2019-05-15 13:48:09.567 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/PythonRead
2019-05-15 13:48:10.400 DEBUG testcase.PythonRead                      - 1: scriptPath = "/Users/amiteshshukla/Documents/Work/highRoads/docgen_validation/docgen_validation.py"
2019-05-15 13:48:10.402 DEBUG testcase.PythonRead                      - 2: command = python $scriptPath
2019-05-15 13:48:10.417 DEBUG testcase.PythonRead                      - 3: result = text
2019-05-15 13:48:10.537 DEBUG testcase.PythonRead                      - 4: println(result)

2019-05-15 13:48:10.541 DEBUG testcase.PythonRead                      - 5: return result
2019-05-15 13:48:10.544 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/PythonRead


Tags: coredebuginfomaindefresulttestcasecommand