When testing is done

C++, C#, Java, PHP, ect...

When testing is done

Postby Chris » Tue Nov 14, 2017 10:21 am

Many people consider testing to be the last part of any process. While this is true, you could also look at it the other way round. You could put the test at the the start of the process. So now we have the knowledge of post- and prefixing. We can put it to use.

1. Testing at the end of the process:
This is general practice as it is the most simple form of testing and the easiest to comprehend.

2. Testing at the start of the process:
This might seem more complex at first, but once you have come to terms with it, you will realize the benefits.

The problem with the first method of testing is that if we were to change something in the thing we created, we would have to manually test everything again to make sure everything is still functioning the way it should. The bigger the system becomes, the more time consuming the testing process becomes. It's inevitable to happen, as everything is relative, that if we were to change something which is connected to a lot of other things, that one of the connections will break. That's where the benefits of the second approach outweigh the first approach.

The first approach might seem more time consuming at first. But if we do the testing before hand, we can automate the testing process and we become more aware of what it is we are trying to create. When we first create the test, it must fail, as if there was no functionality yet, the test should fail, if it passes there is something wrong with the test. Once the test fails we go on to creating the functionality. Once the functionality is created we run the test, while the test fails we keep creating until the test passes. Once the test passes we are done. The advantage is that when we go to change something. We have a test, it doesn't matter how big the system becomes, as every time we change something, we simply run the test and we instantly know what went wrong.

Therefore in my opinion, we should always start with the test, as in the long run it will save time. I shall refer you to google TDD (test driven development). Here's a nice article on Wikipedia:
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
Posts: 1557
Joined: Wed Sep 30, 2009 2:22 pm
Has thanked: 1 time
Been thanked: 4 times
Blog: View Blog (2)

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest