views:

39

answers:

2

Not really a Ruby on Rails question, but that is the framework which we are working in.

We are migrating data from a legacy system into our own system, and have been testing the code that will do the data migrations. These tests live alongside the rest of the applications tests, and so ran against our build server on commits, etc.

Once we've migrated this data, these tests will seemingly be useless to us, since the code they are testing will never be run again. What's more, is the tests will most likely get stale, and might require maintenance, lest they break our build.

Should we just be throwing these tests out afterward? Tagging them in some way so that they don't get ran after we do things for real? Something else?

+2  A: 

If it were me, I would separate out the project that does the data migration along with its tests. That way the tests don't generate noise in your current build process, and you only have to modify them if you (for some reason) touch the migration project again.

If this isn't possible, then just rip all of it out once you are done. If you ever need to get it back it should be in source control... right!?!

Josh
The problem is that the data migration needs to be verified against the project they are currently in. IE. we need to make sure the data we've brought from the old system makes sense in our current system, and the only way to test our current system, is to have these tests in the same project.We've branched the work we are doing for this specific data migration, so we'll have all the work and tests done in a nice separate place in our source control, and so removing them from our main branch might be the best option.
lambdabutz
+3  A: 

Get rid of them.*

*Which is to say, let them sit in source control if you ever need to refer to them.

Jay
I'd also suggest tagging the repository at the point that you retire the tests in case you ever do need to come back to them. It's often the case that you _think_ something will never be required again only to have to resurrect it several months later (been there, done that).
the_mandrill