Test Design

Test Design

Welcome to our Test Design blog from team AllRight. The blog shows the software testing methods like white-box and black-box testing we have used in our code. These two box approaches must be considered while desiging the test cases.

Testing

Software testing is one of the important phase of software development. It is a process conducted to evaluate the quality of a software product.

Black-box Testing

Adhereing to rules Black box testing allows the system to be tested from users perspective.Main function of Black box testing is to evaluate whether the software is working according to the user specifications or not. The kind of black-box test we used here is Functional testing. The functional requirements we tested using black-box testing are as shown below:

Adhereing to rules

Test for RegisteredContactsDatabase

we are using RegisteredContactDatabase for saving the contacts of the users who already registered. The following code is to test several methods of this class.

Adhereing to rules Similarly we are doing test for other classses as well. The following blog will show atleast one test case from each class.

Test for JourneyDetails

The JourneyDetails class has been tested using following code. The below picture shows the test case for only one function which checks the startLocation.

Adhereing to rules

Test for UserDetails

The test class UserDetailsTest is used to check the name and phone number of the followee.

Adhereing to rules

Test for SimpleLocation

The method getLatitude() and getLongitude is checked for the location of the followee.

Adhereing to rules

Test for ContactsClass

The ContactsClassTest is able to test contact name and contact phone number of the followee.

Adhereing to rules

White-box Testing

Adhereing to rules White box testing refers to a scenario where, the tester deeply understands inner workings of the system or system component being tested. The coverage criteria type of white-box testing was carried out during the testing.

Test for PauseButtonPressed

As a followee, he/she should be able to pause the tracking journey.Journey is paused on click PAUSE button.

Adhereing to rules The above code represents the resume of the journey based on the followee’s interests. When followee presses the PAUSE button then the details entered by the followee like time required to reach destination is stopped. i.e. the timer is not null and it get pause. Else when followee presses the resume button, then the timer is continued from the time left remaining.

Adhereing to rules Path : 1, 2, 3-10, 21
Path: 1, 2, 11, 12-20, 21

Test for SOSbuttonPressed

As a Followee, I should be able to send an emergency situation to follower.Emergency situation is notified to the follower by SOS button.

Adhereing to rules The above code represents the emergency situation of the followee based on his conditions and when followee decides himself to press SOS button provided in JourneyOngoing fragment. When followee wants to request for his emergency situation during his journey, then he presses for long approximately 5 seconds to activate the SOS button. When SOS button is pressed a toast message appears saying “sos message has been sent” and special case when no follower accepts request for tracking then toast message appears saying “No one is following you” and the journey on going sets back to home_activity.

Adhereing to rules Path: 1, 2, 3-5, 6, 7-8, 9, 10-13, 14

Test for Failure

The method analyzeFailure () in the verification activity class tests for the several failure reasons supported from the backend manager. The failure reasons could be verification_code_invalid, Invalid_request, error_at_the server, unknown_error.

Adhereing to rules The above code represents the switch cases that was used to handle the several failure reasons.

Adhereing to rules Path 1: 1, 2, 3-4, 5, 6-7, 20, 21
Path 2: 1, 2, 3-4, 8, 9-10, 20, 21
Path 3: 1, 2, 3-4, 11, 12-13, 20, 21
Path 4: 1, 2, 3-4, 14, 15-16, 20, 21
Path 5 : 1, 2, 3-4, 17, 18-19, 20, 21

Test for cancelTracking

As a follower, I should be able to cancel the tracking of the followee.

Adhereing to rules The above code shows the function that will cancel the tracking of the followee, whenever the follower wants to cancel it.The followee will also be notified that the tracking has been cancelled by the follower.

Adhereing to rules Path: 1, 2, 3-4, 5, 6, 7-12, 14
Path: 1, 2, 3-4, 13, 14
Path: 1, 2, 3-4, 14

Test for setJourneyDetails

As a followee, I should be able to set my journey details.

Adhereing to rules The above function setJourneyDetails will be able to set all the details of his journey like select your destination, set the time required, select contacts to follow you. Here we need to pass the journeyDetails object which has all the above-mentioned details of the journey. If journey details are found null then a message displays saying “Found no journey details” or “Can’t create journey details in database”.

Adhereing to rules Path: 1, 2, 3, 4-13, 19
Path: 1, 2, 14, 15-18, 19

Documentation for testing efforts

Whenever there is a failure of test case, the tester will notify about the failed test case in whatsapp and the screenshots of failed test case will be uploaded to the google drive. The below screenshot shows the testing efforts during failure.

Adhereing to rules

Summary of Changes

The customer asked us to integrate google maps i.e. Place picker along with the Autocomplete.

Moving Forward

We are finished with our Test design. See you on the final Blog!