Jump to content

PHP Test Cases


ankitmcgill

Recommended Posts

Hello all,

 

Got a question for all the experienced members out there.

 

I am doing some work for a department at my university which involves updating their database system implemented using PHP + SQL. My job is to implement new features /  correct broken features etc.

 

Now my question is when i implement new feature (lets say a new search parameter) how can i code some test cases to make sure it works fine on its own and also in conjunction with the existing parameters ? can i somehow automate the process ?

 

I fairly comfortable with php but never dealt with a system of this complexity and manual testing tends to be slow and error prone. and i am fairly new to automated testing.

 

Regards,

ankitmcgill

Link to comment
https://forums.phpfreaks.com/topic/163289-php-test-cases/
Share on other sites

Now my question is when i implement new feature (lets say a new search parameter) how can i code some test cases to make sure it works fine on its own and also in conjunction with the existing parameters ? can i somehow automate the process ?

 

Typically you would do it manually - at least I would. But remember, after you go through and check everything once or maybe even twice, then open it up to a group of users to 'beta' test it. You could automate the process, yes, but that would seem like more trouble than it is worth.

Link to comment
https://forums.phpfreaks.com/topic/163289-php-test-cases/#findComment-861615
Share on other sites

kingphilip, thanks for the reply.

 

the problem is that i am the only developer on the system and the system is already in usage. to add to the problems the people using the system are psychologists and hence not very computer savvy. in effect it falls on me to make sure the new feature works before making it available.

 

for small things its easy enough to do manual testing to make sure it does not break anything but for cases where you have complex SQL queries being done i felt the need for more full proof solution.

Link to comment
https://forums.phpfreaks.com/topic/163289-php-test-cases/#findComment-861658
Share on other sites

Use a CVS (Concurrent Version System) to track your changes.

Use a copy of the live site to do your testing.

Backup the live site before you make any changes.

Test the changes on the live site.

If it doesn't work, restore the backup.  If it does work, celebrate.

? ? ? ?

Profit.

Repeat

Link to comment
https://forums.phpfreaks.com/topic/163289-php-test-cases/#findComment-861661
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.