Forum Discussion

mh350's avatar
mh350
Occasional Contributor
9 years ago

How to get the name of the soapui project file ?

Hi 

 

I'd like to know how to retrieve that name.

The closest I got to is "new com.eviware.soapui.support.GroovyUtils(context).projectPath" which provides the path. Incidentally project.name provides the name of the project but not the *.xml filename .

I'd also like to know where I can find some kind of java doc but for soapui objects like testCase, project ... so I can see which attributes are available.

 

Best regards.

  • Running from a Groovy Test Step the following code will get the full filename and path:

     

    log.info (testRunner.getTestCase().getTestSuite().getProject().getPath())

     

    getPath() is defined in the Project interface.

     

    The full Ready API JavaDocs can be found here.

  • Radford's avatar
    Radford
    Super Contributor

    Running from a Groovy Test Step the following code will get the full filename and path:

     

    log.info (testRunner.getTestCase().getTestSuite().getProject().getPath())

     

    getPath() is defined in the Project interface.

     

    The full Ready API JavaDocs can be found here.

    • mh350's avatar
      mh350
      Occasional Contributor

      It works fine.

      Thanks awfully!