The Artima Developer Community
Sponsored Link

Java Buzz Forum
Capturing APIs, and prototyping, with Unit test suites

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Capturing APIs, and prototyping, with Unit test suites Posted: Feb 18, 2005 8:49 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Capturing APIs, and prototyping, with Unit test suites
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
I am working on a project where I needed to delve into a totally new API. To begin with, I needed to take the API for a spin and see what it can do. Starting up a scripting shell was a good start. However, then I wanted to take it to the next level, so I created test suites which poked and proded around the edges, found the fuzzy areas, and ultimately implemented the 'user' features that I needed. Whenever I do this, I end up with a pretty valuable set of unit tests, as: I have a history of playing with the API, that I can go back on to remember why I maybe did something like X I have a great resource for how to USE the API. For some reason, a lot of APIs are not well documented, and although you know methods and classes in isolation, it is hard to visualize how they all work together to actually get something done I was able to copy this code for the actual implemention of my problem. This just shows even more so how it isn't a 'waste of time', since I used all of it. The beauty is that over time I have a suite-case full of tests which encapsulate how I played with an API. If I ever need to go back to one of them, I crack open the bad boy, add / modify / play some more.... and borrow code. If these were cleaned up, they would even make good downloads. P.S. I often look through the unit tests of projects like Spring to learn more about the API too!

Read: Capturing APIs, and prototyping, with Unit test suites

Topic: New horizons in spamming aka SpamBlog ( Rick H needs to be cloned? ) Previous Topic   Next Topic Topic: ACM Queue adverts - how not to do it

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use