Monday, January 2, 2023

Introduction to Postman API Testing

 Postman API:

  • Postman is an API Development Environment that helps developers easily test and work with APIs.
  • It is used for backend testing where we enter the end-point URL, send the request to the server, and receive the response back from the server.
  • It provides an easy-to-use interface for developing, testing and debugging REST APIs.
  • Postman also includes a comprehensive library of pre-defined requests and response objects, making it an ideal tool for quickly testing and prototyping APIs.
Request Methods:
  • GET - Get requests are used to retrieve information from the given URL.
  • POST - To send the new data to an API.
  • PUT - This method is used to update the existing data.
  • DELETE - This is used to remove or delete the existing data.

API test actions:
  1. Verify the correct HTTP status code.
  2. Verify response payload: Check valid JSON body and correct field names, types, and values - including in error responses.
  3. Verify response headers: HTTP server headers have implications on both security and performance.
  4. Verify correct application state: This is optional and applies mainly to manual testing, or when a UI or another interface can be easily inspected.
  5. Verify basic performance sanity: If an operation was completed successfully but took an unreasonable amount of time, the test fails.

HTTP Status Codes:


👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Saturday, December 31, 2022

The Essential Performance Testing Metrics Every Developer Should Know

  1.  Processor Usage: Time spent by the processor to execute non-idle threads.
  2. Memory use: The available physical memory to process on a system.
  3. Disk time: It is the time taken by the disk to read or write a request.
  4. Bandwidth: Bits per second used by a network interface.
  5. Private bytes: A specific number of bytes allocated to a particular process.
  6. Response time: The time between the user’s request and the first response character.
  7. Throughput: Rate of requests received per second by a network. (The formula is Throughput = (number of requests) / (total time). )
  8. Maximum active sessions: Maximum number of sessions that may stay active at once.
  9. Thread (user) counts: Determining the well-being of the application by checking the number of running and active threads.
  10. Latency - JMeter measures the latency from just before sending the request to just after the first response has been received.
  11. Think Time - the time between two transactions of user actions. 
    (Login -> Think Time -> Search -> Think Time -> Logout). 
    The average thinking time could be in the range of 3 to 10 seconds for a normal user.
  12. Error rate - Measures the number of errors that occur in each request.
  13. Network latency - Measures the time it takes for a request to travel from the client to the server.
  14. Transaction time: Measures the time it takes for a transaction to complete.
  15. Resource utilization: Measures the number of resources used by the server to handle requests.
  16. Memory usage: Measures the amount of memory used by the server to process requests.
  17. Load test scalability: Measures how well the server can handle an increasing amount of requests.
  18. Page load time: Measures the time it takes for a web page to load.

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Basic concepts of Performance Testing

 Performance Testing

  • Performance testing is a type of software testing that is used to evaluate the speed, scalability, and stability of a system. It is used to ensure that the system can handle the expected load and volume of traffic.

Types:
  1. Load Testing
  2. Stress Testing
  3. Data/Volume Testing
  4. Scalability testing
  5. Endurance testing
  6. Spike testing
Load Testing:
  • Load testing is a generic term covering Performance Testing and Stress Testing.
  • Testing the app with the maximum number of users.
  • To measure the performance under the expected load.
Stress Testing:
  • The system is under extreme load conditions, such as peak user activity or maximum transaction throughput.
  • Testing the application with MORE than the maximum number of users.
  • To measure performance under a load much higher than expected.
Endurance Testing:
  • Endurance Testing is done to ensure the software can handle the EXPECTED load over a long period.
Spike Testing:
  • System by SUDDENLY increasing the load (e.g. the number of users or transactions) to check how it responds.
Data/Volume Testing:
  • System by increasing the number of users or transactions over a PERIOD OF TIME.
Scalability testing:
  • The system performs when the workload increases or decreases.

Common Performance Problem:
  • Most performance problems revolve around speed, response time, load time, and poor scalability.
  • A slow-running application will lose potential users.
  • Long Load time - While some applications are impossible to make load in under a minute, Load time should be kept under a few seconds if possible.
  • Poor response time - Response time is the time it takes from when a user inputs data into the application until the application outputs a response to that input. Generally, this should be very quick. Again if a user has to wait too long, they lose interest.
  • Poor scalability - A software product suffers from poor scalability when it cannot handle the expected number of users or when it does not accommodate a wide enough range of users.
  • Bottlenecking  - Bottlenecking is when either coding errors or hardware issues cause a decrease in throughput under certain loads.

Common performance bottlenecks are:
  • CPU utilization
  • Memory utilization
  • Network utilization
  • Operating System limitations
  • Disk usage

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

The Essential Qualities of a Good Tester: A Complete Guide

  1.  Problem-solving skills: A good tester should be able to think strategically and come up with creative solutions to problems they encounter while testing.
  2. Communication skills: A good tester should be able to effectively communicate the results of their tests to the development team.
  3. Technical knowledge: A good tester should have a solid understanding of the technology they are using to test.
  4. Writing skills: A good tester should be able to document their testing process in order to help the development team track and debug problems.
  5. Patience: A good tester should be patient and willing to take the time needed to thoroughly test the software.
  6. Flexibility: A good tester should be able to adjust their testing strategies and processes in order to accommodate changes in the software they are testing.
  7. No compromise on the quality.
  8. Negative thinking.

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Introduction to JMETER and Performance Testing

 JMeter

  • JMeter is an open-source load-testing tool used by developers and performance engineers to measure the performance of web applications.
  • It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types.
  • Measure the application performance and response times.


Test Plan: (Top level directory)
  • A complete test plan will consist of one or more Thread Groups, logic controllers, sample-generating controllers, Listeners, Timers, Assertions, and configuration elements.
  1. Adding elements.
  2. Removing elements.
  3. Saving test plans.
  4. Running test plans.
  5. Stopping a test plan(immediate shutdown), Shutdown(graceful shutdown).
  6. Logging the info and errors.
Important components of a Test Plan:
  1. Thread Group
  2. Listeners
  3. Timers
  4. Assertions
Thread Group:
  • The beginning point of any test plan.
  • The thread group element controls the number of threads Jmeter will use to execute your test.
  • All controllers and samplers must be under a thread group.
Main properties of thread group:
  • Set the number of threads (simulation of a number of concurrent users).
  • Set the ramp-up period (time taken to threads up and running = ramp-up period/Thread 
Samplers:
  • Samplers send requests to the server and collect the response.
  • JMeter supports several types of samplers, including HTTP, FTP, JDBC, LDAP and SOAP.
Listeners:
  • Listeners can be added to test plans or thread group level.
  • Listeners provide a way to view the results of a test in JMeter.
  • Listener options - Graph result, view results tree, view result table, aggregate report, aggregate graph, response time graph.

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.