Dashboard > GreenPepper Open Documentation Refactoring > ... > Confluence plugin > Full Confluence plugin guide - HTML
  GreenPepper Open Documentation Refactoring Log In View a printable version of the current page.  
  Full Confluence plugin guide - HTML
Added by Laurent Cobos, last edited by Laurent Cobos on Aug 14, 2009  (view change)
Labels: 
(None)

Full Confluence plugin guide

Confluence is an enterprise wiki that makes it easy to create and share documents.
It also offers a powerful Plugin architecture that allows us to write plugins that change the way things work or add entirely new functionalities.
So this led us to the conclusion that Confluence was a good choice for a Test document repository.

1. Installation

Do not use the Plugin Manager
In most cases, the plugin manager have class loading issue that will make GreenPepper to not work properly. Instead of using the plugin manager, copy the confluence-greenpepper-plugin-xx-complete.jar to directory WEB-INF/lib of your Confluence.

If you previously installed GreenPepper using the plugin manager, uninstall it before doing the file copy.

Note : You will need to shutdown and restart Confluence between the file copy.

The installation of GreenPepper is no different from any other Confluence plugin installation.
Simply upload your confluence-greenpepper-plugin-xx-complete.jar via your Plugin Manager
Confluence - Administration - Plugins.

Upgrade

The upgrade of GreenPepper is no different from any other Confluence plugin upgrade.

1. Uninstall your confluence-greenpepper-plugin-old.jar via your Plugin Manager
2. Re-Upload your confluence-greenpepper-plugin-new.jar via your Plugin Manager

Uninstall

If you really want to uninstall GreenPepper, simply uninstall your confluence-greenpepper-plugin-xxx.jar via your Plugin Manager

2. Configure GreenPepper Confluence plugin

GreenPepper plugin setup

Confluence Server Base Url

If you expose the Confluence server to the oustide world (other than localhost), make sure the Server Base Url of Confluence found is the external URL of the server.

This property is found under the General Configuration of the Administration of Confluence.

Note : If you change this URL when existing Spaces have been registered as GreenPepper project, you will need to refresh each project by clicking the Edit link then the Save link on the Space Registration form of the Space Administration or on the Project Management tab of the configuration of the GreenPepper plugin.

Here are the panes that will be accessible from your GreenPepper Toolbox plugin Configuration.

  • Database setup: GreenPepper has its own database to store multiple data such as executions results, references and so on.
    You will have two options:
    1. Quick install: a HSQL will be created locally. This setup is not suggested for a production environment, it was put inplace for quick trial setup purposes.
    2. Custom install: This will allow you to setup GreenPepper to use an external DBMS via a JNDI name.

  • Licence manager: From where you will be able upload your licence and see your licence details

  • Runner: Your runners configuration pane.
    You will be able to add/remove/update your runners (GreenPepper Open; Test engine)
    Java Runner

    The most recent Java runner will be available by default. At each start of Confluence, we make sure there is a Java Runner matching the GreenPepper plugin version.

    .Net Runner
    Default command line : .../GreenPepper.exe ${inputPath} ${outputPath} -a ${classpaths} -r ${repository} -f ${fixtureFactory} --xml
    Main class : leave it empty
    Environment : .NET
    Classpaths
    (mandatory) :
    .../GreenPepper.Core.dll
    .../GreenPepper.Extensions.dll
    .../CookComputing.XmlRpc.dll

    All required assemblies are found in the GreenPepper Open .Net binaries.
    Note : You need to specify the full path for the Assembly files and the GreenPepper.exe file.

    Maven Runner
    Default command line : java -cp ${classpaths} ${mainClass} ${inputPath} ${outputPath} -l ${locale} -r ${repository} -f ${fixtureFactory} --xml --pdd ${projectDependencyDescriptor}
    Main class : com.greenpepper.maven.runner.Main
    Environment : JAVA
    Classpaths
    (mandatory) :
    .../apache-maven-2.0.x/lib/maven-2.0.x-uber.jar
    .../apache-maven-2.0.x/boot/classworlds-1.1.jar
    .../greenpepper-maven-runner-x.x-complete.jar

    Note : You need to specify the full path for the classpath files.
    More info Maven Runner.

  • Project Management: Your Space registration to GreenPepper.
    From this pane you will be able to:
    1. Associate your Confluence spaces to GreenPepper projects.
    2. Set your GreenPepper credentials to be able to run the tests if the space is secured.
    3. Add/Remove/Edit your System under tests for a specific GreenPepper project.

