Task 2
Task 2
operations for the design specification given in task 1. Use suitable error handling where
appropriate. Test the application using suitable test cases and illustrate the system. Provide
evidence of the test cases and the test results.
1. Software testing
According to this scenario the XYZ hotel chain has some planning system testing. In this system
there are 4 options for run the program. Such as reserve halls, view reservations, delete reservations
and exist. Tested Banquet hall Registration, Display, Search by hall ID, Search by reference
number, Delete, and Exit these functions are tested by different testing methods.
Software testing is the process of executing a program with the intent of finding an error. We
should tested the software when we after developing. Because it make assure the product provides
the expected functionalities up to the expected level without having any sort of issues. And also it
is the way to check whether as the software developed is functioning according to the client
requirement. The test planning is done in the designing face of the software life cycle.
Unit testing is a software development process in which the smallest testable parts of an application
called units. As well as it focuses verification effort on the smallest unit in the software. Units are
individually examined for proper operations. Unit testing are often done manually in some instance
it is automated. Each of unit in the system tested by individually. (Rousse, 2017)
Integration testing test the interaction between components. Integration testing follows two
approach known as Top down approach and Bottom up approach. . (ISTQB exam certificion,
2017)
The aim of integration testing is to identify,
Sub functions may not produce the extract functions when we combine.
System testing is defined as testing a fully integrated the computer based system. This testing falls
in black box testing. In black box testing their source code system is not available. The source code
is available in only for white box testing. (Bennet coleman & co., 2017)
A software is required to be tested to make assure the product provides the expected functionalities
up to the expected level without having any sort of issues. Test planning is done in the designing
face of the software of life cycle. User acceptance tenting is the final phrase of the testing stage.
During user acceptance testing actual software users test the software and make sure it can handle
required tasks in real world according to the specifications. User acceptance testing is one of the
final and critical software project procedure that must occur before newly developed software is
rolled out of the market. It will demonstrate the user to get the feedback and write the comments
and recommend new corrections .Finally they satisfied the costumer 100 % using the user
acceptance testing. (Setter, 2013 - 17)
Table 03: Testing Reservation system
System displays
auto generated
random number as
Type hall ID 124 and
03 reference number
press enter.
and informs that the
reservation was
added successfully!
Reservations get
Add three more
added with
04 reservations(member IDs
confirmation
130 , 200 ,250 )
massages.
Reservations are
05 Select option 2
displayed
Delete reservation
comes out and
06 Select option 3
system prompts for
reference number.
System displays
Enter non-existing ref no
07 massage “Reference
500.
number not found’
System displays
Select option 3 and enter message “Match
08
existing ref no 771 found-
Accept[Y/N]”
System displays
message
09 Press “Y” and press enter
“Reservation delete
successfully!”
System displays
message “Match
10 Enter existing ref no 878
found-
Accept[Y/N]”
System displays
message
11 Press “N” and press enter “Reservation added
to end of the
Queue”
Test case 01
Test case 02
Test case 03
Test case 04
Test case 05
Figure 06: view
reservation. (Author made)
Test case 06
Test case 07
Test case 08
Figure 08: existing ref no. (Author made)
Test case 09
Figure 12: Hall ID 124 deleted and 130 goes last. (Author made)
Actual output matches expected output.
Test case 12
int hallid,referenceNo;
Node nextNode;
public Node(int id,int ref)
hallid=id;
referenceNo=ref;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;
Node head;
Node tail;
if (tail==null)
head=p;
tail=p;
else
{
tail.nextNode=p;
tail=p;
}//end add
Node p=head;
p=p.nextNode;
int hallid;
Node q=null;
Node p=head;
boolean found=false;
{ if (refno==p.referenceNo)
found=true;
System.out.println(" ");
System.out.println(" ");
System.out.println("HALL ID :- "+p.hallid);
System.out.println(" ");
if (answer.equals("Y")|| answer.equals("y"))
System.out.println(" ");
System.out.println(" ");
} else //answer NO
hallid=p.hallid;
add(hallid,refno);
System.out.println(" ");
q=p;
p=p.nextNode;
}//end while
if (found==false)
System.out.println(" ");
}//end remove
int choice=0;
while (choice!=4)
{System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" "+"4.EXIT");
System.out.println(" ");
choice=Integer.parseInt(br.readLine());
if ( choice == 1 )
System.out.println(" ");
System.out.println(" ");
int hid=Integer.parseInt(br.readLine());
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");
else
if (choice==2)
System.out.println(" ");
halls.printList();
System.out.println(" ");
System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");
else
if (choice==3)
System.out.println(" ");
System.out.println(" ");
int refno=Integer.parseInt(br.readLine());
halls.remove (refno);
System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
}//end main