Difference between revisions of "Groovy Uno Release Testing"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Download and Build the Source)
(Download and Build the Source)
Line 35: Line 35:
  
 
== Download and Build the Source ==
 
== Download and Build the Source ==
Source packages for the RC are available at: [https://dist.apache.org/repos/dist/dev/openoffice/devtools/].  
+
Source packages for the RC are available at: [https://dist.apache.org/repos/dist/dev/openoffice/devtools/ https://dist.apache.org/repos/dist/dev/openoffice/devtools/].  
  
 
=== Unpack the source jar ===
 
=== Unpack the source jar ===
Line 43: Line 43:
 
Spock functional tests are run as part of the build process and may need edited for the location of the soffice executable.  
 
Spock functional tests are run as part of the build process and may need edited for the location of the soffice executable.  
 
If using Windows or Linux with a soffice executable location other than "/opt/openoffice4/program/".
 
If using Windows or Linux with a soffice executable location other than "/opt/openoffice4/program/".
Edit the two Spock test files for the location of the soffice executable. The files are located in
+
Edit the two Spock test files for the location of the soffice executable. The files to edit are ''src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and UnoSpec.groovy''
src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and UnoSpec.groovy
+
 
The line to edit looks like:
 
The line to edit looks like:
 
<source lang="groovy">
 
<source lang="groovy">

Revision as of 10:42, 19 April 2016

WORK IN PROGRESS

This page is currently under construction.

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????

The test procedure will be:

  1. Download and run a test script that will cause the release candidate artifact to be downloaded from the Apache Nexus staging location.
  2. Download and unpack the signed source files and build with Gradle.
  3. Replace the Downloaded RC jar with the newly built jar.
  4. Edit the test script to remove the staging repository location.
  5. Run the test script again.

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 and Run the Test Script

Download the HelloTextTableShape.groovy test script from AOO Bugzilla Issue 126770 to your local machine. This location will be referred to as the test script location.

The test script is a Groovy rewrite of the HelloTextTableShape.java provided with the SDK. Running the script will download the artifact from Apache Nexus and install it in Groovy's Ivy cache along with other dependencies. On Fedora 20 Linux it is here: ~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar

Edit the script

If using Windows or 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.

Download and Build the Source

Source packages for the RC are available at: https://dist.apache.org/repos/dist/dev/openoffice/devtools/.

Unpack the source jar

This will be the guno-extension test directory

Edit the Spock Tests

Spock functional tests are run as part of the build process and may need edited for the location of the soffice executable. If using Windows or Linux with a soffice executable location other than "/opt/openoffice4/program/". Edit the two Spock test files for the location of the soffice executable. The files to edit are src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and UnoSpec.groovy The line to edit looks like:

String oooExeFolder = "/opt/openoffice4/program/"

Run the Build

(From guno-extension test directory)

gradle jar

Test the Build

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