It is difficult to overcook mushrooms, but if you cook them for too long, they will darken and become firmer as the moisture evaporates. You can cook them to your own preference, ideally until they are almost tender.