Confluence Space setup

I. Using GreenPepper theme

The Theme is a plug-and-play plugin giving access to all GreenPepper functionalities once it has been set.
You can set the GreenPepper Theme from the Space admin panel or Global admin panel.
The drawback of using the Theme is that you will not be able to customize your layouts (e.g. page, space, template) or, if already customized, your customization will be ignored.
Two themes are available.

  1. The GreenPepper Colour Theme provides the GreenPepper colour palette.

  2. The GreenPepper Theme provides the GreenPepper colour palette and overrides the default ( or custom) page layout.The page layout automatically includes:
  • the GreenPepper header (Execute button and reference list at the top of the page)
  • the GreenPepper body (allows GreenPepper to print out test results)



Caution with the GreenPepper theme
We cannot guaranty the behavior of the theme between Confluence upgrades. We do not have control on the default page layout of Confluence. This one may vary from a version to another. We advise you to manually configure your page layout. See Confluence Plugin Setup.
Confluence 2.8 and up
If you are not using the GreenPepper Plugin v2.2+, the theme should be configured manually (see below)

II. Manual configuration

First, you need to add the following to your Page Layout:



Confluence version 2.8 and up

  You need to replace the following in your Page Layout:

<div class="wiki-content">       
  $body     
</div>
By
<table cellspacing="0" width="100%">
  #parse($greenPepper.header)
</table>
#parse($greenPepper.body)

Previous version of Confluence

Copy #parse($greenPepper.header) at the designated place in the vm. (See bellow)

## VIEW    
 #if ($mode == "view")      
 #set ($labelable = $page)      
 #permitSearchEngines()      
  <table width="100%" style="margin-bottom: 5px" cellspacing="0">        
   <tr>          
    <td align="left" valign="top">            
     <span class="smalltext">              
     #editReport()              
     #parse ("/labels/labels-include.vm")            
    </span>          
   </td>
   Test          
   <td align="right" valign="top">            
    #if(\!$action.anonymousUser && \!$action.isPrintableVersion())              
     <div style="padding: 5px; width: 40px; border: 1px solid #cccccc; margin: 0px">...            
    #end          
   </td>        
  </tr> 
<\!-\\\\\\\- PLACE THIS HERE \-->  
  #parse($greenPepper.header)  
<\!-\\\\\\\- PLACE THIS HERE \-->      
  </table>      
  #if ($helper.isHistoricalVersion())

  Then, you need to replace the following in your Page Layout:

<div class="wiki-content">       
  $body     
</div>
By
#parse($greenPepper.body)



Register a Space to use GreenPepper

I. Goal of the registration

The goal of the repository registration is to regroup available specifications and requirements repositories under a single common GreenPepper project so that, when linking specifications to requirements, we can concentrate on related repositories. Here is an overview of the domain:

II. How to register a repository

To register your repository to GreenPepper server, follow these steps:

  1. Click the Space Registration tab, then click Register.


  2. Select the GreenPepper project to which you want to associate your repository to.
  3. Enter the alias to identify your JIRA project Or Confluence Space (i.e. MYJIRA-PROJECTNAME).
  4. In order to restrict access, enter the username and password of a Confluence and/or JIRA user. This restriction will be applied to Confluence, JIRA and any other plugins accessing or executing the executable specifications.
  5. From the list, select a system under test, if any available.
  6. Click Save.


    N.B.:
    You may add a new GreenPepper project by selecting New Project from the GreenPepper Project Name dropdown list.


3. Use

Make a page executable

As you might have already noticed, Pages in registered spaces have a checkbox labeled GreenPepperized. Checking it will automatically register the document in the server. The default System Under Test will be automatically associated to your newly executable page.






I. Configurating your executable page

You might want to associate your page to other Systems Under Test. To do so, click the Configuration button.
You can now remove or add System Under Test associations. This is important if you want the greenpepper-labels or greenpepper-children macro to select your page.






II. Executing your page

You can now Execute your page. Next to the Execute button you will find which System Under Test will be involved. If you need to select another System Under Test, click the Edit button and select the desired System Under Test. The dropdown list only contains the Systems Under Test configured in step I.






III Getting versioning information

You will see in the right-hand side of your GreenPepper header the versioning information of your page.
There is two possible states:

  1. Implemented indicates that the specification has committed source code that verifies all its examples.
  2. Working indicates that the document has been updated since the last Implemented state.
    Both states are executable.

        The most recent version is the Implemented version

        The Implemented version

        The most recent version differs from the Implemented version

    Clicking on Set as Implemented will set the current version of the page as the Implemented version.


