You are on page 1of 10

Software Testing Assignment# 02 FA19-BSE-168

COMSATS UNIVERSITY
ISLAMABAD

SUBMITTED BY

NAME: NOOR UL AIN


REG. NO.: FA19-BSE-168
SECTION: BSE-7C

SUBMITTED TO

TEACHER: Ms. MEHWISH MUKHTAR


SUBJECT: SOFTWARE TESTING
ASSIGNMENT # 02

DATE: 06 November 2022


Software Testing Assignment# 02 FA19-BSE-168

Table of Contents
Test Cases.................................................................................................................3
Test Case# 01 (valid input)....................................................................................3
Test Case# 02 (valid input)....................................................................................3
Test Case# 03 (Invalid input).................................................................................4
Test Case# 04 (Valid input)...................................................................................4
Test Case# 05 (Valid input)...................................................................................5
Test Case# 06 (Invalid input).................................................................................5
Test Case# 07 (Invalid input).................................................................................6
Boundary Value Analysis:......................................................................................7
Program (Source code):..........................................................................................7
Possible Outputs...............................................................................................8
Class Diagram Explanation:.................................................................................10
Software Testing Assignment# 02 FA19-BSE-168

Question:
Write a program which control value of the robot. The charging min value is zero and max value
is 100. When the charger is not plugged, the robot is in discharging state and the battery
decreases. When charger is attached, the state is changed to charging and the value increase.
Once it reaches the max limit, the state changes to battery full.
a) Write test cases for the battery level.

Test Cases

Test Case# 01 (valid input)


TC ID# 01
TC Name: Battery Level
Pre-condition: charger is unplugged

Step Action Response


1 Want to plug the charger? true

Actual result: Robot is in charging state.


Expected result: Robot start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Test Case# 02 (valid input)

TC ID# 02
TC Name: Battery Level
Pre-condition: charger is unplugged

Step Action Response


1 Want to plug the charger? False
Software Testing Assignment# 02 FA19-BSE-168

Actual result: Robot is in discharging state.


Expected result: Robot do not start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Test Case# 03 (Invalid input)

TC ID# 03
TC Name: Battery Level
Pre-condition: charger is unplugged

Step Action Response


1 Want to plug the charger? yes

Actual result: Please enter a valid Input(true/false).


Expected result: System should not accept any other option than true/false.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS

Test Case# 04 (Valid input)

TC ID# 04
TC Name: Battery Level
Pre-condition: charger is plugged
Software Testing Assignment# 02 FA19-BSE-168

Step Action Response


1 Enter Battery level 25

Actual result: Robot is charging state.


Expected result: Robot should start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Test Case# 05 (Valid input)

TC ID# 05
TC Name: Battery Level
Pre-condition: charger is plugged

Step Action Response


1 Enter Battery level 100

Actual result: Battery is full.


Expected result: Robot should Not start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Test Case# 06 (Invalid input)

TC ID# 06
TC Name: Battery Level
Pre-condition: charger is plugged
Software Testing Assignment# 02 FA19-BSE-168

Step Action Response


1 Enter Battery level 101

Actual result: Your battery is damaged.


Expected result: Robot should Not start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Test Case# 07 (Invalid input)

TC ID# 06
TC Name: Battery Level
Pre-condition: charger is plugged

Step Action Response


1 Enter Battery level -1

Actual result: Your battery is damaged.


Expected result: Robot should Not start charging.
Tested by: Noor ul Ain
Status: Pass
Date: 06/11/2022
Environment: Windows OS
Software Testing Assignment# 02 FA19-BSE-168

Boundary Value Analysis:

Battery Level (Accepts 0 to 100)

Invalid Valid Invalid


-1 1,20,85,96 101

b) Write a program in any programming language. Perform boundary value analysis.

Program (Source code):


Software Testing Assignment# 02 FA19-BSE-168

Possible Outputs
Software Testing Assignment# 02 FA19-BSE-168
Software Testing Assignment# 02 FA19-BSE-168

c) Briefly explain the above class diagram.

Class Diagram Explanation:


The above class diagram depicts the “School Management system” where:
Classes:
Total five classes:
1. School
2. Department
3. Instructor
4. Student
5. Course

Relationship Explanation:
Department has composite (strong) relation with school because without school department
doesn’t exists. And the student has weak relation with school. Many students attend many
courses. Instructor is weakly connected to department and has assigned one or many departments
and teach one or more courses to the assigned department(s). Moreover, many departments have
many courses associated to them.
Functionality:
School/admin can add/ remove/view student(s) and view department(s), department can
add/remove/view instructor(s).

________________

You might also like