Difference between revisions of "Groovy Uno Release Testing"

From Apache OpenOffice Wiki
Jump to: navigation, search
(created page)
 
Line 1: Line 1:
 
__TOC__
 
__TOC__
== This is in progress ==
+
== Overview ==
 +
This page is to document the testing procedure for a Groovy UNO Extension release candidate.
 +
For information on the extension see the [[Groovy_UNO_Extension]] wiki page.
 +
The current release candidate is guno-extension-0.1.4 r????
 +
 
 +
== Prerequisites ==
 +
To run the test script you need a Java JDK and Apache Groovy because Groovy scripts are compiled at runtime.
 +
To build the extension from source you also need Gradle.
 +
 
 +
Download the test script from bugzilla
 +
 
 +
If using Windows or a Linux with a soffice executable location other than "/opt/openoffice4/program/".
 +
Edit the test script for the location of the soffice executable.
 +
A Windows example would look like: "C:/Program Files (x86)/OpenOffice 4/program"
 +
 
 +
Run the script from the download location
 +
groovy HelloTextTableShape.groovy
 +
 
 +
The script should bootstrap the office and add sample content to some of the applications using the guno-extension jar.
 +
Close OpenOffice after the test.
 +
 
 +
running the script should download the jars to the local Groovy Ivy cache
 +
On my Fedora Linux machine it is here:
 +
~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar
 +
 
 +
 
 +
Testing the downloaded source
 +
-------------------------------
 +
 
 +
unpack the source jar
 +
This will be the guno-extension test directory
 +
 
 +
If using Windows or a Linux with a soffice executable location other than "/opt/openoffice4/program/".
 +
Edit the two spock test files for the location of the soffice executable.
 +
src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and UnoSpec.groovy
 +
The default location is:
 +
String oooExeFolder = "/opt/openoffice4/program/"
 +
 
 +
Do the test build.
 +
(From guno-extension test directory)
 +
gradle jar
 +
 
 +
rename the downloaded jar in the local Groovy Ivy cache
 +
(From guno-extension test directory)
 +
mv ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.save
 +
 
 +
copy the test jar into it's place
 +
cp ./build/libs/guno-extension-0.1.4.jar ~/.groovy/grapes/org.openoffice/guno-extension/jars/
 +
 
 +
edit the HelloTextTableShape.groovy script and comment out the grab resolver for the staging area.
 +
Groovy should find the newly built jar in the Ivy cache.
 +
// @GrabResolver(name = 'guno', root = 'https://repository.apache.org/content/repositories/orgapacheopenoffice-1019/')
 +
 
 +
run the script again to test the newly built jar.
 +
 
 +
groovy HelloTextTableShape.groovy
 +
 
 +
Once finished you can remove the test jar from Ivy and rename the guno-extension-0.1.4.save back to .jar
  
 
[[Category:API]]
 
[[Category:API]]

Revision as of 00:17, 19 April 2016

Overview

This page is to document the testing procedure for a Groovy UNO Extension release candidate. For information on the extension see the Groovy_UNO_Extension wiki page. The current release candidate is guno-extension-0.1.4 r????

Prerequisites

To run the test script you need a Java JDK and Apache Groovy because Groovy scripts are compiled at runtime. To build the extension from source you also need Gradle.

Download the test script from bugzilla

If using Windows or a Linux with a soffice executable location other than "/opt/openoffice4/program/". Edit the test script for the location of the soffice executable. A Windows example would look like: "C:/Program Files (x86)/OpenOffice 4/program"

Run the script from the download location groovy HelloTextTableShape.groovy

The script should bootstrap the office and add sample content to some of the applications using the guno-extension jar. Close OpenOffice after the test.

running the script should download the jars to the local Groovy Ivy cache On my Fedora Linux machine it is here: ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar


Testing the downloaded source


unpack the source jar This will be the guno-extension test directory

If using Windows or a Linux with a soffice executable location other than "/opt/openoffice4/program/". Edit the two spock test files for the location of the soffice executable. src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and UnoSpec.groovy The default location is: String oooExeFolder = "/opt/openoffice4/program/"

Do the test build. (From guno-extension test directory) gradle jar

rename the downloaded jar in the local Groovy Ivy cache (From guno-extension test directory) mv ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.save

copy the test jar into it's place cp ./build/libs/guno-extension-0.1.4.jar ~/.groovy/grapes/org.openoffice/guno-extension/jars/

edit the HelloTextTableShape.groovy script and comment out the grab resolver for the staging area. Groovy should find the newly built jar in the Ivy cache. // @GrabResolver(name = 'guno', root = 'https://repository.apache.org/content/repositories/orgapacheopenoffice-1019/')

run the script again to test the newly built jar.

groovy HelloTextTableShape.groovy

Once finished you can remove the test jar from Ivy and rename the guno-extension-0.1.4.save back to .jar

Personal tools