Интеграция SoapUI и Maven - Лицензия - PullRequest
0 голосов
/ 31 октября 2019

Я пытаюсь интегрировать SoapUI (Community Version) и Maven, и для этого у меня есть XML-файл проектов SOAP UI, который я поместил в проект maven, и вот файлы, которые я 'мы написали.

Groovy Script,

import java.io.* 
import jxl.* 
import jxl.write.* 
import java.text.SimpleDateFormat  
//get 
log.info("=======================test started for get=======================") 

def f_g=new File("/Volumes/Kanchan/sample-excel/sample.xls");   ///97-2013 workbook xls 
def wk_g= Workbook.getWorkbook(f_g) 
def ws_g=wk_g.getSheet("Sheet1") 
r_g=ws_g.getRows()  //max row number   

for(def i=1;i<r_g;i++) 
{     
    log.info "last row number - "+r_g    
    Cell c1=ws_g.getCell(0,i)     
    log.info c1.getContents()          
    def get = new URL("http://thetestingworldapi.com/api/technicalskills/"+c1.getContents()).openConnection();     
    def getRC = get.getResponseCode();     
    log.info("code is - "+getRC);     
    if(getRC.equals(200)) {       
        log.info(get.getInputStream().getText());     
    }  
}  

и ниже - это мой pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>com.smartbear</groupId>
            <artifactId>ready-api-maven-plugin</artifactId>
            <version>2.8.0</version>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>

                    <configuration>
                        <projectFile>${FileName}</projectFile>
                        <outputFolder>${basedir}/target/surefire-reports</outputFolder>

                        <!-- Specifies the format of the report. Possible values: PDF, XLS, 
                            HTML, RTF, CSV, TXT and XML. -->
                        <reportFormat>PDF</reportFormat>

                        <reports>${basedir}/target/surefire-reports</reports>
                        <reportName>Project Report</reportName>
                        <printReport>true</printReport>
                        <readyApiProperties>

                            <property>
                                <!-- Required. A folder with ReadyAPI executable files. -->
                                <!-- Used to run a local installation of ReadyAPI. -->
                                <name>soapui.home</name>
                                <value>/Applications/SoapUI-5.5.0.app/Contents/java/app/bin</value>
                            </property>
                        </readyApiProperties>

                        <!-- ========= Additional elements ============= -->

                        <!-- Commands ReadyAPI to generate JUnit-style reports. -->
                        <junitReport>true</junitReport>

                        <!-- Specifies the name of the test suite to be run. -->
                        <!-- <testSuite></testSuite> -->

                        <!-- Specifies the name of the test case to run. -->
                        <!-- <testCase></testCase> -->

                        <!-- Specifies the tags of the test cases to be run. -->
                        <!-- Use the '&amp;&amp;', '||', and '!' operators to apply the AND, 
                            OR and NOT conditions to tags respectively, or list tags separated by commas 
                            to apply the AND condition. To change the order of operations, use parentheses. -->
                        <!-- <tags><param>TestCase tag1 &amp;&amp; (tag2 || tag3) !tag4</param></tags> -->

                        <!-- Overrides the service endpoints specified in the test. -->
                        <!-- <endpoint></endpoint> -->

                        <!-- Overrides the host specified in the the test. -->
                        <!-- <host></host> -->

                        <!-- Overrides the user name for all requests. -->
                        <!-- <username></username> -->

                        <!-- Overrides the passwords for all requests. -->
                        <!-- <password></password> -->

                        <!-- Overrides the domain used for requests. -->
                        <!-- <domain></domain> -->

                        <!-- If true, commands Maven to export all the requests. -->
                        <!-- <exportAll></exportAll> -->

                        <!-- Specifies the SoapUI settings file to use. Required for custom 
                            ReadyAPI reports. -->
                        <!-- <settingsFile></settingsFile> -->

                        <!-- Specifies the type of the WSS password. -->
                        <!-- <wssPasswordType></wssPasswordType> -->

                        <!-- Specifies the password for an encrypted project. -->
                        <!-- <projectPassword></projectPassword > -->

                        <!-- Specifies the password for an encrypted settings file. -->
                        <!-- <settingsPassword></settingsPassword> -->

                        <!-- Specifies the value of a global property for the test run. -->
                        <!-- <globalProperties> <value>Sample Project Property=My sample value</value> 
                            </globalProperties> -->

                        <!-- Specifies the value of a project property for the test run. -->
                        <!-- <projectProperties> <value>Some Property=My Sample Value</value> 
                            </projectProperties> -->

                        <!-- Saves the project after the test run. -->
                        <!-- <saveAfterRun></saveAfterRun> -->

                        <!-- If true, commands Maven to continue -->
                        <!-- the test run even if an assertion triggers. -->
                        <!-- <testFailIgnore>true</testFailIgnore> -->

                        <!-- Enables HTML coverage reports. Only available in ReadyAPI Pro. -->
                        <!-- <coverage></coverage> -->

                        <!-- Specifies the environment to use in the test run. -->
                        <!-- Only available in ReadyAPI Pro. -->
                        <!-- <environment></environment> -->

                        <!-- If true, ReadyAPI will not send usage statistics. -->
                        <!-- <optOutUsageStatistics></optOutUsageStatistics> -->

                        <!-- ========= /Additional elements ============= -->

                    </configuration>
                </execution>
            </executions>
        </plugin>

    </plugins>

</build>

, когда я выполняю его, запрашивая лицензию, с сообщением ниже.

[INFO] Started 'LifecycleManager@422266669'
No valid SoapUI license exists.
Please enter absolute path of the license file (.zip or .key):

есть ли обходной путь для этого?

Заранее спасибо :)

1 Ответ

0 голосов
/ 31 октября 2019

Ready API - это платная лицензионная версия SoapUI. Пожалуйста, попробуйте плагин ниже, это будет для версии с открытым исходным кодом. Вы также можете обратиться к этой ссылке

<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.1</version>
</plugin>
...