If I had to choose only one dessert to enjoy for the rest of my life, it would have to be cake. This sweet treat can be light and airy, dark and decadent, fruity, spongy or smothered in frosting, like this Maple Walnut beaut. As far as I’m concerned, there’s a cake fit for every meal and occasion. And eating a slice (or two!) is easy.

But when it comes to baking a cake, you need to know what you’re doing. Otherwise, you could end up making a whole host of cake mistakes—including the dreaded overbake. (Or underbake—nobody likes a soggy bottom!)

Today, we’re going to show you three foolproof methods for testing cake doneness. These tips will ensure your treats turn out perfect every single time.

How to Test a Layer Cake

Testing a layer cake for doneness

If you’re a frequent cake baker, this is likely your go-to method for testing doneness. You’ll need a toothpick, a metal tester ($8) or—in a pinch—even a strand of uncooked spaghetti.

As your cake nears the finish line, give it a poke in the center with your tester of choice. If the tester comes out with crumbs or wet batter, the cake needs more time to bake. But if the tester comes out clean, your cake is ready to pull from the oven.

Another way to check for doneness is to pay attention to the cake’s edges. The batter will begin to pull away from the pan as it finishes baking.

Our Favorite Layer Cake Recipes
1 / 50

How to Test a Sponge Cake

Testing a sponge cake for doneness

For foam or sponge cakes, the only tool you need to test for doneness is your hand. You can tell when a sponge cake has finished baking by gently pressing the top of the cake. When the sponge springs back, it’s done. If the indentation remains, give the cake a few more minutes in the oven.

You can also look at the top of the cake. It should feel dry to the touch—especially around any cracked areas.

Our Favorite Sponge Cake Recipes
1 / 10

How to Test a Cheesecake

Testing a cheesecake for doneness

Cheesecake is hands down the most difficult cake to test for doneness. Even when it’s fully baked, the batter still jiggles—but the key is how it jiggles. (If you’re still nervous, read up on these other tips for making the best cheesecake).

To test, open the oven door and gently but firmly tap the side of the cheesecake pan with a spoon. A cheesecake that isn’t fully done will ripple—similar to how a pond reacts when a stone is tossed in. Alternately, a perfectly baked cheesecake will wobble as one unit, swaying back and forth before settling back into position.

Our Favorite Cheesecake Recipes
1 / 24

Next, check out the most common mistakes people make when baking a layer cake.