IV Reverting to a previous version

An easy revert feature is provided. Reverting will set the previous implemented version as the actual implemented version.





GreenPepper Confluence Macros

Children Macro

  Description: This macro can execute a batch of documents resulting from a page hierarchy.
  Syntax: {greenpepper-children}
  Optional parameters:

  • all: Default --> false
    If set to true, the complete hierarchy of the parent page will be included in the execution list.
    Otherwise only the first-level children will be included.
  • spaceKey: Default --> Macro's residing space
    You can specify a specific space for your parent page.
  • pageTitle: Default --> Macro's residing page
    You can specify a specific title for the parent page.
  • title: Default --> blank
    You can specify your own title.
  • expanded: Default --> false
    You can ask for the list to be expanded on page load.
  • suts: Default --> All
    You can narrow the list to specific Systems Under Test (1 or more; if more than one they must be separated by a comma).
  • group: Default --> PAGE
    You can regroup all your macros in a page under a group name. (See Group Macro.)
  • sort Default --> Hierarchical sort
    You can configure the way children are sorted. Choose Creation to sort by content creation dates, Title to sort alphabetically by titles and Modified to sort by modification dates (last date first).
  • reverse Default --> false
    You can reverse the sorting sequence.
  • openInSameWindow Default --> false NEW in v2.1
    You can control whether or not the link to the specification will open in the same window.
EXAMPLE
{greenpepper-children:spaceKey=BNKT|pageTitle=Example - Banking Account System|expanded=true}

Example macro

  Description: This macro allows you in the lazy mode to annotate tables and/or bullet lists that you do want to be processed as executable specifications within your executable documents.
  Syntax: {greenpepper-example} your example table(s)/list(s) {greenpepper-example}
  Optional parameters:

  • title: Default --> blank
    You can specify your own title.
  • bgcolor: Default --> NONE
    You can change the backgound color of the Info section (ex.: red, blue, grey, lightgrey, green and hexadecimal colors).
If you omit to close your example section, the end of the document will be considered as the end of it


Group Macro

  Description: This macro regroups all GreenPepper macros labeled under the same group under a single execution button.
  Syntax: {greenpepper-group}
  Optional parameters:

  • group: Default -> PAGE
    The group name
  • title: Default -> blank
EXAMPLE
{greenpepper-group:title=My Group 1|group=Group 1}

The Macros
{greenpepper-children:spaceKey=BNKT|pageTitle=Example - Banking Account System|expanded=true}
{greenpepper-labels:spaceKey=GREENPEPPER|labels=resolution|expanded=true|title=Resolution seeds}

