Selenium Best Practices
-
Setup detailed automation tests reporting
-
All tests should be independent
-
Make tests simpler instead of adding comments
-
Take screenshots for failure investigation
-
Use soft assertions if you need to make list of related checks on the same page
-
Name your tests wisely
-
Make your test automation framework portable
-
Separate your tests from your test automation framework
-
Do not run ALL tests across ALL target browsers
-
Do not rely ONLY on UI test automation
-
Use relative URLs
-
Don't rely on specific driver implementation
-
Do not use Magic values
-
Avoid Thread.Sleep and use Wait instead
-
Use PageObjects Pattern
-
Become a Best practice hero.Help us to grow the catalogue of best practices.
Recently added best practices
- Avoid #region in your code wherever possible
- Remove unused using statements
- Do not use "this" keyword
- Use Resharper
- Use query string to filter resource collections
- Never use CRUD function names in URIs
- Do not use underscores in URIs
- Do not use file extensions in API endpoint URIs
- Use lowercase letters in URIs
- Do not use forward trailing slash in URLs
- Use the right terminology
- Use consistent patterns across all API endpoints
- Do not return plain text
- Use SSL to protect your data during transfer
- Your API should be stateless
- Do not use session in your RESTful API endpoints
- Do not trust the input parameters
- Use correct HTTP status codes
- Use HTTP headers for content negotiation
- Use sub-resources for relations
Comments
0
/
0