Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Surviving the Web Shift : Page 6

Five Issues that Still Fell Good Developers.


advertisement
5. Sophisticated Testing
After we built our dynamic site at Parasoft, we set out to test it. But the testing turned out to be almost as challenging as the creation. We encountered many Java exceptions that didn't come from the code itself; they came up because of bad correlations between the code and the database. This was a new concept for us—having a well-written piece of code which caught exceptions the way it was supposed to, but which failed when it interacted with the database. We discovered that the code was failing because the database was in the wrong state when the code interacted with it. From an end-user's standpoint it would appear that the application failed, but from the programmer's perspective everything was correct. So we needed to move beyond merely testing that the code was well-written and seemed to work; we now needed to test how the code would talk to the database, because one failure could crash the application.

We designed a dynamic Web site development tool (WebKing) that allowed us to go through multiple cycles and arrive at, then test, the same page from different directions. We also used this tool to automate nightly builds and construction, functionality, and regression testing. Because traditional debuggers didn't work for our situation, we relied on print statements as a primitive form of debugging. Jtest, our own Java unit testing tool, became a blessing because it helped us remove lots of "garbage" and allowed us to focus on important problems in the code.

The greatest lesson we learned from this experience is that the back-end code of any dynamic Web application must be robust enough to take care of inconsistencies in the database. The back-end literally has to fix the bad situations in which it finds itself so that the front end will continue to run flawlessly.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date