A Blog from QualiTest

Stop Monkeying Around with Debugging

software testing services

Debugging should be approached as a mystery which will be interesting to crack. Solving that mystery should be done systematically by using every tool at our disposal, like debuggers.

Debugging is not just a good idea; it’s a necessary step in the software testing process. Using the Debugging Tool in Test Automation IDEs allows you to verify that your test automation code is working, and to pinpoint bugs, as indicated by error messages, that you need to locate and resolve. Also, it’s much faster to pinpoint bugs when you can examine the program’s state at any particular point in time. The  most common kind of debugging is called “print debugging” and involves outputting messages to console, log files, etc., that the programmer then analyzes after running their code.

While each debugger works differently, there are some general steps that should be taken.

1. Peruse the Stack Traces to find a particular action. Stack Traces indicate the path of the code. From a stack trace, you can figure out where the issue(s) started occurring, and know where to focus your search.

It is important to note that not all errors will cause a stack trace to be generated, especially when utilizing languages that do not have support for exception handling. In that case, you can use print debugging to pinpoint where actual values do not match expected. By determining the location that has the incorrect code output, you can use breakpoints to narrow down your search.

2. Utilize Break Points to stop the code. Breakpoints are indications to the code that the program should stop running so that you can direct your attention to a certain area of code.

Some debugging tools allow the usage of conditional breakpoints, which allows you to stop the program at a certain point under a specific condition. This is useful if the code only fails for some input values and saves the coder from trudging through code that does usually work.

3. Examine your variables. After the breakpoint has been sprung and the code has stopped, you need to examine the code around that breakpoint to examine your variables and try to understand what went wrong. Diagnosing what went wrong is dependent on you understanding your code and variables. It depends on error messages, understanding the logic flow, and understanding the expected results. This is important because some bugs may not produce an error message, but you still get incorrect results.

More generally, you are examining objects that exist at runtime. These may or may not be variables you created, but could be code from a third party.

4. In addition to breakpoints, you can create watch expressions which observe a certain variable or object over time. A common practice is to set the watch expression to be triggered when the variable contains an incorrect value.

  1. If you know that code will fail, sometimes a good practice is to force the code to read a “good value” so that you can leave this issue until later, and proceed with testing other areas. A good rule is to limit yourself to a 45-minute time limit for each issue; sometimes, you just need to return to the problem later with a fresh set of eyes.
  2. Also in terms of time management, if it takes a long time to execute the code, you don’t want to necessarily rerun the code over and over again due to an unrelated issue to what you are testing.

5. Communicate the found issue and the subsequent resolution with your team. The chances are pretty high that other people could be running into the same issue!



42 thoughts on “Stop Monkeying Around with Debugging

  1. … [Trackback]

    […] Read More here|Read More|Find More Infos here|Here you can find 16136 additional Infos|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  2. sscnbkngoid says:

    … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 45461 more Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  3. … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 73382 additional Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  4. … [Trackback]

    […] Find More here|Find More|Find More Informations here|There you will find 92190 additional Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  5. DMPK Studies says:

    … [Trackback]

    […] Read More here|Read More|Find More Informations here|Here you can find 75493 additional Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  6. zdporn.com says:

    … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you will find 96811 additional Infos|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  7. … [Trackback]

    […] Read More on|Read More|Read More Informations here|Here you will find 92205 more Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  8. … [Trackback]

    […] Read More here|Read More|Find More Informations here|Here you can find 38428 additional Informations|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  9. AME says:

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you can find 19758 additional Infos|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  10. … [Trackback]

    […] Read More on|Read More|Read More Infos here|Here you will find 99961 more Infos|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  11. … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 20163 more Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  12. … [Trackback]

    […] Read More here|Read More|Read More Informations here|Here you can find 35471 more Informations|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  13. … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you can find 11119 additional Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  14. … [Trackback]

    […] Find More on|Find More|Read More Infos here|Here you will find 98381 more Infos|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  15. Aws for Seo says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you will find 98194 additional Informations|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  16. masters says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you can find 45393 more Informations|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  17. GVK BIO PK says:

    … [Trackback]

    […] Read More on|Read More|Read More Informations here|Here you can find 7924 more Informations|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  18. … [Trackback]

    […] Find More here|Find More|Find More Informations here|Here you can find 31685 additional Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  19. … [Trackback]

    […] Read More on|Read More|Find More Informations here|Here you will find 99129 more Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  20. … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you can find 78281 additional Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  21. … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 55160 more Informations|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  22. … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 71279 more Informations|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  23. page11 says:

    … [Trackback]

    […] Find More here|Find More|Read More Infos here|Here you can find 89900 more Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  24. … [Trackback]

    […] Read More on|Read More|Read More Infos here|Here you will find 51880 additional Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  25. exact hour says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|Here you can find 13851 more Informations|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  26. … [Trackback]

    […] Read More on|Read More|Find More Informations here|There you can find 30529 more Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  27. hoverboard says:

    … [Trackback]

    […] Find More on|Find More|Read More Infos here|There you will find 1264 more Infos|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  28. … [Trackback]

    […] Read More here|Read More|Find More Informations here|There you can find 43258 additional Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  29. gypsy says:

    … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you can find 13017 more Infos|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  30. … [Trackback]

    […] Find More on|Find More|Find More Infos here|There you can find 20111 more Infos|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  31. … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you can find 97770 additional Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  32. … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you can find 26632 more Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  33. … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you can find 71657 additional Infos|Infos on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  34. … [Trackback]

    […] Find More here|Find More|Read More Infos here|Here you will find 51920 more Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  35. … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you can find 34363 additional Infos|Infos to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  36. … [Trackback]

    […] Read More here|Read More|Read More Informations here|Here you will find 46383 additional Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  37. … [Trackback]

    […] Read More on|Read More|Find More Informations here|There you can find 2307 additional Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  38. … [Trackback]

    […] Read More here|Read More|Read More Infos here|There you will find 50272 additional Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  39. … [Trackback]

    […] Read More on|Read More|Read More Informations here|There you will find 74322 additional Informations|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  40. … [Trackback]

    […] Read More on|Read More|Read More Infos here|Here you can find 79382 additional Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  41. … [Trackback]

    […] Find More here|Find More|Find More Infos here|Here you can find 84416 additional Infos|Informations on that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

  42. … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you can find 9218 more Informations|Informations to that Topic: qualitestgroup.com/blog/test-methodologies-and-philosophies/debugging-in-ides/ […]

Comments are closed.