Issue with missing POM.xml for bonitasoft-test-toolkit
When I try to run the mvn verify command I’m getting this error from toolkit
However I have extracted (using winzip) the pom.xml from the executable jar file
and placed it inside the same folder as the jar for toolkit
But I still get this error message
[WARNING] The POM for com.bonitasoft:bonita-test-toolkit:jar:1.0.1 is missing, no dependency information available
And it appears my test doesn’t actually run…
(all the test > target folders are empty… no class files are created)
================ the terminal stdout ===============
PS C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject> mvn verify -f "C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\pom.xml"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< com.company.bonita.test:bonita-process-test >-------------
[INFO] Building Bonita process test 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.bonitasoft:bonita-test-toolkit:jar:1.0.1 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bonita-process-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ bonita-process-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ bonita-process-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ bonita-process-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ bonita-process-test ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ bonita-process-test ---
[INFO] Building jar: C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\target\bonita-process-test-1.0.0-SNAt\bonita-process-test-1.0.0-SN
[INFO] Building jar: C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\targe
t\bonita-process-test-1.0. st ---
[INFO] Building jar: C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject\target\bonita-process-test-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ bonita-process-test ---[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:verify (default) @ bonita-process-test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.567 s
[INFO] Finished at: 2022-12-30T17:05:42-05:00
[INFO] ------------------------------------------------------------------------
PS C:\BonitaStudioCommunity-2022.2-u0\workspace\testingproject>
================ the pom for testingproject
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.bonita.test</groupId>
<artifactId>bonita-process-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Bonita process test</name>
<description>Maven project to test Bonita processes</description>
<properties>
<!-- maven -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
<maven-dependency-plugin.version>3.2.0</maven-dependency-plugin.version>
<!-- Bonita -->
<bonita-test-toolkit.version>1.0.1</bonita-test-toolkit.version>
<!-- Test -->
<junit.version>5.9.1</junit.version>
<assertj-core.version>3.23.1</assertj-core.version>
<awaitility.version>4.2.0</awaitility.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.bonitasoft</groupId>
<artifactId>bonita-test-toolkit</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
================= the LeaveRequestIT.java test file
package com.company.bonita.test;
import static com.bonitasoft.test.toolkit.predicate.ProcessInstancePredicates.*;
import static com.bonitasoft.test.toolkit.predicate.UserTaskPredicates.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import java.util.List;
import com.bonitasoft.test.toolkit.BonitaTestToolkit;
import com.bonitasoft.test.toolkit.contract.ComplexInputBuilder;
import com.bonitasoft.test.toolkit.contract.ContractBuilder;
import com.bonitasoft.test.toolkit.junit.extension.BonitaTests;
import com.bonitasoft.test.toolkit.model.BusinessData;
import com.bonitasoft.test.toolkit.model.BusinessObjectDAO;
import com.bonitasoft.test.toolkit.model.Task;
import com.bonitasoft.test.toolkit.model.QueryParameter;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
@BonitaTests
class LeaveRequestIT {
@BeforeEach
void beforeEach(BonitaTestToolkit toolkit){
toolkit.deleteBDMContent();
toolkit.deleteProcessInstances();
}
@RegisterExtension
static BonitaTestExtension bonitaExtension = new BonitaTestExtension();
@Test
void should_create_an_approved_leave_request(BonitaTestToolkit toolkit) {
var user = toolkit.getUser("walter.bates");
var processDef = toolkit.getProcessDefinition("LeaveRequest");
final BusinessObjectDAO<BusinessData> businessObjectDAO = toolkit.getBusinessObjectDAO("com.company.bonitasoft.model.LeaveRequest");
assertThat(businessObjectDAO.find(0, 10)).isEmpty();
var processInstance = processDef.startProcessFor(user);
await().until(processInstance, processInstanceStarted()
.and(containsPendingUserTasks("Validate request")));
var complexInputBuilder = ComplexInputBuilder.complexInput()
.booleanInput("isApproved", true);
var task1Contract = ContractBuilder.newContract().complexInput("requestInput", complexInputBuilder).build();
var task1 = processInstance.getFirstPendingUserTask("Validate request");
await().until(task1, hasCandidates(user)
.and(taskReady()));
task1.execute(user, task1Contract);
await().until(task1, taskArchived());
await().until(processInstance, processInstanceArchived());
// assertThat(processInstance.searchTasks()).map(Task::getName).containsExactlyInAnyOrder("Validate request");
assertThat(processInstance.getFirstTask("Notify request rejected").isArchived()).isTrue();
// Data assertions
final List<BusinessData> result = businessObjectDAO.query("findRequestorId",
List.of(QueryParameter.stringParameter("requestorId")), 0, 10);
assertThat(request.getBooleanField("isApproved")).isTrue();
};
}