Group 2 - Health Laboratory Testing - Paper PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

PROJECT

“Health Laboratory Testing”

Group 2

Author:
Rei Adiel Sitohang (2020010167)
Rangga Raditya Putra Pratama (2020010089)

Class:
3SC2

Faculty:
Mr. Mhd Idham Khalif, S.Kom

CONTINUING EDUCATION PROGRAM


CENTER OF COMPUTING AND INFORMATION TECHNOLOGY
ENGINEERING FACULTY UNIVERSITY OF INDONESIA

2021
PROJECT ON
Health Laboratory Testing

Developed by

1. Rei Adiel Sitohang


2. Rangga Raditya Putra Pratama

2
Health Laboratory Testing

Batch Code : 3SC2


Start Date : October 14th 2021
End Date : November 1st 2021
Name of Faculty : Mhd Idham Khalif , S.Kom
Names of Developer :
1. Rei Adiel Sitohang
2. Rangga Raditya Putra Pratama

Date of Submission: November 2nd 2021

3
CERTIFICATE

This is to certify that this report titled “Health Laboratory Testing” embodies the original
work done by Rei Adiel Sitohang and Rangga Raditya Putra Pratama in partial fulfillment
of their course requirement at NIIT.

Coordinator:
Mhd Idham Khalif ,S.Kom

4
ACKNOWLEDGEMENT

Authors would like to praise to Allah, Most Merciful bless and so authors can finish this
Project entitled “Health Laboratory Testing”. Author would like to thanks to Mr. Mhd Idham
Khalif, S.Kom as Lecturer who has given useful suggestion which are help author in writing
this paper.

The writer realized that this paper far from perfection, then the writer will be very
unfettered the chest and was encouraged, if colleagues and the guide's agreeing lecturer gave
the suggestion & criticism for this paper perfection.

5
SYSTEM ANALYSIS

System Summary:

Health Laboratory is a website used to help employees to manage the laboratory product
inventory so that employees don't need to check the product manually in the laboratory
storage.We can also manage our employees in this application.

6
CONFIGURATION

Hardware : Lenovo IdeaPad C340-14IML


Processor : Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz 2.30 GHz
Installed RAM : 16,0 GB (15,8 GB usable)
System type : 64-bit operating system, x64-based processor
Operating System : Windows 11 Home Single Language
Software : NetBeans IDE 8.2 and Microsoft Office

sssssssssss

7
TYPE OF TESTING TOOLS

• JUnit
JUnit is a unit testing framework for java. Used and writed by developer for testing a specific
area of a functionality of the code to be tested. JUnit is a testing framework for java programming
language.JUnit has been important in the development of test-driven,development,and is one of
family of unit testing framework which is collectively know as xunit that originated with sunit

• JaCoCo
JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team
based on the lessons learned from using and integration existing libraries for many years. The
plugin works as a transparent additional services that colors all java files according to the unit
test coverage information.

8
TESTING IMPLEMENTATION

1. DAOLoginTest.java

1.1 Test Login (testGetBy())


Test whether the login method is successful in finding users in the database or not, by
changing the result variable to an array. If array length == 0, the user does not exist and
the test fails.

1.2 Test Register (testAdd_user())


To test whether the register method has successfully entered new data into the database
or not, the first thing to do is set all the required data. After that, if the results match the
9
expectations, the test is successful.
TESTING IMPLEMENTATION

2. EmployeesTest.java

2.1 Test Save User (testSave_user())


Testing the save user method which is used when the user clicks the register button. The
first step is to set all the required data. After that, make the expectation result. If the result
is the same as the result, the test is successful.

2.2 Test Login User (testLogin_user())


Tests the user's login method which is used when the user clicks the login button. The
first step is to set all the required data. After that, make the expectation result. If the result
is the same as the result, the test is successful.

10
TESTING IMPLEMENTATION

3. DAOProductTest.java

11
TESTING IMPLEMENTATION

4.1 Test List Product (testRetrveTblproduct())


Test whether the method successfully displays all products in the table/list or not. The
first step, change the result into an array. After that, find the length of the array. If the
array length is not empty, the test is successful.

4.2 Test Search by ID (testGetByID())


Tests whether the getByID method successfully displays data based on ID or not. The
first step is to create a test variable for id which will be used as an argument in the
getByID method. After that, check whether the return result is empty or not, if it is not
empty then the test fails.

4.3 Test Create Product (testAddProduct())


Testing the addProduct method which functions to add product data in the database. The
first step, set all the necessary data. Next, check whether the product is null or not. If it is
not null then the test is successful.

4.4 Test Delete Product (testDeleteUser())


