Ok,
So I copied the files to C:\Program Files\SmartBear\ReadyAPI-1.2.2\bin\ext
I then restarted Ready API.
Yet, I'm not having any luck.
It seems like thise libraries are not picked up.
The Groovy Script that refrences those libs.
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.github.fge.jsonschema.core.report.ProcessingReport
import com.github.fge.jsonschema.main.JsonSchema
import com.github.fge.jsonschema.main.JsonSchemaFactory
def response = context.expand( '${GetUser#Response}' )
ObjectMapper mapper = new ObjectMapper()
JsonNode GetUserJSON = mapper.readTree(response)
JsonNode GetUserSchemaJSON = mapper.readTree(new File("/schema/GetUser200.raml"))
JsonSchemaFactory factory = JsonSchemaFactory.byDefault()
JsonSchema GetUserSchema = factory.getJsonSchema(GetUserSchemaJSON)
if (GetUserSchema.validInstance(GetUserJSON))
{
log.info("Response Validated!")
}
else
{
testRunner.fail(GetUserSchema.validate(GetUserJSON).toString())
}
And the result:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script3.groovy:
5: unable to resolve class com.github.fge.jsonschema.main.JsonSchemaFactory @ line 5, column 1.
import com.github.fge.jsonschema.main.JsonSchemaFactory ^ org.codehaus.groovy.syntax.SyntaxException:
unable to resolve class com.github.fge.jsonschema.main.JsonSchemaFactory @ line 5, column 1.
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:146)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1145)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)
at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:632)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:574)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:523)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:613)
at groovy.lang.GroovyShell.parse(GroovyShell.java:625)
at groovy.lang.GroovyShell.parse(GroovyShell.java:652)
at groovy.lang.GroovyShell.parse(GroovyShell.java:643)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:138)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:89)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:76)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:139)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any Ideas?