header
header
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.
November 22, 2008, 12:29:17 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Test case log
Welcome, Guest. Please login or register.
November 22, 2008, 12:29:17 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Test case log
« previous next »
Pages: [1] Print
Author Topic: Test case log  (Read 679 times)
Keacey
Newbie
*
Posts: 23


« on: March 10, 2008, 06:47:19 pm »

Hi,

I am new to SoapUI. When running a test case, and at the end of it, there is the test case log info which is displayed at the lower part of the test case dialog. how can i access this info as text? and is there any way that i can export this info to an external file like .txt or .doc?

thanks in advance.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: March 10, 2008, 07:44:16 pm »

Hi!

There is an "Export to file..." button in the toolbar just on top of the log, this will create a txt file of the log contents. Other options are to create a TearDown groovy script that accesses the results for all TestSteps and writes a custom log-file in any way you want..

Hope this helps!

regards,

/Ole
eviware.com
Logged
Keacey
Newbie
*
Posts: 23


« Reply #2 on: March 11, 2008, 11:12:00 am »

Hi,

I have entered this below code in the test case teardown script.

def testcase = testRunner.getTestCase()
def steplist = testcase.getTestStepList()
def a = steplist[0]
def b = new com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult(a)
def c = b.getMessages()
def tclog = new File ("c:\\groovy\\testcaselog.txt")
tclog << c


In my variable c (and my .txt file) i get {} (two flowery brackets). but no messages. According to me, i have to get the test case log , something like -

Test started at 2008-03-11 15:23:40.488
Step 1 [Request 1] OK: took 11578 ms
TestCase finished with status [FINISHED], time taken = 11578


in my variable c.
Is my code correct? If not what should i enter in the teardown script to get the above information. I do not want to use the button to export to file, but i want the same action in groovy.

Please help.
Kusuma.
Logged
Keacey
Newbie
*
Posts: 23


« Reply #3 on: March 12, 2008, 08:32:03 am »

Hi,

Could you please tell me from where can i access the teststep results?

Please help.
Kusuma.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #4 on: March 12, 2008, 12:57:46 pm »

Hi!

you can get all the results for a TestCase run with

def results = testRunner.results

which returns a list of TestStepResult objects..

have a look at the javadocs at http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/testcase/WsdlTestCaseRunner.html to dig deeper..

regards!

/Ole
eviware.com
Logged
Keacey
Newbie
*
Posts: 23


« Reply #5 on: March 13, 2008, 09:06:40 am »

Hi Ole,

Thanks for the help. Now i am able to get results. But i have a new problem now. I am  using this code to get the test step results.

Code:
def results = testRunner.getResults()

but sometimes when i run the test case, i get a null value for "results". The steps look correct, but no results are generated.

Could you please tell me what could be the problem for this, and how can i ensure that i always get values in my "results" variable.

Please help.
Kusuma.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #6 on: March 13, 2008, 02:09:55 pm »

Hi!

Could you please make sure that you do not have the "Discard OK Results" option checked in the TestCase Options dialog?

Let me know..

regards,

/Ole
eviware.com
Logged
ahsu
Newbie
*
Posts: 10


« Reply #7 on: April 22, 2008, 12:48:01 pm »

This forum is really good and too informative.

just i have one question: Is Groovy has to be down loaded for executing the code which you have placed in the Tear down script??

Bcoz the same is not working for us with out the Groovy software.

Thanks in advance
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #8 on: April 22, 2008, 01:01:40 pm »

Hi!

it should work out of the box.. are you getting any errors or exceptions?

regards,

/Ole
eviware.com
Logged
ahsu
Newbie
*
Posts: 10


« Reply #9 on: April 22, 2008, 02:11:57 pm »

we are not getting any errors but we are getting the flower braces.
No content is there with in the braces.


Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #10 on: April 22, 2008, 02:58:26 pm »

Hi,

sorry.. I'm not really sure when/how you are getting this.. can you give some details and/or attach a screenshot?

regards!

/Ole
eviware.com
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header