Reputation: 91
I wonder if from protractor test specs, in the beforeEach() and afterEach() function, whether I can make some call to backend server API using java? If it is possible, where do I put the Java jar file to be able to run? If it is not possible to do this, what could be the alternative approach?
Upvotes: 2
Views: 916
Reputation: 8900
Run a child process with node. Try this:
var exec = require('child_process').exec;
exec('java foo', function(error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
Upvotes: 2