Ask a Question

[Resolved (walkaround)] ProjectPath issue

Regular Contributor

[Resolved (walkaround)] ProjectPath issue


This is something urgent!

I have two soapUI projects. Name mentioned here are just for understanding purpose
1. ExampleSoapUI
2. CallingSoapUI

ExampleSoapUI is a normal soapUI project created from the wsdl containing 1 testsuite and 16 test cases.
CallingSoapUI has been created blank. It does not contain any wsdl or testSuite. The purpose of this project is to call many more soapUI projects like "ExampleSoapUI" in it's load script.

ExampleSoapUI is located at:

CallingSoapUI is located at:

I retrieve projectPath value in the ExampleSoapUI's load script using below code:

groovyUtils = new
projectPath = groovyUtils.projectPath

When I run "ExampleSoapUI", I get value correctly which is nothing but D:\Workspaces\Workspaces1\ContinuousTests\soapui\DomainServices\Admin

When I run "CallingSoapUI" soapUI project, it calls "ExampleSoapUI" project however the projectPath value which I see in the script.log is:


Why it is not D:\Workspaces\Workspaces1\ContinuousTests\soapui\ContainerServices\Container1 ?
Why "\Container1" is missing when I run "ExampleSoapUI" from "CallingSoapUI" ?

I think it has to do with the context object.

What should I do so that I get correct projectPath value when I call "ExampleSoapUI" from "CallingSoapUI"?

This is a major road block while working on test automation framework. Can you please tell us the alternative or guide us what are we doing wrong here?

This post in no way reflect any Policies of Liberty Information Technology Ltd.

Re: ProjectPath issue


I'm trying to reproduce this, but it's proving to be a bit difficult. In the mean time, you could try using the following load script to get the project file path instead:
def pathWithoutProtocol = new File(project.path).parent.replaceAll("file:", "");

This workaround will possibly resolve your issue if the problem is with the context variable.


SmartBear Sweden

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Regular Contributor

Re: ProjectPath issue

This is marvellous Arian!!!

It is working for me. I will add few more interesting stuff later that what was I trying before you send this workaround.

If I really take this one as a workaround, we need to find out long lasting solution as well.

Till then happy days!


This post in no way reflect any Policies of Liberty Information Technology Ltd.
Showing results for 
Search instead for 
Did you mean: