30 minutes! The casserole should be cooked covered for the first 20 minutes, then uncovered for the last 10 so the cheese can melt and onions can crisp up.