Contact Us
About Us
News
Home
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome,
Guest
. Please
login
or
register
.
January 09, 2009, 02:46:38 pm
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
log.info() and println statements logging
Welcome,
Guest
. Please
login
or
register
.
January 09, 2009, 02:46:38 pm
News:
The Forums are up! Welcome to eviware.
Eviware Forum
soapUI
soapUI
log.info() and println statements logging
« previous
next »
Pages:
[
1
]
Author
Topic: log.info() and println statements logging (Read 666 times)
shiva kakarla
soapui pro users
Newbie
Posts: 38
log.info() and println statements logging
«
on:
March 20, 2008, 11:51:17 pm »
Hi,
I want to capture the output from groovy context and use it in my test case
Below script writes onto dos console and I cant copy everything due to buffer limitation.
for(i in 0.. 10000)
{
println '<ns2:test>'
println i*330
println '</ns2:test>'
}
Could you let me know if there is a way in SOAPUI groovy to capture the output.
Also log.info('<ns2:test>') appends time stamp on every line. Is there a way to not to print timestamp.
Thanks
Shiva
«
Last Edit: March 21, 2008, 12:48:40 am by shiva kakarla
»
Logged
omatzura
Administrator
Hero Member
Posts: 1,666
Re: log.info() and println statements logging
«
Reply #1 on:
March 21, 2008, 01:40:54 am »
Hi,
sorry, the groovy log is pretty fixed currently. Exactly what do you want to do?
regards,
/Ole
eviware.com
Logged
shiva kakarla
soapui pro users
Newbie
Posts: 38
Re: log.info() and println statements logging
«
Reply #2 on:
March 21, 2008, 02:07:18 am »
Hi Ole
Wanted to get output as in below format controlling in a loop. I can generate this in other IDE's but was trying in SOAPUI groovy.
<test>
<case> 1<case>
</test>
<test>
<case> 2<case>
</test>
<test>
<case> 3<case>
</test>
.....
Different question:
What is the context variable in this line
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
I have a requirement to write a groovy script outside of SOAPUI tool which loads SOAPUI projects from a specific directory and executes tests in each of those projects. Is there a sample that I can refer to?
Thanks
Shiva
Logged
omatzura
Administrator
Hero Member
Posts: 1,666
Re: log.info() and println statements logging
«
Reply #3 on:
March 21, 2008, 02:15:58 am »
Hi,
ok.. maybe you could just write this to a stringwriter (or something like that) instead of the log!?
Regarding second question: the context is specific for where your script is executed. Have a look at
http://www.soapui.org/architecture/integration.html
so see how you can load a project, from there you should find the correct methods to run tests, etc.. (javadoc is at
http://www.soapui.org/apidocs/index.html
)
regards,
/Ole
eviware.com
Logged
shiva kakarla
soapui pro users
Newbie
Posts: 38
Re: log.info() and println statements logging
«
Reply #4 on:
March 26, 2008, 01:39:10 am »
Hi Ole
I am trying to create wsdl project in groovy. I am using eclipse ide and I get out of memory: java heap space. I changed my VM args in eclispe.ini file to 512MB. Is there a way to set heap size for loading wsdl project?
Here is th code snippet that I have in my groovy.
import com.eviware.soapui.*;
import com.eviware.soapui.support.*;
import com.eviware.soapui.model.propertyexpansion.*;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.impl.wsdl.*;
import com.eviware.soapui.model.iface.*;
WsdlProject project = new WsdlProject("C:/End2End-soapui-project.xml");
Exception is
Configuring log4j from [jar:file:/C:/P4_WS/mft/dev/3.6L2/java-common/tools/soapuipro/lib/soapui-2.0.2.jar!/soapui-log4j.xml]
17:06:34,976 WARN [DefaultSoapUICore] Missing folder [C:\P4_WS\GroovyJava\ext] for external libraries
17:06:34,976 INFO [DefaultSoapUICore] Creating new settings at [C:\P4_WS\GroovyJava\soapui-settings.xml]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.apache.xmlbeans.impl.store.CharUtil.allocate(CharUtil.java:397)
at org.apache.xmlbeans.impl.store.CharUtil.saveChars(CharUtil.java:506)
at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.text(Cur.java:2911)
at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.stripText(Cur.java:3125)
at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.text(Cur.java:3138)
at org.apache.xmlbeans.impl.store.Locale$SaxHandler.characters(Locale.java:3283)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportCdata(Piccolo.java:992)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseXMLNS(PiccoloLexer.java:1290)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseXML(PiccoloLexer.java:1261)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:4808)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3444)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1275)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1262)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(Unknown Source)
at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:221)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:159)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:126)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:121)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:111)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:526)
at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2331)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1227)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1157)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:801)
Logged
omatzura
Administrator
Hero Member
Posts: 1,666
Re: log.info() and println statements logging
«
Reply #5 on:
March 26, 2008, 01:46:04 am »
Hi,
hmm.. you'll probably just have to increase the eclipse HeapSize even more.. what is the memory-setting for soapUI with this project?
regards,
/Ole
eviware.com
Logged
shiva kakarla
soapui pro users
Newbie
Posts: 38
Re: log.info() and println statements logging
«
Reply #6 on:
March 26, 2008, 02:44:30 am »
Hi Ole
For SOAPUI I set Xms1536m -Xmx1536m. Guess this size is huge. Eclipse support max 1024. If I give more than that eclipse does not start.
Thanks
Shiva
Logged
omatzura
Administrator
Hero Member
Posts: 1,666
Re: log.info() and println statements logging
«
Reply #7 on:
March 26, 2008, 10:25:38 am »
Hi,
well, it seems your project File is very large.. is that correct? Is there any way for you to split it into several projects?
regards,
/Ole
eviware.com
Logged
shiva kakarla
soapui pro users
Newbie
Posts: 38
Re: log.info() and println statements logging
«
Reply #8 on:
March 26, 2008, 06:22:07 pm »
Hi Ole,
Yep the project file is very large around 80 test cases and the size of file is 30 MB. Well its end to end integration test project to verify the system. I can split it into multiple projects and consolidate the output reports but its pain and needs more effort.
I will check if Eclipse has any fix to take more than 1024M else I will split the project.
Thanks
Shiva
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> eviware general
-----------------------------
soapUI
-----------------------------
=> soapUI
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.2
|
SMF © 2006-2007, Simple Machines LLC
Loading...