Skip to main content
added 1 character in body
Source Link
Robbie Dee
  • 9.8k
  • 2
  • 25
  • 54

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

IeI.e. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit. Which, if you are not the person who write the code in the first place, is going to mean delay, meetings, refactoring etc

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

Ie. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit. Which, if you are not the person who write the code in the first place, is going to mean delay, meetings, refactoring etc

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

I.e. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit. Which, if you are not the person who write the code in the first place, is going to mean delay, meetings, refactoring etc

added 122 characters in body
Source Link
Ewan
  • 84.4k
  • 5
  • 91
  • 189

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

Ie. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit. Which, if you are not the person who write the code in the first place, is going to mean delay, meetings, refactoring etc

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

Ie. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit.

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

Ie. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit. Which, if you are not the person who write the code in the first place, is going to mean delay, meetings, refactoring etc

Source Link
Ewan
  • 84.4k
  • 5
  • 91
  • 189

The main problem with your idea is that you can't just write tests for any code. The code has to be testable.

Ie. you need to be able to inject mocks, separate out the bit you want to test, access state which is changed and needs confirming etc.

Unless you get lucky or write the test first, chances are writing the test means rewriting the code a bit.