My project shows errors unexpectedly. Is there a good method that can be used to plan a project before starting and deploying it? [closed]

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/360693

Pergunta

I have completed a project. But errors unexpectedly occurs anytime when the user inputs data in it. Yesterday my program was performing very well. But today when the client tested the project it had some unexpected errors. Is it a normal thing to have such unexpected errors? Or Is there a way or a technique to verify that the program has no error.

Foi útil?

Solução

"Unexpected errors" is a behavior which we software developers do not like. We have to prepare for that:

  • Add a logging mechanism to your application to find out when those errors happened and what users did to "provoke" them.
  • During development, write many automated tests. Those tests include the "happy path" where everything is simple, some tests with edge cases, and some tests with "invalid input".
  • When you detected a way to provoke such an error, write a test for it, then write the code for fixing that bug. Such you create a safety net preventing you from re-creating the error during a later bugfix.
  • There is no practical way to prove that a program is completely correct. But at least the test suite proves, that it copes well with many cases.
Licenciado em: CC-BY-SA com atribuição
scroll top