What is a Client and a Server? Understanding Client and Server:-Software Testing

 

 What is a Client and a Server?

Introduction: Ever wondered how your browser magically fetches a webpage when you click a link? Welcome to the world of clients and servers!

Understanding Clients and Servers:



Client:
Think of the client as a customer in a restaurant. The customer (client) sits at a table (device) and places an order (request) with the waiter (browser or app). The client is the one initiating the request for something (data /services).

Server:
Now, imagine the server as the kitchen. It’s where the orders go to get processed. The kitchen (server) prepares the meal (data or service) and sends it back to the table (client) via the waiter (browser or app). The server is a powerhouse working behind the scenes to fulfill requests.

 Example: When you open browser  on your phone, and search for a news, browser (client) sends a request to the news site’s server asking for the latest news. The server processes this request, pulls up the articles, and sends them back to your browser, which displays them for you.

Understanding the client-server architecture is essential for software testers as it impacts how applications function, how they should be tested, and where potential issues might arise.



Components of Client-Server Architecture

  • Front-End (Client-Side): The user interface where user interactions occur. Testing focuses on UI/UX, functionality, and client-side validation.
  • Back-End (Server-Side): The server that handles business logic, processes requests, and interacts with the database. Testing includes functionality, security, and performance.                     

Testing Scenario:

Imagine testing an online banking app. The app (client) sends a request to view account balances. The server processes this request and sends back the data. Testers need to ensure that the server correctly responds with accurate and timely information.

we will see  an detailed real time example below and what can be tested in each step :

Scenario: User Transferring Money

                                     (Image Source: https://www.freepik.com)

Initiate Transfer: 
The user enters transfer details (amount, recipient) on the banking app (client).

What can be Tested ?
  • Verify that input fields are properly aligned and labels are correct.
  • Enter an invalid amount (like negative values or text) and ensure the client displays an error message.
  • Ensure that the form is accessible to all users, including those with disabilities(Accessibility Testing)
  • Verify that screen readers can read the form fields and labels.
  • Assess the ease of use of the transfer form, including user navigation and interaction.
Send Request:
The app sends a transfer request to the web server.

 What can be Tested ?
  • Use Postman to test the API endpoint for the transfer request and verify it returns the correct response.
  •  Ensure data is transmitted securely using HTTPS.
  •  Inspect network traffic to confirm data encryption.
  •  Test how the server handles multiple transfer requests simultaneously.
  •  Simulate a high number of transfer requests and check server response times.

Process Request:

The web server passes the request to the application server, application server verifies the user’s balance and validates the transfer details. 

    What can be Tested ?
  • Verify that the application server correctly processes the request, including balance checks and validation.
  •  Check that the server properly identifies insufficient funds or any other error and returns the appropriate error .
  •  Ensure proper integration between the web server, application server, and database.
  •  Ensure that only authorized users can initiate transfers(Attempt to initiate a transfer without proper authentication and confirm it’s blocked).
 Execute Transfer:
The application server updates the sender's and recipient's account balances in the database (database server) and  transaction is recorded in the transaction history.  

    What can be Tested ?
  •  After a successful transfer, check the database to confirm the correct debit and credit entries.
  •  Transaction Testing: Ensure that transactions adhere to ACID properties (Atomicity, Consistency, Isolation, Durability).
  •  Test that if a transaction fails, no partial updates are made to account balances.
  •  Attempt to inject malicious SQL commands and verify the database is secure.
Confirmation:
 Server sends the success message to the client.

   What can be Tested ?
  • Verify that the server sends the correct response message (success or failure) to the web server.
  • Check that the server’s response contains accurate transaction details or error codes.
  • Ensure the client displays the correct success message and updates the UI accordingly.
  • Verify that the UI shows the updated balance and a success notification.
  • Measure and analyze response times to ensure they are within acceptable limits.
User Notification:
The client displays the success message to the user and updates the UI to reflect the new balance.

What can be Tested ?
  • Verify that the success notification is shown in the expected location on the screen and matches the design specifications.
  • Simulate a failed transfer and verify that an appropriate error message is displayed.

Conclusion: In software testing, the interaction between clients and servers is crucial for ensuring that applications perform correctly under various conditions. Testing both sides helps catch potential issues early and ensures a smooth user experience.

Quiz:


Comments

Popular posts from this blog

White Box Testing vs. Black Box Testing: Understanding the Differences

Alpha and Beta Testing: Key Differences and Why They Matter

Understanding What is Bug? Essential Steps to Effective Bug Logging