使用Selenium项目执行Squash TA时出错IllegalArgumentException:URI具有权限组件

时间:2017-06-14 09:03:48

标签: java selenium automated-tests illegalargumentexception

在我的项目中,我正在使用Squash TA / Selenium和今天。我有一个问题。 我理解这个问题,但我不知道如何解决它。

错误是关于转换方法失败,通常带有'BadDataException'错误,但这次它是'IllegalArgumentException':URI有一个权限组件

这里是堆栈跟踪:

[INFO] Squash TA : compiling tests...
[INFO] Squash TA : initializing context...
[INFO] org.squashtest.ta.backbone.init.ComponentPackagesEnumerator - Listing sqhashTA engine component packages
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.enginecore
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.commons-component
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.filechecker
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.sahi
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.selenium
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.soapui
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.ftp
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.db
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.ssh
[INFO] org.squashtest.ta.backbone.init.ComponentManifestParser - Loading plugin configuration for: org.squashtest.ta.plugin.local.process
[INFO] Squash TA : testing...
[INFO] org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl - Beginning execution of ecosystem tests.ActivInfinit.V7.Chrome.AdhesionConsultation.Souscription.ACS
[INFO] org.squashtest.ta.backbone.engine.impl.TestRunnerImpl - Beginning execution of test SouscriptionSanteOff01MPAyaACSCheV7.ta
[INFO] [USER_MESSAGE] - Connexion chrome
[ERROR] org.squashtest.ta.backbone.tools.ReflectionUtils - Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource'  has thrown an exception.
java.lang.IllegalArgumentException: URI has an authority component
	at java.io.File.<init>(File.java:423)
	at org.squashtest.ta.plugin.commons.library.java.ProcessConnector.computeJarClassPath(ProcessConnector.java:71)
	at org.squashtest.ta.plugin.commons.library.java.ProcessConnector.computeJarClassPath(ProcessConnector.java:55)
	at org.squashtest.ta.plugin.commons.library.java.CompilerConnector.setCompilerClasspath(CompilerConnector.java:135)
	at org.squashtest.ta.plugin.commons.library.java.CompilerConnector.compile(CompilerConnector.java:105)
	at org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle.convert(FileToJavaCodeBundle.java:88)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.squashtest.ta.backbone.tools.ReflectionUtils.invoke(ReflectionUtils.java:252)
	at org.squashtest.ta.backbone.engine.wrapper.ResourceConverterHandler.convert(ResourceConverterHandler.java:106)
	at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.applyConverter(DefaultConvertResourceRunner.java:130)
	at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.convertResource(DefaultConvertResourceRunner.java:94)
	at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.doRun(DefaultConvertResourceRunner.java:54)
	at org.squashtest.ta.backbone.engine.instructionrunner.AbstractDefaultInstructionRunner.run(AbstractDefaultInstructionRunner.java:69)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstruction(TestRunnerImpl.java:203)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:148)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runMetaInstruction(TestRunnerImpl.java:172)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:146)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runPhase(TestRunnerImpl.java:136)
	at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runTest(TestRunnerImpl.java:107)
	at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.runAllTests(EcosystemRunnerImpl.java:202)
	at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.run(EcosystemRunnerImpl.java:104)
	at org.squashtest.ta.backbone.engine.impl.SuiteRunnerImpl.execute(SuiteRunnerImpl.java:68)
	at org.squashtest.ta.backbone.engine.impl.EngineImpl.execute(EngineImpl.java:63)
	at org.squashtest.ta.maven.SquashTAMojo.executeImpl(SquashTAMojo.java:204)
	at org.squashtest.ta.maven.AbstractSquashTaMojo.execution(AbstractSquashTaMojo.java:85)
	at org.squashtest.ta.maven.AbstractBaseSquashTaMojo.execute(AbstractBaseSquashTaMojo.java:162)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR] org.squashtest.ta.backbone.engine.impl.TestRunnerImpl - The execution raised an error in the TEST phase of the TA script 'SouscriptionSanteOff01MPAyaACSCheV7.ta' with the message: 'Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource'  has thrown an exception.'.
[INFO] Exporting results
[INFO] Cleaning resources
[INFO] Squash TA : build complete.
[INFO] org.squashtest.ta.core.tools.io.TempFileUtils - All the files from C:\Windows\TEMP\Squash_TA were properly deleted.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:11.051s
[INFO] Finished at: Wed Jun 14 10:43:51 CEST 2017
[INFO] Final Memory: 17M/682M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.squashtest.ta:squash-ta-maven-plugin:1.8.0-RELEASE:run (default-cli) on project AI-automated-tests: Build failure : there are tests failures
[ERROR] Test statistics : 1 test runs, 0 passed, 1 tests didn't pass
[ERROR] Tests failed / crashed :
[ERROR] -----------
[ERROR] tests.ActivInfinit.V7.Chrome.AdhesionConsultation.Souscription.ACS:
[ERROR] ==> SouscriptionSanteOff01MPAyaACSCheV7.ta
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

任何帮助,谢谢。

1 个答案:

答案 0 :(得分:1)

基于this answer,我认为您的工作区安装在网络存储空间(&#34; \\&#34; UNC路径)。文件只接受本地文件系统,即没有权限的URI。

Windows下可能的解决方法是将网络驱动器映射到驱动器号。

HTH。