Posts

Showing posts from January, 2024

Building Custom YAML-DSL in Python

Image
  In the realm of developement, there are instances when a generic programming language might not fully capture the specificity of a domain or the nuances of a particular problem. This is where Domain-Specific Languages or DSLs come into play. DSLs are specialized languages designed to address specific problem domains, offering a more expressive and tailored solution. In this blog post, I will guide you through the process of building a custom DSL in Python, a versatile and widely-used programming language. Before delving into the intricacies of building a custom DSL, it's crucial to grasp the fundamental concepts. A DSL, in essence, is a language tailored to a specific problem domain. In our case, it will be created using Python, a language renowned for its readability and simplicity. YAML with DSL ? YAML-DSL proves to be a suitable choice for both individuals, with technical backgrounds and for their non-technical colleagues, particularly when dealing with simple syntax. task...

eBPF, Service Mesh and Sidecar

Image
  The operating system is like the boss of your computer, handling security, networking, and keeping an eye on what's happening. But tweaking or improving the core part of the operating system, called the kernel, is a bit tricky because it's mainly focused on keeping things stable and secure. Most cool new stuff usually happens outside the core system, in what we call the user space. That's where people add extra features or functions. However, thanks to " eBPF ", we now have a way to make big improvements right at the core level of the operating system. This has opened the door for some really exciting changes in how our computers handle networking, security, and keeping track of what's going on. There are many use cases of eBPF, such as: High-Performance Networking for Cloud-Native Apps. More efficient authorization of network traffic at the third (L3) and fourth (L4) layers of the OSI model. Fine-Grained Observability Data Insights with Low Overhead. Insigh...

Understanding Condition Coverage in Software Testing

