Forum Discussion

di98feja's avatar
di98feja
New Member
7 years ago

How do I write an assert to check if jdbc query threw an exception?

I use a JDBC request test step to call a stored procedure on a SqlServer.

The connection works fine and I can get results back.

 

However, the stored procedure takes a XML-parameter and validate its schema.

If the validation fails the stored procedure throws a SqlServerException.

 

I would like the assert to fail in this case but the assertions is never run and left in UNKNOWN state.

 

How do I make the assertions fail in this case?

Or do I need to take another approach?

 

Thanks

//jef

No RepliesBe the first to reply