We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Hi,
Unless you made a typo, I think you need to either use the * wildcard to import the whole assertions package e.g.
import com.eviware.soapui.impl.wsdl.support.assertions.*
Or pick out a particular class to import from that package e.g.
import com.eviware.soapui.impl.wsdl.support.assertions.AssertableConfig
Make sense?
Regards,
Rup
The actual class I'm trying to import is
com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry
From my script
import com.eviware.soapui.config.AssertionEntryConfig
import com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry
import com.eviware.soapui.config.*
and I still get
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script19.groovy: 2: unable to resolve class com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry @ line 2, column 1. import com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class com.eviware.soapui.impl.wsdl.teststeps.assertions.support.AssertionEntry @ line 2, column 1. at .....
I copied the name from
That class com.eviware.soapui.impl.wsdl.teststeps.assertions.
Ohh..my bad. Makes sense. thanks a lot.
Now I have to find a way how to create an assertion with goovy
No problem.
Create an Assertion in Groovy, sounds interesting, in a good way :-)
What is the actual problem that you are trying to solve? Why do you want to do it in a Groovy TestStep? Is a Script Assertion no good for your needs?
Let me know if you need any more help,
Rupert
Recently started using SoapUI..so not a pro..may be not possible..just thoughts I would like to implement..
I'm trying to build a data driven framework with SoapUI that does this..
1. Read the properties from excel sheet and create a rest request dynamically -Got this done.
2. Read the assertions form excel sheet and create the assertions dynamically - Working on this
Found this piece of code in another thread and was tryinjg to make this work
def factoryinstance = AssertionTestStepConfig.Factory.newInstance()
def testStep = context.testCase.testSteps["Assertion TestStep"];
def source = context.testCase.testSteps["Test Request"];
def entry1 = new AssertionEntry(factoryinstance.insertNewEntry(0) , testStep.getTestStep() )
def parent = null
def entry = entry1.buildAssertionEntry("XPath Match", "Xpath", false, testStep, source, "Response",parent)
testStep.addAssertionEntry(entry)
But AssertionEntry is part of the PRO. So now have to find another way of how I can achieve this