Where to Discuss?

Local Group

Preface

Goal: Starting from Requirement.

Questions?
  • I never write a proper test before. What do you mean by Test Plan? And give me example for this case.

  • Any diagram for test?

  • If you do not mind, please help me write down both test diagram above, the test case diagram and sequence diagram in PlantUML format for use with draw.io?


Test Plan

Questions?

I never write a proper test before.

What do you mean by Test Plan? And give me example for this case.

Response

A test plan is a document that outlines the testing strategy and approach for a particular system or software. It includes details about the scope of testing, the testing methodology, the test environment, the test schedule, the test cases, and the expected results.

Here’s an example test plan for the user management system:

Test Plan: User Management System

Introduction

The User Management System is a web application that allows an admin user to manage users. This test plan outlines the testing approach for the system.

Testing Objectives

The testing objectives for the User Management System are as follows:

  • To ensure that the system meets the functional requirements specified in the SRS document.
  • To ensure that the system is easy to use and provides a good user experience.
  • To ensure that the system is reliable, secure, and performs well.

Scope

The scope of testing for the User Management System includes the following:

  • Testing of all the functional requirements specified in the SRS document.
  • Testing of the user interface and user experience.
  • Testing of the security and performance of the system.

Testing Methodology

The testing methodology for the User Management System will include the following:

  • Black box testing to test the functionality of the system.
  • User acceptance testing to test the user interface and user experience.
  • Security testing to test the security of the system.
  • Performance testing to test the performance of the system under various loads.

Test Environment

The test environment for the User Management System will include the following:

  • Operating System: Windows 10
  • Web Browser: Google Chrome
  • Database: MySQL
  • Server: Apache Tomcat

Test Schedule

The test schedule for the User Management System is as follows:

  • Test Planning: Week 1
  • Test Case Development: Week 2
  • Test Execution: Week 3 - Week 6
  • Test Reporting: Week 7

Test Cases

The following are sample test cases for the User Management System:

Test Case 1: Add User
  • Objective: To ensure that an admin user can add a new user to the system.
  • Preconditions: The admin user is logged in to the system.
  • Steps:
    • Click on “Manage Users” link.
    • Click on “Add User” button.
    • Enter the user information in the form.
    • Click on “Save” button.
  • Expected Results:
    • The new user is added to the system.
    • The user is redirected to the “User List” page.
    • The new user is displayed in the user list.
Test Case 2: Delete User
  • Objective: To ensure that an admin user can delete a user from the system.
  • Preconditions: The admin user is logged in to the system.
  • Steps:
    • Click on “Manage Users” link.
    • Select the user to be deleted.
    • Click on “Delete” button.
    • Confirm the deletion.
  • Expected Results:
    • The user is deleted from the system.
    • The user is removed from the user list.

Conclusion

This test plan outlines the testing approach for the User Management System. By following this plan, we can ensure that the system meets the functional requirements, is easy to use, and is reliable, secure, and performs well.


Test Diagram

Questions?
Any diagram for test?
Response
Yes, there are a few diagrams that are commonly used in software testing. Here are two examples that can be used in conjunction with the test plan and test cases outlined for the User Management System:
  1. Test Case Diagram

    A test case diagram is a UML diagram that shows the relationships between test cases, test suites, and the system under test. It can help visualize the test plan and ensure that all test cases are accounted for.

    Here’s an example test case diagram for the User Management System:

+---------------+
| User Mgmt Sys |
+---------------+
         |
         |
    +----------+
    | TestSuite|
    +----------+
         |
         |
    +----------+
    | TestCase |
    +----------+
  1. Sequence Diagram

    A sequence diagram is a UML diagram that shows the interactions between objects or components in a system. It can be useful for visualizing the flow of data and actions during a particular test case.

    Here’s an example sequence diagram for the “Add User” test case:

Admin User -> User Management System: Click "Manage Users" link
User Management System -> Admin User: Display "User List" page
Admin User -> User Management System: Click "Add User" button
User Management System -> Admin User: Display "Add User" form
Admin User -> User Management System: Enter user information
Admin User -> User Management System: Click "Save" button
User Management System -> Database: Save user information
User Management System -> Admin User: Redirect to "User List" page
User Management System -> Admin User: Display new user in user list
These diagrams can help clarify the testing process and ensure that all necessary components are accounted for.

PlantUML

As usual, ask again!

Here are the answer along with the generated diagram from draw.io.

Questions?
If you do not mind, please help me write down both test diagram above, the test case diagram and sequence diagram in PlantUML format for use with draw.io?
Response
Sure, here are the PlantUML formats for both the test case diagram and sequence diagram:

Test Case Diagram:

@startuml
|User Management System|

left to right direction
skinparam packageStyle rectangle

rectangle "User Management" {
  (uc1) << (1) Login >>
  (uc2) << (2) Register >>
  (uc3) << (3) Update Profile >>
  (uc4) << (4) View Roles >>
  (uc5) << (5) Add Role >>
  (uc6) << (6) View Permissions >>
  (uc7) << (7) Add Permission >>
  (uc8) << (8) Add User Role >>
  (uc9) << (9) Remove User Role >>
  (uc10) << (10) Add Role Permission >>
  (uc11) << (11) Remove Role Permission >>
}

(1) <.. (2): include
(1) <.. (3): include
(4) <.. (5): include
(6) <.. (7): include
(8) <.. (9): include
(5) <.. (10): include
(6) <.. (11): include
@enduml

User Management: PlantUML: Test: Test Diagram

Sequence Diagram

@startuml
|User Management System|

actor Admin

participant UserController
participant UserService
participant Database

Admin -> [Manage Users]

[Manage Users] -> UserController: <<create>>
UserController -> UserService: <<create>>
UserController -> UserService: add_user(user_info)
UserService -> UserService: validate_user_info(user_info)
UserService -> Database: Add User to Database
@enduml

User Management: PlantUML: Test: Sequence Diagram

PUML Source

You can obtain the schematic source of PlantUML diagram here:


What is Next 🤔?

We are almost finished with artefact.

Consider continue reading [ User - Deploying Artefact ].

Thank you for reading.