E
E
edwardoid2011-04-24 15:04:24
Software testing
edwardoid, 2011-04-24 15:04:24

Project alone. How?

Sooner or later, anyone sometimes has to take on a project that you have to write yourself. Those. I write alone, I document alone, I test alone. So. Now I am writing a library alone. The library implies some kind of functionality, logic. Not a primitive bridge between native APIs to conveniently provided classes. I don’t have a very clear idea of ​​​​how to do this whole process correctly , because any of these stages is important. It is important to test the product correctly .
Let's say I'm starting a class, where do I start? What to be guided by?

PS
I write in C++.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vladimir Chernyshev, 2011-04-24
@edwardoid

Well, write in the test something like
result = MySuperClass::runSuperAction();
assertEqual(result, 'Expected result');
then you implement the function itself (empty) so that the tests compile, run the tests and see that they do not pass, then change the function so that the test passes and, consider, you have implemented the functionality, testing this functionality and documentation.

T
ThePretender, 2011-04-24
@ThePretender

I would advise you to get out of your head all the tinsel like unit tests, kosher architecture and abstract factories. The main thing is not tests, not documentation, and not mana from heaven that descended on you after writing charitable code. The main thing is the code itself, which performs the task. Here also write the code, being guided by common sense. If later you feel that you need tests, write tests. And no, it's not.

L
lomalkin, 2011-04-24
@lomalkin

> project alone. How?
Complicated. But good luck!

A
Atrax, 2011-04-24
@Atrax

TDD is the best way for a loner.
First tests, then functionality.
According to the same tests and documentation at any time.
I started differently, now I regret it.
And going back to tests is unbearable. But apparently it will.

K
kirushik, 2011-04-24
@kirushik

For me, another important point is the measurability of the result.
If you just sit down to fence the code, then you can be blown away somewhere in the process, purely because of the loss of "enthusiasm". And then either the project rushes halfway, or I start to drive a blizzard.
From these positions, the same tests help a little - you can more or less see which part of the tests I have already managed to complete.
It also helps me a lot to schedule small tasks in hours, I got the idea from Joel Spolsky: russian.joelonsoftware.com/Articles/PainlessSoftwareSchedules.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question