Image
  Introduction: Condition Coverage is a popular testing technique that provides insights into the percentage of branches executed during testing. In this article, we'll explore what is Condition Coverage , Its importance, How it works, and many more! So Without delaying further, let's Start! What is Condition Coverage? Condition coverage in software testing is also known as Predicate Coverage. It guarantees that testing includes the execution of both branches in a decision, like an if statement. If a decision point has different conditions (using AND or OR), Condition coverage makes sure we've tested all the different combinations of conditions. Condition Coverage = (Number of tested conditions / Total number of conditions) * 100 This metric gives a percentage that indicates the proportion of branches executed during testing. Let's understand this with an example: function checkNumberSign(number) { let result; if (number > 0) { result = "Positi...

Why do I need a unit testing tool?

Image
You could probably meet the deadlines and test the logic behind every LOC.  When dealing with a function that incorporates multiple logic paths and various edge cases, the traditional approach of cluttering the function with numerous assert statements for different scenarios can lead to code bloat. This not only makes the code harder to read and maintain but also complicates the testing process. However, testing conditions that go beyond simple equality comparisons, such as checking if a specific exception is raised, can pose challenges. Unit testing frameworks offer dedicated methods like self.assertRaises() that streamline the verification process UNIT TESTING Unit testing is a software testing approach where you test each of the components that you built individually to ensure if what you have intended to have been implemented.In case of huge codebases - Automation testing is much more preferred. There are different types of unit testing in general : Different types of Unit T...

Revolutionizing Software Testing with Feature Flags

Image
Feature flags have become a vital component of DevOps, allowing developers to test and deploy new features without disrupting the user experience. Feature flags , also known as feature toggles, act as conditional statements that enable or disable code portions. This means that developers can release new features incrementally, rather than all at once, reducing the risk of errors and minimizing downtime. Yeah, you are right. This seems like a deployment strategy. Fundamentally, feature toggles offer a way to release new features safely and with minimal risk. By hiding new features behind a flag or toggle, developers can test and refine them before they are fully released. This approach allows developers to receive feedback on new features and make any necessary adjustments before they are widely available to users. Additionally, flags can be used to control access to features, allowing developers to release new functionality gradually to specific user groups. Integrating conditional fla...

All about System Integration Testing in software testing

Image
  Introduction Ever wondered how your favorite apps or software work so smoothly? Well, there's a behind-the-scenes hero called System Integration Testing (SIT) that makes sure all the different parts of a software interract to each other seamlessly. In this Article we'll explore What is SIT, Why we need it, it's disadvantages and many more... Excited Right? Me too! So,Without delaying further Let's dive deep into the Topic What is System Integration Testing(SIT)? Before we move further, Let's understand what is SIT! So, System Integration Testing (SIT) is a software testing technique that evaluates how individual modules within a larger system interact seamlessly and functionally. It's typically performed in the conclusion of the software development cycle. SIT includes black box, smoke, and regression testing to identify issues caused by integrating new components or changes to existing ones Why SIT? So, Now we know what is System Integration Testing in soft...

BDD Testing with Cucumber-js

Image
  Cucumber-js and BDD are not new, still many developers are fairly unfamiliar with them, the two together can be very powerful tools for both non-tech people and developers. What Is BDD? BDD is short for Business Driven Development, it's way to close the gap between business people and technical people. Basically, BDD has evolved from TDD, there's a high chance that you might even be doing BDD without knowing it, as sometimes the lines between them aren't clear. So what's the difference between them, both are automated tests right ? Well, the difference is that we use the language of our end-users, i.e. the business or domain language such as Given-When-Then , to capture like a story in an executable format. For example, GIVEN User is on Wordpress Registration Page. WHEN he enters all the required information. THEN his account is created. The “given” part is where we declare preconditions. In our example above we had a user. Next, the “when” part contains the action y...

How to choose your API Performance testing tool – A guide for different use cases

Image
  API has definitely become a main source of building the business logic of any product. It serves as an intermediary that allows different software systems to communicate and interact with each other either by externally sourced APIs or crafting our own in-house solutions. WHY DO WE NEED API PERFORMANCE TESTING? Imagine you are building a streaming application; you would need to check how fast your movie loads when your users click on it. You would need to assess the scalability of APIs, ensuring they can handle growing user bases and increased demand without degradation in performance. No one would want to be watching it like Now, let's take a deep dive into the world of API performance testing – an aspect that can make or break the user experience. List of types of API performance testing: API Performance Testing : Objective : Assesses how fast or resource efficient your test object is, providing insights into its overall responsiveness and improve API performance API Load Tes...

Dignify Your Test Automation with Concise Code Documentation

Image
  If you already are busy with high priority tasks like regression testing, you can be left wondering if it is a good use of time as sometimes, you have to read existing code for automated tests to figure out what is it they are supposed to achieve. Common causes of confusion are: The names of methods, functions, and classes do not follow a clear naming convention and are not very informative about their purposes. There is little or no documentation in the form of documentation strings (docstrings) or comments that could provide definitions for functions and classes. Why Documenting Your Code Matters We've all been there – you inherit a test automation suite, and it feels like you're deciphering an ancient manuscript. Without proper documentation, understanding the purpose of each test case or the rationale behind a particular design choice can be akin to solving a complex puzzle. Documentation isn't just a box to tick; it's the key to maintaining, scaling, and collabor...

How to Do Java Unit Testing Effectively

Image
Java unit testing is a process used by developers to test individual components of a Java application. It helps ensure that each piece of code, or unit, functions correctly on its own. By isolating each unit and testing it independently, developers can identify and fix issues early, improving the overall quality of the application. So, are you looking for the answer to the main question, how to execute Java unit testing? Well, to execute Java unit testing, you have to typically use a testing framework like JUnit. First, write test cases that define the expected behaviour for a unit. Then, run these tests using the framework, which automatically checks if the unit's actual behaviour matches the expectations. In this guide, you will find all the steps needed to conduct Java unit testing effectively, presented in an easy-to-understand manner without technical jargon. What is Unit Testing? Unit testing involves independently testing individual units or components of software to ensure...