不执行远程驱动程序上的测试

问题描述 投票:0回答:1

使用 selenium IDE 创建了一系列成功结束的测试。然后我导出为

junit
。将文件移动到 Maven 项目中的位置后
src/test/java
我尝试运行测试
./mvnw clean test -Dtest=test.java.DefaultSuiteTest
我收到此消息

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project selenium: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]

setUp
驱动程序是远程的,我可以使用浏览器访问它

 @Before
 public void setUp() throws MalformedURLException {
 ChromeOptions chromeOptions = new ChromeOptions();
 driver = new RemoteWebDriver(new URL("http://<someip>:4444/wd/hub"), chromeOptions);
 js = (JavascriptExecutor) driver;
 vars = new HashMap<String, Object>();
 }

检查地址时,我注意到会话从未创建。

此信息是否为您提供了有关如何解决此问题的任何线索?

提前致以问候和感谢

maven selenium-webdriver junit selenium-ide
1个回答
0
投票

尝试将 Surefire 插件更改为 2.19.1 或 2.22.1 它应该可以工作

© www.soinside.com 2019 - 2024. All rights reserved.