0

I use spring and hibernate with a ria technology called ZKOSS and use the OpenSessionInViewFilter paradigm,

I have integration tests to test features like

1) Entity is loaded into the UI (has lazily loaded entities)
2) Updates are made to it on the UI -- (In the tests UI is replicated through a series of setter method calls)

3) Update button pressed and entity is updated

and more often than not my tests pass.

However when i really start using the application, I end up getting lazy loading exception, because

1) Entity is loaded into the UI -- Loaded in session1 (proxy points to session1)

2) Updates are made to it on the UI -- (In the tests UI is replicated through a series of setter method calls)

3) Update button pressed and entity is updated -- (try to access a lazily loaded entity) and get an lazy loading exception

I want to catch such exceptions in my integration tests, any ideas ? ... is my approach correct here ?

Thanks

Sudarshan
  • 8,574
  • 11
  • 52
  • 74

1 Answers1

0

You could consider using Selenium, that can record clicks, typing and other actions you perform and then replay them as a test.

Stijn Geukens
  • 15,454
  • 8
  • 66
  • 101
  • I was looking for something that i could use in code, selenium and the like bring a host of other problems example ... sometimes they cannot find the textfield at runtime and so on, – Sudarshan May 11 '11 at 08:57