Java Testing with TDD with report generating

Savindu Pasintha
1 min readJan 14, 2024

REPORT generate

APACHE MAVEN TERMINAL INSTALL

https://www.youtube.com/watch?v=k0f9Q56BqHA

<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 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.savindupasintha</groupId>

<artifactId>hospitalRestService</artifactId>

<packaging>war</packaging>

<version>0.0.1-SNAPSHOT</version>

<name>hospitalRestService</name>

<build>

<finalName>hospitalRestService</finalName>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>3.8.1</version>

<inherited>true</inherited>

<configuration>

<source>16</source>

<target>16</target>

</configuration>

</plugin>

<! — use for Junit testing and report genrate →

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

<version>3.0.0-M4</version>

</plugin>

<! — use for Junit testing and report genrate →

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-site-plugin</artifactId>

<version>3.7.1</version>

</plugin>

</plugins>

</build>

<! — use for Junit testing and report genrate →

<reporting>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-report-plugin</artifactId>

<version>3.0.0-M4</version>

</plugin>

</plugins>

</reporting>

<dependencyManagement>

<dependencies>

<dependency>

<groupId>org.glassfish.jersey</groupId>

<artifactId>jersey-bom</artifactId>

<version>${jersey.version}</version>

<type>pom</type>

<scope>import</scope>

</dependency>

</dependencies>

</dependencyManagement>

<dependencies>

<! — jersey auto generated rest service for →

<dependency>

<groupId>org.glassfish.jersey.containers</groupId>

<artifactId>jersey-container-servlet-core</artifactId>

</dependency>

<dependency>

<groupId>org.glassfish.jersey.inject</groupId>

<artifactId>jersey-hk2</artifactId>

</dependency>

<! — Fix for servelet error →

<dependency>

<groupId>jakarta.servlet</groupId>

<artifactId>jakarta.servlet-api</artifactId>

<version>5.0.0</version>

<scope>provided</scope>

</dependency>

<! — mssql Database →

<dependency>

<groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>

<version>8.0.11</version>

</dependency>

<! — json serialize and Decerialize data convert →

<dependency>

<groupId>com.google.code.gson</groupId>

<artifactId>gson</artifactId>

<version>2.8.5</version>

</dependency>

<! — use for TDD Junit testing →

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>4.13.2</version>

<scope>test</scope>

</dependency>

</dependencies>

<properties>

<jersey.version>3.0.3</jersey.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

</properties>

</project>

--

--