Verify that a Silverlight app loads without unhandled errors?
I'm involved with developing a Silverlight application together with a few developers. We use Hudson to build and deploy the application to a test server, the process is roughly like this:
- Developer ch开发者_如何学Cecks in changes.
- Hudson detects changes, checks them out and builds the solution.
- If the build is successful, the new application is deployed to a web server.
Now, it has happened a few times that the application is possible to build and deploy correctly, but freezes when launched from the test server. Internet Explorer reports on the status bar:
Error: Unhandled Error in Silverlight Application. [...]
I would like to add a test for this in the build process, just to verify that the application is possible to load on the web server.
Is there a simple way to automatically detect these errors with Internet Explorer or the Silverlight plugin?
Another option would be to utilize test frameworks. I would believe that selenium or other frameworks and tools should be able to detect this error.
BTW, it is a good idea to automate as many functional tests as possible, as you do for the junit tests.
Im not sure this would be very easy to do, it looks like this is obviously a runtime error. What I would look into doing is replicating the error in your codebase and creating unit tests around it, that way it would not be possible to get the deployment stage of the build.
However, I do appreciate that sometimes this is tough to unit test, however, I believe it would pay off in the long run.
I hope that helps a little
精彩评论