Contract Testing with API Stubs in Pytest

In modern software development, applications often rely on external APIs or microservices to function. Ensuring that these integrations work correctly while maintaining flexibility requires contract testing. Contract testing validates that API consumers and providers adhere to predefined agreements, preventing breaking changes in distributed systems. In this blog, we’ll cover: What contract testing is and why […]
Integration Testing with Real API Stubbing in Pytest

Integration testing ensures that different parts of an application work together as expected. When an application interacts with external services, real API calls can slow down tests, introduce dependencies, and make the testing process unreliable. To mitigate these issues while keeping tests close to real-world scenarios, API stubbing is used. In this blog, we’ll cover: […]
Mocking External Services in Pytest

Scenario: Mocking an API Call in Pytest Let’s assume we have a function get_weather_data() that fetches weather details from an external API using the requests library. Since requests.get() makes an actual network call, we need to mock it in our tests. Using Pytest’s monkeypatch to Mock API Calls Breakdown: We define mock_requests_get() to return a […]
Persist Test Results after Docker Container stop

To persist test results generated by automated tests in a Docker container, you can use Docker volumes. Docker volumes allow you to store data outside of the container’s filesystem, ensuring that the data persists even after the container stops or is removed. Step 1: Set Up Your Project Structure First, organize your project directory. Here’s […]
AI + Automation

AI Agents to drive Test Automation AI agent in s/w testing can effortlessly perform Browser Automation with plain english instructions e.g browser-use.com Integrate AI agents into existing Automation Framework AI powered Testing Tools Popular AI powered tools which are built in combination of (AI Agents + Gen AI) with live demo on how these work […]
Percentiles and Moments

Introduction Statistical measures like percentiles and moments are crucial in understanding data distributions. Percentiles describe the relative standing of a data point in a dataset. Moments capture various aspects of a distribution such as centrality, spread, skewness, and kurtosis. These concepts are widely used in descriptive statistics, machine learning, risk analysis, and anomaly detection. 1. […]
PDF (Probability Desity Function) and PMF (Probability Mass Function)

These functions help describe the distribution of random variables and form the backbone of statistical modeling, machine learning, and data-driven decision-making. Probability Mass Function (PMF) – Used for discrete random variables. e.g dice rolls Probability Density Function (PDF) – Used for continuous random variables. e.g height measurements Probability Mass Function (PMF) A Probability Mass Function […]
Mean, Standard Deviation and Variance

Mean Formula for Mean: Where: is the sum of all data points n is the number of data points in the set. Variance Variance measures how far each data point in the set is from the mean. It gives an idea of how spread out the data is. A small variance indicates that […]
NoSQL (Non-Relational Databases) – Foundation

1. Key-Value Stores The most basic and efficient types of NoSQL databases. In these databases, data is stored as pairs of keys and their associated values, making them extremely fast and ideal for certain use cases like caching and storing session data. Key: This is the unique identifier for a piece of data. Think of it […]
Data Science – Foundation

What is Digital Transformation? The process of integrating digital technology into all aspects of a business. This includes updating existing processes, operations, and even creating entirely new models that harness the benefits of emerging technologies like Big Data, machine learning, and cloud computing. It is an organizational and cultural shift driven by data. Originally a […]