TS 72 PHP Test FTP Support

PHP FTP Support Test Specification for NetBeans 7.2

Author: original author Filip Zamboj, Updates by Vladimir Riha
Version: 1.0
Last Update: 29th March 2012
Introduction: This specification provides tests of FTP Support in NetBeans IDE
Note: User credentials are to be found on Jupiter Hw@OS under our tables

Useful: FTP server on your machine

  1. For simple FTP, you can use FileZilla, it's bundled for example with XAMPP package (see XAMPP)
  2. for SFTP server, fast and easy way is to use for example Core FTP mini-sftp

Contents


Test suite: Create a project with remote sources

Purpose: Verify creation of project with remote sources and sources download via ftp
Setup: PHP engine and Apache 2.2 are configured. Apache 2.2 is installed.
You need to be connected to SWAN
Note: User credentials are to be found on Jupiter Hw@OS under our tables

  1. Create a PHP project from remote server
    1. File -> New Project -> PHP -> PHP Application from Remote Server
    2. Proceed to next step
    3. Choose a project name and source folder according to your installation
    4. Proceed to next step
    5. Add to project url: http://kenai-test.czech.sun.com/tester/AirAlliance/web/
    6. Create new remote connection configuration (pure FTP)
    7. set Initial Directory to '/var/www/tester/AirAlliance'
    8. make Upload Directory field blank
    9. press finish
    • EXPECTED RESULT: a download occurs and all files are downloaded. Created project on local machine has tree like the one below and contains 37 items, totalling 121.1 KB. Run Configuration of the project is set to kenai-test.czech, On Save.
 
.
|-- nbproject
|   |-- private
|   |   `-- private.properties
|   |-- project.properties
|   `-- project.xml
|-- readme.html
`-- web
    |-- classes
    |   |-- flight.php
    |   |-- guest.php
    |   |-- guestitinerary.php
    |   `-- schedule.php
    |-- conf
    |   `-- conf.php
    |-- confirmreservation.php
    |-- css
    |   |-- default.css
    |   `-- images
    |       |-- img01.gif
    |       |-- img02.gif
    |       |-- img03.gif
    |       |-- img04.gif
    |       |-- img05.gif
    |       `-- img06.gif
    |-- flightinfo.php
    |-- include
    |   |-- footer.php
    |   |-- header.php
    |   |-- nav.php
    |   `-- updates.php
    |-- index.php
    |-- itinerarymanager.php
    |-- listitinerary.php
    |-- processitinerary.php
    |-- scheduleinfo.php
    `-- sql
        `-- aadb_dump.sql


Test suite: Test download/upload on existing PHP project

Purpose: Verify download/upload on existing PHP project
Setup: PHP engine and Apache 2.2 are configured. Apache 2.2 is installed.
You need to be connected to SWAN.
Sample project to be created already use TodoList, please

  1. Upload existing Project to server
    1. Go to Project Properties of your created project
    2. Change Run Configuration to Run As Remote Web Site
    3. Set Project Url to 'http://kenai-test.czech.sun.com/tester/upload_download_test/'
    4. Set Up Remote Connection as you did in first Test Suite (Pure FTP again)
    5. set Initial Directory to '/var/www/tester/TodoList/upload_download_test/'
    6. set Upload Files On Run
    7. Run The Project
    8. Confirm Upload Dialog
    • EXPECTED RESULT: All Files are uploaded and a webpage will be open in default browser. TEARDOWN: Delete all uploaded files from the ftp server
  2. Upload On Save
    1. Go to Project Properties of your created project
    2. use the configuration from previous tescase
    3. set Upload Files On Save
    4. change file index.php
    5. save the file
    • EXPECTED RESULT: File is uploaded. A progress bar appeared while upload was in progress
  3. Upload On Save - continue
    1. change the file again
    2. save the file
    • EXPECTED RESULT: File is uploaded with changes (rewritten, actually). A progress bar appeared while upload was in progress. TEARDOWN: Delete all uploaded files from the ftp server
  4. Manual Upload
    1. Go to Project Properties of your created project
    2. use the configuration from previous tescase
    3. set Upload Files Manual
    4. change index.php and make a change in it
    5. choose index.php in Project View
    6. invoke upload on context menu.
    7. confirm dialog (index.php is already enabled for upload)
    • EXPECTED RESULT: File is uploaded and output is printed to console
220 Welcome to NB QE PHP and KENAI testing server! .
USER tester
331 Please specify the password.
PASS ******
230 Login successful.
TYPE I
200 Switching to Binary mode.
CWD /var/www/tester/upload_download_test
250 Directory successfully changed.
CWD /var/www/tester/upload_download_test
250 Directory successfully changed.
SYST
215 UNIX Type: L8
PORT 129,150,124,159,162,70
200 PORT command successful. Consider using PASV.
LIST index.php
150 Here comes the directory listing.
226 Directory send OK.
PORT 129,150,124,159,236,241
200 PORT command successful. Consider using PASV.
STOR index.php.new
150 Ok to send data.
226 File receive OK.
RNFR index.php.new
350 Ready for RNTO.
RNTO index.php
250 Rename successful.
PORT 129,150,124,159,224,132
200 PORT command successful. Consider using PASV.
LIST index.php
150 Here comes the directory listing.
226 Directory send OK.
QUIT
221 Goodbye.

Summary
====================
Succeeded:
file      index.php  
Runtime: 2 s, transfered: 1 file(s), 4.475 KB
  1. Manual Download I
    1. Go to Project Properties of your created project
    2. use the configuration from previous tescase
    3. set Upload Files Manual
    4. change index.php on server
    5. choose index.php in Project View
    6. invoke download on context menu.
    7. confirm dialog (index.php is already enabled for download)
    • EXPECTED RESULT: File is downloaded and output is printed to console
220 Welcome to NB QE PHP and KENAI testing server! .
USER tester
331 Please specify the password.
PASS ******
230 Login successful.
TYPE I
200 Switching to Binary mode.
CWD /var/www/tester/upload_download_test
250 Directory successfully changed.
QUIT
221 Goodbye.
220 Welcome to NB QE PHP and KENAI testing server! .
USER tester
331 Please specify the password.
PASS ******
230 Login successful.
TYPE I
200 Switching to Binary mode.
CWD /var/www/tester/upload_download_test
250 Directory successfully changed.
CWD /var/www/tester/upload_download_test
250 Directory successfully changed.
PORT 129,150,124,159,188,66
200 PORT command successful. Consider using PASV.
RETR index.php
150 Opening BINARY mode data connection for index.php (4582 bytes).
226 File send OK.
QUIT
221 Goodbye.

Summary
====================
Succeeded:
file      index.php  
Runtime: 793 ms, transfered: 1 file(s), 4.475 KB

  1. Manual Download II
    1. Go to Project Properties of your created project
    2. create new file on FTP
    3. invoke download on context menu on Source Folder.
    4. confirm dialog (new file is already enabled for download)
    • EXPECTED RESULT: Files are downloaded and output is printed to console. A new file has to there. Check new file is present in project window
Summary
====================
Succeeded:
file      classes/flight.php          
file      include/updates.php         
file      css/images/img03.gif        
file      confirmreservation.php      
file      include/footer.php          
file      css/images/img02.gif        
file      include/header.php          
file      include/nav.php             
file      scheduleinfo.php            
file      classes/schedule.php        
file      css/images/img01.gif        
file      css/images/img04.gif        
file      css/default.css             
file      flightinfo.php              
file      index.php                   
file      listitinerary.php           
file      css/images/img05.gif        
file      classes/guest.php           
file      css/images/img06.gif        
file      processitinerary.php        
file      NEW_FILE.php                
file      itinerarymanager.php        
file      classes/guestitinerary.php  
file      conf/conf.php               
file      sql/aadb_dump.sql           
Runtime: 16 s, transfered: 25 file(s), 77.55 KB


Test suite: FTP over TLS/SSL

Purpose: Verify that FTP with encryption settings works as expected

  1. Explicit FTP using TLS
    1. Create new PHP project from Remote Server
    2. In Remote Configuration step, press Manage. Manage Remote Connection dialog is shown
    3. Select FTP and set encryption to "Explicit FTP using TLS", fill in other settings.
    4. Finish creating the project
    5. Edit some files and upload them to server, then right click on some file and select Download.
    • EXPECTED RESULT: All operations works.
  1. Implicit FTP using TLS
    1. Repeat the same as in previous test, but this time set encryption to "Implicit FTP using TLS"
    • EXPECTED RESULT: NetBeans connects to the ftp server and the file was uploaded OK.


