[crossfire] Unit tests, request for comments
Tchize
tchize at myrealbox.com
Fri Mar 10 02:07:50 CST 2006
Alex Schultz a écrit :
>This looks good to me, just a couple things. What is the logic behind
>naming the directory for the runtime resources 'rsc'? I think something
>clearer should be used for that. Also, I'm not sure we need to have unit
>
>
A reflex from java world :) Indeed using someting 'resources' would be
better
>or functional tests for crossedit, and there probably isn't much of it
>anyways that one could write unit tests for as most of it to my
>understanding is GUI code, and glue code to the common directory. Also
>
If you do unit testing, you must test each method, this include the gui
related ones. Of course you can't easily write test saying 'interface
must look ok' but you can write tests that ensure gui objects are
created, that the event queues are working, and so on.
>
>in terms of step 2 for dealing with bugs, I believe that even if it is
>reported on sourceforge, it may be helpful to still include a comment at
>the top of what the bug is, possibly copied from the sourceforge
>tracker's summary.
>
>
Agree.
>I'm also wondering what sort of unit tests one could have for 'headers',
>that doesn't seem very clear to me.
>
>
They are there to store all testcases related to macros defined in
headers. Crossfire has a few quite complicated macros, we need to unit
test them as there are used a lot.
>Another point, is some functional tests, could very well combine
>multiple parts of the server code, such as 'server' and 'common', or
>'socket' and 'server'. It is difficult to make a clear separation for
>most functional tests.
>
>
>
For tests that involve several modules, the 'general' folder is there,
as stated in document. Suppose you want to write a functionnal test for
socket, it may be that you need functions defined in common/ but as it
is the socket module which is under test, put it in socket/ folder. On
the other side, if you want to write a functionnal test based on 'map
loading code should interact gracefully with protocol' then you test 2
modules at same time and put them in general/.
>Alex Schultz
>
>
>
>tchize wrote:
>
>
>
>>Hello,
>>
>>I have wrote draft documentation on testing. This will serve as a guide line on implementing unit testing in crossfire.
>>All comment from community welcomed. Note, as nobody did come with other suggestiong i went on the use of check
>>
>>Regards,
>>Tchize
>>
>>
>>
>>
><snip>
>
>
>
>_______________________________________________
>crossfire mailing list
>crossfire at metalforge.org
>http://mailman.metalforge.org/mailman/listinfo/crossfire
>
>
>
More information about the crossfire
mailing list