views:

44

answers:

1

does any of you have any info/idea on how can I test my application for cross version compatibility. I am testing these object's serialization in current "HEAD" version. but I need to wait for my integration testing to see if I broke anything cross version.

I am guessing I will need to store the objects serialized from last released version somewhere on my disk, I can imagine how this kind of system might work but I wonder if someone already did it.

A: 

Never did it, but I'd use the following approach:

  • Have both versions of the class under test NOT in the normal classpath.
  • Use a custom classloader to load one version
  • serialize one or more instances into a String or to a file or whatever
  • use another instance of a custom classloader, to load the other version.
  • deserialize the stuff.
  • assert all the required properties.
Jens Schauder
Sounds good, some issues that you might be able to find creative soutions also:1. junit tests will work only if both projects are checkedout in my workspace and in s specific location 2. I will need to write some mapping from project and its predecessor
ekeren
For checking out the two versions, I'd consider ant. ADD ONS FOR INTERFACING WITH svn exist. Probably for other systems aswell. Also a CI system might help (teamcity does). Sorry, I don't get your second point.
Jens Schauder