与gradle的Selenium互联网探险家。运行单个班级

时间:2017-11-14 16:48:33

标签: selenium gradle

面对在IE浏览器中运行单个类的问题。始终显示Could not find matching test for pattern: init1已使用的命令gradle -Dtest.single=init1 test -DBROWSER=IE

但是当我为Firefox浏览器或Chrome浏览器执行相同命令时,一切正常。 IE浏览器有一些特殊的行为吗? 也试过 - 测试并面临同样的行为。

test {
scanForTestClasses = true
reports.html.enabled = true

useTestNG() {
    systemProperties = [BROWSER: System.getProperty('BROWSER', 'IE'),
}
testLogging {
    events "started", "passed", "skipped", "failed"
}

使用Selenium - 3.7.1, 尝试使用gradle 3.3和4.3.1 来自seleniumhq网站的IE的最新驱动程序。

也许有人遇到同样的问题? 感谢

更新

这是stacktrace

  

org.gradle.api.tasks.TaskExecutionException:任务':test'执行失败。       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)       在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)       在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)       在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)       at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)       在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)       在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)       在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)       在org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)       在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker $ 1.execute(DefaultTaskGraphExecuter.java:236)       at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker $ 1.execute(DefaultTaskGraphExecuter.java:228)       在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)       在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)       在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)       at org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)       at org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)       在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)       在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)       在org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)       在org.gradle.execution.DefaultBuildExecuter.access $ 000(DefaultBuildExecuter.java:23)       在org.gradle.execution.DefaultBuildExecuter $ 1.proceed(DefaultBuildExecuter.java:43)       在org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)       在org.gradle.initialization.DefaultGradleLauncher $ 3.execute(DefaultGradleLauncher.java:196)       在org.gradle.initialization.DefaultGradleLauncher $ 3.execute(DefaultGradleLauncher.java:193)       在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)       在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:193)       在org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)       在org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)       在org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)       在org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:50)       在org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)       在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner $ 1.execute(RunAsBuildOperationBuildActionRunner.java:43)       在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner $ 1.execute(RunAsBuildOperationBuildActionRunner.java:40)       在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)       在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)       在org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:75)       在org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)       在org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)       在org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)       在org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)       在org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)       在org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)       在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:74)       在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:72)       在org.gradle.util.Swapper.swap(Swapper.java:38)       在org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)       在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)       在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)       在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)       在org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy $ 1.run(StartBuildOrRespondWithBusy.java:50)       在org.gradle.launcher.daemon.server.DaemonStateCoordinator $ 1.run(DaemonStateCoordinator.java:297)       at org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)       at org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run(StoppableExecutorImpl.java:40)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)       在java.lang.Thread.run(Thread.java:745)   引起:org.gradle.api.tasks.testing.TestExecutionException:找不到模式的匹配测试:init1       在org.gradle.api.internal.tasks.testing.NoMatchingTestsReporter.afterSuite(NoMatchingTestsReporter.java:37)       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)       在org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)       在org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)       在org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)       在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)       在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)       at org.gradle.internal.dispatch.ProxyDispatchAdapter $ DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)       在com.sun.proxy。$ Proxy55.afterSuite(未知来源)       在org.gradle.api.internal.tasks.testing.results.TestListenerAdapter.completed(TestListenerAdapter.java:48)       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)       在org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)       在org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)       在org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)       在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)       在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)       at org.gradle.internal.dispatch.ProxyDispatchAdapter $ DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)       在com.sun.proxy。$ Proxy54.completed(未知来源)       在org.gradle.api.internal.tasks.testing.results.StateTrackingTestResultProcessor.completed(StateTrackingTestResultProcessor.java:71)       在org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.completed(AttachParentTestResultProcessor.java:56)       在org.gradle.api.internal.tasks.testing.processors.TestMainAction.run(TestMainAction.java:55)       在org.gradle.api.internal.tasks.testing.detection.DefaultTestExecuter.execute(DefaultTestExecuter.java:94)       在org.gradle.api.tasks.testing.Test.executeTests(Test.java:622)       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)       在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)       at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore $ StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)       在org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore $ StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)       在org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore $ StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)       在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:632)       在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:615)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)

0 个答案:

没有答案