在WIndows 7中开发代码然后使用Winscp将代码移动到Unix框中,在Unix框中输入以下命令之后在Unix环境中获得以下错误
./ katalon -runMode = console -projectPath =" /home/jenktran/Automation/Katalon_First_Proj/Katalon_First_Proj.prj" -retry = 1 -retryFailedTestCases = true -testSuitePath =" Chrome浏览器中的测试套件/ Time-Trax" -browserType =" Chrome(无头)"
以下是控制台日志: -
jenktran@pstas07:~/Automation$ ./katalon -runMode=console -projectPath="/home/jenktran/Automation/Katalon_First_Proj/Katalon_First_Proj.prj" -retry=1 -retryFailedTestCases=true -testSuitePath="Test Suites/Time-Trax in Chrome Browser" -browserType="Chrome (headless)"
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
129 2.4.7.xx-201611170128-e46 = ACTIVE
/%home%jenktran%Automation%Katalon_First_Proj%Katalon First Proj.prj/Keywords/newPackage/newKeyword.groovy: 24 Groovy:unable to resolve class internal.GlobalVariable
java.lang.NullPointerException
at com.kms.katalon.dal.fileservice.manager.GlobalVariableFileServiceManager.getWrapper(GlobalVariableFileServiceManager.java:44)
at com.kms.katalon.dal.fileservice.manager.GlobalVariableFileServiceManager.getAll(GlobalVariableFileServiceManager.java:17)
at com.kms.katalon.dal.fileservice.dataprovider.GlobalVariableFileServiceDataProvider.getAll(GlobalVariableFileServiceDataProvider.java:13)
at com.kms.katalon.controller.GlobalVariableController.getAllGlobalVariables(GlobalVariableController.java:31)
at com.kms.katalon.controller.GlobalVariableController.generateGlobalVariableLibFile(GlobalVariableController.java:54)
at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:96)
at com.kms.katalon.execution.console.ConsoleMain.getProject(ConsoleMain.java:223)
at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:130)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:70)
at com.kms.katalon.console.application.Application.runConsole(Application.java:62)
at com.kms.katalon.core.application.Application.runConsole(Application.java:72)
at com.kms.katalon.core.application.Application.start(Application.java:56)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
知道为什么这个脚本失败了,尽管它在Windows 7中正常运行
答案 0 :(得分:2)
通过重新导入项目
解决了这个问题