M
M
Maxim2018-02-09 12:48:08
Yii
Maxim, 2018-02-09 12:48:08

How is testing organized in your company?

Hello!
There was a small dispute with a colleague about testing web projects. It became interesting how testing is organized in other companies and what arguments for tests can be for "businessmen" who believe that tests are unprofitable?
PS We use codeception ourselves.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eRKa, 2018-02-09
@kttotto

Often, tests are treated like a religion, because everyone around says that they are needed and that it is useful. And often they are made "Schaub was." Tests give an increase only in the long run, on large long-lived projects.
Cons:
1. Tests are the same code part of the project, resources (man-hours) are spent on it, and they need to be maintained in the same way as the rest of the code. It is often thought that the test was written once and you can forget about it, but much more often changes come that can change the logic of expecting some kind of behavior, refactoring can occur, which can also break tests or make some tests unnecessary or require new ones, etc. .d. If you are afraid to break tests, then the code will no longer be flexible to changes.
2. Often, due to inexperience, they try to cover almost all 100% of the code, it turns out redundancy, tests for obvious things. And this is all the time, which means money.
3. There are projects that have a short life span, written for a specific one-time portion of tasks. On them, I think, it makes no sense to write tests at all.
It makes sense to do tests:
1. When the project is going to live happily ever after, and more than one portion of changes will come.
2. Not 1-2 people work on the project, you need to make sure that someone else does not break what you wrote.
3. During development, it is sometimes more convenient to write a test for some section of code and run the code for debugging through the test than to launch a heavy project every time.

M
Maxim Fedorov, 2018-02-09
@Maksclub

I'll add to eRKa
Sometimes you need to make a complex functionality that you need to work with somehow, but you don't know how it will work :)
That is, write a test using the functionality, and you already build your code for it...
#TDD

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question