Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
swat:design [2007/09/24 09:35] isuru |
swat:design [2009/07/06 20:36] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | **SWAT checklist for Testing** | + | **SWAT checklist for testing** |
- | **1.Code conventions** | ||
- | *Assigned modules per week will be validated against the PHP coding conventions available at http:// | ||
- | *PHPCheckstyle(http:// | ||
- | |||
- | **2.Module Developer Conventions** | + | |
+ | |||
+ | |||
+ | |||
+ | |||
+ | __Objectives__ | ||
+ | |||
+ | The major objective of this process is to improve the quality of the code available in the repository ensuring all the conventions are met as in the following url. http:// | ||
+ | |||
+ | __Team__ | ||
+ | - isuru [at] opensource [dot] lk | ||
+ | - mahesh [at] opensource [dot] lk | ||
+ | - viraj [at] gmail [dot] com | ||
+ | |||
+ | __Modules under SWAT for this week__ | ||
+ | - **Organization Registry** | ||
+ | - **Request Management System** | ||
+ | - Inventory Management System | ||
+ | - Catalog System | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =====Main | ||
+ | |||
+ | *Assigned modules per week will be validated against the PHP coding conventions available at http://www.sahana.lk/ | ||
+ | |||
+ | |||
+ | **Following tests will be done using PHPCheckstyle(http:// | ||
+ | |||
+ | * Test " | ||
+ | code open tag is used. | ||
+ | * Test " | ||
+ | shell/perl style comment (that starts with '#' | ||
+ | * Test " | ||
+ | line exceeds the value of " | ||
+ | " | ||
+ | * Test " | ||
+ | immediately preceded by a docblock. A property " | ||
+ | can be set if you want to disable docblocks for private member | ||
+ | functions. | ||
+ | * Test " | ||
+ | control structure is included within a {} block, even if it is | ||
+ | syntactically optional. | ||
+ | * Test " | ||
+ | curly bracket for a control structure. | ||
+ | * Test " | ||
+ | function definition and the default value of " | ||
+ | |||
+ | |||
+ | **The other convention validations will be done manually** | ||
+ | |||
+ | |||
+ | __PHPCheckstyle installation and generate test reports__ | ||
+ | |||
+ | * Download phpcheckstyle from http:// | ||
+ | |||
+ | * Unzip the content to a folder i.e: | ||
+ | |||
+ | * Comment the following lines in the pear.cfg.xml file in config directory | ||
+ | |||
+ | <test name=" | ||
+ | <test name=" | ||
+ | <test name=" | ||
+ | < | ||
+ | </ | ||
+ | <test name=" | ||
+ | |||
+ | | ||
+ | php run.php --src ' | ||
+ | |||
+ | * Open the generated HTML file using Firefox | ||
+ | |||
+ | |||
+ | __Steps to validate a file against the convention__ | ||
+ | - Parse the file using PHPCheckstyle and generate the violation report | ||
+ | - Identify the common coding convention violations in the file manually | ||
+ | - Submit a bug in the bug tracker attaching the violation report and the manually identified violations | ||
+ | - For each and every file of a module this process should be repeated | ||
+ | - Developers are also expected to use PHPCheckstyle and validate their code before they mark the bug ' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Module developer/ | ||
| | ||
+ | Developer must use the existing reusable libraries.i.e paging, | ||
| | ||
+ | In each and every module ' | ||
*File structure | *File structure | ||
+ | Under inst folder mysql-dbcreate.sql, | ||
| | ||
- | + | All the requests to the server should be navigated according to the front controller design pattern | |
- | **3.Integration | + | |
- | *Module dependency issues | + | |
- | | + | |
+ | |||
+ | |||
+ | ===== Integration testing ===== | ||
+ | *Identify module dependencies | ||
+ | Request Management System, | ||
+ | |||
+ | __Major | ||
+ | |||
+ | | ||
+ | Any user should | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | |||
+ | *Validate the dependencies in the code | ||