Hello,
OK, here is what I read about when to take the test. They say a person should take the test when they are ready for naturalization or settlement. As long as you feel ready to do so. The test results are valid for an indefinite period of time. The Home Office will keep the test results for a reasonable time. They don't really say what a reasonable time is to them. They say not to take the test too early, but then again they don't really say what is too early, 3 months, 6 months or what.
Take the test when you're ready to do the naturalization or settlement, do everything all at one time, then you don't have to worry about it & you'll be all situated.