How to Test JAVA Application Manually ?

Manual Testing JAVA Application

Let us see how we can go about testing a Java/J2EE application. For example, consider that we have the screen:
  • A login screen
The UI (User Interface) for these three screens are developed with JSP/HTML and the validations performed through JavaScript. Because it is a sample application, logic is in the Servlet and DAO (Data Access Object). DAO is a class for connecting to the database.
Have a look at the sample screens:

Manual Testing  Java Application :

During manual JAVA testing, a tester prepares the test cases from the detailed design document and tries to cover every scenario and code snippet possible.
Unit testing is a type of testing wherein a user needs to test the smallest of the code snippets for accuracy, correctness and meeting the requirements.
Let us take the example of the login screen. The login screen has two text fields: username and password, and has two buttons: submit and cancel.
The test cases should cover all the loops and conditional statements. Test cases should display the expected results and the test data. Below are some of the general test cases that a user could execute manually in a login screen. The results are then noted down in the test case document.
Important:  sample test case format for a login screen.

S.No. Test Case Expected Result Actual Result Pass/Fail

1 User checks the appearance of labels Username, Password The labels should be correctly spelled and displayed in Normal sized font The label username and password are displayed correctly PASS

2 User checks the appearance of the button
Submit and Cancel
The buttons should be displayed with the correct name The buttons Submit and Cancel are displayed correctly PASS

3 User checks the background color of the screen The login form should be within a white table and the screen should be of background grey The screen appearance does not match the requirements. FAIL

4 The user leaves username textbox as Blank Error message “Username cannot be empty” should be displayed Error message “Username cannot be empty” is displayed PASS

5 The user enters some value in the username textbox and leave the password textbox as Blank Error message “Password cannot be empty” should be displayed Error message “Password cannot be empty” is displayed PASS

6 User enters username as “abcd” and password as “xxxx” Error message
“Invalid username password combination”
should be displayed
Error message
“Invalid username password combination”
is displayed

4 User enters a username of more than 10 characters Error message
“Username should not be more than 10 characters” should be displayed
Error message is not displayed FAIL

5 User enters username as “testuser” and password as “password” and clicks the Submit button The user should be able to see the “Employee details screen” Employee details screen is displayed PASS

Note: Please see complete list of test cases below:
  • Check for any exception including NULL pointer exception
  • Check if NULLS are not allowed for username and password
  • Check if username/password is in the correct format
  • Check if numbers are not allowed for username
  • Check if special characters are not allowed in Username
  • Check if the correct combination of Username and password are entered, then the application takes you to the next screen, i.e. employee information screen
  • Check if the username entered is of correct length
  • Check if the username text field allows only the maximum number of characters specified for that field
  • Check if the password field if specified in the requirements is visible as * while entering
  • Check if passwords are case sensitive
  • Check if username is not case sensitive
  • Check if login page does not remember the username or password, even after exiting
  • Check if the Submit and Cancel button work as per requirement
  • If using the application first time, check if the username has permission to enter the application
  • Delete a username/password combination from the database and check if the combination is not able to login again
  • For all the above cases, check if the appropriate validation error messages are shown
  • Check if the Labels and Buttons are in the right place in the screen and that they display the text correctly
  • Check if the screen appearances are as per requirements
  • Check if exceptions are handled
  • Check if logging is performed for required actions
After going through the test cases, you may realize that you are mostly dealing with the testing of fields, buttons, functionality and validations of a particular screen. This is accurate, as Unit Testing very keenly deals with the testing of every small code snippet and component. The same type of testing should be performed for all the screens.

We will see in the upcoming post how we can integration test this .