120 reputation
7
bio website originalcopy-on.blogspot.com
location Austria
age 27
visits member for 3 years, 11 months
seen Dec 12 at 18:19

Sep
29
awarded  Scholar
Sep
29
accepted Convincing my boss that touching the Database is integration testing
Sep
29
comment Convincing my boss that touching the Database is integration testing
Today we had a code review and I asked "how would you test this?". He finally said all by himself things that I said for a long time like "static is bad" and "use factories as objects and inject them" - all factories are factory static methods at the time of writing. So I'll continue to ask questions with the right timing and make him think, maybe just ask "what if...?" to give him the direction he should head to.
Sep
28
comment Convincing my boss that touching the Database is integration testing
What I was thinking about was to write a dummy project which shows all the advantages of doing it properly and actually benchmark the DB speed and present the entire workflow. To show him that if we treat the database just like a plugin, then we can inject/replace it at runtime and run all the tests quickly - which prevents more bugs.
Sep
28
comment Convincing my boss that touching the Database is integration testing
I've also noticed that "planting a seed" works better, but it works only partially in that he takes only some parts of the seeds, not everything. So I'll have to bombard him with seeds, not just plant a few. I'm afraid that this way it will take quite a while (one year?) until he understands...
Sep
28
comment Convincing my boss that touching the Database is integration testing
Yes, he is still involved in the development, and there is a team, but the others are juniors.
Sep
28
awarded  Student
Sep
28
comment Convincing my boss that touching the Database is integration testing
The actual problem is a mentality problem - of him. Since he likes the database so much, he also couples all the DB-specific code to the core model of the application. But in order to make it testable, we have to decouple the application domain from the DB. That's why "winning the integration tests argument" is a good first step towards making the code testable.
Sep
28
awarded  Editor
Sep
28
revised Convincing my boss that touching the Database is integration testing
added 135 characters in body
Sep
28
comment Convincing my boss that touching the Database is integration testing
I don't think that matters to him. He's quite inconsistent with himself, I know. He rather thinks about "what leaves the server" as being integration testing, but yet again, exec()-ing a local process is also integration to him ("because running the process is time consuming", but "the database is so fast"). So yeah, summa summarum, I think he thinks that everything which is notably slow is an integration test, and he's in love with the "super-fast database".
Sep
28
comment Convincing my boss that touching the Database is integration testing
This is my first question here, so please comment if I should write more details or fix the tags.
Sep
28
asked Convincing my boss that touching the Database is integration testing
Jan
17
awarded  Nice Answer
Jan
17
awarded  Supporter
Jan
17
awarded  Critic
Jan
17
awarded  Teacher