Testing the delete method which serves to delete product data based on the product id.
The first step is to create a test variable in the form of an id to be entered as an argument
as a parameter. After executing the delete method, then call the Product object and check
the product id. If the product id is null then the product is deleted successfully and the
test is successful.

4.5 Test Update Product (testEditUser())


Testing the update method which functions to change product data that already exists in
the database. The first step is to set all the necessary data. The second step, run the
method. Next, call the Product object and check the product id. Finally, make the result
expectation variable whether it matches the result variable. Here, we compare the product
names that have been changed. If the results are the same, then the test is successful.

12
TESTING IMPLEMENTATION

4. ProductTest.java

13
TESTING IMPLEMENTATION

4.1 Test Get All Record (testGetAllRecord())


Tests the getAllRecord method whether it successfully displays all products in the table.
To test it, I use the test variable, namely expResult which is the number of all existing
products. After that, I changed the result variable to an array. Next, compare the length
of the array with expResult . If the results are the same, then the test is successful.

4.2 Test Get by ID (testGetById())


Tests whether the getById method successfully displays data based on ID or not. The first
step is to set the product id. Next, create a test variable expResult and compare it with the
result of the getById method. If the results are the same, then the test is successful.

4.3 Test Save Product (testSaveProduct())


Test the saveProduct method which functions to add product data in the database and this
method is used when the user clicks the create button. The first step is to set all the product
data you want to add. Next, create a test variable expResult and compare it with the result
of the saveProduct method. If the results are the same, then the test is successful.

4.4 Test Edit Product (testEditProduct())


Testing the editProduct method which functions to change product data in the database
and this method is used when the user clicks the update button. The first step is to set all
the product data that you want to change. Next, create a test variable expResult and
compare it with the result of the editProduct method. If the results are the same, then the
test is successful.

4.5 Test Delete Product (testDeleteProduct())


Testing the deleteProduct method which functions to delete product data in the database
based on the product id and this method is used when the user clicks the delete button.
The first step is to set the product id you want to delete. Next, create a test variable
expResult and compare it with the result of the deleteProduct method. If the results are
the same, then the test is successful.

14
TESTING IMPLEMENTATION

No. Test Case Test Data Expected Actual Result Result


Result

1. Get employees data Checks whether Not empty, Not empty, Pass
from database the length of the means that the means that the
arraylist of the data exists data exists
employees
object is empty
or not

2. Add Employees data Checks whether To index page, To index page, Pass
to database the method means that means that
returns the successfully successfully
correct value add data add data

3. Save Employees data Checks whether To index page, To index page, Pass
to database, this case the method means that means that
used for button click returns the successfully successfully
in register form correct value add data add data

4. Get employees data Checks whether To dashboard To dashboard Pass


from database, this the method page, means page, means
case used for button returns the that the data that the data
click in login form correct value exists exists

5. Show product data Checks whether Not empty, Not empty, Pass
from database the length of the means that the means that the
arraylist of the data exists data exists
product object is
empty or not

6. Get product data from Checks whether Not empty, Not empty, Pass
database by product id the length of the means that the means that the
arraylist of the data exists data exists
product object is
empty or not

15
TESTING IMPLEMENTATION
No. Test Case Test Data Expected Actual Result Result
Result

7. Add product data to Input product data Not null, Not null, Pass
database correctly, after means that means that
executing the successfully successfully
method, check add data add data
whether the product
object is not null or
not

8. Delete product data Checking the Null, means Null, means Pass
from database product object after that that
executing the successfully successfully
method whether it is delete data delete data
null or not

9. Update product data Check the product Same result, Same result, Pass
from database name after the means that means that
update method is successfully successfully
run, if the results are update data update data
the same then the
test is successful

10. Get all product Checks whether the Same result, Same result, Pass
record from ArrayList length of means that means that
database, to show the Product object successfully successfully
product data in table matches the show all data show all data
expectation

11. Get product data by Checks whether the To dashboard To dashboard Pass
ID, this case used for method returns the page, means page, means
search button correct value that that
successfully successfully
search data search data

12. Save product to Checks whether the To dashboard To dashboard Pass


database, this case method returns the page, means page, means
used for create correct value that that
button successfully successfully
save data save data

16
TESTING IMPLEMENTATION

No. Test Case Test Data Expected Actual Result Result


Result

13. Edit product data from Checks whether To dashboard To dashboard Pass
database, this case used the method page, means page, means
for update button returns the correct that that
value successfully successfully
update data update data

14. Delete product data Checks whether To dashboard To dashboard Pass


from database, this case the method page, means page, means
used for delete button returns the correct that that
value successfully successfully
delete data delete data

17
RESULT

1. DAOLoginTest.java

2. EmployeesTest.java

3. DAOProductTest.java

18
RESULT

4. ProductTest.java

19
RESULT JaCoCo

20

You might also like