cancel
Showing results for 
Search instead for 
Did you mean: 

relativePath (soapui java API)

Highlighted
Occasional Contributor

relativePath (soapui java API)

Hi all,

 

i'm trying to find the way how to set relativePath for project xml's and also for datasource. Cause' I'm trying to automate all soap and rest tests in our company. And all collegues create their own soapui tests/projects and plan is run this projects or just suites, testCases from Bamboo.

 

what I trying is:

private static final String OUTPUT_FOLDER_PATH = WorkspaceImpl.class.getResource("src/test/resources/suites/").getPath();

 and than from bamboo i will send specific name of the XML what I want to start. 

but problem is that i'm not sure if this way is correct, cause' doesnt work. Could somebody write me how to do it? Some example will help 🙂 

 

Thanks

1 REPLY 1
Highlighted
Contributor

Re: relativePath (soapui java API)

I'm not sure if I understand what you are doing with Bamboo. However you can get the project path this way in a Groovy script.

 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectPath = groovyUtils.projectPath

I found a link in ReadyAPI documentation (2.2) about datasource that might help. Hope this link below works. See section 3.1

 

https://www.soapui.org/scripting-properties/tips-tricks.html

 

I use 2.2 for now and I create a folder where I store any project's xml along with the keystore in that folder. Then I can refer to the ksystore password and ksystore from a groovy script using the relative path. I can launch test runner from linux using the command 

/usr/local/SmartBear/ReadyAPI-2.0.0/bin/testrunner.sh

and one of my arguments is -i app.xml      (I think that is my application). 

 

This stuff is important to me as well since I need to do automatic scripts from any new folder. Just have to refer to absolute path of the readyAPI testrunner.sh   

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors