1

我正在使用 Jenkins、maven 和 testLink 插件进行自动化测试。我想用 Jenkins 执行 ruby​​ 测试并将它们挂在 testLink 中。

这是我的 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
...
...
<dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.2.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.codeartisans</groupId>
        <artifactId>ruby-maven-plugin</artifactId>
        <version>0.1</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.codeartisans</groupId>
            <artifactId>ruby-maven-plugin</artifactId>
            <version>0.1</version>
            <executions>
        <execution>
        <id>exec-test</id>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <script>src/main/ruby/exec.rb</script>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

这是我在 jenkins 中的配置:

测试执行 --> 单一构建步骤 --> 调用顶级 maven 目标: --> 目标:-X clean org.codeartisans:ruby-maven-plugin:0.1:exec test -DsuiteXmlFiles=suite.xml

这里是控制台输出:

These will use the artifact files already in the core ClassRealm instead, to allow them to be included in PluginDescriptor.getArtifacts().

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'ruby:exec'

[0] Inside the definition for plugin 'ruby-maven-plugin' specify the following:

<configuration>
  ...
  <script>VALUE</script>
</configuration>.

有人可以帮我吗?我是maven,IC等的新手...

4

0 回答 0