|
README | Outline the order by which the installs of various components must occur. |
Install_01 | Test the SFrameworkInstall.jar file when
deployed will present to the user options to allow a script to be bound to
an event. Also test that scripting framework office.jar file is successfully deployed to NetBeans. |
Install_02 | Test the SFrameworkInstall.jar will sense directory names longer than 8 characters. |
Install_03 | Test the SFrameworkInstall.jar will sense directory names which contain a space character. |
Bindings_01 | Test that the user can assign a deployed script to a key. |
Bindings_02 | Test that the user can remove an assigned key. |
Bindings_03 | Test that the user can assign a deployed script to the File menu item. |
Bindings_04 | Test that the user can delete an assigned File menu item. |
Bindings_05 | Test that the user can execute a script stored in a document with a binding stored in the same document. |
NetBeans_01 | Compile and deploy a java script to the application user area using NetBeans. |
NetBeans_02 | Compile and deploy a java script to a document using NetBeans. |
NetBeans_03 | Delete a script deployed to a document using NetBeans. |
NetBeans_04 |
Generate and deploy a script using the command line
interface |
Test Case: README
Test Area: Solaris - Linux - Windows
Test AimOutline the order by which the installs of various components must occur.
Prerequisites:-
Download NetBeans 3.4 from http://www.netbeans.org.
Download Scripting Framework from http://framework.openoffice.org/scripting/
Download OpenOffice.org 1.1Beta or later from http://www.openoffice.org
General Description:
It is important that the following steps be executed
in order and before and other test cases.
1. Install NetBeans
2. Start NetBeans, cd to the install-dir/bin
and execute runide.sh for unix systems,
select runide.exe for windows. exit NetBeans.
3. Install OpenOffice.org.
4. Copy the SFrameworkInstall.jar file
to the users home directory.
Test Case: install_01
Test Area: Solaris - Linux - Windows
Test AimTest the SFrameworkInstall.jar file when deployed will present to the user options to allow a script to be bound to an event.
Also test that scripting framework office.jar files is successfully deployed to NetBeans.
Requirements
README
is performed before running this test case.
Description:
1. Copy the SFrameworkInstall.jar file to the user's
home directory.
2. Ensure OpenOffice.org is not running, also ensure
the quickstarters for windows and Linux are not running.
3. Execute java -jar SFrameworkInstall.jar
4. On the Scripting Framework Installer welcome screen
click next, the welcome screen should state the version of SFramework.jar.
5. Select Install, in the dialog select Next.
6. When Installation has completed, select Finish,
the next dialog should prompt you that the installer has
found a NetBeans installation,
select Next.
8. Select the IDE's for update, i.e. NetBeans, select
Next, Select Install, Select Finish
9. Manually check the NetBeans install directory <netbeans-install>/modules
for the following file:-
office.jar
10. Manually check that the SFrameworkInstall.log
file was writter to the users home directory.
11. Start OpenOffice.org, select Tools, there should
be an entry - Scripting Add On's
12. Select Tools, Scripting Add On's, Interactive
Beanshell Scripting, An interactive beanshell editor window should be
launched.
Expected Result:
All operations should complete successfully.
Test Case: install_02
Test Area: Windows
Test AimTest the SFrameworkInstall.jar will sense directory names longer than 8 characters.
Requirements
READMEis performed before running
this test case.
OpenOffice.org installation path directory has a
name which is nine characters or more.
NetBeans installation path directory has a name which
is nine characters or more.
Description:
1. Copy the SFrameworkInstall.jar file to the user's
home directory.
2. Ensure OpenOffice.org is not running, also ensure
the quickstarters for windows and Linux are not running.
3. Execute java -jar SFrameworkInstall.jar
4. On the Scripting Framework Installer welcome screen
click next.
5. Select Install, in the dialog select Next.
6. When Installation has completed, select Finish,
the next dialog should prompt you that the installer has
a NetBeans installation, select
Next.
8. Select the IDE's for update, i.e. NetBeans, select
Next, Select Install, Select Finish.
9. Manually check the NetBeans install directory <netbeans-install>/modules
for the following file:-
office.jar.
10. Start OpenOffice.org, select Tools, there should be an entry - Scripting Add On's
11. Select Tools, Scripting Add On's, Interactive
Beanshell Scripting, An interactive beanshell editor window should be
launched.
Expected Result:
All operations should complete successfully.
Test Case: install_03
Test Area: Windows
Test AimTest the SFrameworkInstall.jar will sense directory names which contain a space character.
Requirements
README is performed before
running this test case.
OpenOffice.org installation path directory has a
name which contains a space character.
NetBeans installation path directory has a name which
contains a space character.
Description:
1. Copy the SFrameworkInstall.jar file to the user's
home directory.
2. Ensure OpenOffice.org is not running, also ensure
the quickstarters for windows and Linux are not running.
3. Execute java -jar SFrameworkInstall.jar
4. On the Scripting Framework Installer welcome screen
click next.
5. Select Install, in the dialog select Next.
6. When Installation has completed, select Finish,
the next dialog should prompt you that the installer has
a NetBeans installation, select
Next.
8. Select the IDE's for update, i.e. NetBeans, select
Next, Select Install, Select Finish
9. Manually check the NetBeans install directory <netbeans-install>/modules
for the following file:-
office.jar
10. Start OpenOffice.org, select Tools, there should be an entry - Scripting Add On's
11. Select Tools, Scripting Add On's Interactive
Beanshell Scripting, An interactive beanshell editor window should
be launched.
Expected Result:
All operations should complete successfully.
Test Case: bindings_01
Test Area: Solaris - Linux - Windows
Test AimTest that the user can assign a deployed script to an key.
Prerequisites:-
install_01 is executed
before running this test case.
Description:
1. Start OpenOffice.org writer document.
2. Select Tools - Script Add On's, Assign Script
to Key.
3. In the popup dialog,
in the select script function
select
Location- User
Language- Java
Script - HighlightText.showForm
Select Key Group SHIFT +
CONTROL +F keys.
Select ShortcutKey SHIFT + CONTROL
+ F3.
SelectAssign Key.
4. The Key should now be assigned to HighlightText.showForm.
Select OK.
5. Select Shift - Control
- F3. The Highlight Text box dialog should be displayed.
6. Select Tools - Script
Add On's - Assign Script to Key.
SHIFT-CONTROL-F3 should be listed as assigned to HighlightText.showForm.
Close the Assign Script to Key dialog.
9. Select Tools - Configure, select the Keyboard
option, ensure that writer is selected in the top right corner.
In the shortcut keys scroll to Ctrl+Shift+F3, this
should show that it is assigned to [script://HighlightText.showForm].
10. Close the Configuration dialog.
Expected Result:
All operations should complete successfully.
Test Case: bindings_02
Test Area: Solaris - Linux - Windows
Test AimTest that the user can remove an assigned key.
Prerequisites:-
bindings_01 is executed
before running this test case.
Description:
1. Start OpenOffice.org writer document.
2. Select Tools - Script
Add On's - Assign Script to Key.
3. In the popup dialog,
Select Key Group SHIFT +
CONTROL +F keys.
Select ShortcutKey SHIFT + CONTROL
+ F3.
Select Delete Script Key.
4. The Key should not be assigned to anything. Select
OK.
6. Select Shift - Control - F3. The Highlight Text
box dialog should be not displayed.
7. Select Tools -Script
Add On's - Assign Script to Key ,
Key, SHIFT-CONTROL-F3 should not be listed as assigned to anything. Close
the Assign Script (Java) to Key dialog
8. Select Tools - Configure, select the Keyboard
option, ensure that writer is selected in the top right corner.
In the shortcut keys scroll to Ctrl+Shift+F3, this
should show that it is not assigned to anything
9. Close the Configuration dialog.
Expected Result:
All operations should complete successfully.
Test Case: bindings_03
Test Area: Solaris - Linux - Windows
Test AimTest that the user can assign a deployed script to the File menu item.
Prerequisites:-
install_01 is executed
before running this test case
Description:
1. Start OpenOffice.org writer document.
2. Select Tools, Scripting Add On's, Assign Script
to Menu.
3. In the popup dialog, select
Location - User
Language - Java
Script - HighlightText.showForm
Select File in the Top Level menu drop
down list.
In the New Menu dialog box , enter
a menu item name e.g. menuhighlight.
Select New, select ok.
4. Select File, menuhighlight - a highlight text box should appear.
Expected Result:
All operations should complete successfully.
Test Case: bindings_04
Test Area: Solaris - Linux - Windows
Test AimTest that the user can delete an assigned File menu item.
Prerequisites:-
bindings_03 is
executed before running this test case
Description:
1. Start OpenOffice.org writer document.
2. Select Tools, Scripting
Add On's, Assign Script to Menu.
3. In the popup dialog,
Select File in the Top Level menu
drop down list.
In the Sub Menu, select menuhighlight
[ HighlightText.ShowForm]
Select Delete Script Menu. Select
OK.
4. Select File, there should now be no menu option
menuhighlight.
Expected Result:
All operations should complete successfully.
Test Case: bindings_05
Test Area: Solaris - Linux - Windows
Test AimTest that the user can execute a script stored in a document with a binding stored in the same document.
Prerequisites:-
install_01 is executed
before running this test case.
Description:
1. Start OpenOffice.org.
2. Select File - Open, navigate to <OpenOffice.org-install-dir>/user/Scripts/java/MemoryUsage.
3. Open file ExampleSpreadSheet.sxc, a spreadsheet
document with a pie chart should be opened
4. Press ctrl-shift-m, the user is warned that they
are about to execute a sctipt.
Do you want to execute this script.
5. Select Yes.
6. The chart updates with JVM memory usage statistics.
7. Repeat steps 4-6 again.
Expected Result:
Test Case: netbeans_01
Test Area: Solaris - Linux - Windows
Test AimCompile and deploy a java script to the application user area using NetBeans.
Prerequisits
install_01 is executed
before running this test case.
http://framework.openoffice.org/scripting/release-0.2/netbeans-devguide.html#prerequisites
Description:
-
1. Create an examples directory e.g. HelloNetBeans.#
Start NetBeans.
2. Mount the examples directories
Select the File->Mount Filesystem menu item
In the Choose Filesystem Type window select Local Directory and click Next
Mount the examples directory you created i.e. HelloNetBeans.
Select Finish.
3. Create a new script parcel
Right click on your mounted examples directory.
Select New->Office Scripting->Parcel Recipe
In the New Wizard window that appears, enter the name you wish to call your
new parcel e.g HelloNetBeans.
Select Finish.
4. Click on the Contents-Empty file
-Change the name of 'public class Empty' to 'public
class HelloNetBeans'
-Remove the package declaration 'package HelloNetBeans.Contents;'
at the top of the file
-Add the following lines to the top of the script
immediately after the first import statement
import com.sun.star.uno.UnoRuntime;
import com.sun.star.frame.XModel;
import com.sun.star.text.*;
5. Add the following lines to the public method doMethod in the HelloNetBeans class.
XModel model = xSc.getDocument();
XTextDocument textdoc = (XTextDocument)
UnoRuntime.queryInterface(XTextDocument.class, model);
XText oText = textdoc.getText();
XTextCursor oCursor = oText.createTextCursor();
oText.insertString(oCursor, "Hello NetBeans",
false);
6. Right click on the HelloNetBeans in the right frame and select save.
7. Right click on the HelloNetBeans
directory and select compile. You should note that
the compile completes successfully from the lower
right hand frame (output window) of NetBeans.
8. Right click on the HelloNetBeans directory
and select build,
In the dialog which appears select the HelloNetBeans.doMethod
and add to scripts , select OK.
A HelloNetBeans parcel file should be built.
9. Right click on the Hello NetBeans parcel file and select Deploy to OpenOffice.org, user.
10. Check that the files have been successfully deployed to <office-install>/user/Scripts/java.
11. Assign an event to execute the script.
- Start OpenOffice.org writer document.
- Select Tools, Scripting
Add On's, Assign Script to Menu.
- In the popup dialog, select
Location - user
Language - Java
Script HelloNetBeans.doMethod
Select File in the Top Level menu
drop down list.
In the New Menu, enter a menu item name
e.g. HelloNetBeans.
Select New, select ok.
- Select File, HelloNetBeans - Hello NetBeans should
be inserted into the document.
All operations should complete successfully.
Test Case: netbeans_02
Test Area: Solaris - Linux - Windows
Test AimCompile and deploy a java script to a document using NetBeans.
Prerequisites
netbeans_01 is executed
before running this test case.
Delete directory <office-install>/user/Scripts/java/HelloNetBeans.
A previously created OpenOffice.org writer document, e.g. TestBindNB.sxw
1. Start NetBeans
Right click on the HelloNetBeans in the right
frame and select the previously opened HelloNetBeans.java file.
Change the "Hello NetBeans" line to "Hello NetBeans
2 ----"
Select File Save.
2. Right click on the HelloNetBeans
directory and select compile. You should note that
the compile completes successfully from the lower
right hand frame (output window) of NetBeans.
3. Right click on the HelloNetBeans directory
and select build,
In the dialog which appears select the HelloNetBeans.doMethod
and add to scripts , select OK.
A HelloNetBeans parcel file should be built.
4. Right click on the Hello NetBeans parcel file and select Deploy to Office Document, select the previously saved test document i.e. TestBindNB.sxw. A warning dialog should warn the user that the douemnt should not already be opened in OpenOffice.org. If the document is opened, close it and select ok.
5. Check that the script has been successfully deployed to the document by running unzip -l TestBindNB.sxw. (Unix) or pkunzip -v TestBindNB.sxw (Windows). You should see the script saved in the document.
6. Assign an event to execute the script.
- Open the TestBindNB.sxw test document.
- Select Tools, Scripting Add On's, Assign Script to Menu.
- In the popup dialog, select
Location - Document,
Language - Java,
Script- HelloNetBeans.doMethod
Select File in the Top Level menu drop
down list.
In the New Menu, enter a menu item name
e.g. HelloNetBeans.
Select New, select ok.
- Select File, HelloNetBeans - Hello NetBeans 2 ----
should be inserted into the document.
Test Case: netbeans_03
Test Area: Solaris - Linux - Windows
Test AimDelete a script deployed to a document using NetBeans.
Prerequisits
netbeans_02 is executed
before running this test case.
1. Start NetBeans.
Mount the file system where TestBindNB.sxw. is stored. If TestBindNB.sxw is opened in OpenOffice.org,
close it.
2. Expand the file TestBindNB.sxw file . Right click on the PARCEL_FILE and select Delete.
3. The Script saved in the office document TestBindNB.sxw should now be deleted.
4. Check that it is deleted by running unzip -l TestBindNB.sxw. (Unix) or pkunzip -v TestBindNB.sxw (Windows). You should see that the previously saved script in the document is now gone.
Test Aim
Generate and deploy a script using the command line interface.
Prerequisits
netbeans_03 is executed before running this test case.
http://framework.openoffice.org/scripting/release-0.2/commandline-devguide.html#prereqs
Set the users CLASSPATH to include
<netbeans-install-dir>/modules.jar
all jar files <office-install-dir>/program/classes/ directory.
all jar files in the xerces installation path directory.
1. Create a new examples directory, e.g. examplesCLI. Create a Contents directory in examplesCLI.
2. Copy the HelloNetBeans.java and HelloNetBeans.class path from the examples directory (HelloNetBeans) previously generated in netbeans_02 to the newly created Contents directory in examplesCLI.
3. Enter the command 'java CommandLineTools -g examplesCLI -l Java'.
You should be prompted that a examplesCLI.sxp file has been generated.
4. Enter the command 'java CommandLineTools -d <absolute path>/examplesCLI.sxp <office-install-dir/share/Scripts.
5. Start OpenOffice.org, Select Tools, Scripting Add On's, Assign Script to Menu.
Select,
Location - Share
Language - Java
Script - HelloNetBeans.doMethod
Create a binding to the File menu, and execute it. HelloNetBeans 2 ---- should be entered in the text document.