我正在尝试使用Windows命令提示符w /和w / o选项来运行SoapUI project.xml
以生成测试报告但是获得以下访问被拒绝错误。测试跑步者执行是否适用于免费版?或者这与您机器上的管理员访问权限相关吗?
testrunner.bat C:\Users\meiyer\Desktop\LOAD TOOLS\SOAPUI sample projects\RESTTEST\Locations.xml
testrunner.bat -FPDF -R"JUnit-Style HTML Report" C:\Users\meiyer\Desktop\LOAD TOOLS\SOAPUI sample projects\RESTTEST\Locations.xml
Configuring log4j from [C:\Program Files\SmartBear\SoapUI-5.2.1\bin\soapui-
log4j.xml]
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: global-groovy.log (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:2
56)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.ja
va:220)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurat
or.java:150)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfi
gurator.java:163)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOM
Configurator.java:425)
at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.ja
va:345)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:712)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:604)
at org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:861)
at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.
java:88)
at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:57)
at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:853)
at org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurato
r.java:584)
at com.eviware.soapui.DefaultSoapUICore.initLog(DefaultSoapUICore.java:4
80)
at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:124)
at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:11
4)
答案 0 :(得分:2)
是的,这是访问权限问题。默认情况下,SoapUI尝试写入其SoapUI程序目录,这是一种糟糕的风格。
要更改此行为,请转到=Switch(Fields!verwag.Value > Fields!skatting.Value, 1, Fields!verwag.Value = Fields!skatting.Value, 2, Fields!verwag.Value < Fields!skatting.Value, 3)
并查找文件参数值(例如,在C:\Program Files\SmartBear\SoapUI-5.3.0\bin\soapui-log4j.xml
appender中)
将GLOBAL_GROOVY_LOG
的值设置为当前用户有权访问的路径。例如。你的用户目录。
我尝试在那里使用Windows环境变量,但短期内没有成功。
答案 1 :(得分:0)
以SoapUI.exe管理员身份运行为我解决了此问题。
以管理员模式运行cmd时也是如此