Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 詹金斯没有';t运行Selenium测试(';没有要运行的测试';)_Java_Maven_Selenium_Jenkins - Fatal编程技术网

Java 詹金斯没有';t运行Selenium测试(';没有要运行的测试';)

Java 詹金斯没有';t运行Selenium测试(';没有要运行的测试';),java,maven,selenium,jenkins,Java,Maven,Selenium,Jenkins,我有一个香草硒项目,我想和詹金斯一起运行它。我已经阅读了这么多的帖子,并在我的项目中做了一些修改,以使我的测试可见。无论如何,当我尝试在Jenkins中运行测试时,我最终得到了一条“无需运行测试”的消息。这令人困惑 让我看看我的东西 我的测试方法之一: package tests; import junitparams.JUnitParamsRunner; import org.junit.Test; import org.junit.runner.RunWith; import junitp

我有一个香草硒项目,我想和詹金斯一起运行它。我已经阅读了这么多的帖子,并在我的项目中做了一些修改,以使我的测试可见。无论如何,当我尝试在Jenkins中运行测试时,我最终得到了一条
“无需运行测试”的消息。这令人困惑

让我看看我的东西

我的测试方法之一:

package tests;

import junitparams.JUnitParamsRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
import junitparams.FileParameters;
import pages.AnyPage;
import utils.AbstractTest;

@RunWith(JUnitParamsRunner.class)
public class DisponibiliteSitesWebTest extends AbstractTest {

    @Test
    @FileParameters("src\\selenium\\resources\\check_websites.csv")
    public void test_AffichageTexte(String url, String texteATrouver) {
        accesURL(url);
        AnyPage page = new AnyPage(this);
        page.assertTextDisplayed(texteATrouver);
    }
}
  • “测试”包存在:已选中
  • 测试命名约定:已选中
  • @测试注释:选中
我的POM:

<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.hightest.nc</groupId>
    <artifactId>poc</artifactId>
    <!--<packaging>pom</packaging>-->
    <packaging>jar</packaging>
    <version>1.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <skip>${skip.selenium.tests}</skip>
                    <parallel>none</parallel>
                    <threadCount>1</threadCount>
                    <reuseForks>false</reuseForks>
                    <disableXmlReport>true</disableXmlReport>
                </configuration>
                <executions>
                    <execution>
                        <id>runSeleniumTests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.7</version>
        </dependency>
        <dependency>
            <groupId>org.gebish</groupId>
            <artifactId>geb-core</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.gebish</groupId>
            <artifactId>geb-spock</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.0-groovy-2.4</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-driver</artifactId>
            <version>3.8.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-firefox-driver</artifactId>
            <version>3.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>pl.pragmatists</groupId>
            <artifactId>JUnitParams</artifactId>
            <version>1.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

4.0.0
org.hightest.nc
poc
罐子
1
org.apache.maven.plugins
maven故障保护插件
${skip.selenium.tests}
没有一个
1.
假的
真的
runSeleniumTests
集成测试
集成测试
org.codehaus.groovy
groovy all
2.4.7
org.gebish
geb型芯
1
org.gebish
格布·斯波克
1
org.spockframework
斯波克堆芯
1.0-groovy-2.4
org.seleniumhq.selenium
selenium远程驱动程序
3.8.0
测试
org.seleniumhq.selenium
selenium firefox驱动程序
3.8.0
org.seleniumhq.selenium
硒爪哇
3.8.0
org.apache.httpcomponents
httpclient
4.5.1
测试
log4j
log4j
1.2.17
实用主义者
少年照片
1.1.1
测试
org.apache.pdfbox
pdfbox
2.0.6
org.apache.commons
公地io
1.3.2
朱尼特
朱尼特
4.12
测试
  • 包装=罐:选中
  • 提及的测试范围:已检查
我的Jenkins作业调用Maven目标:
clean集成测试

我错过了什么


谢谢。

我终于找到了答案。问题是我的项目目录配置

它是src/selenium/java/**而不是src/test/java


我在另一个我以前没见过的问题中找到了答案

我终于找到了答案。问题是我的项目目录配置

它是src/selenium/java/**而不是src/test/java


我在另一个我以前没见过的问题中找到了答案

您是否在本地运行了
clean集成测试
?结果如何?同样的错误。但我找到了答案。。。在另一篇我以前没有看到的SO帖子中,您是否在本地运行了
clean集成测试
?结果如何?同样的错误。但我找到了答案。。。在另一个我以前没见过的SO帖子里。