[wp-hackers] Please stop saying WordPress is Unit Tested
Jacob Santos
wordpress at santosj.name
Wed Apr 30 03:09:26 GMT 2008
There have been and are several references to the Automattic WordPress
Tests to being Unit Tests and tests in the Automattic WordPress Tests
test suite to being unit tests. "Unit test" refers to the way it is run
and not to the actual test. The create name for the tests, when
referring to the tests in the test suite is, 'test case'. The the entire
test cases grouped as a whole is called a test suite.
Currently, the way the Automattic WordPress Tests is run is not done in
the fashion of "Units." There are some mocks, but that does not
immediately make the test case an unit test. The Unit Test term refers
to separation of the run time or the test suite from every other test
suite and also from execution. What this means is that the unit test
pulls in just the functions it needs to run (while mocking dependencies)
and running the execution independent of WordPress execution.
The Automattic WordPress Tests are not executed as units and are instead
run aside and dependent on the WordPress execution. Meaning if I called
a function in one test suite, it could affect the results in another
test suite or that I will have to clear out any possible interruptions
to functions I'm going to call in order to provide consistent and
accurate results.
I edited the codex page on the Automattic WordPress Tests to remove the
reference to unit tests and instead describe the way the Automattic
WordPress Tests, by default it runs.
Thank you.
--
Jacob Santos
Also known as darkdragon and santosj on WordPress Trac.
More information about the wp-hackers
mailing list