First off I love using GWT but I have a concern about the current unit testing available. The JUNIT tests provide a great way to do regression testing but I find myself lacking an effective way to do integration testing. I really need a way to make sure that all the layers match up and work together properly. The way I usually do that on other platforms is blow away the database before each test, create a standard configuration in the database, and then perform whatever CRUDs and other operations I want to test.
The issue I have with the GWT unit tests is that since I can't run an Async request in the beforeMethod I don't have a way of setting up the data on the back end before I run my test. This means that if the GUI tells me there are 3 objects in the database right now, I don't really know if that's correct or not. I think that to run effective integration tests you need a stable known state in the DB. I've tried managing this in several ways. I attempted to run a long series of tests in a suite where the first test emptied the database and created my stable configuration, then subsequent tests would perform CRUDs. The problem with this was that each test had to be aware of the state all the proceeding tests had left the DB in. They were very complex and expensive to maintain and were ultimately abandoned. I was wondering if anyone had a better solution for how to do this. I was considering trying to add a sister class to GWTTestSuite that would give the ability to run a synchronous method on the server during the beforeMethod and would allow proper setup for subsequent integration testing. I was hoping someone could tell me how complex this would be and if there was a reason why GWT did not include this feature. I understand that unit tests can be run in either native java or javascript but I believe I can still use java to make an HTTPRequest to the server with expected parameters. I think having the ability to do proper setup on the backend before running a test suite would be very valuable. Can anyone give me some feedback on this idea? Thanks -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
