Saturday, May 05, 2007

CSE7312 Project Progress

I've continued to make progress over this weekend (despite losing several hours cleaning up the blown over tree in my front yard). My goal is to be done with the coding be the end of the day Monday (three days ahead of my original goal).

At the end of Friday I had what I thought a daunting task ahead of me. All I had accomplished was reading in an XML file and turn that into an internal representation. I was worried because the meat of what I needed to do was still left to be done. After today I am much more optimistic. I've completed the real meat of the project which is discovering what requirements have Test Cases, which of those Test Cases have an associated JUnit test and executing the JUnit test. All that is left is to update the XML file and make the tool executable from Ant.

I've also started to gather together a number of to dos that should be addressed before this would become a viable tool for general use.

To Do
  • Implement the internal representation of the SysML in an embedded database such as JavaDB or Derby. This will make the code more flexible and allow more freedom in what objects and relationships are allowed (right now unknown relationships generate an error)
  • Convert it to use true XMI formatted files.
  • Make the tool smart enough to allow more than one Test Case with a JUnit test to be associated with a single requirement.
  • Make it smart such that if the same JUnit test is used across multiple Test Case objects, do not re-execute the test again.
  • Allow for the insertion of JUnit parameters (right now only the class name is supported)
  • Make use of the Ant JUnit task code to provide better integration with Ant (right now the task will run stand alone)
  • Make use of custom class loaders so a user can specify a different classpath for use when running JUnit tests
Because of the list of deficiencies listed above (none of which will be addressed for this project given the limited amount of time) this ant task will not be much more than a proof of concept. However, it does show that the concept is sound and the code is simple enough to easily expand to support the above features and more.

Finally, I'd like to mention a happy realization I came to. This is the first project I've use JUnit on and followed the "write the test first" methodology. I have been somewhat annoyed at the fact that my test cases are so much longer, tedious, and hard to maintain than the code (my main class s only 172 LOC whereas the JUnit test framework to t est it is 560 LOC). But there is one really nice thing that comes from the JUnit tests and that is the feeling one gets when the test passes, particularly when it passes unexpectedly. It is almost like getting three cherries on a slot machine. It also gives me confidence that what I have written works well enough to move on to the next part.



Post a Comment

<< Home