TS 65 CLI
Command Line Interface and Locking User Directory Test Specification for NetBeans 6.5
Authors: Tomas Musil, Petr Chytil
Last update: 23.9.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
Related Issuezilla categories: platform / Launchers&CLI
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.
- Show help
- Run ide with param --help
- EXPECTED RESULT: There will be shown help on console with
General options.
Core Options.
OpenFile options
- No splash screen
- Run netbeans with param --nosplash.
- EXPECTED RESULT: The ide was started and no splashsceen was displayed during startup.
- Look and feel
- 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.
- Open file
- 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
- Try open unexisting file
- 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.
- Open file and go to the line
- Start the ide.
- 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.
- Attributes of lock file
- Run netbeans ide
- Login to the system as other user.See to file attributes of lock file from nb userdir ran in first step.
- EXPECTED RESULT:
The file cannot be read by another user. The attributes are 500 on linux/solaris.
Test suite: Opening project using Netbeans CLI
Purpose: to test opening a netbeans project using CLI
Setup: no setup needed
- Opening Java project from CLI
- Create in IDE java project ($PATH_TO_DIR/JavaApplication1), close the project, close netbeans
- Run netbeans with parameter "--open $PATH_TO_DIR/JavaApplication1"
- EXPECTED RESULT: IDE starts and your java project is opened
- Open java project in running ide
- Run ide
- Run the same instance of ide with param "--open $PATH_TO_SOME_JAVAPROJECT"
- EXPECTED RESULT: Project is opened in the same instance
- Try to open more projects
- Run netbeans with parameter "--open $PATH_TO_JAVAPROJECT1 $PATH_TO_JAVAPROJECT2 $PATH_TO_JAVAPROJECT3"
- EXPECTED RESULT: "IDE opens and all three projects are opened"
- Open project with space in name
- Run netbeans with parameter "--open $PATH_TO_JAVAPROJECT_WITH_SPACE_IN_NAME"
- EXPECTED RESULT: "IDE opens and project is opened"
- Open non existent project
- 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.
- IDE on UNC
- Start IDE from UNC path
- EXPECTED RESULT: IDE starts up as usually.
- Userdir on UNC
- start with --userdir UNC_PATH
- EXPECTED RESULT: IDE starts up as usually.
- JDK on UNC
- start with --jdkhome UNC_PATH
- EXPECTED RESULT: IDE starts up as usually.
Test suite: Combination of more IDE switches
- More switches on command line
- Run IDE with --nosplash --laf Metal --filename 'filename':'line number'
- EXPECTED RESULT: IDE starts without splashscreen, runs in Metal L&F and correct file is opened on correct line.
- Different order of switches
- Try to change order of command line switches from previous testcase.
- EXPECTED RESULT: IDE starts without splashscreen, runs in Metal L&F and correct file is opened on correct line.
Test suite: Failing scenarios
Purpose: to test netbeans fail messages
- Missing options message
- Run IDE with --branding, --ui, --fontsize, --locale but don't provide the value of the property
- EXPECTED RESULT: IDE shows warning message.

