Software Testing Automation Tips - 50 Things Automation Engineers Should Know
von: Gennadiy Alpaev
Apress, 2017
ISBN: 9781484231623
Sprache: Englisch
58 Seiten, Download: 858 KB
Format: PDF, auch als Online-Lesen
Contents at a Glance | 4 | ||
Contents | 5 | ||
About the Author | 8 | ||
About the Technical Reviewers | 9 | ||
Introduction | 10 | ||
Chapter 1: Scripting | 11 | ||
1-1. Do Not Use Record & Play in Real Projects | 11 | ||
1-2. Do Not Use Pauses | 13 | ||
1-3. Provide Exit by Timeout for Loops | 14 | ||
1-4. Do Not Consider Test Automation as Full-Fledged Development | 15 | ||
1-5. Do Not Write Bulky Code | 16 | ||
1-6. Verify All Options of Logical Conditions | 18 | ||
1-7. Use Coding Standards | 18 | ||
1-8. Use Static Code Analyzers | 19 | ||
1-9. Add an Element of Randomness to Scripts | 20 | ||
1-10. Do Not Perform Blind Clicks Against Nonstandard Controls | 20 | ||
1-11. Learn and Use Standard Libraries | 21 | ||
1-12. Avoid Copy and Paste | 22 | ||
1-13. Do Not Use try…catch with an Empty catch Block | 23 | ||
1-14. Separate Code from Data | 24 | ||
1-15. Learn How to Debug | 25 | ||
1-16. Do Not Write Code for the Future | 26 | ||
1-17. Leave the Code Better Than It Was | 27 | ||
1-18. Choose a Proper Language for GUI Tests | 27 | ||
1-19. Remember to Declare and Initialize Variables | 28 | ||
Chapter 2: Testing | 30 | ||
2-1. Do Not Duplicate Tested Application Functionality in the Scripts | 30 | ||
2-2. Each Test Should Be Independent | 31 | ||
2-3. What Should Not Be Automated? | 32 | ||
2-4. Ask the Developers for Help | 33 | ||
2-5. Cloud Testing | 35 | ||
2-6. Introduce Automation for Corner Cases | 35 | ||
2-7. The Difference Between Error and Warning | 36 | ||
2-8. Use the Appropriate Methodologies | 36 | ||
2-9. Verification of Individual Bugs | 37 | ||
2-10. Make a Pilot Project Before Writing Real Tests | 38 | ||
Chapter 3: Environment | 39 | ||
3-1. Choose a Proper Set of Tools for Your Needs | 39 | ||
3-2. Do Not Automatically Register Bugs from Scripts | 40 | ||
3-3. Do Not Chase After a “Green Build” in the Prejudice of Quality | 41 | ||
3-4. Learn the Tool You Work With | 41 | ||
3-5. Make Use of Version Control Systems | 42 | ||
3-6. Avoid Custom Forms | 43 | ||
3-7. Simplify Everything You Can | 43 | ||
3-8. Automate Any Routine | 44 | ||
Chapter 4: Running, Logging, Verifying | 45 | ||
4-1. Run Scripts as Often as Possible | 45 | ||
4-2. Perform an Automatic Restart of Failed Tests | 46 | ||
4-3. A Disabled Test Should Be Provided with a Comment | 46 | ||
4-4. Errors in Logs Should Be Informative | 47 | ||
4-5. Make a Screenshot in Case of Error | 47 | ||
4-6. Check the Accuracy of Tests Before Adding Them to the Regular Run | 48 | ||
4-7. Avoid Comparing Images | 49 | ||
Chapter 5: Reviewing | 51 | ||
5-1. Write Tests That Even Non-Automation Engineers Can Understand | 51 | ||
5-2. Avoid Unneeded Optimization | 52 | ||
5-3. Review Someone Else’s Code Regularly | 53 | ||
5-4. Participate in Forums and Discussions | 54 | ||
5-5. Perform Refactoring | 55 | ||
5-6. Remove Tests That Provide Minimal Benefit | 55 | ||
Index | 57 |