Dashboard > GreenPepper Open Documentation Refactoring > ... > Confluence plugin > 4. Advanced Confluence
  GreenPepper Open Documentation Refactoring Log In View a printable version of the current page.  
  4. Advanced Confluence
Added by Laurent Cobos, last edited by Francois Denommee on Jun 15, 2010  (view change)
Labels: 
(None)

4. Advanced

GreenPepper logs

Activating the GreenPepper logs is helpful for the GreenPepper support team.

To activate the GreenPepper logs, browse to the Logging and Profiling menu under the Confluence Administration screens. Under the Add New Entry, specify com.greenpepper for the Class/Package Name, select the ALL (or DEBUG) level and then click the Add Entry button.

For older version of Confluence

To activate the GreenPepper logs, you need to add this line

log4j.category.com.greenpepper=TRACE
to the file WEB-INF/classes/log4j.properties under the Confluence webapp directory. You will need to restart Confluence.

Don't forget to de-activate the GreenPepper logs when no more needed

Maven Runner

These are the steps needed to configure the Maven runner.
Before you begin, you must verify the following:

Maven Runner

Configuring a System Under Test can be tedious if you are having a lot of library dependencies. The Maven Runner allow you to use your existing pom.xml to resolve dependencies needed for the execution of specifications. Only the <dependencies> element of the pom.xml is read. Artifacts found will be resolved and added to the classpath of the runner. The artifact of the project itself will also be part of the classpath.

Maven Runner Configuration

  From the Runner Configuration Panel, please follow these steps.

  1. Click on Add a new Runner


  2. Enter the name of your Runner (Mandatory)
  3. Enter the Command line (please refer to Executing a Specification)
    Know that (similar to velocity)
    • ${classpaths} will be replaced by the Runner, SUT and Fixtures classpaths -(Mandatory for GP)
    • ${mainClass} will be replaced by the Runner specified Main Class -(Mandatory for GP)
    • ${inputPath} will be replaced by an input path -(Mandatory for GP)
    • ${outputPath} will be replaced by an output path -(Mandatory for GP)
    • ${locale} will be replaced by the user locale -Default: English (java only)
    • ${repository} will be replace by the repository of the Specification resolver class -Default: FileSystemRepository
    • ${fixtureFactory} will be replaced by the SUT Fixture Factory Class;Fixture Factory Args -Default: CoreFixtureFactory
    • ${projectDependencyDescriptor} will be replaced by the project dependency descriptor file location-(Mandatory for the Maven runner)
      Example of a command line:
      java -mx252m -cp ${classpaths} ${mainClass} ${inputPath} ${outputPath} -l ${locale} -r ${repository} -f ${fixtureFactory} --xml --pdd ${projectDependencyDescriptor}
  4. The main class : com.greenpepper.maven.runner.Main -(Mandatory, main Maven runner class)
  5. The Server name and port (if you are using the Remote agent)


  6. Click Save
  7. Enter the location of your Runner library and its dependencies.
    • GreenPepper Maven Runner library
      • greenpepper-maven-runner-x.x-complete.jar
    • Maven libraries
      • maven-2.x.x-uber.jar from the lib directory of your Maven home
      • classworlds-1.1.jar from the boot directory of your Maven home

System Under Test Configuration

Make sure your Confluence Space is registered as a GreenPepper Project (see)

From the Space Registration Panel, please follow these steps.

  1. Click on Add a new System Under Test
  2. Enter the name of your System Under Test (Mandatory)
  3. Select your Maven runner (Mandatory)
  4. Enter the Fixture factory to use (optional)
  5. Enter the Fixture arguments (optional)
  6. Enter the Project Dependency Descriptor (Mandatory)
    • Since we are using Maven, there is 2 possibilities :
      • use a valid Project Object Model file (pom.xml)
      • NEW in 2.8 use the groupId:artifactId:version (Maven Coordinates) where the version can be a Version Ranges
        Ex:
        greenpepper-open:greenpepper-core:2.7
        greenpepper-open:greenpepper-extensions-db:[2.7,)

        You may need to add required repositories to the settings.xml of Maven (or routing all repositories using the mirrors) using the coordinates.
  7. Click Save

Maven Plugin Fixture Artifact Dependency

By default, the Maven Runner will detect if the pom.xml is using the Maven Plugin to create fixture artifact. If so, the fixture artifact will be automatically added to the list of dependencies.

However, if you want to use a fixture artifact from another project, you will need to add the <dependency> of that project with <classifier>fixtures</classifier>.

NEW in 2.7.1/2.8.1/2.9 scopes
You can now specify scope on the command line (by default, runtime and compile are always use) :

--scope provided

Remote Agent

The remote agent is a small server that can be used to execute specifications from a GreenPepper Server to another machine.

This Agent is an answer to many purposes like this examples :

  1. Your GreenPepper server is installed on a unix machine and you need to execute .Net specifications on a windows machine.
  2. You do not want to execute your specifications directly on your GreenPepper Server.

Requirements

GreenPepper Remote Agent installation

The remote agent is a simple executable java application that can be found here.

  1. Copy the remote agent Jar file on the machine where your GreenPepper Server will sends its remotes executions.
  2. To launch the remote agent, just double-click on the Jar file or by command line.
