qa:testfesttalk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
qa:testfesttalk [2009/04/05 08:35] – Run single test or dir with tests dabaseqa:testfesttalk [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== PHPT roundup talk ====== ====== PHPT roundup talk ======
-This wikipage contains all extra information for the talk prepared for phptestfest 2009. They heavily rely on content written by other people before. Every resource of the talk, even the slides (in different formats) will be in this place. Other testfesters can use and modify this talk to save precious time.+This wikipage contains all extra information for the talk prepared for [[qa:testfest-2009|phptestfest 2009]]. They heavily rely on content written by other people before. Every resource of the talk, even the slides (in different formats) will be in this place. Other testfesters can use and modify this talk to save precious time. 
 + 
 +[[http://tinyurl.com/c9bqf4]] 
  
 ===== How is PHP Tested ===== ===== How is PHP Tested =====
Line 19: Line 21:
   * autoconf   * autoconf
   * gcc   * gcc
-  * bison or flex+  * flex-old 
   * libxml2-dev   * libxml2-dev
   * re2c   * re2c
-  * lcov+  * Bison (before php 5.2)  
 +  * lcov / ggcov
  
  
Line 139: Line 142:
 <code> <code>
 php run-tests.php tests/func/ php run-tests.php tests/func/
 +</code>
 +
 +===== Write Tests =====
 +From here on it's easy to add own tests. 
 +
 +<code>
 +--TEST--
 +Hello world test
 +--FILE--
 +<?php
 +echo "Hello";
 +?>
 +--CLEAN--
 +--EXPECT--
 +Hello
 </code> </code>
  
Line 233: Line 251:
   * Split into several smaller tests   * Split into several smaller tests
  
-==== Lazy Test ==== 
-// 
-This occurs when several test methods check the same  
-method using the same fixture (but for example check the  
-values of different instance variables). Such tests often only  
-have meaning when considering them together so they are  
-easier to use when joined using Inline Method (F:117).//  
- 
-Examples 
-  * Several Tests have the same parameters but different checks on return values 
- 
-Avoid by 
-  * group the tests together 
  
  
qa/testfesttalk.1238920523.txt.gz · Last modified: 2017/09/22 13:28 (external edit)