Skip to end of metadata
Go to start of metadata

Setting up your development environment

Clamp is built using maven and is mostly composed of java code. Please follow the instructions under the Setting your development environment page to prepare your machine for developing clamp.

Cloning CLAMP code

CLAMP code is located in a single git repository named clamp

it is accessible via HTTPS :

or SSH : ssh://

Please make sure to review the ONAP Development Procedures and Policies to understand how to interact with the gerrit/git repositories.

Project structure

CLAMP is composed of a main pom.xml and is structured in only one maven module, there is no sub-modules. It's composed of a back-end written in java, and a Designer UI front-end written in HTML/javascript (with angularJS).

The back-end code is stored in the standard java locations "/src/main/java", "src/main/resources". And all the back-end tests are located in "src/test/java", "src/test/resources".

The front-end code is stored in a sub folder of the back-end code in "src/main/resources/META-INF/resources".

Unit test

The unit tests are composed of 2 different types:

  1. The standard unit tests, testing obviously the class and methods
  2. The Spring integration tests that really starts Clamp (using @SpringBootTest) and that can make use of everything in the code, like the database, the http connection, etc ...
    Those tests must have a specific filename pattern: **

The code coverage is done by Jacoco and the reports are configured to provide unit tests and integration coverage.

Location details

/docsThe documentation in .rst files
/extra/docker/clampThe docker compose file to start clamp and the Mariadb
/extra/docker/mariadbThe mariadb conf files used by docker compose
/extra/sqlThe SQL file containing the CLAMP schema, Clamp Stored procedures and Camunda schema
/src/main/dockerThe Docker file + the scripts to start clamp that are used to build the image
/src/main/javaThe back-end and front-end code + resources
/src/main/testThe unit tests and Spring integration tests to validate CLAMP code
/src/main/scriptsGroovy scripts used by maven build
/src/main/resourcesThe default CLAMP configuration files + the Front end code
/src/main/resources/cldsThe Clamp specific configuration files
/src/main/resources/xslThe xsl used to convert BMPN XML to JSON (from designer UI)
/src/main/resources/META-INF/resourcesThe front end code
/src/main/resources/META-INF/resources/designerThe designer front code (HTML + javascript)

Building CLAMP

To build CLAMP you need to use maven with the goal "clean install". By default it executes the standard unit tests and the Spring integration tests but does not build the docker images.

You can disable the integration tests by executing: "mvn clean install -DskipITs=true"

There are one profile to build the docker image named "docker", to build the docker image: "mvn clean install -P docker"

Testing CLAMP

We created CSIT (Continuous System and Integration Testing) tests for clamp as requested for each ONAP component. This use Robot Framework. See this wiki page for more information: Creating a CSIT Test

The tests are created in the integration repository:

For Clamp we have created 2 test plans that test:

       - The APIs to create templates, close loops,...

       - The UI to login, click on menus, create templates or close loops manually, set properties,...

This is testing Clamp standalone and thus cannot validate interactions with other components (sdc, policy...). This still require some manual E2E testing.

  • No labels