Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
For our project we were required to creat a Guide to squeak. In a nutshell, the guide was required to have two major components: the avatar and the administration window. The administration window allowed an admin to enter Instructions on how to complete a certain task. The avatar was a cartoon like element that would step through information on how to complete a chosen task. It also was required to have a way for the task to automatically execute for demonstration purposes. The tasks that were entered in to the Guide were kept in a repository and could be output to an xml formated file.
And for all of these classes we were required to have SUnit testing. With hindsight SUnit was easy to implement. But we lost many points because of it during evaluation. Here are a couple of hints to take advantage of:
1 - Make sure your SUnit tests are included with your turnin!
- We had this problem on more than one occasion. The SUnit was complete but the team member responsible for final submission did not include it.
2 - Make sure you update your SUnit code whenever you make significant changes to a class.
- When we turned in our second or third milestone, we didn't update the SUnit tests. But we still made heavy changes to our classes, and we lost points.
3 - Make sure you are clearing your morphs in SUnit.
- If you should chose to use morphs for your implementation, do not forget to kill them when you are running your SUnit tests. We would run our SUnit and not kill the morphs we used. Soon there were 30-40 leaks in our squeak window and the entire system was ready to crash.
4 - Make sure you Back up information before you begin the testing code.
- Our test code would clean out the entire repository of information evertime it ran. Make sure you create new instances or backup class variable so that you don't have this issue.
5 - SUnit can be your friend
- If SUnit is used properly it can greatly help you make sure that your code is still backwards compatible with old code. Instead of running different things in workspace and then loosing all that if you forget to save your image, use SUnit like you might use a workspace for testing. The tests cases will be stored in your .st files or change sets and you will always have it to use
Here is some sample code for you to get a start with:
testTask := OrderedCollection new.
testTask add: ('step 1').
testTask add: ('step 2').
testTask add: ('step 3').
testTask add: ('step 4').
self assert: ((testTask at: 1) = ('step 1')).
self assert: ((testTask at: 2) = ('step 2')).
self assert: ((testTask at: 3) = ('step 3')).
self assert: ((testTask at: 4) = ('step 4')).
Links to this Page
- What do you think of SUnit? last edited on 24 April 2004 at 11:39 pm by r75h82.res.gatech.edu
- Fall 2003 Team Declaration Page last edited on 24 September 2004 at 1:29 pm by c-24-98-178-183.atl.client2.attbi.com
- Team Rat Poison last edited on 7 December 2003 at 9:42 pm by r70h48.res.gatech.edu
- Fall 2003 Who's Who last edited on 24 December 2003 at 7:59 am by adsl-219-137-67.aep.bellsouth.net
- Table 14 last edited on 30 April 2004 at 5:41 pm by castenell-desk.iac.gatech.edu
- SUnit last edited on 4 June 2004 at 10:29 pm by gk7.leo-net.jp