Forum Discussion

kk2's avatar
Occasional Visitor
7 years ago

executing the SOAPUIproject (as xml) in a node childprocess as a .bat file. unable to capture output

I m working with protractor for UI Automation & SOAPUI  for API both integrated with cucumber js.


I m invoking SOAPUI project (as xml file) via node child process as below:


================mybat file ------------

cd c:/project/SOAPUI/5.0.0/bin

testrunner.bat -r -a -I "D:/absolutepathto/spaopUiproject.xml"


node file:


@Then('soapUI must be executed', function(callback){

var spawn = require('child_process').spawn,

ls = spawn('cmd.exe', ['/c', 'path to mybatfile'];


ls.stdout.on('data', function(data){


ls.on('exit', function(code){

return callback();



Problem: I get the "testrunner.bat" file execution on console. but how do i assert it ?how do i capture the response code/status?

No RepliesBe the first to reply