<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hansika Chaudhary</title>
    <description>The latest articles on DEV Community by Hansika Chaudhary (@hansika_chaudhary_85d861b).</description>
    <link>https://dev.to/hansika_chaudhary_85d861b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3301170%2Fac21c0a7-173f-48e3-95f1-3ec1d6688459.jpg</url>
      <title>DEV Community: Hansika Chaudhary</title>
      <link>https://dev.to/hansika_chaudhary_85d861b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hansika_chaudhary_85d861b"/>
    <language>en</language>
    <item>
      <title>How I Automated API Testing and CI/CD Integration with Keploy</title>
      <dc:creator>Hansika Chaudhary</dc:creator>
      <pubDate>Fri, 27 Jun 2025 18:17:09 +0000</pubDate>
      <link>https://dev.to/hansika_chaudhary_85d861b/how-i-automated-api-testing-and-cicd-integration-with-keploy-1hph</link>
      <guid>https://dev.to/hansika_chaudhary_85d861b/how-i-automated-api-testing-and-cicd-integration-with-keploy-1hph</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Sharing my experience of moving from manual API testing to smart, automated testing using Keploy — and integrating it into my GitHub Actions workflow.&lt;br&gt;
tags: node, testing, ci, dev&lt;/p&gt;




&lt;h2&gt;
  
  
  From Manual Testing to Smart Automation with Keploy
&lt;/h2&gt;

&lt;p&gt;Testing APIs manually is something every developer gets used to. But as the complexity of a project increases, so does the effort to maintain test cases. During my latest project, I explored how to simplify this with AI — and the results were better than I expected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Overview
&lt;/h3&gt;

&lt;p&gt;I built a backend project named &lt;strong&gt;Event Tracker API&lt;/strong&gt; using Node.js, Express.js, and MongoDB Atlas. It supports basic CRUD operations to create, read, update, and delete events.&lt;/p&gt;

&lt;p&gt;Initially, I tested it using &lt;strong&gt;Thunder Client&lt;/strong&gt;, and later wrote &lt;strong&gt;unit&lt;/strong&gt;, &lt;strong&gt;integration&lt;/strong&gt;, and &lt;strong&gt;API tests&lt;/strong&gt; manually with Jest and Supertest. This gave me decent test coverage, but maintaining it wasn’t scalable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with Keploy
&lt;/h3&gt;

&lt;p&gt;Keploy allowed me to auto-generate test cases by simply interacting with my API. I didn’t have to manually define mocks or request payloads — it recorded real API calls and built test cases using them.&lt;/p&gt;

&lt;p&gt;What stood out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to write tests manually&lt;/li&gt;
&lt;li&gt;Real data was captured&lt;/li&gt;
&lt;li&gt;Tests were deterministic and replayable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I used my &lt;strong&gt;OpenAPI schema&lt;/strong&gt; and &lt;strong&gt;curl commands&lt;/strong&gt; to feed context. Keploy handled the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrating into GitHub Actions
&lt;/h3&gt;

&lt;p&gt;To automate everything further, I added Keploy to my GitHub Actions pipeline.&lt;/p&gt;

&lt;h4&gt;
  
  
  A few things I did:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Added &lt;code&gt;MONGO_URI&lt;/code&gt; as a GitHub Secret&lt;/li&gt;
&lt;li&gt;Updated my workflow YAML to install Keploy and run tests&lt;/li&gt;
&lt;li&gt;Increased the server boot time to avoid connection issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Seeing all green checks in the pipeline and a live badge in the README was satisfying.&lt;/p&gt;

&lt;h3&gt;
  
  
  API Testing with Chrome Extension
&lt;/h3&gt;

&lt;p&gt;I also used Keploy’s Chrome extension to test live API calls from websites I frequently use. This helped me understand how dynamic data from frontends can be captured and replayed for regression testing — without having access to backend code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Learnings
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AI-powered API testing is faster and more reliable than I expected.&lt;/li&gt;
&lt;li&gt;CI/CD integration gets easier once secrets and dependencies are handled properly.&lt;/li&gt;
&lt;li&gt;Keploy works well with real projects without requiring major changes.&lt;/li&gt;
&lt;li&gt;Keploy’s auto-recording of curl commands saved a ton of setup time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Visual Proofs
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwh159wb4xvioa8zevco4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwh159wb4xvioa8zevco4.png" alt="Image description" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdf2tmc65vhcjemjpemz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdf2tmc65vhcjemjpemz.jpg" alt="Image description" width="716" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;This was my first time using AI for testing and automating it in CI/CD. It was a great learning experience — not just about tools, but about best practices in building production-ready APIs.&lt;/p&gt;

&lt;p&gt;The full project is live on my GitHub:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/hansikachaudhary/event-tracker-api" rel="noopener noreferrer"&gt;https://github.com/hansikachaudhary/event-tracker-api&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Built with:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Node.js • Express • MongoDB Atlas • Jest • Supertest • Keploy&lt;/p&gt;

</description>
      <category>node</category>
      <category>api</category>
      <category>cicd</category>
    </item>
  </channel>
</rss>
