<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Harindu Mudunkotuwa on Medium]]></title>
        <description><![CDATA[Stories by Harindu Mudunkotuwa on Medium]]></description>
        <link>https://medium.com/@harindu61?source=rss-8a4bdb06a107------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LhtChmqGd2iM3hbccv6zeQ.jpeg</url>
            <title>Stories by Harindu Mudunkotuwa on Medium</title>
            <link>https://medium.com/@harindu61?source=rss-8a4bdb06a107------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 04:40:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harindu61/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Robot Framework: API Automation]]></title>
            <link>https://medium.com/@harindu61/robot-framework-how-i-handled-responses-with-a-list-of-multiple-objects-7a4bb69715c4?source=rss-8a4bdb06a107------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a4bb69715c4</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[robot-framework]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[api-testing]]></category>
            <dc:creator><![CDATA[Harindu Mudunkotuwa]]></dc:creator>
            <pubDate>Tue, 03 Sep 2019 09:31:12 GMT</pubDate>
            <atom:updated>2019-09-04T08:47:29.792Z</atom:updated>
            <content:encoded><![CDATA[<h3>Robot Framework API Testing: Responses with a list of multiple objects</h3><p>Recently I was assigned by my manager to an API project where I had to test several end points which are being used by some third party agents. As a part of it, I also thought of automating some of the more important test cases from the regression test suite. For this task I was recommended to use Robot framework, since it is more popular in my current company.</p><p>While doing this task, I came up with this small challenge where I had to validate one web service where there is a list of multiple objects about some policies. When an agent makes a request with his agent code to this service, it would return all the policies that are assigned to that particular agent as a list with multiple objects of policies, like the example response as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73f97edfca9084d072c9c66048a95e0c/href">https://medium.com/media/73f97edfca9084d072c9c66048a95e0c/href</a></iframe><p>Since I was a beginner to Robot framework and Python programming language, after looking into some online study materials, I came up with a solution for this by using a Python custom library. Due to the limitations of nested for loops in Robot framework and also since I personally prefer to use less number of assertions in the test cases, I created a separate method to validate each value in each object. As mentioned below, this method is returning if the values in the object are correct depending on the expected results. In this example, I get expected values for the validation by querying the database and pass it to the below method as a list as ‘fromDb’ list.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/50978ae1cf5795614a75d5953fe67740/href">https://medium.com/media/50978ae1cf5795614a75d5953fe67740/href</a></iframe><p>Now we can use the above python custom library method in our test cases like the example given below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16b038b3803fc9304f33754360fd6d0a/href">https://medium.com/media/16b038b3803fc9304f33754360fd6d0a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*1kGqFHWids4INu7NK0xaOA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a4bb69715c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>