Forum Discussion

venkataramann's avatar
venkataramann
New Contributor
12 years ago

Maven & SoapUI , ProjectPath returns different Value

Hi,

I am using soapui 4.6.2 , and I am using groovy scripting for getting the data to load the properties from an external file. In my code I have as below
def String[] propData
File testdata = new File(projectPath+"//POCTEST.txt") and on Printing the project path it pints as D:\SOAPSAMPLE which is correct and runs the script.

I ran the code from the command prompt and that also got working, but trying to run that from Maven due to some reason it is looking for the file in D:\ and not D:\SOAPSAMPLE

Can anybody help me with this ? Is there any specific reason why the same code returns 2 different results when running from Maven and when running using Soapui?

Thanks and Regards
-Venkat
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi, where does the projectPath variable come from?
    this variable may be set differently when running from the GUI and maven