Most Powerful Open Source ERP

How to Host ERP5Testnode with SlapOS

  • Last Update:2012-02-05
  • Version:001
  • Language:en

How to install ERP5Testnode

You can view this tutorial in presentation mode.

After having some introduction to SlapOS theory and after learning SlapOS installation of ERP5, it is time to deploy ERP5Testnode application.

As soon as you start doing implementing new features or customization for project based on ERP5, it is a good practice to start writing test and to automate their execution.

Automated unit test is a must to ensure quality of your software. Every time you change any line of  code or configuration you have the risk to introduce regressions, and automated unit allows to detect it. They are also very important to check that your features are still working whatever happens.

We will create everything that is needed to install a ERP5Testnode application with SlapOS in order to automate tests of an ERP5 project.

Agenda

  • What is erp5testnode ?
  • How to instanciate erp5testnode
  • How to configure your erp5testnode

What is erp5testnode ?

In this part, we will see what is erp5testnode and what it does.

ERP5TestNode picture


ERP5TestNode is looking at some version control system repositories to check if there is new commits. As soon as there is new commits, it then ask send commit identifiers to ERP5 master and get back the confirmation to test this particular revision or to test another (if another testnode already sent another revision). Indeed the ERP5 master is in charge to synchronize all testnodes that test the same project

Then the software is built, it could take some time. Once this is done, the testnode asks to the ERP5 testnode which tests are still needed to run (some other testnode might already have started the work). When some test name are given, the testnode launch them, it could even launch several tests in parallel. As soon as there is results, they are sent back to ERP5 Master, and then the erp5testnode will get extra work to do. When all work is done, then the erp5testnode will go back to watch if there is new commits.

ERP5TestNode loops


This graph give an overview of the main algorithm of erp5testnode. We clearly which steps are done several times and what is the order.

How to instanciate erp5testnode

In this part, we will see how to use a SalpOS master to create an erp5testnode instance for you.

Installing the software


Please connect to a Slapos Master (like https://www.vifib.net ) and login.

Then please select go to manage your servers, then select one of them. You can ask for "Install New Software". Please select ERP5 Test Node and validate. A list of possibilities will be displayed. Please take the highest stable version as suggested on the screenshot.

Requesting an instance


Please connect to a Slapos Master (like https://www.vifib.net ) and login.

Then please select go to manage your servers, then select one of them. You can ask for "Install New Software". Please select ERP5 Test Node and validate. A list of possibilities will be displayed. Please take the highest stable version as suggested on the screenshot.

How to configure erp5testnode

In this part, we will see how to use configure parameters of erp5testnode to test your code.

Specify project parameters

Here are some typical parameters to define your project :

vcs-repository-list : 
      [{
        'url':'http://git.erp5.org/repos/slapos.git',
        'branch':'erp5',
        'profile_path':'software/erp5/software.cfg',
      }, {
        'url':'http://git.erp5.org/repos/erp5.git',
        'buildout_section_id' : 'erp5'
      }, ]

test-suite : ERP5
The vcs_repository_list parameter allows to define how to get all git repositories that define your project. It is a list of dictionnaries. Each dictionnary contains all parameters allowing to identify a repository. The url is where the repository can be found (you can specify password in the url if you have private repository). The branch can make erp5testnode using a particular branch. One of the repository dictionnary must contains "profile_path", and this is used to know where to take the profile to build the software. buildout_section_id is used on other repositories to define how to override a section in the profile with the repository we are defining.

Then the test-suite : name of the test suite class defined in tests/__init__.py, so for ERP5 it can be "ERP5", "PERF", etc.

Specify erp5testnode parameters

Here are some typical parameters to define your ERP5TestNode :

project-title : ERP5 R&D
test-node-title : BoxX-ERP5-MASTER
node-quantity : 6
test-suite-master-url : https://[user]:[password]@www.tiolive.com/nexedi/
test-suite-title : ERP5-MASTER
project-title : Name of the project, this project must be defined in Nexedi ERP5. If the field stakeholder is defined on the project, automatic emails will be sent to the default email of the stakeholder. test-suite-title (optional) : title of this test suite. This is optional, if nothing is provided test-suite will be used for title. If you create several test instances with the same test-suite-title, then test will be executed in parallel. test-node-title : name of the particular instance you are using. This is mostly useful when you have several parallel tests running on different computers in order to identify which instance is running and which instance has errors.

Output : ERP5 Test Results


With the ERP5 Master managing your ERP5TestNode, there is a test result module. It is used to retrieve and navigate all results of the execution of unit tests.