Command line to start the remote agent with default settings :
java -jar greenpepper-remote-agent-x.x-complete.jar
Command line to start the remote agent on a specified port :
java -jar greenpepper-remote-agent-x.x-complete.jar -port <MyPortNumber>
By default, the Remote Agent is listening on port 56000

Secured mode

The communication between your GreenPepper server and your agent can be secured with SSL.

Requirements

  • 1. On Remote Agent
    Your Remote Agent must be version 1.3 or higher
    You must have a KeyStore properly configured see Configuring my Agent keystore
  • 2. On GreenPepper Server
    Your GreenPepper Server must be version 1.3 or higher
    You must have the agent certificate stored in your java cacerts file see Importing the Agent certificate

Enabling Secured Mode

  • On the remote agent
    To enable Secured mode start the remote agent with this command line :
    java -jar greenpepper-remote-agent-x.x-complete.jar -secured -keystore <path to your keystore file>
    
  • On GreenPepper Server
    In Confluence or XWiki, get in GreenPepper Server Configuration, then Select the remote runner to be secured and just check the box "Secured Mode".

Configuration File

Starting with version 2.1, the remote agent can use a property file to specify parameters (instead of the command line parameters). By default, the remote agent will look for a property file remoteagent.properties in the current directory. You can also use the command line parameter -config [path of the configuration file] to override the default property file.

Command line parameter Configuration file entry Default Value
-port greenpepper.remoteagent.port 56000
-secured greenpepper.remoteagent.secured=[true or false] false
-keystore greenpepper.remoteagent.keystore.file=[path of the keystore file] * Mandatory if secured=true
  greenpepper.remoteagent.keystore.password=[the password of the keystore file] * Mandatory if secured=true and the keystore require a password

The property greenpepper.remoteagent.keystore.password replace the command line input of the keystore password at remote agent startup.

Using SSL

HTTPS

You would need to setup your Web Container to server HTTPS requests.

Create a test certificate

I. Generating your key pair

keytool -genkey -alias greenpepper -keyalg RSA -keystore c:\greenpepper.keystore
Be Careful

When keytool will ask you to enter your First and Last name, you have to enter the network machine name (ex: myserver) or the domain name of your server (ex: www.myserver.com) where resides the your web container.

II. Generating a self signed certificate

keytool -selfcert -alias greenpepper -keystore c:\greenpepper.keystore
keytool -export -alias greenpepper -keystore c:\greenpepper.keystore -file c:\greenpepper.cer

III. Importing the certificate to a Certificate Authority store

You have two solutions :

  • Inside your JVM

The certificate must be imported in the Java Virtual Machine used by tomcat.
Supposing your tomcat JVM location is C:\Program Files\Java\jdk1.6.0_02\

keytool -import -alias greenpepper -file c:\greenpepper.cer -keystore "C:\Program Files\Java\jdk1.6.0_02\jre\lib\security"\cacerts
Default Cacerts password

The default java Cacerts keystore password is "changeit"


  • Creating a standalone 'cacerts'
keytool -import -alias greenpepper -file c:\greenpepper.cer -keystore c:\greenpepper.cacerts


Adding SSL support for Tomcat with the test certificate

Uncomments the definition of the SSL HTTP/1.0 Connector and specify attribute keystoreFile and keystorePass :

    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="c:\greenpepper.keystore"
               keystorePass="[WIP:the password of the keystore]" />


Start tomcat and using your internet browser, navigate to https://www.myserver.com:8443. You should be alerted to accept the certificate.

  • If you are using Firefox, you should see :


Hint : Select Accept this certificate permanently and click ok

  • If you are using Internet Explorer, you should see :


Hint : Click on Continue to this web site (not recommended)

Hint : Click on Certificate Error

Hint : Click on View Certificates

Hint : Click on Install Certificate , follow the instructions and restart Internet Explorer when done

Runner Configuration

Java Runner

You would need to tell your runner the location of the trustStore and the password on the command line (Optional if you imported the certificate in the JVM)

java -Djavax.net.ssl.trustStore=c:\greenpepper.cacerts -Djavax.net.ssl.trustStorePassword=[WIP:the password of the trustStore] -mx252m ...
.Net Runner

You only need to accept the certificate when navigating to https://www.myserver.com:8443 using Internet Explorer.

Troubleshooting : if for some reason the .Net runner doesn't work, try C# example from Using Trusted Roots Respectfully. You may need to recompile your the GreenPepper - Open .Net binaries from source.

Confluence / Jira Repository Update

From Confluence / Jira, make sure the base url is using https on port 8443 (goto Adminstration / General Configuration).

  • For each Confluence Space's Registration repository, click edit and update (without changing anything, the repository url will be updated using the actual base url)
  • For each Jira Project Registration repository, click edit and update

Using the Eclipse Plugin

If you are using the Eclipse Plugin, you would need to perform the following steps :

  • Add information about the truststore and password to the eclipse.ini (Optional if you imported the certificate in the JVM)
    -Djavax.net.ssl.trustStore=c:\greenpepper.cacerts
    -Djavax.net.ssl.trustStorePassword=[WIP:the password of the trustStore]
    
  • Change the Server's context path to use https on port 8443


Using the Visual Studio Plugin

You only need to accept the certificate when navigating to https://www.myserver.com:8443 using Internet Explorer.

GreenPepper logs (GreenPepper Open Documentation Refactoring )
Maven Runner (GreenPepper Open Documentation Refactoring )
Using SSL (GreenPepper Open Documentation Refactoring )

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators