Test Automation and CI using Serenity BDD & Jenkins for an Oracle ADF Application: Part 3 of 5

Serenity BDD: What is it? Where is it used?

Serenity BDD is an open source library that helps developers and testers write maintainable automated acceptance and regression tests faster. It also uses the test results to produce illustrated, narrative reports that document and describe what your application does and how it works. A developer can build Serenity test suites using Maven, Gradle, or Ant. Serenity BDD provides strong support for automated web tests using Selenium 2. To learn more about the basic concepts of Behaviour Driven Development or BDD please refer to the link below.


In this blog series we explain how to

Part 1: Install Serenity BDD and configure the environment
Part 2: Build sample Serenity project/test suite using maven
Part 3: Configure an existing ADF Application using maven
Part 4: Create Serenity test suite for the maven-based Oracle ADF application
Part 5: Continuous Integration of Serenity test suite using Jenkins

Part 3: Configure an existing ADF Application using maven

In this blog it is explained in steps on how to create maven build for an existing oracle ADF application as it is necessary for CI/CD, using a simple existing ADF application with model and viewcontroller as an example.


Open the existing ADF Application
From application drop down select New > From Gallery

In gallery select Maven > Application POM

The below create maven POM popup will appear. Make sure to check the boxes to add pom.xml in all the projects, use ojdeploy and use ojmake.

Pom.xml is added to the projects and application as shown below

The application pom.xml has the below format


Use the below available commands as needed, refer the link below for more information on the maven commands.

We now click on Install which uses ojmake and ojdeploy to create EAR file for the application, by default it is created under target folder in the application.


Deploy the generated application EAR to application server from EM console.

You may face the issues noted below during the process of build and deployment

ISSUE / Error Msg – No META-INF/application.xml found in the EAR

To avoid this issue while deploying the EAR file , please make sure to follow the below steps in ADF application

Go to Application Properties > Deployment > Select Deployment Profile > Edit Icon

Select Application Assembly and make sure the checkboxes are checked for Java EE modules as shown below

Save the changes, use Maven Install command to generate EAR file and deploy to EM console.
ISSUE / Error Msg – Weblogic.common.ResourceException: No credential mapper entry found for password indirection

If the deployment is failing giving the above error message , make sure you check if the “Auto Generate and Synchronize Weblogic JDBC Descriptors During Deployment” is unchecked

Save the changes, use Maven Install command to generate EAR file and deploy to EM console.

ISSUE / Error Msg – Failed to execute goal org.apache.maven.plugins:maven-compiler -plugin:compile diamond operator is not supported in -source 1.5

By default the maven-compiler-plugin version 3.1 is provided when generating the Application pom for an ADF application
The diamond operator is not supported in maven-compiler-plugin version 3.1 with source and target set to 1.5(Java version), It is only supported on java 1.7 or greater.
Add the below (updated plugin) to your pom file to make sure the build works.


ISSUE / Error Msg – Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:compile package xyz does not exist

When the execute goal compile is failing with the package xyz does not exist error, the issue is related to the jar dependency not found. The jar dependencies can be added in the following different ways.



ISSUE / Error Msg – Failed to execute goal com.oracle.adf.plugin:ojmake:12.2.1-1-0: compile

If you see the above error while executing a goal maven compile or install without any further information of why the goal failed please do the following.

Make sure to see the complete log trace for any errors in specific files
Check for package not found or unable to import class error, which can be eliminated by adding the jar dependencies in pom.xml
Also remove any unnecessary imports in the java files which are not being used and throwing errors as these can cause the issue while executing goal ojmake.

Download Sample Project

hareesha muppalaneni