enter image description here私はJenkinsとmavenからスカラーテストを実行すると、次の出力が表示されます。なぜ私はsrc/test/scalaの下にある私のscalaテストを選んでいないのか分かりません。ジェンキンスコンソール出力の 出力はfollows-mavenはjenkinsを通してscalaテストを実行しません
[INFO] [scalatest:test {execution: test}]
[36mRun starting. Expected test count is: 0[0m
[32mDiscoverySuite:[0m
[36mRun completed in 905 milliseconds.[0m
[36mTotal number of tests run: 0[0m
[36mSuites: completed 1, aborted 0[0m
[36mTests: succeeded 0, failed 0, ignored 0, pending 0[0m
[32mAll tests passed.[0m
上記の通りである私のフォルダ構造です。 PFB私pom.xml-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hsbc.ftp.bigdata</groupId>
<artifactId>rpf</artifactId>
<version>${rpf.release.version}</version>
<distributionManagement>
<repository>
<id>dsnexus-releases</id>
<name>Nexus Release Repository</name>
<url>https://dsnexus.uk.hibm.hsbc:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>dsnexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>https://dsnexus.uk.hibm.hsbc:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.10.5</scala.version>
</properties>
<build>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<sourceDirectory>src/main</sourceDirectory>
<resources>
<resource>
<directory>src/main</directory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.scala</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<mainClass>com.hsbc.ftp.rpf.driver.RPFDriver</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>WDFTestSuite.txt</filereports>
<skipTests>false</skipTests>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_2.10</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.4</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>jodaExt</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.10</artifactId>
<version>1.9.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
は、あなたは私のScalaのテストを実行することができますどのように提案してくださいだろうか?
おかげ アビシェークSomani
ローカルでスカラテストを実行できましたか?使用している同じプラグイン( 'scalatest-maven-plugin')を使ってジェンキンズでスカラーテストを実行しています - https://github.com/nihil- os/stream-driver/blob/kinesis-stream/pom.xml#L199 – prayagupd
いいえ...同じ問題ですが、私のローカルマシンにいくつかのアクセスの問題があり、その理由はJenkinsからはうまくいくはずです。しかし、運がない! –
「完了しました1」と書かれていますが、テストクラス内にテストがありますか? – prayagupd