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, 11:02:36 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Executing SOAP tests using Groovy script
Welcome, Guest. Please login or register.
November 22, 2008, 11:02:36 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Executing SOAP tests using Groovy script
« previous next »
Pages: [1] Print
Author Topic: Executing SOAP tests using Groovy script  (Read 366 times)
shiva kakarla
soapui pro users
Newbie
*
Posts: 38


« on: March 28, 2008, 12:29:19 am »

Hi Ole,

I am trying to load a SOAP Project and execute tests from a Groovy Script.

I am using WsdlTestCaseRunner and it does not seem to recognize datasources and loops. I know only SoapUiProTestCaseRunner recognizes. I am not sure how to get the reference of it. 
1. Is there a documentation on how to use it?
2.  Also I need to know the testcase status if its passed or failed. Could you please let me know if there is a way to get the status too?

Here is the code snippet that I have written to execute tests.

WsdlProject project = new WsdlProject(soapTestProj);
    
println("wsdlprojct created")

Map testSuiteMap = project.getTestSuites();
Iterator x = testSuiteMap.keySet().iterator();
while( x.hasNext())
{
   
   String testsuiteName = (String) x.next()
   println("testsuite is::"+testsuiteName)
      
         
   WsdlTestSuite wsdlTestSuite= project.getTestSuiteByName(testsuiteName);
      
   Map testCaseMap=wsdlTestSuite.getTestCases();
   Iterator tcase = testCaseMap.keySet().iterator();
         
   while(tcase.hasNext())
   {
       String testCase=(String) tcase.next()
         
       println("Executing:"+testCase);
       WsdlTestCaseRunner testcaseRunner=project.getTestSuiteByName(testsuiteName).getTestCaseByName(testCase).run(new StringToObjectMap() ,false)
            println("Finished Executing:"+testCase);
    List stepResult=testcaseRunner.getResults()
    Iterator j=stepResult.iterator();
    while (j.hasNext())
   {
      TestStepResult result=(TestStepResult)j.next();
      println("result:"+result.getStatus())
   
   }
         
     }

}
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