Skip to main content
Post Made Community Wiki by Loren Pechtel

Unit tests are useful when used correctly. Therecorrectly; there are various problems with your logic.

When I'm developing I go through a lot of trial-and-error "When I'm developing I go through a lot of trial-and-error" Said Kevin.

Look at programming by coincidenceprogramming by coincidence. It's better to understand what a code should doshould do and then prove that it does it via a unit test. Do notDo not assume a code works simply because the UI didn't break when you ran the program!

s writing unit tests for ASP.NET web forms something that is done often

I know ofhave no knowledge of statistical data to say how often people test webformsweb forms. It does not matter. The UI is hard to test and Unit Tests should not be coupled to a UI either. seperateSeparate out your logic into layers, class libraries which can be tested. Test the UI seperatelyseparately from the backendback-end logic.

So, question number 2: Would you guys advise me to start writing unit tests?

Yes. Once you get used to them, they speed you up. Maintenance is far more time consuming and costly than the initial development phase. Maintenance is greatly assisted with unit tests, even with initial testing and bug repair.

Unit tests are useful when used correctly. There are various problems with your logic.

When I'm developing I go through a lot of trial-and-error

Look at programming by coincidence. It's better to understand what code should do and then prove that it does it via a unit test. Do not assume code works simply because the UI didn't break when you ran the program!

s writing unit tests for ASP.NET web forms something that is done often

I know of no statistical data to say how often people test webforms. It does not matter. The UI is hard to test and Unit Tests should not be coupled to a UI either. seperate out your logic into layers, class libraries which can be tested. Test the UI seperately from the backend logic.

So, question number 2: Would you guys advise me to start writing unit tests?

Yes. Once you get used to them, they speed you up. Maintenance is far more time consuming and costly than the initial development phase. Maintenance is greatly assisted with unit tests, even with initial testing and bug repair.

Unit tests are useful when used correctly; there are various problems with your logic.

"When I'm developing I go through a lot of trial-and-error" Said Kevin.

Look at programming by coincidence. It's better to understand what a code should do and then prove that it does it via a unit test. Do not assume a code works simply because the UI didn't break when you ran the program!

s writing unit tests for ASP.NET web forms something that is done often

I have no knowledge of statistical data to say how often people test web forms. It does not matter. The UI is hard to test and Unit Tests should not be coupled to a UI either. Separate out your logic into layers, class libraries which can be tested. Test the UI separately from the back-end logic.

So, question number 2: Would you guys advise me to start writing unit tests?

Yes. Once you get used to them, they speed you up. Maintenance is far more time consuming and costly than the initial development phase. Maintenance is greatly assisted with unit tests, even with initial testing and bug repair.

Source Link
P.Brian.Mackey
  • 11.1k
  • 8
  • 53
  • 88

Unit tests are useful when used correctly. There are various problems with your logic.

When I'm developing I go through a lot of trial-and-error

Look at programming by coincidence. It's better to understand what code should do and then prove that it does it via a unit test. Do not assume code works simply because the UI didn't break when you ran the program!

s writing unit tests for ASP.NET web forms something that is done often

I know of no statistical data to say how often people test webforms. It does not matter. The UI is hard to test and Unit Tests should not be coupled to a UI either. seperate out your logic into layers, class libraries which can be tested. Test the UI seperately from the backend logic.

So, question number 2: Would you guys advise me to start writing unit tests?

Yes. Once you get used to them, they speed you up. Maintenance is far more time consuming and costly than the initial development phase. Maintenance is greatly assisted with unit tests, even with initial testing and bug repair.