I had extended problems similar to this, and it turned out to be the baking powder, even though it was well within in the expiry date. Have you very recently made a cake with the same baking powder?
Also, here is how to test baking powder and baking soda:
That said, I just did a search, and here?s how to test your baking soda and baking powder:
■ To test baking soda: Put a few tablespoons of white vinegar into a small bowl and add a teaspoon of baking soda. It should bubble up furiously, and the foaming should take several moments to subside. The more bubbles, the more potent the baking soda. If there is no reaction, or you only end up with a handful of small bubbles, you need to replace you baking soda.
■ To test baking powder: Put a few tablespoons of warm water (warm tap water is fine, but cold water is not) into a small bowl and add a teaspoon of baking powder. The mixture should make a fizzing noise and, after a moment, the baking powder will begin to fizz and the water will become very cloudy with tiny bubbles. The more bubbles, the fresher the baking powder. Baking powder reacts with liquids and heat, but does not react as well with cold water (even fresh powder won?t fizz much in ice water), so do not use it for this test.
I also hear it’s good to “shake up” your baking powder before using it as the rising agents can settle on the bottom. Don’t know if it’s true or not, but I do it now!!