cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyApi-SoapUI-Maven Swagger Petstore Failed to load SoapUI project file

SOLVED
Highlighted
New Contributor

ReadyApi-SoapUI-Maven Swagger Petstore Failed to load SoapUI project file

Hi,

I have created TestSuite while importing using Swagger Petstore API.

When executing in TestRunner reports of API testing are generated.

After that I exported project like zip file and extract the xml file. Configured the pom.xml to use the file under projectFile.

        <build>
                <plugins>
                        <plugin>
                                <groupId>com.smartbear.soapui</groupId>
                                <artifactId>soapui-pro-maven-plugin</artifactId>
                                <version>5.1.2</version>
                                <configuration>
                                        <junitReport>true</junitReport>
                                        <projectFile>Petstore-readyapi-project.xml</projectFile>
                                        <outputFolder>target/soapui</outputFolder>
                                </configuration>

                                <executions>
                                        <execution>
                                                <phase>test</phase>
                                                        <goals>
                                                                <goal>test</goal>
                                                        </goals>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>

When running mvn clean test I get error java.lang.Exception: Failed to load SoapUI project file

 

com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/root/soapui/soapui/Petstore-readyapi-project.xml]
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(SourceFile:321)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:220)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.<init>(SourceFile:160)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(SourceFile:28)
at com.eviware.soapui.impl.wsdl.WsdlProjectProFactory.createNew(SourceFile:16)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:331)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:188)
at com.eviware.soapui.maven2.TestMojo.execute(TestMojo.java:134)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.InterfaceFactoryRegistry.build(InterfaceFactoryRegistry.java:51)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(SourceFile:218)
... 29 more
[ERROR] java.lang.Exception: Failed to load SoapUI project file [Petstore-readyapi-project.xml]

 

If I create WADL project and create simple TestSuite and follow the same procedure to export and run under maven, reports are generated and everything is ok.

Why projects created with Swagger definitions are unusable with soapui-maven-plugin ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Contributor

Hi,

As per support feedback, using Swagger test definition and building exported package with Ready API require readyapi-maven-plugin with license to be able to run.

<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>2.7.0</version>

For Java 8

 

Use upper version number of the plugin if need for upper version of java, otherwise you get version error.

 

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

What version of the tool are you using
What is the version of swagger definition?


Regards,
Rao.
Highlighted
New Contributor

Hi,

As per support feedback, using Swagger test definition and building exported package with Ready API require readyapi-maven-plugin with license to be able to run.

<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>2.7.0</version>

For Java 8

 

Use upper version number of the plugin if need for upper version of java, otherwise you get version error.

 

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors