cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to pass in Rest Services endpoint info via the command line (mvn) ?

letstestthisfas
Occasional Contributor

Is there a way to pass in Rest Services endpoint info via the command line (mvn) ?

So, currently, I can run my tests with maven, via this command - 

 

mvn -Denvironment=env1 -DtestSuite= -Dbranch=master -DtestCase= clean test -Dsoapui.environment=env1

 I want to be able to similarly pass in Rest Services endpoints, example 

 

account-api = http://accounts:8300

 

Is there a way to pass it? I see that there is soapui.endpoint, but I am unsure how to pass the info. 

 

Thanks

Tags (3)
1 REPLY 1
nmrao
Community Hero

Re: Is there a way to pass in Rest Services endpoint info via the command line (mvn) ?

  1. soapui project changes: You may set a project level property say APPLICATION_URL and update the test requests with endpoint as ${#Project#APPLICATION_URL}
  2. pom.xml changes:
    <plugin>
        <groupId>com.smartbear.soapui</groupId>
        <artifactId>soapui-maven-plugin</artifactId>
        <version>4.6.1</version>
        <configuration>
            <systemProperties>
              <property>
                 <name>endpoint</name>
                 <value>${app.url}</value>
              </property>
            </systemProperties>
            <projectFile>simple-test-soapui-project.xml</projectFile>
            <projectProperties>
                <value>APPLICATION_URL=${app.url}</value>
            </projectProperties>
        </configuration>
    </plugin>

 

Now, you may add -Dendpoint=http://yourhost:port your command

 

Disclaimer: Just collected it from net, never tried myself.

 

Update:

Also look at this resource



Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors