TS 69 PHP Test FTP Support

PHP FTP Support Test Specification for NetBeans 6.9

Author: Filip Zamboj, Updates by Vladimir Riha
Version: 1.2
Last Update: 19th October 2011
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


Contents


Useful: FTP server on your machine

Windows
  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


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.
    • __Netbeans version
    • 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

teradown TEARDOWN Restart NB with clean userdir }} }}


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

teradown TEARDOWN Delete all uploaded files from the ftp server }}

  1. 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
    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

teradown TEARDOWN Delete all uploaded files from the ftp server

  1. 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.
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