Each element represents a row, each attribute represents a column.
All attributes must be present in the first element for a given table.
Specifying an element with no attributes represents an empty table.
If an attribute specified in the first element is missing in subsequent element, NULL is implied.
There is no explicit NULL
PHPUnit - Database Extension
Flat XML
<dataset> <TEST_TABLE COL0="row 0 col 0" COL1="row 0 col 1" COL2="row 0 col 2"/> <TEST_TABLE COL1="row 1 col 1"/> <SECOND_TABLE COL0="row 0 col 0" COL1="row 0 col 1" /> <EMPTY_TABLE/> </dataset>
PHPUnit - XML Data Set
A more robust and capable format
<table> element for each table
<column> element for each column
<row> element for each row
<row> will contain equal number of children as there are <column>s in the same order.
<value>val</value> is used to specify a value
<null/> used to explicitly specify NULL
PHPUnit - Database Extension
XML (Not so flat)
<dataset> <table name="TEST_TABLE"> <column>COL0</column> <column>COL1</column> <column>COL2</column> <row> <value>row 0 col 0</value> <value>row 0 col 1</value> <value>row 0 col 2</value> </row> <row> <null/> <value>row 1 col 1</value> <null/> </row> </table> <table name='EMPTY_TABLE'> <column>COLUMN0</column> <column>COLUMN1</column> </table> </dataset>
PHPUnit - Other Data Sets
Pull your data sets out of a database
Possible, and might be a good way to do it for smaller database test suites.
Wouldn't recommend it for large ones (yet)
What about the Default data set?
I haven't hated myself enough to bother with it yet :P
Future formats? CSV, Composite Data Sets, Query Sets
PHPUnit - Other Data Sets
Pull your data sets out of a database
Possible, and might be a good way to do it for smaller database test suites.
Wouldn't recommend it for large ones (yet)
What about the Default data set?
I haven't hated myself enough to bother with it yet :P
Future formats? CSV, Composite Data Sets, Query Sets <- this is when you'll want to use database data sets for large suites
PHPUnit - Operations
If you want to specify non-default operations override either getSetUpOperation() or getTearDownOperation() with a static method from the class: PHPUnit_Extensions_Database_Operation_Factory
Selenium is a testing framework for web applications.
Runs tests by controlling a remote browser session
Can inspect the dom, look for events, and much much more
Selenium tests can be made a part of your PHPUnit Test Suite
PHPUnit - Selenium
Selenium is a testing framework for web applications.
Runs tests by controlling a remote browser session
Can inspect the dom, look for events, and much much more
Selenium tests can be made a part of your PHPUnit Test Suite
PHPUnit - Selenium Demo Time!
PHPUnit - Continuous Integration Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily, leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly. -- Martin Fowler
<b>[Comment posted from</b> http://www.digitalsandwich.com/archives/74-2008-DC-PHP-Conference-Advanced-PHPUnit-Testing.html] 3 years ago
plz send me on sant.shinde@yahoo.com
Thanks in advanced 4 years ago