Forum Discussion

tamnor's avatar
tamnor
Occasional Contributor
8 years ago

Running SoapUI / ReadyAPI tests from Maven

Hi

I am trying to figure out how to run my Ready API scripts, or in actual fact SoapUI scripts from Maven.

I do actually have a ready API licence, which should be registered to Royal Mail. However I was running into trouble creating a Maven project from my work machine where ReadyAPI is installed. From searching online I suspect this could be due to the fact that requests to download Maven dependencies are going through the proxy. So I am attempting to first do this from my personal machine to make some progress and understand how this works. However I only have SoapUI 5.2.1 installed on this.

I have created a Maven project and updated the POM based on the instructions at "http://readyapi.smartbear.com/features/integration/maven/working".

I changed the artifact id from ..

<artifactId>ready-api-maven-plugin</artifactId>

to

<artifactId>soapui-maven-plugin</artifactId>

and the version and included the correct path to my soapui project.

But when I run the command mvn test from the maven project folder where the POM is located I get errors ..

Plugin com.smartbear:soapui-maven-plugin:5.2.1 or one of its dependencies could not be resolved: Failure to find com.smartbear:

I have attached my POM file and the maven error log.

Any help in resolving this would be much appreciated.

Regards,

Tam Norris

3 Replies

    • tamnor's avatar
      tamnor
      Occasional Contributor

      Thanks Tanya. I worked this out too. See my reply below. I had the group id set to "com.smartbear" and not "com.smartbear.soapui".

       

      However I do still get a lot of ClassNotFoundExceptions.

       

      java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory

       

      I also get these errors every time I run the maven tests ..

       

      14:50:03,120 WARN [Tools] Could not delete temporary directory C:\Users\TAMNOR~1\AppData\Local\Temp\0dba8721-e6d2-4b5e-a3f8-c89e952c2367

       

      Do you know how I can resolve these?

  • tamnor's avatar
    tamnor
    Occasional Contributor

    OK. I worked out why I was getting this error. My group id was set to "com.smartbear" and not "com.smartbear.soapui".

     

    I ran mvn test and it worked the first time. Request failed as expected because there was an assertion that was failing, but now I'm running it again and I get ClassNotFoundExceptions ...

     

    java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory

     

    I also get these warning messages at the end ..

     

    WARN [Tools] Could not delete temporary directory C:\Users\TAMNOR~1\AppData\Local\Temp\dfade0d8-77f1-4763-ba03-bed461ef71f7

     

    There is also the following error ..

     

    13:55:14,673 ERROR [SoapUI] An error occurred [Double slash (//) in path], see error log for details

     

    Which doesn't seem right as the URL is shown above.

     

    13:55:14,226 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: GET /royalmail/uat/mailPieces/AF980715825GB/history HTTP/1.1