cancel
Showing results for 
Search instead for 
Did you mean: 

Events are not executing when testsuite running through testrunner or commandline

Highlighted
Regular Contributor

Events are not executing when testsuite running through testrunner or commandline

Executing testsuite using testrunner / command line testsuite has some steps to trigger using events which are not executing 

 

where as if i use Soapui Pro Gui working all as expected 

2 REPLIES 2
Highlighted
Moderator

Hi, 

 

Can you please provide an example of a script and let us know what event you use?

 



Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Regular Contributor

TestRunListner.afterstep

 

Script :

import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus
import com.eviware.soapui.model.testsuite.TestRunner.Status
import com.eviware.soapui.model.project.ProjectFactoryRegistry
import com.eviware.soapui.impl.wsdl.WsdlProjectFactory

 

def Workspace = testRunner.getTestCase().getTestSuite().getProject().getWorkspace()

def  Project =
ProjectFactoryRegistry.getProjectFactory(WsdlProjectFactory.WSDL_TYPE).createNew("c:\\users\\project1\\soapuitestproject.xml")

if(!Project.open && Workspace!=null) Workspace.openProject(Project)

 

def Lib = Project.getTestSuiteByName("Library");

testCase = Lib.getTestCaseByName("TestCase1")

 

 


Random rand1 = new Random();
int num1 = rand1.nextInt(9000) + 99999;
userid = "num1"

testCase.setPropertyValue("randomID", userid)

 

 

 

 

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors