testing - How to test efficiently the acidity of transactions (Java/Spring/EJB or others) -


just wonder. in applications, atomicity , consistency reallly important guess should tested...

as i'm java developer i'll talk know. using spring or ejb3 transaction management annotations.

when doing refactoring in business layer of application, have rework transation propagation amon other things, , can introduce regressions.

i wonder if there easy ways test transaction management of our application. exemple, imagine work @ paypal. want sure customer paypal account credited, , customer charged on bank account. exception should not permit credit paypal account without charging client.

  • are there tools test such things?
  • have done such thing?
  • or how do?

i guess done "home made" using bit of aop , designing methods easier test...

it's possible inject exceptions in tests bytecode tools byteman: http://java.dzone.com/articles/fault-injection-unit-tests

once raise exception can check if db state has been inconsistently updated or been rollbacked...


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -