Hi all,
I know there are all kind of tests when it comes to software development.
There is functional, load, regression tests.
We all know well about unit test (implemented easily by simpletest and phpunit) - other thing is who is wise enough to actually apply them.
So I would be very grateful, and believe everybody will benefit from this, if someone can point out:
1. List types of tests there exists(like the one I mentioned and more).
2. How they apply to php world (if make sense using them).
3. Tools to implement them (like phpunit for unit tests and simpletest for unit tests and functional tests)/
4. Good book(s) covering somhow this vast topic.
what type of tests there are and how to apply them in web
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I would lump test into two main types: code tests and system tests. Code tests, such as unit tests, *generally* check for errors in code by testing the values of variables or return values. System tests, such as web tests, *generally* test the output of the application to see if it matches expected output.
After that, test as specified more my the intent/goal of the test, and there are a plethora of reasons to test things.
After that, test as specified more my the intent/goal of the test, and there are a plethora of reasons to test things.
(#10850)
So are you using anything else beside simpletest and phpunit when developing proffesional web software?arborint wrote:I would lump test into two main types: code tests and system tests. Code tests, such as unit tests, *generally* check for errors in code by testing the values of variables or return values. System tests, such as web tests, *generally* test the output of the application to see if it matches expected output.
After that, test as specified more my the intent/goal of the test, and there are a plethora of reasons to test things.
Or you need something extra from time to time?
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
You can test performance using the XDebug extension from PECL. Like Aborint stated, it all depends on what you're testing, and sometimes even WHEN you're testing (unit testing a pre-existing app is very difficult for example). For example if you write procedural code, unit testing is probably not going to be best choice, and you'll need to look at functional testing, maybe using phpt tests or the PHP port of Perl's Test Simple (Chris Shiflett was working on this in the past).
Largely Unit Testing in an OOP application has the best balance, especially if you use from the beginning of a project. Unit Testing also facilitates Regression Testing, and SimpleTest has some fairly useful web testing functionality. At present I don't see a huge need for anything else.
Largely Unit Testing in an OOP application has the best balance, especially if you use from the beginning of a project. Unit Testing also facilitates Regression Testing, and SimpleTest has some fairly useful web testing functionality. At present I don't see a huge need for anything else.