我的pom.xml在这里带有project.xml和soapui-setting.xml。如何在pom.xml中传递外部groovy脚本(Soapui和Maven集成)
<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</groupId>
<artifactId>SOAPUI</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SOAPUI</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>4.6.2</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>SOAPUI-soapui-project.xml</projectFile>
<junitReport>true</junitReport>
<outputFolder>reports\</outputFolder>
<testSuite>UVConnect_Users</testSuite>
<testCase>TC_DECE_00001_UV_UserCreate_Adult_FAU_TOU_NotAccepted</testCase>
<settingsFile>C:\Users\omkar.khatavkar\soapui-settings.xml</settingsFile>
<soapuiProperties>
<property>
<name>soapui.scripting.library</name>
<value>C:\Scripts</value>
</property>
</soapuiProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
但是给MVN测试作为Maven的目标之后,那么它给了失败,因为它不理解。
有没有什么办法可以将外部书面groovy脚本传递到Soap ui Maven命令行目标中?
00:25:00,371 ERROR [SoapUI] An error occurred [startup failed:
Script1.groovy: 15: unable to resolve class dbUtils.dbUtils
@ line 15, column 9.
def a = new dbUtils.dbUtils(log,dBHost);
^`enter code here`
我编辑pom.xml中,也试图与你所提到的目标。仍然看到相同的错误。我是否需要获得此许可? – Omkar 2014-09-23 11:28:27
您需要详细描述:1.您的项目涉及哪些方面。 2.你如何在你的项目中指定脚本位置。 3.它是否从SoapUI GUI起作用。 – SiKing 2014-09-23 15:05:59
它做了一些更改有关设置分机和脚本文件夹后的工作。 – Omkar 2014-09-23 17:23:15