free seo tool

Project Path Using Groovy in soapUI

While doing automation testing we might need to get the project path/ folder to access other files or resources. soapUI provides this feature in the below way.



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

Now the variable projectDir has the project path which can be set as one of the project properties and can be used in later stages.

2 comments:
  • Anonymous says:
    May 07, 2014

    Hi This code is giving me null pointer exception at line 2. How to resolve this

  • Gan says:
    May 26, 2014

    Hi Anonymous.

    Please save your project and try again. Hope this helps.

    -Gan

Post a Comment

This is a new website mainly for SOA Testers using soapUI. Let me know your thoughts/ suggestions.