[wp-hackers] Probably best to move tickets to 2.7 instead
Jacob Santos
wordpress at santosj.name
Mon Mar 10 05:27:16 GMT 2008
DD32 wrote:
> Test-cases are brilliant, If people can be bothered writing them, and running them on changed code of course.
> If WordPress had test-cases which covered a large part of the code, It would be relitivly simple for nightly testing to take place, and to notify of any regressions from the previous days code, It would even be possible for it to pin-point the exact patch which caused the regression to occur.
> I'm one of those people, I dont like writing test-cases, I just like to see a problem fixed; I dont like having to run test-cases, because i *know* if it was fixed or not (As i'd be trying to fix a bug in one place), But that kind of thought isnt good, as i said before, just because it works in one place, doesnt mean it does in another.
>
I thought the same thing, back before I started writing test cases, "Ah,
I don't need to write any test cases, my code is awesome!" I have to
admit, my l33t coding skills are not, but one day, one day they will be.
I don't think it is a novice skill vs advanced skill, because no matter
what experience or mad skillz a coder has, I still think test cases
should be written.
If you have written them before and don't like them, then okay. If you
want me to hold your hand, along the way. I might not be as good as a
coder as you are, but I know a few things here and there about test
cases. If anyone needs help, just email me. I'll be more than happy to
help you out with writing test cases for WordPress.
Finding people to write test cases seems to be a difficult task. That
seems to be the general issue (I wouldn't call it a problem). You can't
force people to do something they don't want, because they aren't being
paid and if they don't have an interest, then they aren't going to do it.
I'm doing an entire session about it during the WordCamp Dallas, however
the talk will focus on more code and different types. I'm not expert,
but I believe if I can get a coder writing a few tests, I'm sure they'll
be happy to write more.
I'll just suggest to write a test, but again, if you have already, then
you know everyone has their dislikes and likes and you can't push
someone into liking something. However, as a coder, it seemed natural to
write test cases, because I was always wondering about writing something
which helps me know when my code breaks, but isn't scattered in multiple
scripts and can be automated. I'll be damned, if I didn't know about
this when I was just starting out.
Friends, while I enjoy torturing myself, with writing documentation
(just kill me, because I'll rather die than write a single line). You
know, there are just some things which as a programmer, you need to do
to take that step to being a professional. Writing documentation (well)
and writing test cases falls into that "developer" attitude.
"I'm not just any programmer, I'm a developer." It is something that
puts you above the rest. Anyone can code, but those that have the
fortitude to write documentation and unit tests are far more reliable
with their code than those who don't. This isn't geared towards DD32,
but anyone who codes (myself included, I'll be honest, I haven't been
writing test cases, so if you excuse me I have to whip myself for being
arrogant. Just how many slashes is that again?).
--
Jacob Santos
http://www.santosj.name - blog
http://funcdoc.wordpress.com - WordPress Documentation Blog/Guide Licensed under GPLv2
Also known as darkdragon and santosj on WP trac.
More information about the wp-hackers
mailing list