public void actionPerformed(ActionEvent e) {
SoapUI.getThreadPool().execute(new Runnable() {
public void run() {
MockTestRunner mockTestRunner = new MockTestRunner(groovyStep.getTestCase(), logger);
statusBar.setIndeterminate(true);
WsdlTestStepResult result = (WsdlTestStepResult) groovyStep.run(mockTestRunner,
new MockTestRunContext(mockTestRunner, groovyStep));
statusBar.setIndeterminate(false);
Throwable er = result.getError();
if (er != null) {
String message = er.getMessage();
// ugly...
editor.selectError(message);
UISupport.showErrorMessage(StringUtils.join(result.getMessages(), "\n"));
editor.requestFocus();
} else if (result.getMessages().length > 0) {
UISupport.showInfoMessage(StringUtils.join(result.getMessages(), "\n"));
}
}
});
}