Test suite: Keep-Alive setting

Purpose: Verify that keep-alive feature works as expected

  1. Keep-Alive setting
    1. Create new PHP project from Remote Server
    2. In Remote Configuration step, press Manage. Manage Remote Connection dialog is shown
    3. There is an option called Keep-alive interval, set to some value
    4. Finish creating the project
    5. Wait some time (specified by keep-alive interval) and then edit and save some file (having set upload on save)
    • EXPECTED RESULT: NetBeans didn't disconnect from the ftp server the specified interval and the file was uploaded OK.


Test suite: Lazy download

Purpose: Verify that lazy download feature works as expected

  1. Lazy download
    1. You must have some project (with nested folders) at your FTP server (for testing purposes, you can use some local ftp server and create TodoList from Sample|PHP)
    2. Create new project, PHP from Remote Server
    3. Set ftp settings so the project will download sources from TodoList from first step. Click Next
    4. List of files/folders from FTP server is shown, unfold some folder (so you could see files/folders inside
    5. Check "Output-Remote log" in NetBeans, after your unfolding, there should be written command: List folderName
    • EXPECTED RESULT: Everything works as expected.


Test suite: Remote synchronization

Note that this feature is experimental and proposed operations highly depend on FTP server implementation

  1. Initial synchronization

File:TS_72_PHP_ftp_init.png

    1. Create PHP project from Remote server (let's call it projectA)
    2. Go to project properties -> Run configuration and set Upload Files to Manually
    3. Right click on "Source files" node in Project Window and select Synchronize
    4. Remote Synchronization dialog is shown (keep it opened for next test)
    • EXPECTED RESULT: All files/folders should have "Upload with review" as proposed operation.
  1. Synchronization dialog

File:TS_72_PHP_ftp_summary.png

    1. Having opened dialog from previous test, select some file at the dialog
    2. Action buttons at the bottom should become enabled
    3. Press Diff button
    4. Diff window should appeared with diff comparison of remote and local version of file
    5. Press OK to hide diff dialog
    6. The warning icon (yellow triangle) disappeared from the Remote synchronization dialog for the file
    7. Try to check some filter and make sure that only appropriate files are visible
    8. Hit OK to finish synchronization
    • EXPECTED RESULT: Summary dialog is opened showing actions that will be done. Confirm it. Confirmation dialog appears, hit OK.
  1. Synchronization with local changes
    1. Edit some file (at least 2 lines), create new file and folder and delete some file
    2. Right click on "Source files" node in Project Window and select Synchronize
    3. In Synchronize dialog, again diff the edited file
    4. Diff dialog window is shown and correctly displays differences between files
    5. Try to undo some change by clicking on the Arrow or Cross icon in Diff dialog
    6. Close diff dialog and finish synchronization
    • EXPECTED RESULT: All files/folders were treated correctly
  1. Synchronization with local changes of selected files
    1. Change 2 files
    2. Select one in Project window
    3. Right click on it and select Synchronize
    • EXPECTED RESULT: Only selected file is synchronized
  1. Synchronization with remote changes

File:TS_72_PHP_ftp_conf.png

    1. To simulate remote changes, create new project (we will call it projectB) from the same remote sources as the first project
    2. Perform the initial synchronization of projectB
    3. Change some file in projectB and synchronize
    4. Change the same file in projectA and synchronize
    • EXPECTED RESULT: Synchronization of projectA indicates conflicts. To resolve conflicts either select some operation or display DIFF dialog. After that the file is synchronized
  1. Synchronization with different run configuration
    1. Synchronization is working per remote connection. For this test you need to have either 2 different FTP servers or a small workaround is to define 2 remote connections and everyone is pointing to different location on the FTP server.
    2. Go to project Properties | Run Configuration and in Remote Connection select the 1st connection
    3. Synchronize Source Files
    4. Synchronize Source Files again, all proposed operation should be "No operation" (again, depends on FTP server)
    5. Switch Remote Connection in Run Configuration to the second one
    • EXPECTED RESULT: Proposed operations are different for the second remote connection
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo