1

My testing framework has hundreds of tests. The average test takes a 30 seconds so right there that's 50 minutes.

If I change ONE file I should only have to re-test the dependencies.

The way I was thinking about doing this was to checkout rev0 from version control. Compile it. Then update to rev1, then look at the unit tests that needed to be recompiled after the task in ant kicks in and deletes the classes in the dependency graph.

In a trivial example I just did I found that I would only need to run 2 tests.

I imagine I can just do this with the hashes of the files. This way I can do cool things like tweak javadoc without triggering lots of retesting.

I could HACK something together but I don't think there's any clean way to do this in Junit/Ant.

Anyone have any ideas?

burtonator
  • 451
  • 1
  • 5
  • 11

1 Answers1

-1

As said in a comment: if you have a unit test that takes 30 seconds, your tests are not good unit tests. They are probably not unit tests at all. You would be better off redesigning your tests.

That said, I have a large C++ software system with 25000 unit, integration and system tests. It uses make for building and cppunit for unit tests. Each module has its own suite of tests, which write a report file for each module. I have the make dependencies set up so only the modules that have changed rerun their tests.

Raedwald
  • 46,613
  • 43
  • 151
  • 237