STS 70 CLI

Command Line Interface and Locking User Directory Sanity Test Specification for NetBeans 7.0

Authors: Tomas Musil, Petr Chytil
Last update: 4.12.2008
Introduction: This test specs tests the Command Line Interface and Locking User Directory (CLI) feature. Most importatnt IDE switches tested here you can find when running netbeans with --help parametr.For details about this feature see to CLI proposal at http://openide.netbeans.org/proposals/arch/cli.html

Contents


Test suite: Command Line Interface and Locking User Directory

Setup: There are no specials steps to configure the NetBeans ide for testing of CLI.

  • Use nb.exe launcher for testing in Windows.
  1. Show help
    1. Run ide with param --help
    • EXPECTED RESULT: There will be shown help on console with
           General options. 
                 Core Options. 
               OpenFile options 
   
  1. Look and feel
    1. Run netbeans with param --laf 'look_and_feel'. Where 'look_and_feel' is other L&F than the default one on your OS. Available L&Fs: Metal, Nimbus, GTK, Window and Aqua. The last three are available only on some OS's.
    • EXPECTED RESULT: The ide was started with corresponding L&F.
  1. Open file
    1. Run netbeans with param --open 'filename'. Where the
               'filename' is some name of java file which will be opened.         
    • EXPECTED RESULT: The ide was started and the file was openeted in editror
  1. Try open unexisting file
    1. Run netbeans with param -open 'filename'. Where the
               'filename' doesn't exist on filesystem.         
    • EXPECTED RESULT: After start ide will be shown warning dialog that file 'filename' doesn't exists.
  1. Open file and go to the line
    1. Start the ide.
    2. Run the second instance of netbeans for the same userdir
       with param -open 'filename':'line-number'. The file
       filename must exists and the number of its lines must be great or equal to the
         'line-number'. The 'line-number' is integer value of a line number in opened file.   
       
    • EXPECTED RESULT:
          The file will be opened in the editor od first instance of netbeans. The line 
          of cursor of opened file  will be set to the 'line-number' value.


Test suite: Opening project using Netbeans CLI

Purpose: to test opening a netbeans project using CLI
Setup: no setup needed

  1. Opening Java project from CLI
    1. Create in IDE java project ($PATH_TO_DIR/JavaApplication1), close the project, close netbeans
    2. Run netbeans with parameter "--open $PATH_TO_DIR/JavaApplication1"
    • EXPECTED RESULT: IDE starts and your java project is opened
  1. Try to open more projects
    1. Run netbeans with parameter "--open $PATH_TO_JAVAPROJECT1 $PATH_TO_JAVAPROJECT2 $PATH_TO_JAVAPROJECT3"
    • EXPECTED RESULT: "IDE opens and all three projects are opened"
  1. Open non existent project
    1. Run netbeans with parameter "--open $SOME FOLDER"
    • EXPECTED RESULT: "IDE opens and appropriate message is shown"


Test suite: UNC Paths

Purpose: to test netbeans with UNC paths
Setup: Have a UNC path ready. Have JDK in the UNC path.

  1. IDE on UNC
    1. Start IDE from UNC path
    • EXPECTED RESULT: IDE starts up as usually.
  1. Userdir on UNC
    1. start with --userdir UNC_PATH
    • EXPECTED RESULT: IDE starts up as usually.
  1. JDK on UNC
    1. start with --jdkhome UNC_PATH
    • EXPECTED RESULT: IDE starts up as usually.


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