PHP Projects and Wizards Test Specification Test Specification for NetBeans 6.7
Author: Victoria Zhukovskaya, revision for 6.7 by
Filip Zamboj
Version: 1.0
Last update: 10th October 2008
Introduction: This specification provides usecases of Php project creation, Php Project properties customizing and Php Project actions in the NetBeans
IDE
Test suite: Create a new Php Project
Purpose: Check the Wizard for creation empty Php Project.
Setup: PHP engine and Apache 2.2 are configured. Apache 2.2 is installed to default location.
- Create an empty Project with default settings.
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP. In the Projects area, choose PHP Application to create an empty project and click Next.
- Accept default values for Name and Location step. Press Finish button.
- EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in the source view. Project Sources are located in htdocs directory
of Apache.
- Create empty Project with the given name
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- Type Project Name myPhpProject. the rest fields use default values for Name and Location step, press Finish button.
- Repeat above steps for creating project with the same name.
- EXPECTED RESULT: There should be the warning message: Source directory is already NetBeans project.
- Create empty Project with incorrect name
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- For Name and Location step type Project Name myPhpProject*. Accept default values for the rest fields, press Cancel button.
- EXPECTED RESULT: There should be warning message: Source directory is not a valid folder name.
- Create empty Project and put metadata into a separate directory
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- Check "Put NetBeans metadata into a separate directory" checkbox. Accept default values for the rest fields, press Finish button.
- EXPECTED RESULT: Created Php project appears on Project tab. Index.php opens in source view. Project Sources are located in the Source Folder and
metadata are located in a separate directory.
- Create empty Project with renamed index.php file
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- Accept default values for the rest fields, press Finish button.
- Rename index.php Index File to myindex.php.
- Invoke Properties for this PHP Application. Slect Run Configuration on Properties window. Press "Browse..." button for index file. Select myondex.php
file. Press Select File button. Press OK.
- EXPECTED RESULT: Created Php project appears on Project tab. Index file has new name myindex.php opens
- Create empty Project and choose copy location.
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- Accept default values for the rest fields, press Next button.
- Set checkbox 'Copy files from Sources Folder to another location' on. Press Browse button and select path for copying. Press Finish button.
- EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in source view. Project Sources are located in the Sources Folder
and have a copy in Copy Location.
- Create empty Project and set copy location to the doc root.
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP, in the Projects area, choose PHP Application to create an empty project and click Next.
- Select NetBeansProjects directory for the Sources Folder combobox. Accept default values for the rest fields, press Next button.
- Set checkbox 'Copy files from Sources Folder to another location' on. Select htdocs\PhpProjectN for the Copy to Folder combobox. Press Finish button.
- EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in source view. Project Sources are located in the Project Folder and have a copy in htdocs directory of Apache.
Test suite: Create Air Alliance Sample Application
Purpose: Create the sample and work with it.
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.
- Create Air Alliance Sample
- In the Projects window, choose File > New Project.
- In the Categories list, select Samples>PHP. In the Projects area. Choose Air Alliance Sample Application to create the sample. Press Next.
- Name of Project is AirAllianceN. Press Finish.
- Folow the instruction in the appeared readme.html.
- EXPECTED RESULT: Created Air Alliance Sample appears on Project tab. There should be opened readme.html in default browser. Finally, we can run the project.
Test suite: Check Properties of PHP Project
Purpose: Check Properties of PHP Project
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.
- Check Properties of php Project with default settings.
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP. In the Projects area, choose PHP Project to create an empty project and click Next.
- Accept default values for Name and Location step, press Finish button.
- Created Php project appears on Project tab. Right click on the project and select Properties.
- EXPECTED RESULT: Project Properties window appears. There are six Categories: Sources,Run Configuration, PHP Include Path, JavaScript Libraries, Debug, Formatting.
- Check Properties of php Project with default settings.
- Create a PHP Project with default settings. (Source folder is htdocs folder of Apache, Copy folder is not specified.)
- Right click on the project and select Properties. Select Sources node in the Categories tree.
- Set check box 'Copy files from Sources Folder to another location' on. Expand combobox and select htdocs\PhpProjectN+1 folder. Press Ok button.
- EXPECTED RESULT: Project has a copy of sources in Copy Location.
Test suite: PHP Project from remote server
Purpose: Create PHP Project with remote server; FTP
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.
- Create PHP Project from remote sources
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP. In the Projects area, choose PHP Project from Remote Server
- Accept default values for Name
- set project url to your local folder
- select manage remote configuration
- use ftp connection
- enter credentials, see hw&os configuration for php testing server on Jupiter
- set initial directory to /var/www/PHPTesting/remoteConfigurationProject
- Created Php project appears on Project tab and sources will be downloaded
- EXPECTED RESULT: sources are downloaded. You can see log. verify that data has been downloaded.
- Check Properties of php Project From Remote Server
- Right click on the project from previous testcase and select Properties.
- Select Run Configuration
- EXPECTED RESULT: Verify that configuration matches to entries you entered before and upload files is set on save
- Create PHP Project with remote server, SFTP without public key
- repeat first testcase of this testsuite using sftp connection without providing public key
- Create PHP Project with remote server, SFTP with public key
- repeat first testcase of this testsuite using sftp connection and providing public key without passphrase
- Create PHP Project with remote server, SFTP with public key with passphrase and without password
- repeat first testcase of this testsuite using sftp connection and provide public key with passphrase and without password
Test suite: Symfony PHP Project
Purpose: Create PHP Project with remote server
Setup: Symfony, PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location, Windows & Linux OS
Note:
How to install symfony is to be found here . Don't install yet
- Create New Symfony PHP Project
- In the Projects window, choose File > New Project.
- In the Categories list, select PHP. In the Projects area, choose PHP Project
- Accept default values for Name and Location
- press next
- enable Symfony PHP Web Framework
- accept default values
- EXPECTED RESULT: verify that error on the bottom of the panel appears. It should indicate it didn't find symfony script
- Close project wizard Issue 168832
- Proceed with textcase Symfony automatic recognition Linux
- uninstall symfony
ubuntu example:
$ sudo pear uninstall symfony/symfony-1.2.8
uninstall ok: channel://pear.symfony-project.com/symfony-1.2.8
- try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
- Proceed with textcase Symfony manual path entering Linux
- try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
- Proceed with textcase Symfony manual path entering Windows
- try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
- EXPECTED RESULT: A file structure hierarchy should be created as stated below. Invoke project context menu and you should find symfony -> clear cache and/or symfony -> run command
|-- apps
| `-- frontend
| |-- config
| | |-- app.yml
| | |-- cache.yml
| | |-- factories.yml
| | |-- filters.yml
| | |-- frontendConfiguration.class.php
| | |-- routing.yml
| | |-- security.yml
| | |-- settings.yml
| | `-- view.yml
| |-- i18n
| |-- lib
| | `-- myUser.class.php
| |-- modules
| `-- templates
| `-- layout.php
|-- cache
| `-- project_autoload.cache
|-- config
| |-- ProjectConfiguration.class.php
| |-- databases.yml
| |-- propel.ini
| |-- properties.ini
| |-- rsync_exclude.txt
| |-- schema.yml
| `-- vhost.sample
|-- data
| `-- fixtures
| `-- fixtures.yml
|-- doc
|-- lib
|-- log
|-- plugins
|-- symfony
|-- test
| |-- bootstrap
| | |-- functional.php
| | `-- unit.php
| |-- functional
| | `-- frontend
| `-- unit
`-- web
|-- css
| `-- main.css
|-- frontend_dev.php
|-- images
|-- index.php
|-- js
|-- robots.txt
|-- sfPropelPlugin -> ../../../../usr/share/php/symfony/plugins/sfPropelPlugin/web
|-- sfProtoculousPlugin -> ../../../../usr/share/php/symfony/plugins/sfProtoculousPlugin/web
`-- uploads
`-- assets
- Symfony automatic recognition Linux
- Install symfony as a pear package. Note: you need to allow more than 256MB of memory for php command line script. Settings to be found in something/cli/php.ini where something stands for the path to php
ubuntu example:
$ sudo pear channel-discover pear.symfony-project.com
[sudo] password for felipee:
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded
$ sudo pear install symfony/symfony-1.2.8
downloading symfony-1.2.8.tgz ...
Starting to download symfony-1.2.8.tgz (2,695,461 bytes)
..................................................done: 2,695,461 bytes
install ok: channel://pear.symfony-project.com/symfony-1.2.8
- open Tools -> Options -> PHP -> Symfony -> search
- EXPECTED RESULT: script is found and path appears in text field
- Symfony manual path entering Linux
- Install symfony manually - what basically means download package or checkout from svn
- open Tools -> Options -> PHP -> Symfony -> Browse
- provide path to symfony/data/bin/symfony
- EXPECTED RESULT: path should be accepted
- Symfony automatic recognition Windows
- install pear for windows if you don't have yet How To
c:\wamp\bin\php\php5.2.9-2>pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded
c:\wamp\bin\php\php5.2.9-2>pear install symfony/symfony-1.2.8
downloading symfony-1.2.8.tgz ...
Starting to download symfony-1.2.8.tgz (2,695,461 bytes)
.........done: 2,695,461 bytes
install ok: channel://pear.symfony-project.com/symfony-1.2.8
- open Tools -> Options -> PHP -> Symfony -> search
- EXPECTED RESULT: script is found and path appears in text field. If not, then verify you have path to PEAR in %PATH% system variable
- Symfony manual path entering Windows
- repeat steps for manual path entering for Linux, note: use only paths without spaces!
- provide path to symfony/data/bin/symfony.bat
- EXPECTED RESULT: path should be accepted
- Symfony Project containing symfony sources
- download symfony sources
- unpack them to project_folder/lib/vendor/
- from command line call
$ php lib/vendor/symfony/data/bin/symfony generate:project PROJECT_NAME
On Windows:
c:\> php lib\vendor\symfony\data\bin\symfony generate:project PROJECT_NAME
- create project with existing sources that has sources and project folder in project_folder
- EXPECTED RESULT: project should be recognized as symfony project. Verify by invoking project context menu and found symfony-> run command and/or symfony -> clear cache. The project folder tree will be as the one above but including symfony sources in lib/vendor%