arbisoft brand logo
arbisoft brand logo

A Technology Partnership That Goes Beyond Code

  • company logo

    “Arbisoft is an integral part of our team and we probably wouldn't be here today without them. Some of their team has worked with us for 5-8 years and we've built a trusted business relationship. We share successes together.”

    Jake Peters profile picture

    Jake Peters/CEO & Co-Founder, PayPerks

  • company logo

    “They delivered a high-quality product and their customer service was excellent. We’ve had other teams approach us, asking to use it for their own projects”.

    Alice Danon profile picture

    Alice Danon/Project Coordinator, World Bank

1000+Tech Experts

550+Projects Completed

50+Tech Stacks

100+Tech Partnerships

4Global Offices

4.9Clutch Rating

Trending Blogs

    81.8% NPS Score78% of our clients believe that Arbisoft is better than most other providers they have worked with.

    • Arbisoft is your one-stop shop when it comes to your eLearning needs. Our Ed-tech services are designed to improve the learning experience and simplify educational operations.

      Companies that we have worked with

      • MIT logo
      • edx logo
      • Philanthropy University logo
      • Ten Marks logo

      • company logo

        “Arbisoft has been a valued partner to edX since 2013. We work with their engineers day in and day out to advance the Open edX platform and support our learners across the world.”

        Ed Zarecor profile picture

        Ed Zarecor/Senior Director & Head of Engineering

    • Get cutting-edge travel tech solutions that cater to your users’ every need. We have been employing the latest technology to build custom travel solutions for our clients since 2007.

      Companies that we have worked with

      • Kayak logo
      • Travelliance logo
      • SastaTicket logo
      • Wanderu logo

      • company logo

        “Arbisoft has been my most trusted technology partner for now over 15 years. Arbisoft has very unique methods of recruiting and training, and the results demonstrate that. They have great teams, great positive attitudes and great communication.”

        Paul English profile picture

        Paul English/Co-Founder, KAYAK

    • As a long-time contributor to the healthcare industry, we have been at the forefront of developing custom healthcare technology solutions that have benefitted millions.

      Companies that we have worked with

      • eHuman logo
      • Reify Health logo

      • company logo

        I wanted to tell you how much I appreciate the work you and your team have been doing of all the overseas teams I've worked with, yours is the most communicative, most responsive and most talented.

        Matt Hasel profile picture

        Matt Hasel/Program Manager, eHuman

    • We take pride in meeting the most complex needs of our clients and developing stellar fintech solutions that deliver the greatest value in every aspect.

      Companies that we have worked with

      • Payperks logo
      • The World Bank logo
      • Lendaid logo

      • company logo

        “Arbisoft is an integral part of our team and we probably wouldn't be here today without them. Some of their team has worked with us for 5-8 years and we've built a trusted business relationship. We share successes together.”

        Jake Peters profile picture

        Jake Peters/CEO & Co-Founder, PayPerks

    • Unlock innovative solutions for your e-commerce business with Arbisoft’s seasoned workforce. Reach out to us with your needs and let’s get to work!

      Companies that we have worked with

      • HyperJar logo
      • Edited logo

      • company logo

        The development team at Arbisoft is very skilled and proactive. They communicate well, raise concerns when they think a development approach wont work and go out of their way to ensure client needs are met.

        Veronika Sonsev profile picture

        Veronika Sonsev/Co-Founder

    • Arbisoft is a holistic technology partner, adept at tailoring solutions that cater to business needs across industries. Partner with us to go from conception to completion!

      Companies that we have worked with

      • Indeed logo
      • Predict.io logo
      • Cerp logo
      • Wigo logo

      • company logo

        “The app has generated significant revenue and received industry awards, which is attributed to Arbisoft’s work. Team members are proactive, collaborative, and responsive”.

        Silvan Rath profile picture

        Silvan Rath/CEO, Predict.io

    • Software Development Outsourcing

      Building your software with our expert team.

    • Dedicated Teams

      Long term, integrated teams for your project success

    • IT Staff Augmentation

      Quick engagement to boost your team.

    • New Venture Partnership

      Collaborative launch for your business success.

    Discover More

    Hear From Our Clients

    • company logo

      “Arbisoft partnered with Travelliance (TVA) to develop Accounting, Reporting, & Operations solutions. We helped cut downtime to zero, providing 24/7 support, and making sure their database of 7 million users functions smoothly.”

      Dori Hotoran profile picture

      Dori Hotoran/Director Global Operations - Travelliance

    • company logo

      “I couldn’t be more pleased with the Arbisoft team. Their engineering product is top-notch, as is their client relations and account management. From the beginning, they felt like members of our own team—true partners rather than vendors.”

      Diemand-Yauman profile picture

      Diemand-Yauman/CEO, Philanthropy University

    • company logo

      Arbisoft was an invaluable partner in developing TripScanner, as they served as my outsourced website and software development team. Arbisoft did an incredible job, building TripScanner end-to-end, and completing the project on time and within budget at a fraction of the cost of a US-based developer.

      Ethan Laub profile picture

      Ethan Laub/Founder and CEO

    Contact Us
    contact

    Understanding API Testing and Postman

    November 11, 2024
    https://d1foa0aaimjyw4.cloudfront.net/Understanding_API_Testing_and_Postman_Blog_2cf9dcc4a2.jpg

    APIs are everywhere. From checking the weather on your phone to making online purchases, APIs are the silent helpers behind many of the services we rely on every day. But have you ever wondered how they work or how we make sure they’re doing their job correctly? That’s where API testing comes in.

     

    If you’ve ever used an app or website and wondered how it pulls data from other services, like showing your social media feed or fetching product details from a database, it’s likely using an API. Testing these APIs is crucial to ensuring they function smoothly and securely. 

     

    In this blog post, we will explore how to test REST API methods so let's look at them in more detail.

     

    So, What API is Afterall?

    In simple terms, an API Application Programming Interface is a set of rules that allows different software applications to talk to each other. Imagine you’re at a restaurant. You (the user) are placing an order (request) to the waiter (the API), and the waiter takes that order to the kitchen (the server), which sends back your food (response). This entire process happens whenever you use an app or website that pulls data or interacts with another system. There are several types of API’s. Let’s take a quick look. 
     

    Types of APIs You Should Know About

    APIs come in different types, each with its own purpose and way of working. Here are a few:

    • SOAP (Simple Object Access Protocol): This type of API is used for secure transactions and structured communication, and is often found in older systems.
    • GraphQL: A newer type that allows you to request specific data from a server, making it more efficient for some use cases.
    • gRPC: Used in systems that need fast and efficient communication between different services, like in large-scale systems.
    • REST (Representational State Transfer): By far the most common type. REST APIs are simple, and flexible, and use standard HTTP methods like GET, POST, PUT, and DELETE to interact with data.

     

    HTTP Methods: What They Do

    Once you’re familiar with the types of APIs, it’s time to understand how they communicate. API endpoints use HTTP methods to define what action you want to perform. Here’s a quick rundown:

    • GET: Get data from the server (e.g., fetching a list of users).
    • POST: Send data to the server (e.g., submitting a form).
    • PUT: Update existing data (e.g., editing a user profile).
    • DELETE: Remove data (e.g., deleting an account).

     

    What Are API Endpoints?

    Next, let’s explore the key component of any API request: the endpoint. Endpoints are like doorways that connect to the data you want from an API. Every time you make a request to an API, you’re essentially knocking on one of these doors. The API will send you the information you asked for, as long as you know where to knock (the URL) and have the right permission (headers and parameters).

    An End Point Request URL can be constructed as below:

    Base URL/resource/(Query/Path)Parameters

    Let’s understand API endpoints in detail:

    Base URL:

    The term “Base URL” refers to the root address of a web application that remains consistent across different pages of a website.

    Example: https://www.google.com

    Resources:

    ​​Resources represent specific collections or a set of data in an API that can be accessed and altered through requests from the server.

    Example:

    https://www.google.com/map - map resource will help you to access the map API.

    Query Parameters:

    It is used to sort or filter the resource. Query parameters are identified with “?” and separated by “&.”

    Example: https://amazon.com/orders?date=2020-02-20&sort_by=desc

    Path Parameters:

    Path parameters are variable parts of a URL path. It is a sub-resource that keeps on changing with every API request. They are typically used to point to a specific resource within a collection, such as a user identified by ID.

    Example: https://www.google.com/Images/1123343  (After / the ID is a path parameter.)

    Headers:

    Example: Most commonly used API headers include:

    Authorization: The purpose of this header is to authenticate requests. Different types of authorization include Basic auth, OAuth, JWT bearer, api key, bearer token. 

    The token-based authentication is often represented by the keyword Bearer followed by the access token Bearer you_access_token;  this ensures that the request has the necessary permissions to access the API. 

     

    Content-Type: It defines the format of the request body, such as application/JSON or application/xml, which helps the server interpret the data. 

     

    Why Test API Endpoint?

    APIs are designed to do specific tasks, and the way an app works depends on APIs to get the right response. Sometimes, a single action in an app calls several APIs at once. If one of these APIs breaks, it can cause the whole system to fail and the app might stop working properly.

     

    APIs also handle sensitive information, like login details, and testing them helps ensure that unauthorized users can't access private data or perform actions they shouldn't be able to. Since many different apps might use the same API, a problem with one API can affect several apps at once. This makes testing APIs essential to prevent issues from reaching the users.

     

    For example, think about the payment API on an online shopping site. When a customer is ready to check out, this API handles their payment. If there's a mistake with the payment API, the customer might not be able to complete the purchase, which could lead to lost sales and unhappy customers. A failure in the payment API doesn’t just affect one customer; it could stop everyone from completing their orders.

     

    Testing API Endpoints:

    API testing can be achieved both manually and automatically. The choice between manual and automated testing depends on several factors, such as the project’s requirements, how complex the API is, how often the API needs testing, the time available, and the extent of testing needed. 

     

    For instance, if we require frequent testing of API endpoints in deployments or builds, we could opt for automated testing, and if the project involves some unique test cases that don’t require testing often, then we can opt for manual testing. 

     

    Similarly, if the API goes through regular updates that require continuous validation to catch regressions, then automating the API could be the optimal option, and if frequent changes are not required, then we can select the latter. 

    Let's take a look at how to perform API testing using Postman.

     

    Why Postman?

    Postman is a widely popular tool used by many organizations. It facilitates both manual and automated tests using Javascript. Its user-friendly interface makes it easy to set up and allows even less experienced beginners to interact with the API’s without digging into details to make requests, analyze the responses, and debug issues against it.

    Postman also allows us to arrange our requests by organizing them into collections and adding tests to verify the responses from your API.  We can also create environments to store different API endpoint setups and shift between them easily.

    Here's a step-by-step guide to walk you through the process:

     

    Step 1: Download and Install Postman

    • Visit the Postman website and download the application that is compatible with your operating system.

     

    Step 2: Setup your Environment

    • Once Installed, open Postman and click on the Environment button from the left panel.
    • Click on the Add button to create a new Environment and provide a name for your Environment (e.g. Development, Staging, or Production).

     

    ys blog 1.png

     

    • Define your necessary Environment variables for instance baseURL, api_key, access_token, refresh_token etc.

     

    ys 2.png

     

    Step 3: Create your Collection

    • To create a Collection, click on the “new” button choose a collection from the options, and provide a name to your collection e.g. API tests.

    ys 3.png

     

    Step 4: Add Request

    • To add a request to your collection, click on the “Add request” located under the dotted dropdown button next to your collection name.

     

    ys 4.png

     

    • Provide a name to your request and select the type of the HTTP method of your request (e.g. GET, POST, PUT, DELETE).
    • Enter the endpoint request URL or use environment variables for dynamic URLs (e.g. {{base_url}}/resource).

     

    ys 5.png

     

    • Add all necessary parameters (e.g. api-key), headers such as application/json , Authorization bearer_token, and request payload body required depending upon the type of HTTP method of your API. 

    ys6.png

     

    ys pp.png

     

    • Save your request, click on the send button to Request and the Server sends the response back. 
    • For a successful request, you’ll receive a status response of 200 ok.

     

    ys 7.png

     

    Step 5: Writing Test Scripts

    Scripts in Postman allow us to write tests that validate the response data, status data, or other conditions to check if an API request is returning correct results.

     

    • Go to the Scripts tab of your request.
    • Use JavaScript to write tests that will validate your response. Here is an example of a script that validates the response status returned as 200.  

     

    ys9.png

     

    Step 6: Run Collection

    Once we have created multiple requests within our collection, we can use the Collection Runner to execute them sequentially. For this purpose,

    • Click the three dots button at the right side of your collection name and select Run Collection.

     

    ys10.png

    • Under the Run configuration header, specify the number of iterations and delay between requests and data files (if required).
    • Click the run collection button at the bottom to execute your request. 

     

    ys12.png

     

    • Each request will be executed in the order they are listed in the collection, analyze the results, and ensure all tests pass. 

     

    ys13.png

     

    ys14.png

     

    Conclusion:

    API testing is an important part of making sure applications work well, are secure, and run smoothly. By understanding the basics of APIs, methods, and endpoints, and using tools like Postman, you can easily test your APIs and find problems early in your development process. This guide will help you get started with API testing in Postman, ensuring better quality and confidence in your development projects.

      Share on
      https://d1foa0aaimjyw4.cloudfront.net/Yasra_Shams_2f0f2e68e6.jpg

      Yasra Shams

      I have over 7 years of experience as a Senior QA engineer with sound knowledge of QA methodologies, tools and processes. I specialize in developing and implementing effective testing strategies for complex software systems with expertise in both manual and automated testing to ensure high-quality software delivery.

      Related blogs

      0

      Let’s talk about your next project

      Contact us