data-testid Best Practices: What to Add, What to Skip | QATools Blog

Not every element needs a test ID. Learn the rules for where to add data-testid attributes and how to name them consistently.