venkataramann
11 years agoNew Contributor
[Resolved]Update Project Properties from Maven-soapui-plugin
Hi,
I am using soapUI 5.0.0 , 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
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.
When 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 ( Note: D:\SoapSample is the Path where the POM was kept )
I am getting the ProjectPath using the below Code
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectPath = groovyUtils.projectPath
Since this was not working for me from Maven, I created a Project Property called as ProjectDir from Soapui and tried to populate the value for this parameter from maven POM. I am using the Maven-soapui-Plugin for this Purpose.
In the Configuration section of the Plugin, I gave a below, but this value is not getting passed to the Project Properties.
<projectProperties>
<projectProperty>ProjectDir=${project.basedir}/src/test/resources</projectProperty>
</projectProperties>
Can somebody please guide me if I am doing something wrong here?
Thanks and Regards
-Venkat
I am using soapUI 5.0.0 , 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
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.
When 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 ( Note: D:\SoapSample is the Path where the POM was kept )
I am getting the ProjectPath using the below Code
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectPath = groovyUtils.projectPath
Since this was not working for me from Maven, I created a Project Property called as ProjectDir from Soapui and tried to populate the value for this parameter from maven POM. I am using the Maven-soapui-Plugin for this Purpose.
In the Configuration section of the Plugin, I gave a below, but this value is not getting passed to the Project Properties.
<projectProperties>
<projectProperty>ProjectDir=${project.basedir}/src/test/resources</projectProperty>
</projectProperties>
Can somebody please guide me if I am doing something wrong here?
Thanks and Regards
-Venkat