Hierarchy Macro

  Description: This macro retrieves JIRA's version hierarchy for the given version name or link type of a project.
  Syntax: {greenpepper-hirearchy}
  Mandatory parameters:

  • gpUrl: The URL of your server (i.e. http ://mydomain:8080/confluence).


  • gpService: The handler (i.e. *greenpepper1).


  • jiraUid: The Repository UID of your JIRA project. (See [Repository registration].)
  • versionName: The version name of your JIRA project for which you want to view the hierarcy.
  • linkName: The JIRA link type name to draw the hierarchy on.
  • user: Your JIRA user name.
  • pwd: Your JIRA password.
EXAMPLE
{greenpepper-hierarchy:gpUrl=http://www.greenpeppersoftware.com/confluence|
                       gpService=greenpepper1|
                       jiraUid=Jira-BANK|
                       versionName=Iteration 1|
                       linkName=Detail|
                       user=***|pwd=***}

Broken (It should be working in the next release.)

Begin Info
MACRO-{greenpepper-hierarchy}
This Space is not registered in GreenPepper Server.
End Info

Historic Macro

  Description: This macro creates a Chart image of the latest historic data of a page execution. The image created provide clickable area to display the specific execution result.
  Syntax: {greenpepper-historic}

  Optional parameters:

  • pageTitle: Default --> Macro's residing page
    The page title you want to show historic.
  • spaceKey: Default --> Macro's residing space
    You can specify a specific space for your page.
  • sut: Default --> selected System Under Test of the page
    The System Under Test name of the page
  • maxresult: Default --> 30
    The maximum number of the latest historic data entry to show
  • width: Default --> 500
    The width of the chart in pixels
  • height: Default --> 500
    The height of the chart in pixels
  • border: Default --> false
    Indicate to use a border for the chart image
  • showignored: Default --> false
    Indicate to show the count of ignored tests
  • children: Default --> false
    This parameter present a summary Chart containing an aggregation of execution result. If set to first, aggregation will be done for all first level children of the specified page. If set to all, the aggregation will be done with the complete hierarchy of the specified page.
  • labels: Default --> none
    Labels to base the search when doing the aggregation of execution result of pages
    Using the , as the label separation is equivalent to an OR query. So label1,label2 will retrieve all pages labeled by label1 OR/AND label2
    Using the & as the label separation is equivalent to an AND query. So label1&label2 will retrieve all pages labeled by label1 AND label2
{greenpepper-historic:pageTitle=Cell Decoration|
                       spaceKey=GREENPEPPER|
                       sut=GreenPepperOpen - Core Java|
                       maxresult=20|
                       width=700|
                       height=500|
                       border=true|
                       showignored=true}



{greenpepper-historic:pageTitle=Home|
                       spaceKey=GREENPEPPER|
                       sut=GreenPepperOpen - Core Java|
                       maxresult=20|
                       width=700|
                       height=500|
                       border=true|
                       showignored=true|
                       children=first}



Saving historic data from a local execution or a continuous build server

When executing specification locally or through a continuous build server, result are not saved automatically since they are deconnected from the Confluence plugin (only the specification page is retrieved).
Starting from version 2.2, we can post back the execution result using the repository implementation com.greenpepper.runner.repository.GreenPepperRepository (Java) or Greenpepper.Repositories.GreenPepperRepository (.Net). A new parameter must be added to the URL : postExecutionResult=true.

Example using the GreenPepper Maven Plugin :

Example using the GreenPepper Maven Plugin
<repositories>
        <repository>
            <type>com.greenpepper.runner.repository.GreenPepperRepository</type>
                <root>
                    <![CDATA[http://.../confluence/rpc/xmlrpc?handler=greenpepper1&sut=Java&includeStyle=false&postExecutionResult=true]]>
                </root>
                <name>greenpepper</name>
                <suites>
                    <suite>GreenPepper Confluence-GREENPEPPER</suite>
                </suites>
        </repository>
    </repositories>

Import Macro

  Description: This macro allows you to import classes into your executable document without polluting it with undesirable and unmeaningful user tables.
  Syntax: {greenpepper-import: my.class.to.import | some.other.class.to.import | ... }

EXAMPLE
{greenpepper-import:my.class.to.import|some.other.class.to.import}

This will generate the following hidden table:

import
my.class.to.import
some.other.class.to.import


Include Macro

  Description: This macro allows you to include pages content into Executable document allowing for example, to define a setup and a tear down page and include it in executable pages avoiding duplication.
  Syntax: {greenpepper-include}
  Mandatory parameteres:

  • pageTitle: The page title you want to include

  Optional parameteres:

  • spaceKey: Default --> Macro's residing space
    You can specify a specific space for your included page.
  • title: Default --> Macro's residing pageTitle
  • expanded: Default --> false NEW in 2.4
    You can ask for the included page to be expanded on page load.



EXAMPLE
{greenpepper-include:pageTitle=My Setup}


Info Macro

  Description: This macro allows you to create tables and/or bullet lists that you do not want to be processed as executable specifications within your executable documents.
  Syntax: {greenpepper-info} your body {greenpepper-info}
  Optional parameters:

  • title: Default --> blank
    You can specify your own title.
  • bgcolor: Default --> NONE
    You can change the backgound color of the Info section (ex.: red, blue, grey, lightgrey, green and hexadecimal colors).
This macro also allows you to insert into your executable document, other macros that generate tables or bullet lists.
For more information on the Info Tag, please refer to
Info Tag example.
If you omit to close your info section, the end of the document will be considered as the end of it


EXAMPLES
Wiki Markup Result

{greenpepper-info}
* My bullet list
* Some information
{greenpepper-info}

  • My bullet list
  • Some information
Wiki Markup Result
{greenpepper-info}
{info:title=Some info}{info}
{greenpepper-info}
My Macro generating a table
Some info


Labels search Macro

  Description: This macro can execute a batch of documents resulting from a label search.
  Syntax: {greenpepper-labels}
  Optional parameters:

  • spaceKey: Default --> None
    You can narrow the label search to a specific space.
    If none is specified, the available GreenPepperized spaces will be in a select list.
  • labels: Default --> None
    You can pre-enter the labels to base the search on.
    Using the , as the label separation is equivalent to an OR query. Therefore, label1,label2 will retrieve all pages labeled by label1 OR label2.
    Using the & as the label separation is equivalent to an AND query. Therefore, label1&label2 will retrieve all pages labeled by label1 AND label2.
  • title: Default --> blank
    You can specify your own title.
  • expanded: Default --> false
    You can ask for the list to be expanded on page load.
  • suts: Default --> All
    You can narrow the list to specific Systems Under Test (1 or more; if more than one they must be separated by a comma).
  • group: Default --> PAGE
    You can regroup all your macros in a page under a group name. (See Group Macro.)
  • sort Default --> NONE
    You can configure the way children are sorted. Choose Creation to sort by content creation dates, Title to sort alphabetically by titles and Modified to sort by modification dates (last date first).
  • reverse Default --> false
    You can reverse the sorting sequence.
  • openInSameWindow Default --> false NEW in v2.1
    You can control whether or not the link to the specification will open in the same window.
EXAMPLE
{greenpepper-labels}

{greenpepper-labels:spaceKey=GREENPEPPER}

{greenpepper-labels:spaceKey=GREENPEPPER|labels=resolution & seed|expanded=true}


Manage Macro

  Description: This macro retrieves JIRA references for a specific project filtered by the specified version name.
  Syntax: {greenpepper-manage}
  Mandatory parameters:

  • gpUrl: The URL of your server (i.e. http ://mydomain:8080/confluence).


  • gpService: The handler (i.e. *greenpepper1).


  • jiraUid: The repository UID of your JIRA project. (See [Repository registration].)
  • versionName: The version name of the JIRA project you want to view. (ALL will view all versions.)
  • user: Your JIRA user name.
  • pwd: Your JIRA password.
LIVE EXAMPLE
{greenpepper-manage:gpUrl=http://www.greenpeppersoftware.com/confluence|
                       gpService=greenpepper1|
                       jiraUid=GreenPepper Jira-BANK|
                       versionName=Release 1|
                       user=***|pwd=***}
Begin Info
MACRO-{greenpepper-manage}: Invalid JIRA Project name.
Your selection: Project: Unknown - Version: Unknown
Available selections:
* Project: GreenPepper - Versions: Sprint 10/27 (1.1M1), Sprint 11/10 (1.1M2), Sprint 11/24 (1.1M3), Sprint 12/08 (1.1M4), Sprint 2007/01/02 (1.1M5), Sprint 2007/01/19 (1.1M6), Release 1.1, Marketing 2007/02/23, Sprint 2007/02/23 (1.2M1), Sprint 2007/03/16(1.2M2), Sprint 2007/03/30 (1.2M3), Sprint 2007/04/20 (1.2M4), Release 1.2, Semaines Pedagogiques (Release 1.2), Marketing 2007/07/20, Fridge, Back Burner, Sprint 2007/05/25 (1.3m1), Sprint 2007/06/15 (1.3m2), Sprint 2007/07/06 (1.3m3), Marketing 2007/08/10, Sprint 2007/07/27 (1.3m4 QA), Release 1.3, Release 1.3.1, Release 2.1, Release 2.0, Sprint 2.1M1, Sprint 2.0M1, Sprint 2.0M2, Sprint 2.0M3, Sprint 2.0M4, Sprint 2.1M2, Sprint 2.1M3, Sprint 2.1M4, Sprint 2.1M5, Release 2.2, Sprint 2.2M1, Sprint 2.2M2, Sprint 2.2M3, Release 2.3, Sprint 2.3M1, Sprint 2.3M2, Sprint 2.4M1, Release 2.4, Sprint 2.4M2, Sprint 2.5M1, Sprint 2.5M2, Sprint 2.5M3, Release 2.5, WISH LIST, Sprint 2.6M1, Release 2.6, Sprint 2.6M2, Sprint 2.6M3, Sprint 2.7M1, Sprint 2.7M2, Sprint 2.7M3, Release 2.7, Sprint 2.8M1, Sprint 2.8M2, Release 2.8, Sprint 2.9M1, Release 2.9, Marketing, À faire cette semaine, Marketing Dec - Jan, Marketing Février
* Project: GreenPepper Ruby - Versions: Sprint S8-7, Sprint S8-6, Sprint S8-5, Sprint S8-4, Sprint S8-3, Sprint S8-2, Sprint S8-1, Sprint S8-0, Sprint été, Sprint 3, Sprint 2, Sprint 1, Release 1, Phase de démarrage
* Project: Marketing Pepper - Versions: Backlog, Septembre 2010, Janvier 2011
* Project: GreenHopper JIRA - Versions: Release 1.2.1, Release 1.3, Release 1.4, Release 1.5, Release 1.6, Sprint 1.7M1, Sprint 1.7M2, Sprint 1.7M3, Release 1.7, Release 1.7.1, Modeling Session, Release 2.0, Release 2.1, Release 2.1.1, Sprint 2.2M1, Sprint 2.2M2, Release 2.2, Release 2.3, Release 2.3.1, Release 2.3.2, Release 2.4, Release 2.5, Sprint 2.5M1, Sprint 2.5M2, Release 2.5.1, Sprint 3.0M1, Sprint 3.0M2, Release 3.0, Release 3.0.1, Release 3.0.2, Release 3.1, Release 3.1.1, Release 3.2, Release 3.2.1, Release 3.3, Release 3.4, Release 3.5, Release 3.6, Release 3.7, Release 3.7.1, 3.7.2 - Atlassian Summit, Release 3.8, Sprint 4.0M3, Sprint 4.0M2, Sprint 4.0M1, Release 4.0, Blocked Issues/Requests, Wish list
* Project: Bank (For demo) - Versions: Release 1, Sprint 1, TODO
* Project: GreenPepper Demo - Versions: Sprint 1, Release 1, Sprint 2
* Project: Whiteboard Plugin - Versions: 1.1, 1.2, Release 1.3, Release 1.4, Release 1.5, Sprint 1.5M1, Sprint 1.5M2, Releaes 1.5.1, Release 1.6, Release 1.6.1
* Project: GreenPepper C++ - Versions: Sprint 1.7, Sprint 1.6, Sprint 1.5, Sprint 1.4, Sprint 1.3, Sprint 1.2, Sprint 1.1, Release 1.0
* Project: Urban Turtle - Versions: Release 1, Sprint 1M1, Sprint 1M2, Sprint 1M3, Sprint 1M4, Sprint 1M5, Sprint 1M6, Sprint 1M7, Sprint 1M8, Sprint 1M9, Release 1rc, Sprint 1rcM1, Sprint 1rcM2, Release 1.1, Release 1.2, Sprint 1.2M1, Sprint 1.2M2, Sprint 1.1M1, Sprint 1.1M2, Sprint 1.1M3, Sprint 1.1M4, Sprint 1.2M3, Release 1.3, Release 1.4, Sprint 1.3M1, Sprint 1.3M2, Sprint 1.4M1, Sprint 1.4M2, Release 1.5, Sprint 1.5M1, Sprint 1.5M2, Release 1.6 (Refactoring), 1.6M1 - Refactoring, 1.6M2, Release 1.7 (Configuration), Release 1.8 (Template independant), Sprint 1.7M1, Refonte Site Web
* Project: Sandbox - Versions: Sprint 1, Release 1, Sprint 1 r2, Release 2, Sprint 2, Sprint 3, Spint 4, Iteration 2, Iteration 1, Iteration 0, Iteration 'n', version vide
* Project: Minyaa Suite - Versions: 1.0, 1.0-M1, 1.0-M2, 1.0-M3, 1.0-M4
* Project: Workflow Designer - Versions: Sprint 0, Release 1, Sprint 1M1, Sprint 1M2, Sprint 1M3
End Info
Note:
Some functionalities are blocked such as the possibility to add references. The user that we used has restricted permissions to prevent undesired handling.


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.

5. FAQ

I keep having an error message when I try to create a new test case.

To be able to create a test case (a link between a requirement and a test document), you need a registered TEST repository such as a space from Confluence and a registered Requirement repository (such as a JIRA project) on the same project. Make sure a system under test has been defined for your project .

I do not see the GreenPepperized checkbox

I click on the GreenPepperized checkbox but nothing happens.

This is because GreenPepper uses some AJAX calls and they cannot occur accross multiple domains. Make sure that the domain you are using in the url of your browser matches the domain in the Server Base Url configured in Confluence's General Configuration. A common case of this is when GreenPepper is installed on a local machine. We suggest you use the name of your local machine (http: //mymachine:8080/accept) instead of localhost in the URL (e.g. http: //localhost:8080/accept).

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