What is the responsibility of the test department?

testing, unit-testing

Solution

While developers should test their own work (and they all do, some just use the inefficient "run-test-last-change-fix-run-again" method), there is a psychological problem trying to find your own mistakes:

If you knew that you were making a mistake, you would probably try to avoid it. In hindsight, it's often obvious/simple to see a mistake but when it happens, this isn't true. So this creates a "loser" situation where everyone thinks that you're stupid when you actually were trying your best.

Every developer has his/her own error pattern; that is everyone makes the same mistakes over and over again. There are various reasons, the most important here is blindness to or unwillingness to admit your own flaws.

When you're in a hurry, you start to cut corners. This isn't bad, this is human. The problem is that your memory is already full with all the details that you need for your work. Now the performance of your memory is reduced by stress. This means you will overlook important details without noticing - your brain is already working at its limit. And you won't notice that you're missing them. And you won't remember all the ones which you did notice because your memory is in panic mode -> only really important (as in life threatening) information will be processed.

Self-surveillance simply doesn't work with humans. You always need an external controller or you will have corruption.

Therefore it makes sense to let someone else test your work:

They won't use the same patterns (where to click, in which order to click buttons, how fast you type, ...) which quickly uncovers simple bugs that you can't find yourself, simply because they lie outside your preferred way of using a computer.

Their task is to make your life miserable (in a nutshell). If the boss is worth his money, he will create a competitive environment where the developers will try to let as few bugs as possible slip to testing while testing will try to find as many bugs as possible "to show them" (where "them" is the other team). This works really well (human groups love to compete), but you need to be aware of the psychological forces at work. If this isn't managed really well, it will create a lot of stress (-> more bugs slip through), burnout and mutual hatred. If the boss isn't excellent at managing humans, then this will backfire.

They have different assumptions. They didn't write the code, so they have no idea how it's supposed to work. They will look at your work like a customer and see things that a developer would never care for ("looks ugly", "not responsive enough"). They can find issues which make the product easier to sell. Developers usually only focus on "works well enough" (= doesn't crash when I click the right buttons in exactly the right order).

Now your questions:

Are the unit test supposed to be done by the test department/third party enterprise?

No. Unit tests are the smallest possible test that you can run on the code but which still has some meaning. The test department should never run those, that's the job of an automated CI server. It's stupid, boring and repetitive work suitable for a computer.

But it makes sense to let the testing dept define new unit tests. Alternatively, error reports from testing should be converted into new unit tests.

despite of the unit test, what other tests does the test department do?

Some examples:

- They install the actual application like a customer would do (= testing the installer)

- They click everything (especially those parts which they aren't supposed to)

- They run high-level tests on special test databases which contain complex test cases

- They run tests which take hours to complete (unlike unit tests which should execute in a few seconds at most)

- They check that all requirement are met

- They install the product on all kinds of hardware with all supported databases, network layouts, and different configurations.

Problem

I know that many companies have their test department, and I'm asking this question because I can't get some concepts clear. 1, Are the unit test supposed to be done by the test department/third party enterprise? For my own feeling I think this should be done by the developer himself/herself. But there is a saying that said: You will tend to test your code in the way you wrote it. So it's better for us to do the unit test. And you are not a professional tester, so you can't make sure your unit test is the best. If this is wrong, is there anything official that said a programmer should do the unit test himself? 2, despite of the unit test, what other tests does the test department do? This is kind of a simple question. Maybe there are some random tests, some stress tests, but could anyone give me a list of what the test department do normally?

Original source