I'm working on some policy tests, and I'm noticing that when
exceptions are happening during the execution time, the
BaseJAXWSTestRunner are not properly handling the exceptions when
checking for the expected error message to assert test results.

Let's consider POL_9006_TestCase as an example, the test execution
fails and although  BaseJAXWSTestRunner display proper error message
on the console (see code below)

} catch ( TestException_Exception e ) {
                TestException exceptionContent = e.getFaultInfo();
                System.out.println("Service fault received - detail: " +
exceptionContent.getMessage() );
            checkException(e);
                return;
        } catch (Throwable e) {
                //e.printStackTrace();
                        System.out.println( "Exception received - detail: " + 
e.getMessage() );
            checkException(e);
                return;
        }

when it checks for expected error message

runtimeBridge.checkError(testConfiguration.getTestName(), e);

it fails as ex.getMessage() returns "unknown" and the proper error
details are encapsulated inside the faultInfo.

I'll update the TuscanyRuntimeBridge implementations to properly
handle both "validation" and "execution" type of errors and this
should help with some of the tests...


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to