Forum Discussion

Chris_Moesel's avatar
Chris_Moesel
Occasional Contributor
17 years ago

2.0b1: Error getting project path in groovy TestSuite setup script

Hello,

I love the new features for setup and teardown, project and testsuite properties, etc.  Thank you!

I am having trouble in a TestSuite setup script.  It's easy to reproduce.  The script is as follows:

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

When you run it, you get:

Tue Nov 20 12:03:36 EST 2007:ERROR:java.lang.NullPointerException
  java.lang.NullPointerException
  at com.eviware.soapui.support.GroovyUtils.getProjectPath(GroovyUtils.java:39)
  at gjdk.com.eviware.soapui.support.GroovyUtils_GroovyReflector.invoke(Unknown Source)
  at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
  at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
  at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:882)
  at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:2077)
  at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:200)
  at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:205)
  at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:500)
  at Script5.run(Script5.groovy:1)
[plus a bunch more stack trace]

This same script seems to work fine if I use it as a test step though.

Thanks,
Chris

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Chris,

    thanks.. and sorry about this.. I'll fix this and will attach an updated jar to this topic..

    regards!

    /Ole
    eviware.com