Category Archives: ADempiere

ADempiere ERP

Introducing some tools to the ADempiere and iDempiere project for better quality management

In every software development project there is the need for quality assurance and quality management for the code. To make this work more efficient there exist a big number of tools to do this task.

For the ADempiere and iDempiere project I was working together with Redhuan (red1.org) on some Fitnesse test integration to run them automatically. The goal was to have a test suite applied on the current ADempiere code with all migration done to the database.

At the start of the project I defined following steps:

  1. Setup Jenkins for doing the tests automatically
  2. Code some scripts for creating an up to date database with all migration scripts applied
  3. Run all the test triggered by Jenkins

While doing the work I was facing some problems with the process on an headless build server. The tests for the ADempiere client needed some graphical interface to work. To work around this issue I installed a minimal X11 environment and started the Fitnesse test software within this X11 environment. Now when the tests a run the popups can be shown by the code and triggered by Fitnesse.

1. Setup Jenkins

The default installation of Jenkins was done by me some time ago and the Jenkins is already running some build processes for the iDempiere project to build the OSGi based code using Buckminster.

For the testing of the Fitnesse tests we decided to use the 361 code base maintained by Carlos Ruiz from Kenai repository.

To keep things clear I first created the build job to run the build of ADempiere with the ant task.

This is quite straight forward and no magic. Just let the Ant plugin call the complete target and go for it.

 

2. The up to date database script

To recreate a fully updated database I created a short collection of commands within a shell script which looks like this:

#!/bin/bash
#
#This script installes fresh ADempeire Postgres database
#Author Dominik Zajac
#Date: 10-13-2011
#Version: 0.0.1

WORKSPACE=/var/lib/jenkins/jobs/ADempiere361-Kenai/workspace/
SCRIPTHOME=/opt/adempiere_database_tool
#Remove existing database
/usr/bin/dropdb -U adempiere adempiere
echo "Old Database removed";

#Import new fresh database
/usr/bin/createdb -U adempiere adempiere
echo "Database created";
/usr/bin/psql -U adempiere adempiere < $SCRIPTHOME/adempiere.dump
echo "Database imported";

#Apply migration scripts
$WORKSPACE/migration/migrate_postgresql.sh \
$WORKSPACE/migration/360lts.010-release commit \
|psql -U adempiere -d adempiere

echo "Migration scripts applied"

What the script does is quite clear. It loads a default database and applies all necessary migrations scripts to it to have a fully prepared database for testing.

 3. Run all the Fitnesse test triggered by Jenkins

Jenkins Fitnesse Screenshot

This two tasks within that build job are the main effort from Redhuan D. Oon and me. Red1 consolidated all the Fitnesse tests to one project so it was more easy to integrate it into the build server and run it. I created the sql database script which is very very basic and just runs commands step by step for database setup. The part for Fitnesse in Jenkins is starting a new instance of Fitnesse each time the tests are called and executes the tests within this instance. The results will be written to the fitnesse-restults.xml.

Jenkins takes care of the job to look if there are new changes in the repository every minute and reruns the job if there where some commits.

The next tasks would be:

  • migrate this testing stuff to iDempiere OSGi platform
  • write some presentation layer for the xml result file
  • implement a second instance for manual testing by some interested users

 

 

ADempiere World Conference 2011

 

From Saturday and Sunday 03. -04.09.2011 the ADempiere World Conference takes place in Berlin this year.

ADempiere is one of the leading open source erp system. It’s community driven project fork of Compiere.For the time of the meeting at the von Beuth University in Berlin I will provide a streaming supported by the Piraten Streaming.

Update: 

The videos I recorded at the conference are now available for download here.

 

The (r)evolution has begun: OSGi + ADempiere = iDempiere

What is iDempiere?

This project mainly driven by Low Heng Sin and Carlos Ruiz the main developer and head of development of ADempiere project for 4 years  looks like to be created to bring the development around an OSGi implementation of ADempiere done by Heng Sing Low to a stable and productive level. The main communication platform of iDempiere is the well known forum hosted by Redhuan ( red1).

 

If you want to test this project you need to follow a strict setup procedure to be successful.

1. Checkout the HG-repository to a new directory in my example: ~/Development/iDempiere/workspace/

2. Install Eclipse Helios Java EE Edition with Mercurial Plugin, Buckminster and Equinox Target Platform

3. Import the Project the following way.

  • right click in the project explorer select import and then choose buckminster:

Import iDempiere Buckminster project into Eclipse

Import iDempiere cquery file into Eclipse

The import process takes a while. After it has finished successful your project tree should look something like my.

Now you should have some run configurations imported as well. Check them in your run configurations window.

iDempiere run configurations

This should be all you need to do for testing the iDempiere project.

If I have some more time I will document the install process of the server on CentOS. This should be quite easy. First test done by me have shown that the OSGi implementation works faster. But let me check if there is a real speed improvement. The main goal is to make iDempiere more extendable than ADempiere was or is.

I am looking forward what this new projects impact will be for the ADempiere community. Maybe iDempiere will be a total independent project maybe it will become ADempiere 4.0 we will see. Never the less it’s ass kicking improvement already.

Red1 reopend his forum

ADempiere-LogoIn the beginning of the ADempiere project Red1 gave the discussions and process a home. Now 4 years later the Forum is reopend and it start growing and living again.

If you search for an direct contact to main developers and progressive thinkers around the ADempiere project you are right there. There is place for technical questions and maybe some philosophical stuff around free and open software. It is not in competition with the SourceForge project forum it’s more an extension and more personal place.

Take a look and make you your own opinion about it.

Install ADempiere on Mac OS X 10.6

This Howto more or less just lists the points you need to do. ADempiere is installed the same way on several different unix systems so on MAC OS X. For more information please use the search functionality on wikipage.

ADempiere needs to be setup with correct DNS services be sure you know what you are doing.

 

First we need to install PostgreSQL. I am using PostgreSQL 8.4.x.

You can download it here.

Installation doen’t need special interaction just run the installer and follow the instructions.

Maybe you need to edit the pg_hba.conf file to allow database connection from your network.

 

Now download ADempire from here and extract it where you want.

You need to add some environment variables to ~/.bash_profile of the user you want run ADempiere.

export PATH=/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
export POSTGRES_HOME=/Library/PostgreSQL/8.4
export PATH=$PATH:$JAVA_HOME/bin/:$POSTGRES_HOME/bin/
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export ADEMPIERE_HOME=<where_ADempiere_is_stored>

Next step we need to link tool.jar because this doesn’t work out of the box. I use Java 1.6 to run ADempiere.

sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar

Make the RUN_setup.sh script executeable by

chmod +x $ADEMPIERE_HOME/RUN_setup.sh

and run it.

You should see the configuration window for all needed setup values.

After setup is finisehd (this takes some time) you need to import the default database.

$ADEMPIERE_HOME/utils/RUN_ImportAdempiere.sh

Now you can start the server via the startscript

$ADEMPIERE_HOME/utils/RUN_Server2.sh

You can run the JAVA client by

$ADEMPIERE_HOME/RUN_Adempiere.sh