0

このMavenプロファイルを設定しています。

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.8</version>
    <configuration>
        <includes>
            <include>com.something.test.X.java</include>
        </includes>

        <properties>
            <property>
                <name>reporter</name>
                <value>org.testng.reporters.XMLReporter</value>
            </property>
            <property>
                <name>listener</name>                          
                <value>Listener</value>
            </property>
        </properties>

        <systemProperties>
            <property>
                <name>x.host</name>
                <value>${server.ip}</value>
            </property>
            <property>
                <name>http_port</name>
                <value>${http_port}</value>
            </property>
            <property>
                <name>https_port</name>
                <value>${https_port}</value>
            </property>
            <property>
                <name>jmx_remote_port</name>
                <value>${jmx_remote_port}</value>
            </property>
        </systemProperties>

        <systemPropertyVariables>
            <x.host>${server.ip}</x.host>
            <env.BUILD_NUMBER>${env.BUILD_NUMBER}</env.BUILD_NUMBER>
            <env.HOSTNAME>${env.HOSTNAME}</env.HOSTNAME>
        </systemPropertyVariables>
    </configuration>

    <executions>
        <execution>
            <id>test</id>
            <phase>integration-test</phase>
            <goals>
                <goal>test</goal>
            </goals>
            <configuration>
                <skip>false</skip>
            </configuration>
        </execution>
    </executions>
</plugin>

プロファイルを実行すると、含まれているテストが実行されません!私は何が間違っているのですか?suitexmlfileで試してみましたが、クラスが見つからない場合に解析エラーが発生します。

4

1 に答える 1

1

Andrew Logvinovが提案したように、.java含めるテストの名前から削除する必要があります。一般に、テスト座標はとして指定され<class-name>[#<method-name>]ます。

于 2012-07-25T12:29:39.657 に答える