cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted
Occasional Visitor

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){
console.log(data);

});

ls.on('exit', function(code){
console.log(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?

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors