Performed unit testing on DAO layer using Junit to check its working. For this created an another DB test.
Performed unit testing on Controller using Mockito.
Performed integration testing on Controller using @SpringBootTest.
Performed webapplication testing using Selenium.
-
File-> New Project-> Maven-> Web Application
-
Edit pom.xml to convert simple maven into Spring project
-
Create a main method inside a package com.springpro.elibrary
-
Create a new package inside Source Package for controller com.springpro.elibrary.controller and add Java Files
AdminSideController
LibrarianSideController
-
Create a new package inside Source Package for dao com.springpro.elibrary.dao and add Java Files
AdminFunctionDao
LibrarianFunctionDao
DbConnenction
-
Create a new package inside Source Package for entity com.springpro.elibrary.entity and add Java Files
AddBook
AddLibrarian
IssueBook
LoginDetails
ReturnBook
-
Create a new package inside Source Package for entity com.springpro.elibrary.service and add Java Files
AdminLoginService
AdminService
LibrarianLoginService
LibrarianService
-
Create a new package inside Test Package for daotest com.springpro.elibrary.dao and add Java Files
AdminFunctionDaoTest
LibrarianFunctionDaoTest
-
Create a new package inside Test Package for daotest com.springpro.elibrary.controller and add Java Files
AdminSideControllerTest
LibrarianSideControllerIT
-
To perform one unit test comment all the other tests of the file.
-
Create two database one for testing and one for application
-
Create a simple Java project.
-
Download jar files for Selenium.
Download the jar/zip file from here
selenium-server-3.9.0.zip selenium-server-standalone-3.9.0.jar
-
Unzip all the zip files.
-
Add all the jar files in the project.
Note:- Run ELibrary Spring Project before running Selenium Project