Hi...

Originally Posted by
ceefour
About "looking at my page": well, yeah. Basically that's the most testing I do. I for some reason do a more "defensive" approach, i.e. trying to code everything early, putting documentation at all places, and having placeholders and stuff like that. I try to fix things before it happens. And when it doesn't work, I fix it. And when it works, I try to spend some few hours tingling (not really testing) before publishing it.
The smallest commercial project I am involved with right nowis about 25K lines of code and two other developers. The largest is 120K lines and five other developers. I do none of your stuff. If I did, I'd spend days "tingling"
.
Here is how I test a user logging in by looking at three pages, clearing my cookies and session data, and documentating the behaviour of the site. I would check this result again even after I change the code by even a few lines...
PHP Code:
class TestOfSignIn extends WebTestCase {
function testValidLogin(0 {
$this->get($this->getHomepage());
$this->clickLink('Log in');
$this->setField('name', 'Marcus');
$this->setField('password','My secret');
$this->clickSubmit('Log in');
$this->assertWantedText('Welcome Marcus');
}
}
They accumulate and give confidence. Running about 100 tests per second is typical. I don't even notice the tingling
.
It even gets tested when I'm not in the office: on roll out, every night (once we get Rephlux working), on every server every 15 minutes if it's infrastructure (using a Nagios plug-in), by every other developer making a change, on check-in...and I don't have to do a thing.
I spend my time designing (I am typing unit tests at the same time), formalising requirements with clients (and writing acceptance tests at the same time), object modelling, iteration planning and sundry automation (I prefer automated builds too) and coding.
I don't spend my time testing (one click of the mouse is all I need).
I don't spend my time deploying (one command line is all I need).
I don't spend time tracking project progress (one click of the mouse is all I need).
I don't spend time verifying code against requirements (one click of the mouse is all I need).
I don't spend my time documenting the code (the unit tests do that for me and they don't lie).
I don't spend my time writing requirements docs (the acceptance tests do that for me andthey don't lie).
I don't waste time checking severs for dependencies (one click of the mouse is all I need).
Oh, yeah. I don't even need to try to fix stuff "before it happens"as that's the test writing. It rather comes for free. In fact I don't even need to fix stuff unless its a design error. We change stuff all the time though...because we can.

Originally Posted by
ceefour
And then after the few hours it got published on the Internet I'll start monitoring the error logs, which contains quite complete information including backtrace (of course) and some other whatnot like currently logged in user and session data.... The error logging mechanism has to be robust though, it'd be useless if the error logger itself bugs.
Arrrgh! What a life of drudgery
. If I want to deploy I type in the server names and a few other parameters and come back after a cup of tea to read the messages. If it passed all of it's tests it's live, else it automatically rolls back. After that...I go home and put my feet up. I know it's working.
Oh, we don't have error logs as we don't need them. I don't want to clutter the code with logging anyway as it just slows everyone else down. We only write the code we need. I work a four day week. Life is good.

Originally Posted by
ceefour
All in all unit testing rocks (even though I never had the chance to use them).
It sounds like you cannot afford not to do it. You're life is hell.
yours, Marcus
Bookmarks