To keep zucchini firm, avoid overcooking it. Cook zucchini just until tender but still slightly crisp, and avoid cooking methods that may cause it to become mushy, such as boiling for an extended period.