PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon May 25, 2020 12:31 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jan 16, 2015 11:31 am 
Offline
Forum Newbie

Joined: Fri Jan 16, 2015 11:08 am
Posts: 2
I have a moderately large app (about 67K lines of code) that I've written over a period of years. The code is clean, commented religiously, and the program architecture is reasonably modular despite not using an OOP approach. It's in production use at my workplace, and has proven generally reliable.

When I began working on it in 2007, I'd never heard of unit tests, and though I've since learned about them in theory, it has seemed easier to keep going without them than to go back and figure out a testing suite for the already fairly complex app.

But in the interests of long-term stability, a test-driven approach seems like a good idea, so I should probably bite the bullet and do it. But it seems pretty overwhelming. Can anyone offer tips or resources on how to add unit tests to a large existing project that wasn't built around the methodology?


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 2:48 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Writing tests from the core out might make sense, but you need to ask yourself what you would get out of it. Are there areas of the codebase that are unstable or change often. Having tests for those areas might make changes and refactoring safer.

There is a fairly new book that might be of interest to you: https://leanpub.com/mlaphp

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 4:30 pm 
Offline
Forum Newbie

Joined: Fri Jan 16, 2015 11:08 am
Posts: 2
That looks interesting, thanks! I'll check it out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group