diff --git a/static/llm-full.txt b/static/llm-full.txt
new file mode 100644
index 000000000..1c3b7b59c
--- /dev/null
+++ b/static/llm-full.txt
@@ -0,0 +1,21955 @@
+# https://keploy.io llm-full.txt
+
+## Automated Testing with AI
+[2 minutes to 90% coverage. Try Now!](https://github.com/marketplace/keploy)
+
+# AI Generated Tests that actually that actually work!\|
+
+[Try for Free!](https://app.keploy.io/)
+
+[Book Cloud Demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Maximise Coverage, Minize Effort
+
+One platform to write verified tests using AI. Not just another ChatGPT wrapper.
+
+[\\
+\\
+Unit Testing\\
+\\
+Unit testing has never been this easy. Trade complex setups for one-click, accurate test generation with full coverage.](https://github.com/marketplace/keploy) [\\
+\\
+Integration Testing\\
+\\
+Automate integration tests with mocks, record-and-replay, replicating complex system interactions effortlessly.](https://github.com/keploy/keploy) [\\
+\\
+API Testing\\
+\\
+Be the first, be fast—automate API testing with Keploy catching issues early for faster results.](https://app.keploy.io/)
+
+10.3K+
+
+GitHub Stars
+
+543K+
+
+Keploy Extension Installs
+
+228K+
+
+Community of Developers
+
+397+
+
+Contributors
+
+
+
+
+
+Unit Testing Agent
+
+### Instant Unit Tests for Your Functions Files
+
+No flakes, no time waste —
+
+just accurate unit tests with high-coverage.
+
+Accurate Tests, Zero FlakinessLanguage-Trained AI Tests100% Unit Test Coverage
+
+Install Now
+
+
+
+"Using keploy really helps increase velocity while ensuring high quality"
+
+"Solid Unit Test Engineer for Modern Teams. The Github PR agent is awesome!"
+
+"Future of Microservices Testing. I don't write unit tests now!"
+
+API Testing and Mocking Agent
+
+## Turn API Calls into Test Cases & Mocks
+
+Automate API testing with **open-source** platform that records calls, replays them, and generates mocks. Integrates into CI/CD without needing test environments and gets you coverage.
+
+Record & Replay \- Records API calls coming to server into test cases and mocks (databases, http calls) using eBPF.
+
+Built for CI/CD \- Seamlessly integrates into pipelines (github actions, gitlab runners, bitbucket) without extra setup.
+
+Coverage-Friendly \- Works with JUnit, PyTest, Jest, Go-Test, and more to calculate test-coverage
+
+
+
+Senior Executive Member \- [Maruti Suzuki](https://keploy.io/#0)
+
+“Our collaboration with Keploy was remarkable. Their proactive support and platform have added significant business value to code-quality. ”
+
+Try Open Source
+
+
+
+## Test any tech-stack, anywhere!
+
+LanguagesDatabasesFrameworksCI/CD
+
+
+
+## Keploy Enterprise
+
+### Confident. Scalable. Reliable. Testing with AI for all scenarios
+
+Keploy scales with your team - with test deduplication, GitHub PR unit test agents, and CI/CD alerts. Track and improve testing coverage across repositories.
+
+AI-Driven Test Generation
+
+Automatically generate high-quality test cases to uncover edge scenarios and improve code coverage.
+
+GitHub PR Test Agent
+
+Automate unit test generation for every new PR, ensuring coverage, consistent builds across all repos.
+
+Centralized Reporting Dashboard
+
+Visualize real-time metrics like test coverage, failures, and quality insights in a single, easy-to-navigate console.
+
+Book a Demo
+
+
+
+### Smarter Test Deduplication
+
+Detect and remove redundant or overlapping tests, streamlining your suite for faster execution and cleaner results.
+
+### Global Coverage Insights
+
+Track code coverage and testing performance across projects and teams for a comprehensive organizational view.
+
+### Full CI/CD Integration
+
+Seamlessly integrate with your CI/CD pipelines to trigger tests, monitor failures, and notify teams in real-time.
+
+### Dedicated Enterprise Support
+
+Get priority access to Keploy’s expert team for guidance, troubleshooting, and onboarding tailored to your needs.
+
+### Cross-Repository Metrics
+
+Gain a unified view of test health, coverage, and trends across all repositories within your organization.
+
+### Edge Case Detection
+
+Leverage AI to identify edge scenarios missed by conventional tests, maximizing robustness and reliability.
+
+## We love when you Tweet!
+
+[I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20)
+
+[It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20)
+
+[Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20)
+
+[I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20)
+
+[I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20)
+
+[Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20)
+
+[Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20)
+
+[Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20)
+
+[It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20)
+
+[I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20)
+
+[It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20)
+
+[Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20)
+
+[I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20)
+
+[I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20)
+
+[Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20)
+
+[Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20)
+
+[Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20)
+
+[It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20)
+
+## Trusted, Secure, Community-Driven
+
+
+
+
+
+### Built on Open-Source
+
+
+
+### Trusted by Global Networks
+
+### Industry–
+
+### Leading Security
+
+### & Compliance
+
+Built with enterprise-grade security at its core, Keploy ensures your data is always protected.
+
+In short, No, we do not steal your data
+
+
+
+
+
+## Join the Keploy community
+
+[\\
+\\
+**Twitter** \\
+\\
+Let's talk about regression testing!](https://twitter.com/Keployio) [\\
+\\
+**Github** \\
+\\
+Contribute code to Keploy or report a bug](https://github.com/keploy/keploy) [\\
+\\
+**Slack** \\
+\\
+Connect and chat with other Keploy users](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) [\\
+\\
+**Youtube** \\
+\\
+Learn with Keploy team and community videos](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg) [\\
+\\
+**Linkedin** \\
+\\
+Follow us and connect with other Keploy engineers!](https://www.linkedin.com/company/74471957)
+
+Test with Keploy AI
+
+Get the power of AI to your Testing Pipelines!
+
+[Book a Demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## Unit Testing Best Practices
+21 Mar, 2025.[Community](https://keploy.io/blog/community)
+
+# 10 Essential Unit Testing Best Practices For Bug-Free Code
+
+12 min read
+
+
+
+Written By:Shubhra Srivastava
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Shubhra Srivastava
+
+Table of Contents
+
+1\. Create Independent and Isolated Tests2\. Implement the Arrange-Act-Assert (AAA) Pattern3\. Make Tests Small and Targeted4\. Name Tests Descriptively and Consistently5\. Mock External Dependencies6\. Keep a Fast and Efficient Test Suite7\. Automate Unit Testing8\. Use Code Coverage as a Guide, Not a Goal9\. Test Boundary Cases and Edge Cases10\. Refactor and Keep Test Code Up-to-DateThe Place of Unit Testing in Agile DevelopmentConclusionFAQ’S1\. Why is unit testing necessary?2\. What are some popular unit testing frameworks?3\. How frequently should unit tests be executed?4\. How does unit testing differ from integration testing?Authored By:#Reviewed By:#
+
+Table of Contents
+
+In the constantly changing landscape of software development, code reliability is paramount. One of the best methods of attaining this is by using unit testing. By concentrating on small, independent segments of the codebase, unit testing allows developers to identify bugs early and enhance code quality. To maximize the benefits of unit testing software, though, best practices must be followed.
+
+This article will walk through 10 unit testing best practices that developers can use to write dependable, maintainable, and bug-free code.
+
+## **What is Unit Testing?**\#
+
+Unit testing is a method of software testing in which the individual units or modules of an application are tested separately. The main objective is to ensure that every unit of the software works as expected. Unit tests are usually automated and coded by developers with the help of testing frameworks like JUnit (Java), NUnit (.NET), Jest (JavaScript), and PyTest (Python).
+
+By following unit testing best practices, teams can reduce errors, increase maintainability, and improve software reliability.
+
+### **1\. Create Independent and Isolated Tests**
+
+Every unit test must be isolated from other tests. In other words, executing one test should not impact the result of another. One should not rely on external services, databases, or APIs.
+
+Best Practice: Implement mocks, stubs, or fakes to mimic dependencies. Mockito (Java), Sinon.js (JavaScript), and unittest.mock (Python) can assist in this isolation.
+
+### **2\. Implement the Arrange-Act-Assert (AAA) Pattern**
+
+A good unit test is in the AAA pattern:
+
+- Arrange: Prepare test data and environment.
+
+- Act: Call the function or method being tested.
+
+- Assert: Check the outcome.
+
+
+**Example** (in Python using PyTest):
+
+from my\_module import add\_numbers\*\*
+
+def test\_add\_numbers():\*\*
+
+**\# Arrange**
+
+›
+
+num1, num2 = 5, 10
+
+expected\\\_result = 15\*\*
+
+ct
+
+result = add\\_numbers(num1, num2)
+
+\# Assert
+
+assert result == expected\\\_result
+
+**Following this structure makes tests easier to read and debug.**
+
+### **3\. Make Tests Small and Targeted**
+
+Each unit test must test one functionality or behavior. Complex, big tests are hard to debug.
+
+Best Practice: If a test tests more than one functionality, split it into smaller tests.
+
+### **4\. Name Tests Descriptively and Consistently**
+
+Good-named tests make it easier to comprehend what is being tested and why a test is failing.
+
+Best Practice: Adopt a clear naming convention like:
+
+**test\_functionName\_scenario\_expectedResult**
+
+**Example:**
+
+›
+
+def
+
+test\\\_calculate\\\_discount\\\_with\\\_valid\\\_coupon\\\_returns\\\_correct\\_discount():
+
+pass # Test logic here
+
+**This improves readability and maintainability.**
+
+### **5\. Mock External Dependencies**
+
+Unit tests must not rely on databases, APIs, or file systems. Instead, mock out external dependencies.
+
+- Example (Python with unittest.mock):
+
+
+›
+
+from unittest.mockimportpatch
+
+frommy\\\_module import get\\\_user\\\_data
+
+def test\\\_get\\\_user\\_data():
+
+withpatch('my\\\_module.requests.get') as mock\\\_get:
+
+mock\\\_get.return\\\_value.json.return\\\_value = {'name': 'John Doe'}
+
+response = get\\\_user\\_data('123')
+
+assert response\\\['name'\\\] is 'John Doe'
+
+Mocking allows tests to be fast and independent of external failures.
+
+### **6\. Keep a Fast and Efficient Test Suite**
+
+Unit tests must be fast. Slow tests decrease productivity and slow down feedback.
+
+Best Practice:
+
+- Prevent unnecessary computation.
+
+- Run tests in parallel whenever possible.
+
+- Maximize test data setup.
+
+
+### **7\. Automate Unit Testing**
+
+Manual testing is subject to human error. Unit tests automated guarantee consistency and repeatability.
+
+Best Practice: Utilize CI/CD pipelines (GitHub Actions, Jenkins, GitLab CI) to execute unit tests automatically with every code change.
+
+### **8\. Use Code Coverage as a Guide, Not a Goal**
+
+Code coverage is a metric of the percentage of code run by tests. High coverage is nice, but 100% coverage does not necessarily mean bug-free code.
+
+Best Practice: Prioritize substantial coverage over mere number increases. Concentrate on testing important business rules and edge cases.
+
+### **9\. Test Boundary Cases and Edge Cases**
+
+Most bugs happen at edges (e.g., null inputs, huge integers, special characters). A good unit test suite contains tests for:
+
+- Null or blank values
+
+- Maximum and minimum input values
+
+- Invalid inputs
+
+
+**Example:**
+
+**def test\_calculate\_tax\_with\_negative\_income\_raises\_error():**
+
+›
+
+with pytest.raises(ValueError):
+
+calculate\\_tax(-5000)
+
+Testing edge cases makes software respond nicely to unexpected inputs.
+
+### **10\. Refactor and Keep Test Code Up-to-Date**
+
+Test code is not less valuable than production code. With time, it can become outdated or redundant.
+
+Best Practice:
+
+- Regularly refactor and keep tests up-to-date.
+
+- Eliminate duplicate tests.
+
+- Refactor tests when refactoring production code.
+
+
+**Example:** When a function is refactored to take new parameters, refactor its related unit tests as well.
+
+## **The Place of Unit Testing in Agile Development**\#
+
+Agile development focuses on iterative development, constant code revisions, and continuous feedback. Unit testing is the backbone of Agile methodologies because it ensures code stability in the face of frequent development cycles.
+
+**Top Advantages of Unit Testing in Agile:**
+
+- Speedier Iterations: Constant code revisions call for instant verification, which unit tests ensure.
+
+- Early Bug Identification: Early bug identification minimizes rework and enhances software quality.
+
+- Seamless CI/CD Integration: Smooth deployment through automated unit tests.
+
+- Improved Collaboration: Product managers, testers, and developers can work effectively without compromising the functionality.
+
+
+By using unit tests as part of Agile development, teams are able to achieve consistent quality software while ensuring speed and agility.
+
+**Common Traps in Unit Testing**
+
+Certain common pitfalls are:
+
+- Writing extremely complicated tests
+
+- Failing to test negative conditions
+
+- Forgetting to consider performance in tests
+
+- Not updating the tests after refactoring
+
+- Selecting the appropriate Unit Testing Framework
+
+
+**Every programming language has its own unit testing framework:**
+
+- Java: JUnit, TestNG
+
+- Python: PyTest, unittest
+
+- JavaScript: Jest, Mocha
+
+- C#/.NET: NUnit, xUnit
+
+
+Selecting the appropriate framework guarantees improved integration and usability.
+
+### **Conclusion**
+
+By implementing these 10 key unit testing best practices, developers can be confident that their unit testing software works, is trustworthy, and can be supported. Unit testing allows bugs to be caught early, enhances the quality of the software, and facilitates more efficient development. Ranging from the composition of isolated and targeted tests to automating them in CI/CD pipelines, these practices develop a strong culture of testing.
+
+Additionally, unit testing is critical to Agile development as it allows teams to change frequently and yet have stable code. Shunning common traps and selecting appropriate testing frameworks reinforces the testing process even further.
+
+By incorporating these unit testing best practices into your process, you can improve productivity, cut debugging time, and release high-quality software with confidence. Begin to apply these methods today and raise your development game!
+
+## **FAQ’S**\#
+
+### **1\. Why is unit testing necessary?**
+
+- Early Bug Detection: Unit testing can detect bugs in an early state, saving the effort and cost of debugging during subsequent development stages
+
+- Better Code Quality: Unit testing guarantees that code is modular, maintainable, and in conformance with coding best practices.
+
+- Speedier Development & Deployment: Automated unit tests enable developers to make changes with confidence, resulting in quicker releases with less risk.
+
+- Facilitates Refactoring & Scalability: Unit tests guarantee that changing code or adding features won’t break existing functionality, making it simpler to scale and maintain software.
+
+
+### **2\. What are some popular unit testing frameworks?**
+
+Some popular unit testing frameworks are JUnit (Java), NUnit (.NET), PyTest (Python), Jest (JavaScript), and Mocha (JavaScript).
+
+### **3\. How frequently should unit tests be executed?**
+
+Unit tests must be executed regularly, preferably after each code modification, as part of a continuous integration (CI) process.
+
+### **4\. How does unit testing differ from integration testing?**
+
+Unit testing involves testing an individual component in isolation, whereas integration testing confirms interactions among various components or systems.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Shubhra srivastava
+
+Author Description:
+
+- I help businesses and brands amplify their digital presence with data-driven marketing strategies.
+- As a Digital Marketing Consultant, I specialize in SEO, content marketing, social media growth, and paid advertising, ensuring brands reach the right audience and maximize ROI..
+
+[LinkedIn](https://www.linkedin.com/in/shubhra-srivastava-30b767239/)
+
+[View All Posts](https://keploy.io/blog/authors/Shubhra%20Srivastava)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-software-architecture)
+
+### [What is Software Architecture Guide: Build Robust Systems](https://keploy.io/blog/community/what-is-software-architecture)
+
+Amaan Bhati
+
+13 Jun, 2025
+
+One of the problems development teams experience is that when they build applications, they are unable to...
+
+[](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+### [Angular vs React : Complete Guide for Development in 2025](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+Amaan Bhati
+
+10 Jun, 2025
+
+Frontend coding has been transformed by JavaScript frameworks for more than a decade, with developers leaning on...
+
+[](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+### [Unit Testing vs Regression Testing: A Comprehensive Guide](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+Jiya Bhati
+
+5 Jun, 2025
+
+Ever deployed code only to watch everything crash? We’ve all experienced that sinking feeling ,which is exactly...
+
+[](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+### [Smoke Testing vs Regression Testing: What You Need to Know](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+Amaan Bhati
+
+4 Jun, 2025
+
+In the field of software quality assurance, there are two types of testing often referenced, smoke testing...
+
+[](https://keploy.io/blog/technology/building-a-cli-tool-in-go-with-cobra-and-viper)
+
+### [Building a CLI Tool in Go with Cobra and Viper](https://keploy.io/blog/technology/building-a-cli-tool-in-go-with-cobra-and-viper)
+
+Charan Kamarapu
+
+28 May, 2025
+
+"The elegance of the command line lies in its ability to combine simple tools to accomplish complex...
+
+[](https://keploy.io/blog/community/testing-methodologies-in-software-testing)
+
+### [Testing Methodologies in Software Testing: A Comprehensive Guide](https://keploy.io/blog/community/testing-methodologies-in-software-testing)
+
+Amaan Bhati
+
+22 May, 2025
+
+Introduction Software testing methodologies are structured approaches that determine how testing activities are planned, executed, and managed...
+
+## Top Test Automation Tools
+5 Sep, 2024.[Community](https://keploy.io/blog/community)
+
+# Top 7 Test Automation Tools In 2025 : Boost Your Software Testing Efficiency
+
+16 min read
+
+
+
+Written By:Tvisha Raji
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Tvisha Raji
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/what-is-software-architecture)
+
+### [What is Software Architecture Guide: Build Robust Systems](https://keploy.io/blog/community/what-is-software-architecture)
+
+Amaan Bhati
+
+13 Jun, 2025
+
+One of the problems development teams experience is that when they build applications, they are unable to...
+
+[](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+### [Angular vs React : Complete Guide for Development in 2025](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+Amaan Bhati
+
+10 Jun, 2025
+
+Frontend coding has been transformed by JavaScript frameworks for more than a decade, with developers leaning on...
+
+[](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+## Automated Testing Tools 2025
+29 May, 2025.[Community](https://keploy.io/blog/community)
+
+# Guide To Automated Testing Tools In 2025
+
+29 min read
+
+
+
+Written By:Falak Bhati
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Falak Bhati
+
+Table of Contents
+
+What is Automated Software Testing?Why Should We Use Automated Software Testing?What Kinds of Tests Should Be Automated?Repetitive TestsRegression TestsHigh-Risk TestsSmoke TestsPerformance TestsTime-Consuming Manual TestsWhat Kinds of Tests Are Best Done Manually?Types of Automation Software TestingUnit TestingIntegration TestingFunctional TestingRegression TestingSmoke TestingPerformance TestingAcceptance TestingBuilding Your Testing StrategyHow to Automate Your Tests Using Keploy?1\. Unit TestingA. Keploy GitHub PR Agent: Automated Testing for Every Code ChangeB. Keploy VS Code Extension: AI-Powered Unit Test Generation2\. Integration Testing3\. API TestingTop 10 Automation Software Testing Tools in 20251\. Selenium– Web UI Automation2\. Keploy– API Test Generation from Real Traffic3\. Cypress– Fast Frontend Testing4\. Playwright– Cross-Browser Automation5\. TestComplete– GUI Automation6\. Appium – Mobile Testing7\. Postman – API Testing8\. Katalon Studio – All-in-One Automation Tool9\. JUnit/TestNG – Java-Based Unit Testing10\. Robot Framework – Keyword-Driven TestingBest Practices for Test AutomationStarting Small and Scaling GraduallyFollowing the Test PyramidMake Tests IndependentWrite Clear Test NamesHandling Timing ProperlyKeeping Tests SimpleIntegrating with Your PipelineMaintaining Test HealthCollaborating Across TeamsConclusionRelated Keploy BlogsAI-Powered Test Automation: Exploring AI-Powered Test Automation ToolsFAQs1\. How do I choose the right test automation tool?2\. How often should automated tests be run?3\. Can small teams benefit from test automation?4\. What is Keploy, and how does it help with automation testing?5\. Does automation replace manual testing completely?Authored By:#Reviewed By:#
+
+Table of Contents
+
+Manual testing gets old fast. You end up clicking through the same workflows over and over, and it’s easy to miss bugs when you’re going through dozens of test cases. Automated testing tools handle the repetitive stuff for you, running tests in the background while you work on actual development.
+
+This guide looks at some solid automated testing tools for 2025 that can help streamline your testing process.
+
+## **What is Automated Testing?**\#
+
+Automated testing uses particular software tools to perform tests on various software applications automatically. Instead of checking each detail by hand, the computer runs the tests for you, saving time and helping to identify bugs more efficiently. It is mainly used when tests require regular repetition.
+
+## **What is Automated Software Testing?**\#
+
+Automated testing uses scripts to check if your software works properly. Instead of manually clicking through your app every time you make a change, you create scripts that do the testing for you. These scripts run through your application, try different scenarios, and check if everything works the way it’s supposed to.
+
+The nice thing about automated tests is that they’re consistent, they’ll run the same way every time, and catch issues you might miss when testing manually. Plus, they can run while you’re doing other things, like grabbing coffee or actually writing new features. When something breaks, the tests will let you know exactly what went wrong and where.
+
+For example, suppose your online application has a login page. It might take a lot of effort to manually verify that the login still functions when a developer makes changes to the code.
+
+You may write a script for automated software testing that accomplishes the following using a range of technologies:
+
+1. Open the web browser.
+
+2. Go to the page that allows you to log in.
+
+3. Enter your username and password.
+
+4. Click "Login" to log in.
+
+5. Check to see if the user was sent to the dashboard.
+
+
+Because it runs automatically anytime the code changes, this script may save time and guarantee that the login always works as intended.
+
+## **Why Should We Use Automated Software Testing?**\#
+
+There are many reasons why Automated Software Testing has become essential in modern development, which include:
+
+**Speed and Efficiency:** **Speed:** [Manual testing](https://keploy.io/blog/community/why-manual-testing-matters-a-ultimate-guide-to-software-testing) takes forever. What might take you an entire afternoon to test manually can run in a few minutes with automation. This becomes important when you’re shipping code multiple times a day.
+
+**Consistency and Reliability:** People make mistakes, especially when doing the same boring tasks over and over. Automated tests run the same way every time, so you don’t have to worry about someone forgetting a step or getting distracted.
+
+**Cost-Effectiveness:** Although establishing automated tests requires an initial investment, the long-term savings can be quite significant. Rather than employing QA testers to repetitively execute the same tests by hand, automation takes care of the monotonous tasks, allowing humans to focus on exploratory testing and complex situations.
+
+**Better Test Coverage:** Automated tools can test thousands of scenarios, edge cases, and combinations that would be impractical to test manually. They can simulate heavy loads, test across multiple browsers simultaneously, and validate complex user workflows.
+
+**Early Bug Detection:** Finding a bug during development is way cheaper than finding it after you’ve already shipped to users. Automated tests catch issues while you’re still coding, not after customers start complaining.
+
+**Regression Prevention:** Every time you add new features, automated tests ensure you haven’t broken existing functionality. This safety net lets developers refactor and improve code with confidence.
+
+**Runs when you don’t:** Tests can run overnight, on weekends, or whenever you need them to. Your application gets monitored continuously without anyone having to stay late.
+
+The main benefit is that automation handles the repetitive, time-consuming work so your team can focus on the creative problem-solving and user experience testing that actually requires human judgment.
+
+## **What Kinds of Tests Should Be Automated?**\#
+
+### Repetitive Tests
+
+These are tests that need to be done again and again, especially after every change in the code. Doing them by hand can be boring and time-consuming. That’s why it makes sense to let a tool handle them automatically.
+
+### Regression Tests
+
+When something new is added to the software, there’s a chance it might break something that was working before. These tests help check that everything still works like it used to, even after updates.
+
+### High-Risk Tests
+
+Some parts of an app are more important than others, like features many people use or ones that deal with sensitive data. These areas need extra care. Automating tests here makes sure they’re always checked properly.
+
+### Smoke Tests
+
+These are basic checks to make sure the app is running at all. It’s like a quick scan to see if the main features are working before doing deeper testing.
+
+### Performance Tests
+
+These check how fast or stable the app is when many people use it at the same time. They help find out if the app can handle pressure without slowing down or crashing.
+
+### Time-Consuming Manual Tests
+
+Some tests take too long to do by hand or are very repetitive. Automating them saves time and lets people focus on more interesting, thoughtful testing.
+
+## **What Kinds of Tests Are Best Done Manually?**\#
+
+Despite all our automated testing advances, some types of testing still require being done manually,
+
+**Usability and User Experience Testing**
+
+Humans excel at evaluating whether an interface feels intuitive, if the user journey makes sense, or if something just "feels off." You can’t automate the question "Does this confuse users?" because it requires human judgment and empathy.
+
+**Exploratory Testing**
+
+This is where testers get to be curious and creative, exploring the application freely, trying unusual combinations, and looking into anything that feels ‘off.’ It requires the kind of intuitive problem-solving that only humans can provide.
+
+**Visual and Design Testing**
+
+While tools can catch broken layouts, humans are needed to judge whether colors look right, fonts are readable, images are appropriate, or if the overall design feels polished. Automated tools might miss that a button looks "slightly off" even if it’s technically functional.
+
+**Accessibility Testing**
+
+Screen readers and automated accessibility tools help, but you need a real human to truly evaluate if an application is accessible. Does it work well for someone using voice navigation or a screen reader?
+
+**Ad-hoc and Edge Case Testing**
+
+When users report weird bugs like "it only happens when I do X, then Y, then go back and do Z," that requires human investigation. These aren’t scenarios you’d typically write automated tests for initially.
+
+**Subjective Content Review**
+
+Testing whether error messages are helpful, if content makes sense, or if the tone matches your brand requires human judgment. You can’t automate "Does this sound friendly but professional?"
+
+**Device-Specific Mobile Testing**
+
+While you can automate mobile functionality, testing how an app feels in your hands, how gestures work, or if it’s comfortable to use on different screen sizes requires physical interaction.
+
+**Initial New Feature Testing**
+
+When exploring a completely new feature for the first time, humans are better at asking "What if?" questions and discovering unexpected behaviors before they know what to automate.
+
+**Complex Integration Scenarios**
+
+Testing how your app behaves in real-world environments with actual data, network conditions, and user behaviors often requires human observation and decision-making.
+
+## **Types of Automation Software Testing**\#
+
+Different types of automated testing play different roles in ensuring the quality of software. Each kind concentrates on certain elements of your application, from individual parts to overall system performance. Teams may develop comprehensive testing procedures that detect issues at every level by understanding these different approaches.
+
+
+
+## Unit Testing\#
+
+[Unit testing](https://keploy.io/blog/community/what-is-unit-testing) is about checking the smallest parts of your code, like a single function or method, to make sure they work correctly on their own. These tests are quick to run and give fast feedback, which helps catch issues early during development. Think of them like a built-in spell-check, but for your code logic.
+
+**Example:** You’ve got a function that calculates sales tax. A unit test would check if it gives the right percentage for different amounts, making sure the math works before you plug it into your bigger application.
+
+## Integration Testing\#
+
+Even if all your pieces work fine, problems can pop up when they try to talk to each other. Integration testing checks if different parts of your system play nicely together.
+
+**Example:** Testing whether the user login system properly communicates with the database to authenticate credentials, ensuring the frontend form correctly sends data and receives the appropriate response.
+
+## [Functional Testing](https://keploy.io/blog/community/functional-testing-an-in-depth-overview)\#
+
+This tests whether your app does what it’s supposed to do from a user’s perspective. It’s less about how the code works and more about whether the features work as intended.
+
+**Example:** Testing the complete password reset flow, from clicking "forgot password" to receiving an email, clicking the reset link, entering a new password, and successfully logging in with the updated credentials.
+
+## Regression Testing\#
+
+Regression testing makes sure that new changes don’t break anything that was already working. Every time developers add features, fix bugs, or update the code, regression tests verify that previously working features continue to work correctly. This type of testing is beneficial as the software becomes more complex.
+
+**Example:** After adding a new user profile page, running tests to confirm that existing features like login, logout, and account settings still function properly, and preventing new changes from inadvertently breaking established functionality.
+
+## Smoke Testing\#
+
+[Smoke testing](https://keploy.io/blog/community/developers-guide-to-smoke-testing-ensuring-basic-functionality) is a quick check to see if the main parts of the software are working after a new update or deployment. These tests don’t dive deep into every feature but ensure the application’s core functions work well enough for further testing. Think of it like a basic health check before doing deeper testing.
+
+**Example:** After deploying a new version, testing whether the application starts successfully, users can access the main screen, and critical features like login are functional before proceeding with detailed testing.
+
+## Performance Testing\#
+
+Performance testing evaluates how well your application handles various loads and stress conditions. These tests measure response times, throughput, resource utilization, and system stability under different usage scenarios. This helps find slow parts (bottlenecks) and makes sure the app works well under real-world conditions.
+
+**Example:** Simulating 1,000 concurrent users accessing your e-commerce site during a flash sale to measure page load times, transaction processing speed, and system stability under peak load conditions.
+
+## Acceptance Testing\#
+
+[Acceptance testing](https://keploy.io/blog/community/what-is-acceptance-testing) is the final validation that your system meets business requirements and is ready for release. These tests verify that all specified functionality works correctly and that the application satisfies the needs of end users and stakeholders. Acceptance tests often mirror real-world usage scenarios and business processes.
+
+**Example:** Testing the customer journey from browsing products to completing a purchase, ensuring all business rules are correctly implemented, and the user experience meets expectations before launching to production.
+
+## Building Your Testing Strategy\#
+
+The key to good automated testing isn’t picking one type, it’s combining them smartly. Start with unit tests for quick feedback, add integration tests for important connections, throw in functional tests for key user flows, and include performance tests for anything that needs to handle traffic.
+
+You don’t need to automate everything on day one. Start with the tests that will save you the most time and headache, then build from there. The goal is to catch different types of problems at different levels, so nothing slips through the cracks.
+
+## How to Automate Your Tests Using Keploy?\#
+
+Keploy takes a unique approach to test automation by automatically generating tests from your application’s real traffic. Instead of manually writing test cases, Keploy captures actual API calls and responses, then converts them into automated tests. This innovative approach makes test automation faster and more realistic than traditional methods.
+
+Keploy offers comprehensive testing automation across three key areas:
+
+- Unit testing
+
+- Integration testing
+
+- API testing
+
+
+Each approach addresses different aspects of your application’s quality assurance needs.
+
+### 1\. Unit Testing
+
+[](https://keploy.io/unit-test-generator)
+
+Unit testing forms the foundation of any robust testing strategy. Keploy provides two powerful tools to automate unit test generation:
+
+#### **A. Keploy GitHub PR Agent: Automated Testing for Every Code Change**
+
+You know that sinking feeling when you submit a PR and realize you forgot to write tests? Yeah, the Keploy PR agent has your back. It automatically generates unit tests for every file you change in a pull request. No more "I’ll add tests later" (we all know how that goes).
+
+**Installation and Setup**
+
+Getting started with the Keploy PR agent is straightforward:
+
+1. Visit the Keploy GitHub Marketplace
+
+2. Click "Install" to add the app to your GitHub account.
+
+3. Select the repositories where you want to enable automated test generation.
+
+4. Configure permissions for the app to read your code and create pull request comments
+
+
+Once installed, the agent automatically activates for all new pull requests in your selected repositories.
+
+**How the PR Agent Works**
+
+**Automatic Detection**: When a pull request is created or updated [,](https://github.com/apps/keploy) the agent automatically scans all changed files to identify functions, methods, and classes that need testing.
+
+**Intelligent Analysis**: The AI examines the diff to understand what new functionality has been added or what existing code has been modified.
+
+**Test Generation**: For each significant change, the agent generates appropriate unit tests that verify the new or modified functionality.
+
+**PR Integration**: Generated tests are either committed directly to the PR branch or provided as suggestions in PR comments, depending on your configuration.
+
+**Coverage Reports**: The agent provides detailed reports showing which parts of your code changes are covered by the generated tests.
+
+#### **B. Keploy VS Code Extension: AI-Powered Unit Test Generation**
+
+The Keploy VS Code extension brings the power of AI directly into your development environment, making unit test generation as simple as a few clicks.
+
+**Key Features:**
+
+**Intelligent Test Generation**: The extension analyzes your code structure, function signatures, and logic to generate comprehensive unit tests that cover various scenarios, including edge cases, error conditions, and normal execution paths.
+
+**Context-Aware Testing**: The extension considers your existing codebase, imports, and dependencies to generate tests that integrate seamlessly with your project structure.
+
+**Customizable Test Templates**: You can configure the extension to match your team’s testing conventions, naming patterns, and preferred testing frameworks.
+
+**How It Works:**
+
+The extension integrates directly into your VS Code workflow:
+
+1. Right-click on any function or class you want to test
+
+2. Select "Generate Unit Tests with Keploy" from the context menu.
+
+3. Review the generated tests that appear in a new file or are integrated into your existing test suite.
+
+4. Customize as needed and run your tests.
+
+
+The AI analyzes your code’s complexity, identifies potential failure points, and creates tests that cover both happy paths and edge cases you might not have considered.
+
+**Benefits for Developers:**
+
+**Faster Development Cycles**: Instead of spending hours writing boilerplate test code, developers can focus on business logic while ensuring comprehensive test coverage.
+
+**Improved Code Quality**: AI-generated tests often catch edge cases that developers might overlook, leading to more robust applications.
+
+**Consistent Testing Patterns**: The extension ensures that all tests follow consistent patterns and conventions across your codebase.
+
+**Learning Tool**: By examining AI-generated tests, junior developers can learn best practices for test writing and understand different testing scenarios.
+
+### 2\. Integration Testing
+
+Integration testing is where things get interesting. Instead of you having to set up mock databases and fake API responses, Keploy does something clever: it records what happens when your app runs.
+
+It captures real API calls, database queries, and all the interactions between your services. Then it uses that recorded data to create integration tests. This means your tests are based on how your system behaves, not how you think it should behave.
+
+The best part? You don’t need to spend hours setting up test environments or creating fake data. Keploy just watches your app do its thing and builds tests from that.
+
+For more details, visit Keploy’s official website or check out their GitHub repository.
+
+### 3\. API Testing
+
+API testing is crucial for modern applications, but traditional approaches can be time-consuming and complex. Keploy revolutionizes this process with its innovative API Testing Agent.
+
+Instead of writing test cases to test your APIs, what if you provide your schema, API endpoints, and curl commands to an agent, and it generates the test suite and gives you the test reports? Sounds interesting or confusing? Yes, it is possible! Keploy API Testing Agent will do all this without you touching any code.
+
+The agent analyzes your API specifications, understands the expected behavior, and automatically generates comprehensive test suites that cover various scenarios, including success cases, error handling, edge cases, and performance testing. You simply provide the necessary information about your APIs, and the agent handles the rest.
+
+Not convinced? Just give it a try, and you will enjoy it.
+
+Link to try: [app.keploy.io](http://app.keploy.io/)
+
+## Top 10 Automation Software Testing Tools in 2025\#
+
+### **1\. Selenium– Web UI Automation**
+
+
+
+Selenium is a well-established test automation tool that automates web browsers across different platforms. It offers scripting-only modes, providing testers and developers the flexibility to write complex test cases using various programming languages.
+
+**Key Features:**
+
+- **Cross-Browser Testing:** Supports automation across different web browsers
+
+- **Language Support:** Compatible with Java, C#, Python, Ruby, and more
+
+- **Integration:** Easily integrates with other tools like Jenkins, Maven, and TestNG
+
+- **Community Support:** Strong open-source community for continuous updates and support
+
+- **Flexibility:** Provides a robust platform for custom test automation
+
+- **Parallel Test Execution:** Supports running tests in parallel across different environments
+
+
+* * *
+
+### **2\. Keploy– API Test Generation from Real Traffic**
+
+[](https://keploy.io/)
+
+Keploy automatically generates API tests by capturing real application traffic. Instead of writing test cases manually, it records actual API interactions and converts them into automated tests with mocks for external dependencies.
+
+**Key Features:**
+
+- **Auto-Generated Tests:** Creates tests from real API traffic without manual scripting
+
+- **Smart Mocking:** Automatically mocks external services and databases
+
+- **Zero Setup:** No need for complex test data or environment setup
+
+- **Real-World Scenarios:** Tests based on actual usage patterns
+
+- **Database State Management:** Captures and replays database interactions
+
+- **CI/CD Integration:** Seamlessly integrates with continuous integration pipelines
+
+
+**Website:** [https://keploy.io/](https://keploy.io/)
+
+* * *
+
+### 3\. Cypress– Fast Frontend Testing
+
+
+
+Cypress is built specifically for modern web applications with lightning-fast test execution. It runs directly in the browser and provides excellent debugging capabilities with real-time reloads and interactive testing.
+
+**Key Features:**
+
+- **Real-Time Testing:** See tests run in real-time with automatic reloads
+
+- **Time Travel Debugging:** Step through each command and see what happened
+
+- **Automatic Waiting:** Smart waiting for elements without explicit waits
+
+- **Network Stubbing:** Easy API mocking and network traffic control
+
+- **Screenshot/Video Recording:** Automatic capture of test failures
+
+- **Modern Architecture:** Built for JavaScript frameworks like React, Vue, Angular
+
+
+* * *
+
+### 4\. Playwright– Cross-Browser Automation
+
+
+
+Microsoft’s cross-browser automation framework that works reliably across Chrome, Firefox, Safari, and Edge. It provides fast, reliable automation with modern web standards support and an excellent developer experience.
+
+**Key Features:**
+
+- **True Cross-Browser:** Native support for all modern browsers
+
+- **Auto-Wait:** Intelligent waiting for elements before actions
+
+- **Mobile Testing:** Test mobile web apps with device emulation
+
+- **Multiple Languages:** Supports JavaScript, Python, Java, and .NET
+
+- **Parallel Execution:** Run tests in parallel across browsers
+
+- **Modern Web Standards:** Full support for modern web features
+
+
+* * *
+
+### 5\. TestComplete– GUI Automation
+
+
+
+TestComplete is a comprehensive GUI testing tool that can test desktop, web, and mobile applications. It uses advanced object recognition and supports both script-based and scriptless testing approaches.
+
+**Key Features:**
+
+- **Multi-Platform Testing:** Desktop, web, and mobile app testing
+
+- **Object Recognition:** Advanced AI-powered object identification
+
+- **Scriptless Testing:** Record and replay functionality for non-programmers
+
+- **Visual Testing:** Image-based verification and comparison
+
+- **Data-Driven Testing:** Easy integration with external data sources
+
+- **Reporting:** Detailed test reports with screenshots and logs
+
+
+* * *
+
+### 6\. Appium – Mobile Testing
+
+
+
+Appium is the industry standard for mobile app test automation, supporting both iOS and Android platforms. It allows testing of native, hybrid, and mobile web applications using the same API across platforms.
+
+**Key Features:**
+
+- **Cross-Platform:** Single API for iOS and Android testing
+
+- **Multiple App Types:** Native, hybrid, and mobile web app support
+
+- **Real Devices & Simulators:** Test on actual devices or emulators
+
+- **Language Flexibility:** Supports multiple programming languages
+
+- **Cloud Testing:** Integration with cloud testing platforms
+
+- **Open Source:** Active community and continuous development
+
+
+* * *
+
+### 7\. Postman – API Testing
+
+
+
+Postman simplifies API testing with an intuitive interface for creating, organizing, and running API tests. It supports both manual and automated testing with powerful scripting capabilities.
+
+**Key Features:**
+
+- **User-Friendly Interface:** Easy-to-use GUI for API testing
+
+- **Collection Organization:** Group and organize API requests
+
+- **Automated Testing:** Built-in test scripting with JavaScript
+
+- **Environment Management:** Multiple environment configurations
+
+- **Team Collaboration:** Share collections and collaborate on API testing
+
+- **CI/CD Integration:** Command-line runner for automated pipelines
+
+
+* * *
+
+### 8\. Katalon Studio – All-in-One Automation Tool
+
+
+
+Katalon Studio provides a comprehensive testing solution that combines web, mobile, API, and desktop testing in a single platform. It offers both codeless and script-based testing approaches.
+
+**Key Features:**
+
+- **Multi-Platform Testing:** Web, mobile, API, and desktop in one tool
+
+- **Codeless Testing:** Record and playback without programming
+
+- **Built-in Keywords:** Pre-built test actions and keywords
+
+- **Integration Hub:** Connects with popular CI/CD and testing tools
+
+- **Test Analytics:** Built-in reporting and analytics dashboard
+
+- **Dual Interface:** Both scriptless and script-based testing options
+
+
+* * *
+
+### 9\. JUnit/TestNG – Java-Based Unit Testing
+
+
+
+JUnit and TestNG are the most popular Java testing frameworks for unit testing. They provide annotations, assertions, and test runners specifically designed for Java applications with excellent IDE integration.
+
+**Key Features:**
+
+- **Annotation-Based:** Simple test configuration with annotations
+
+- **Assertion Library:** Rich set of assertion methods for validation
+
+- **Test Organization:** Group tests with suites and categories
+
+- **Parameterized Testing:** Data-driven test execution
+
+- **IDE Integration:** Seamless integration with Java IDEs
+
+- **Maven/Gradle Support:** Easy build tool integration
+
+
+* * *
+
+### 10\. Robot Framework – Keyword-Driven Testing
+
+
+
+Robot Framework uses a keyword-driven approach that makes test cases readable and maintainable. It supports both technical and non-technical team members with its natural language syntax.
+
+**Key Features:**
+
+- **Keyword-Driven:** Tests written using human-readable keywords
+
+- **Rich Ecosystem:** Extensive library of pre-built keywords
+
+- **Multi-Purpose:** Web, mobile, API, and desktop testing support
+
+- **Easy Syntax:** Simple tabular format for test cases
+
+- **Extensible:** Custom keywords and libraries in Python/Java
+
+- **Detailed Reporting:** Comprehensive HTML reports and logs
+
+
+* * *
+
+## Best Practices for Test Automation\#
+
+Building effective test automation requires more than just picking the right tools. You also need to follow good habits that help your tests stay useful, easy to manage, and helpful throughout the entire development process.
+
+### Starting Small and Scaling Gradually
+
+Don’t automate everything at once. Begin with your most critical features and frequently-used workflows. Focus on tests that would be painful to run manually every release. As your team gets comfortable, gradually expand coverage to less critical areas.
+
+### Following the Test Pyramid
+
+Structure your tests with lots of fast unit tests at the bottom, fewer integration tests in the middle, and minimal end-to-end tests at the top. Unit tests catch bugs quickly and cheaply, while UI tests confirm complete user workflows but run slower and need more maintenance.
+
+### Make Tests Independent
+
+Each test should run on its own without depending on other tests or shared data. Tests that rely on each other create fragile chains where one failure breaks everything. Generate fresh test data for each test and clean up afterward.
+
+### Write Clear Test Names
+
+Use descriptive names that explain what’s being tested: "shouldRejectInvalidPasswords" instead of "testLogin." A good test name tells you exactly what broke without reading the code.
+
+### Handling Timing Properly
+
+Never use hardcoded delays like "wait 5 seconds." Instead, use smart waits that check for specific conditions, wait for an element to appear, an API to respond, or a page to load. This makes tests faster and more reliable.
+
+### Keeping Tests Simple
+
+One test should verify one thing. Complex tests that check multiple features are hard to debug when they fail. If a test is doing too much, split it into focused, single-purpose tests.
+
+### Integrating with Your Pipeline
+
+Run tests automatically in your CI/CD pipeline. Unit tests on every commit, integration tests on pull requests, full suites before deployment. Fast feedback helps developers catch issues while the code is fresh in their minds.
+
+### Maintaining Test Health
+
+Plan how you’ll manage test data right from the start. Instead of using fixed data that can go out of date, use tools like _factories_ or _builders_ to create test data through code. This makes your tests easier to update and manage.
+
+For database tests, use methods like _transaction rollback_ or _database seeding_ to make sure each test starts with clean, reliable data. Also, never use real production data for testing; use fake but realistic data that won’t change or cause problems.
+
+### Collaborating Across Teams
+
+Test automation isn’t just QA’s job. Developers should write unit and integration tests, QA focuses on user workflows, and DevOps ensures tests run smoothly in pipelines. Share knowledge and work together.
+
+## Conclusion\#
+
+Moving from manual to automated testing isn’t just about using new tools; it’s about changing how we think about software quality. As we’ve seen, automated testing includes everything from quick unit tests to full end-to-end tests that check complete user journeys.
+
+Each type of test plays a key role:
+
+- **Unit tests** help catch bugs early while coding.
+
+- **Integration tests** make sure different parts of the app work well together.
+
+- **Functional tests** check if the app does what users expect.
+
+- **Performance and regression tests** protect your app from slowing down or breaking after updates.
+
+
+Thanks to modern tools like **Keploy, Selenium**, and **Cypress**, automation is now easier and more accessible even for small teams. You no longer need a big QA team to do it well.
+
+Remember, manual and automated testing work best together. Automation takes care of routine checks quickly and consistently. Manual testers can then focus on exploring, improving the user experience, and finding problems only humans can spot.
+
+Development teams need to move fast, but they also need to keep their software reliable. Test automation helps make that possible. It gives teams the support they need to make changes, try new ideas, and release updates quickly, without breaking things or letting bugs slip through.
+
+* * *
+
+## Related Keploy Blogs\#
+
+**Top 7 Test Automation Tools**
+
+This blog covers the benefits of using test automation tools, outlines the steps to perform automation testing, and highlights 7 top test automation tools to consider.
+
+Link to the blog: [https://keploy.io/blog/community/top-7-test-automation-tools-boost-your-software-testing-efficiency](https://keploy.io/blog/community/top-7-test-automation-tools-boost-your-software-testing-efficiency)
+
+* * *
+
+**QA Automation: Revolutionizing Software Testing**
+
+This blog talks about QA automation, its benefits, and all the tools that can be used for QA automation.
+
+Link to the blog: [https://keploy.io/blog/community/qa-automation-revolutionizing-software-testing](https://keploy.io/blog/community/qa-automation-revolutionizing-software-testing)
+
+* * *
+
+**Introduction To REST API In Python**
+
+This blog covers what a REST API is, its benefits, the different types of Python frameworks available, and how to build a simple REST API using Python.
+
+Link to the blog: [https://keploy.io/blog/community/introduction-to-rest-api-in-python](https://keploy.io/blog/community/introduction-to-rest-api-in-python)
+
+* * *
+
+**Playwright Alternative For API Testing**
+
+This blog explores Playwright as a tool for API testing, discusses why developers may look for alternatives, introduces Keploy as a modern option, and outlines the steps to migrate from Playwright to Keploy.
+
+Link to the blog: [https://keploy.io/blog/technology/playwright-alternative-for-api-testing](https://keploy.io/blog/technology/playwright-alternative-for-api-testing)
+
+* * *
+
+### **AI-Powered Test Automation: Exploring AI-Powered Test Automation Tools**
+
+This blog explores AI-powered test automation tools, how they work, their key benefits, and popular options in the market. It also offers tips on choosing the right tool, introduces the Keploy VS Code AI extension, and discusses the future of AI in test automation, highlighting how AI supports, rather than replaces, human testers.
+
+Link to the blog: [https://keploy.io/blog/community/ai-powered-test-automation](https://keploy.io/blog/community/ai-powered-test-automation)
+
+* * *
+
+## FAQs\#
+
+### **1\. How do I choose the right test automation tool?**
+
+Start by deciding what you want to create, be it a web, mobile, or API. Then, move on to the technology that is required for creating it. Thinking about your team can also be an important factor, like what tools are they already comfortable with, or what would be easier for them to take up? Also, think about your budget since some tools are free and some require a subscription. Check if the product performs well with your current setup. And most importantly, make sure it supports the testing you need, whether it is for interfaces, APIs, performance, or everything altogether.
+
+### **2\. How often should automated tests be run?**
+
+As often as possible! The ideal configuration is to run automated tests every time you make a change to the code, this is called continuous testing. Some teams also run their test set every night or before releasing. Running frequent testing can help you catch bugs early, when they are easier and cheaper to fix.
+
+### **3\. Can small teams benefit from test automation?**
+
+Definitely! You don’t have to have a huge QA team to take advantage of automation. A lot of tools are simple to use and require little maintenance. Automated tests can take care of the everyday stuff, which unburdens developers and testers to take up more challenging tasks for smaller groups. Even some basic automation can help speed things up and raise the quality of your product in the long run.
+
+### **4\. What is Keploy, and how does it help with automation testing?**
+
+Keploy is an open-source tool that makes API testing simpler by recording API requests and converting them into test cases. By doing this, you can avoid writing a lot of test code. Keploy learns from your app’s real-world behavior and that information is used to generate useful tests. It is a convenient method to make sure that your tests accurately represent user behavior and also saves time.
+
+### **5\. Does automation replace manual testing completely?**
+
+Not at all. Automation is great for testing the same checks repeatedly, but there are some things that only people can test, like testing how user-friendly an app is or noticing any strange bugs that automated tests might miss. The best teams combine both: they use automation for the regular tasks and manual testing where a human’s perception might be needed.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Falak bhati
+
+[LinkedIn](https://www.linkedin.com/in/falak-bhati-802a7328a/)
+
+[View All Posts](https://keploy.io/blog/authors/Falak%20Bhati)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+### [What Does Enumerate Mean in Python](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+Falak Bhati
+
+20 Jun, 2025
+
+When you use loops in Python, there are a lot of times when you don’t just want...
+
+[](https://keploy.io/blog/technology/maintaining-auto-generative-api-tests-need-of-de-duplicate-tests)
+
+### [Maintaining Auto-Generative API Tests: Need of de-duplicate tests](https://keploy.io/blog/technology/maintaining-auto-generative-api-tests-need-of-de-duplicate-tests)
+
+Sarthak Shyngle
+
+15 May, 2025
+
+The Evolving Landscape of Auto-Generative Testing In today’s fast-paced development environment, automatically generating tests has become a...
+
+[](https://keploy.io/blog/community/ai-revolutionizes-software-qa-testing-frameworks)
+
+### [AI’s Impact on Testing Frameworks & Software QA Evolution](https://keploy.io/blog/community/ai-revolutionizes-software-qa-testing-frameworks)
+
+Ashkan Ebtekar
+
+21 Mar, 2025
+
+As the time goes by, we can see that requirements for software products also change. These requirements...
+
+[](https://keploy.io/blog/community/test-case-generation-for-faster-api-testing)
+
+### [How to Automate Test Case Generation for Faster API Testing](https://keploy.io/blog/community/test-case-generation-for-faster-api-testing)
+
+Tvisha Raji
+
+15 Mar, 2025
+
+Software development teams spend up to 30% of their project time creating and maintaining test cases. As...
+
+[](https://keploy.io/blog/community/how-to-achieve-scalable-automation-with-ai-driven-testing)
+
+### [How to Achieve Scalable Automation with AI-Driven Testing](https://keploy.io/blog/community/how-to-achieve-scalable-automation-with-ai-driven-testing)
+
+Ashkan Ebtekar
+
+24 Feb, 2025
+
+Testing has always been a critical component of software development and the Software Development Lifecycle. In today’s...
+
+[](https://keploy.io/blog/community/continuous-ui-testing-pipeline-browserstack-with-github-actions)
+
+### [Continuous UI Testing Pipeline: BrowserStack with GitHub Actions](https://keploy.io/blog/community/continuous-ui-testing-pipeline-browserstack-with-github-actions)
+
+Khushi Trivedi
+
+25 Dec, 2024
+
+Did you know 88% of users don’t return to sites with poor experiences, even if they offer...
+
+## Compare JSON Files
+9 Jun, 2024.[Community](https://keploy.io/blog/community)
+
+# How To Compare Two Json Files?
+
+12 min read
+
+
+
+Written By:Keploy Team
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Keploy Team
+
+Table of Contents
+
+Old JSONNew JSONWhat is a JSON File?Comparing JSON Files#1\. Visual Inspection2\. Using Command Line Tools3\. Using Online JSON comparison Tools4\. Writing Custom ScriptsExamples of Scenarios Where JSON Compare Is Useful1\. Version Control and Code Reviews2\. API Response Validation3\. Database Migration and Synchronization4\. Configuration Management5\. User Profile Updates6\. E-commerce Product Data7\. Logging and DebuggingConclusionFrequently Asked Questions1\. Why do developers need to compare JSON files?2\. What are the challenges developers face when manually comparing JSON files?3\. How can command-line tools help in comparing JSON files?4\. What are the advantages of using online JSON diff tools?Authored By:#Reviewed By:#
+
+Table of Contents
+
+## JSON Diff Viewer\#
+
+### Old JSON
+
+›
+
+⌄
+
+⌄
+
+{
+
+"name": "John",
+
+"age": 25,
+
+"location": "New York",
+
+"hobbies": \[\
+\
+"Reading",\
+\
+"Cycling",\
+\
+"Hiking"\
+\
+\]
+
+}
+
+### New JSON
+
+›
+
+⌄
+
+⌄
+
+{
+
+"name": "John",
+
+"age": 26,
+
+"location": "San Francisco",
+
+"hobbies": \[\
+\
+"Reading",\
+\
+"Traveling"\
+\
+\],
+
+"job": "Software Developer"
+
+}
+
+| | | | |
+| --- | --- | --- | --- |
+| 1 | ```
{
``` | 1 | ```
{
``` |
+| 2 | ```
"age": 25,
``` | 2 | ```
"age": 26,
``` |
+| 3 | ```
"hobbies": [
``` | 3 | ```
"hobbies": [
``` |\
+| 4 | ```
"Reading",
``` | 4 | ```
"Reading",
``` |\
+| 5 | ```
"Cycling",
``` | 5 | ```
"Traveling"
``` |\
+| 6 | ```
"Hiking"
``` | | ```
``` |\
+| 7 | ```
],
``` | 6 | ```
],
``` |
+| | ```
``` | 7 | ```
"job": "Software Developer",
``` |
+| 8 | ```
"location": "New York",
``` | 8 | ```
"location": "San Francisco",
``` |
+| 9 | ```
"name": "John"
``` | 9 | ```
"name": "John"
``` |
+| 10 | ```
}
``` | 10 | ```
}
``` |
+
+As a developer, you usually work with JSON data, and may need to compare JSON files. This might involve checking a list of products from the database against a previous version or comparing an updated user profile returned by your REST API with the original data sent to the server.
+
+In this article, we’ll explore several methods and tools developers can use to compare two JSON files effectively.
+
+## What is a JSON File?\#
+
+JSON is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is organized in key-value pairs and arrays, making it versatile for representing various types of data.
+
+💡 Need to add comments to your JSON files before comparing them? Check out [4 ways to write comments in JSON](https://keploy.io/blog/community/4-ways-to-write-comments-in-json "4 ways to write comments in JSON").
+
+Here’s a simple example of a JSON object:
+
+›
+
+⌄
+
+{
+
+"name": "John Doe",
+
+"age": 30,
+
+"city": "New York"
+
+}
+
+JSON files can contain nested structures, arrays of objects, and other complex data types, making their comparison non-trivial when done manually.
+
+## Comparing JSON Files\#
+
+When comparing two JSON files, our goal is to detect differences in their structure and content. Here are some approaches developers can take:
+
+### 1\. Visual Inspection
+
+The most basic method is to open both JSON files side by side and visually inspect them. This approach works well for small JSON files or when you’re interested in a quick overview. However, it becomes impractical for larger files or when the differences are subtle.
+
+### 2\. Using Command Line Tools
+
+For developers comfortable with the command line, tools like `diff` and `jq` can be immensely useful.
+
+- The `diff` command in JSON format is commonly utilized to identify discrepancies between a model schema and the actual schema in a database. The JSON-formatted output from `diff` can then be seamlessly integrated into automation workflows as input. This enables automated processes to efficiently handle schema drift detection and subsequent corrective actions as needed.
+- The `jq` command is a versatile tool that allows you to parse and manipulate JSON data right from your command line. It can extract and manipulate JSON data and is particularly useful for comparing JSON structures.
+
+### 3\. Using Online JSON comparison Tools
+
+Several online tools are available that provide a visual diff of JSON files. These tools often highlight additions, deletions, and modifications in an easy-to-understand format.
+
+Examples of such tools include:
+
+- **[JSON Diff](https://www.jsondiff.com/)**: Provides a clear visualization of the differences between two JSON files.
+- **JsonComparer**: Another tool that highlights changes between JSON objects.
+
+These tools are convenient for occasional use or for teams that prefer a graphical interface over command-line tools.
+
+### 4\. Writing Custom Scripts
+
+For more complex comparisons or integrating comparison tasks into automated workflows, writing custom scripts in your preferred programming language (like Python or JavaScript) might be necessary. Libraries such as `jsondiff` in Python or using standard libraries like `json` can facilitate this process.
+
+Here’s a basic example in Python using `jsondiff`:
+
+›
+
+from jsondiff importdiff
+
+withopen('file1.json') as f1, open('file2.json') as f2:
+
+json1 = json.load(f1)
+
+json2 = json.load(f2)
+
+differences =diff(json1, json2)
+
+print(differences)
+
+This script uses the `jsondiff` library to compute the differences between `file1.json` and `file2.json` and prints them.
+
+## Examples of Scenarios Where JSON Compare Is Useful\#
+
+JSON comparison is necessary in various real-world scenarios where data integrity and consistency are most important. Here are some common situations where comparing JSON files proves to be invaluable:
+
+### 1\. **Version Control and Code Reviews**
+
+When multiple developers work on the same project, changes to JSON configuration files, API responses, or data structures are inevitable. By comparing JSON files during code reviews, teams can easily track changes, identify unintended modifications, and ensure that all updates align with the project’s requirements.
+
+### 2\. **API Response Validation**
+
+During API development or testing, comparing the JSON response from the API with expected results is essential. This helps validate that the API behaves as expected, returning the correct data structures and values. Automated JSON comparisons can be integrated into testing pipelines to catch discrepancies early, ensuring reliable API performance.
+
+### 3\. **Database Migration and Synchronization**
+
+When migrating data between databases or synchronizing data across environments, JSON comparison helps ensure that the data structures and values remain consistent. By comparing JSON exports from different environments, developers can detect and resolve discrepancies, preventing data loss or corruption during migration.
+
+### 4\. **Configuration Management**
+
+Applications often rely on JSON files for configuration settings. Comparing configuration files between different environments (e.g., development, staging, production) ensures that all environments are correctly set up. It also helps prevent issues caused by configuration drift, where settings might unintentionally differ between environments.
+
+### 5\. **User Profile Updates**
+
+In applications that manage user profiles, comparing the JSON representation of user data before and after updates is vital. This ensures that updates are correctly applied and that no critical information is inadvertently altered or lost. JSON comparison can also help track changes to user profiles over time, providing valuable insights for auditing and troubleshooting.
+
+### 6\. **E-commerce Product Data**
+
+In e-commerce platforms, product information is often stored and transferred in JSON format. Comparing JSON files containing product data between different versions of a database or API can help ensure that all product details, prices, and availability are correctly updated. This is particularly important during bulk updates or when synchronizing data across multiple sales channels.
+
+### 7\. **Logging and Debugging**
+
+JSON is frequently used to log structured data, such as API requests and responses or application state information. By comparing JSON logs from different instances or time periods, developers can identify patterns, detect anomalies, and debug issues more effectively. JSON comparison can be a powerful tool in pinpointing the root cause of errors and ensuring consistent application behavior.
+
+## Conclusion\#
+
+Comparing JSON files is a necessary task for developers to ensure data consistency, track changes, and debug applications effectively. Depending on your specific needs and workflow, you can choose from manual methods, command-line tools, online utilities, or custom scripts.
+
+Each method has its strengths, so it’s essential to pick the one that best suits your requirements. By mastering JSON file comparison techniques, developers can streamline their development processes and ensure the reliability of their JSON data.
+
+## Frequently Asked Questions\#
+
+### 1\. Why do developers need to compare JSON files?
+
+Developers often need to compare JSON files to ensure data consistency across different versions of their software, track changes made by multiple contributors, debug issues related to data discrepancies, and validate data integrity during testing or deployment phases.
+
+### 2\. What are the challenges developers face when manually comparing JSON files?
+
+Manual comparison of JSON files can be challenging due to their nested and hierarchical structure. Spotting differences in large files or complex objects can be time-consuming and error-prone. Moreover, differences might be subtle, such as changes in nested values or array orders, which are not immediately apparent without a structured comparison approach.
+
+### 3\. How can command-line tools help in comparing JSON files?
+
+Command-line tools like `diff` and `jq` offer efficient ways to compare JSON files. `diff` provides a line-by-line comparison, while `jq` allows for sorting keys and extracting specific elements before comparison. These tools are scriptable, making them ideal for automated workflows and integration into build processes or version control systems.
+
+### 4\. What are the advantages of using online JSON diff tools?
+
+Online JSON diff tools provide a visual representation of differences between JSON files, often highlighting additions, deletions, and modifications. They are user-friendly and don’t require installation, making them accessible for quick comparisons or collaborations across teams. These tools often include features like color-coding and side-by-side views, enhancing the clarity of differences in JSON structures.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Keploy team
+
+Author Description:
+
+- Keploy is developer-centric API testing tool that creates tests along with built-in-mocks, faster than unit tests.
+
+Keploy not only records API calls, but also records database calls and replays them during testing, making it easy to use, powerful, and extensible..
+
+[View All Posts](https://keploy.io/blog/authors/Keploy%20Team)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/react-vs-react-native-which-one-should-you-use)
+
+### [React vs React Native: Which One Should You Use?](https://keploy.io/blog/community/react-vs-react-native-which-one-should-you-use)
+
+Alok Kumar
+
+23 Jun, 2025
+
+It is said that the special nature of software development is ever-changing so it is important to...
+
+[](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+### [What Does Enumerate Mean in Python](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+Falak Bhati
+
+20 Jun, 2025
+
+When you use loops in Python, there are a lot of times when you don’t just want...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/when-to-use-a-list-comprehension-in-python)
+
+### [When to Use a List Comprehension in Python](https://keploy.io/blog/community/when-to-use-a-list-comprehension-in-python)
+
+Achanandhi M
+
+18 Jun, 2025
+
+To be honest, most Python developers are not using list comprehensions. Even I, who is writing this...
+
+## Understanding Code Coverage
+18 Dec, 2023.[Community](https://keploy.io/blog/community)
+
+# Code Coverage Explained: Best Tools 2025
+
+11 min read
+
+
+
+Written By:Arindam Majumder
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Arindam Majumder
+
+Table of Contents
+
+Why Code Coverage is Essential for Software Testing?How to measure code coverage in Java, Python, C#?What are the Levels of Code Coverage?7 Best Code Coverage Tools You Must Try in 2025ConclusionFAQsHow can Code Coverage be integrated into the CI/CD pipeline?What is Code Coverage and why is it important in software development?How does Code Coverage work in practice?Authored By:#Reviewed By:#
+
+Table of Contents
+
+Code Coverage is a very important part of the Software Development life cycle. It helps to ensure that tests are covering the most critical parts of our application, and is an important measure to determine the reliability of the code!
+
+In this article, we’ll explore what is Code Coverage, Its importance, How it works, and many more! So without delaying further, let’s get started!
+
+## What is Code Coverage & How Does It Improve Software Quality?\#
+
+
+
+Code coverage measures the percentage of code that is tested. It’s a very useful metric to test the quality of the test suite and is one of the [major forms of White Box Testing.](https://keploy.io/blog/community/black-box-testing-and-white-box-testing-a-complete-guide)
+
+A program with high test coverage is more likely to have fewer bugs compared to a program with low test coverage
+
+> _The Formula of Code Coverage:_
+>
+> \* **Code Coverage Percentage = (Number of lines of code executed)/(Total Number of lines of code in an application) \* 100.\***
+
+## Why Code Coverage is Essential for Software Testing?\#
+
+Ok, now that you’ve understood what code coverage is, let’s know why should we care about Code Coverage? What will we get from it?
+
+In this section, we will explore the importance of Code Coverage:
+
+- It helps us to find the untested code where the potential can be. So by finding them, we can minimize the chances of getting bugs.
+
+- It helps detect regressions early. By tracking code coverage over time, any drop in coverage can indicate a regression that requires further testing.
+
+- By detecting the unused it helps to improve the maintainability.
+
+- It seamlessly integrates with CI/CD pipelines, automating coverage measurement throughout the development lifecycle.
+
+- It works with a variety of programming languages and platforms like C#, Java, JavaScript, and more. This allows the testing of heterogeneous systems
+
+
+## How to measure code coverage in Java, Python, C\#?\#
+
+There are many approaches to measure Code Coverage but overall there are three main ways to measure it.
+
+1. **Instrumentation** – The code coverage tool modifies the source code by inserting tracing calls. This allows it to track the executed parts of the code.
+
+2. **Test Execution** – The test suite is run against the instrumented code. The tracing calls collect data on which lines, functions, branches, etc. were executed.
+
+3. **Reporting** – The code coverage tool analyzes the collected data and generates a report showing the percentage of various coverage criteria that were met.
+
+
+
+
+## What are the Levels of Code Coverage?\#
+
+Several levels of code coverage can be measured to determine how thoroughly your test suite exercises your code:
+
+1. **Statement coverage** – This measures the percentage of statements in your source code that have been executed by tests. Simply counting the number of lines executed gives you the statement coverage.
+
+2. **Branch coverage** – This measures the [percentage of branches](https://keploy.io/blog/community/understanding-branch-coverage-in-software-testing) in your source code that have been executed. Branches refer to decision points like if-else statements, loops, etc. To achieve full branch coverage, tests must execute every branch at least once.
+
+3. **Condition coverage** – This measures the percentage of [conditions within branches](https://keploy.io/blog/community/understanding-condition-coverage-in-software-testing) that have been tested for both true and false. It focuses on individual Boolean expressions rather than full branches.
+
+4. **Path coverage** – This measures the percentage of possible paths through your program that have been executed. It takes into account the order of execution and all possible paths through the code.
+
+5. **Modified condition/decision coverage (MC/DC)** – This is the strongest form of coverage and requires that each condition independently affects a decision outcome. To achieve MC/DC coverage, tests must vary one condition at a time while holding others constant.
+
+
+## 7 Best Code Coverage Tools You Must Try in 2025\#
+
+There are several tools available in the market to measure the Code Coverage of any Software. Some are given below:
+
+- **Cobertura**:\- Cobertura is an open-source code coverage tool for Java programs. It provides line and branch coverage reports, highlighting untested code and helping developers improve their test suites.
+
+- [**Keploy.io**](https://keploy.io/) **: –** Keploy is an open-source testing tool that has inbuilt capabilities to provide the code coverage. It provides detailed reports with line, branch, statement and branch metrics, and also the way to improve test suites to [get higher code coverage](https://keploy.io/code-coverage).
+
+- **Gretel :-** Gretel is a lightweight code coverage tool for Python. It provides statement and branch coverage metrics, helping developers ensure that their Python code is thoroughly tested.
+
+- **Kalistick :-** Kalistick is a cloud-based code coverage and quality analysis tool. It supports multiple languages and provides detailed reports on coverage, complexity, and other quality metrics.
+
+- **JaCoCo: –** JaCoCo (Java Code Coverage) is an open-source tool that provides comprehensive code coverage reports for Java applications. It integrates with popular build tools like Maven and Gradle, making it easy to incorporate into the development workflow.
+
+- **OpenCover (.NET Code Coverage)** **:-** OpenCover is an open-source code coverage tool for .NET applications. It provides statement and branch coverage metrics, integrating with CI/CD tools like Jenkins and Azure DevOps.
+
+- **Istanbul (JavaScript Code Coverage)** : – Istanbul is a popular tool for JavaScript applications. It works with frameworks like [Jasmine, Mocha](https://keploy.io/blog/technology/my-testing-journey-with-jasmine-and-mocha), [Vitest, Jest](https://keploy.io/blog/community/migrate-from-jest-to-vitest), and Karma, generating detailed reports and visualizations.
+
+
+## Conclusion\#
+
+Hence, Code coverage is an indispensable part of the [software development lifecycle](https://keploy.io/blog/community/4-ways-to-accelerate-your-software-testing-life-cycle), providing crucial insights into the effectiveness of test suites and helping to ensure high-quality, reliable software. By measuring the percentage of code that is tested, developers can identify untested areas, detect regressions early, and improve maintainability.
+
+Various tools are available to measure code coverage, each offering unique features and capabilities to suit different development environments and programming languages. By integrating code coverage tools into CI/CD pipelines, teams can automate the measurement and reporting of coverage metrics, maintaining high standards of code quality throughout the development process.
+
+## FAQs\#
+
+### **How can Code Coverage be integrated into the CI/CD pipeline?**
+
+Code Coverage tools can seamlessly integrate into CI/CD pipelines, automating the measurement and reporting of coverage metrics. By incorporating tools like JaCoCo, Keploy, or OpenCover into your CI/CD setup, you can ensure that code coverage is consistently tracked with each build and deployment. This integration helps detect regressions early, maintain high code quality, and ensure that new code changes are adequately tested before being released into production.
+
+### **What is Code Coverage and why is it important in software development?**
+
+**Code Coverage** is a metric that measures the percentage of source code executed by a test suite. It is crucial because it helps identify untested areas of the code, reduces the risk of bugs, detects regressions early, and improves maintainability. High code coverage generally indicates a well-tested and robust application, leading to fewer issues in production.
+
+### **How does Code Coverage work in practice?**
+
+**Code Coverage** works through three main steps: instrumentation, test execution, and reporting. The code is instrumented by inserting tracing calls to track execution, then the tests are run, and finally, a report is generated showing the percentage of statements, branches, conditions, and paths covered. This process helps developers understand which parts of the code are thoroughly tested and which are not.
+
+
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Arindam majumder
+
+Author Description:
+
+- I'm building @Studio1, helping B2B SaaS companies grow through technical content with over 500k+ reads.
+- I specialize in technical writing, blogging, and content strategy..
+
+[LinkedIn](https://www.linkedin.com/in/arindam2004/)
+
+[View All Posts](https://keploy.io/blog/authors/Arindam%20Majumder)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/what-is-software-architecture)
+
+### [What is Software Architecture Guide: Build Robust Systems](https://keploy.io/blog/community/what-is-software-architecture)
+
+Amaan Bhati
+
+13 Jun, 2025
+
+One of the problems development teams experience is that when they build applications, they are unable to...
+
+[](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+### [Angular vs React : Complete Guide for Development in 2025](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+Amaan Bhati
+
+10 Jun, 2025
+
+Frontend coding has been transformed by JavaScript frameworks for more than a decade, with developers leaning on...
+
+[](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+## AI in Software Testing
+21 Mar, 2025.[Community](https://keploy.io/blog/community)
+
+# Ai’S Impact On Testing Frameworks & Software Qa Evolution
+
+11 min read
+
+
+
+Written By:Ashkan Ebtekar
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Ashkan Ebtekar
+
+Table of Contents
+
+Emergence of Automated Testing FrameworksWhat Sparked Their Emergence?Key BenefitsLimitationsHow AI is Revolutionizing Testing FrameworksCase Studies and Real-World ApplicationsKey Impact of Keploy in Regression TestingConclusionAuthored By:#Reviewed By:#
+
+Table of Contents
+
+As the time goes by, we can see that requirements for software products also change. These requirements are increasing in difficulty and get the development cycle of digital products are getting more complicated than ever.
+
+We already know the importance of fast delivery of the software while making sure its reliable. This importance only increases with the complications of development caused by these requirements, which makes the importance of software testing more than ever.
+
+Like any other workflow, AI have greatly made an impact on the software development lifecycle. This also includes modification on the testing process of the software, help us achieve more creative solutions that helps us with efficiency and reliability of the software.
+
+In this article, we are going to see how AI is reshaping the testing landscape of software development and testing frameworks.
+
+## **The Early Days of Testing Frameworks**\#
+
+In traditional testing, we relied on manual testing techniques to ensure software quality. This process involved testers manually executing test cases without the aid of automated tools.
+
+Testers would follow a set of predefined steps to check whether the software behaved as expected. This method required a significant amount of time and effort as testers needed to perform these checks repeatedly, especially after each update or modification to the software.
+
+As time passed we saw the emergence of automated testing frameworks. These frameworks although not fully automated, helped streamline parts of the testing process. This made testing more efficient and productive by leaving routine tasks to automation.
+
+Some of the examples of automated testing frameworks are: Selenium, JUnit, and TestNG.
+
+The key benefit of these automated testing frameworks are reusability of test scripts and the reduced human effort achieved by automation. However, these automation of process and the benefits it brings also comes with a downside. One of the cons we can point out to is high learning curves and maintenance requirements.
+
+## **Emergence of Automated Testing Frameworks**\#
+
+Frameworks like **Selenium**, **JUnit**, and **TestNG** revolutionized software testing by automating repetitive tasks.
+
+Automated testing frameworks like **Selenium**, **JUnit**, and **TestNG** marked a turning point in software quality assurance. These frameworks introduced structured ways to automate tests which significantly reduced the reliance on manual testing and increasing testing efficiency.
+
+#### **What Sparked Their Emergence?**
+
+1. **Growing Complexity of Software**: As applications became more intricate and dynamic, manual testing alone couldn’t ensure reliability and scalability.
+
+2. **Demand for Faster Development Cycles**: Agile and DevOps practices required faster and more frequent testing to keep up with shorter release cycles.
+
+3. **Error-Prone Manual Testing**: Automation frameworks were designed to reduce human error and improve accuracy in testing.
+
+
+#### **Key Benefits**
+
+- **Reusability**: Write once, reuse across multiple tests.
+
+- **Efficiency**: Reduced manual effort in repetitive testing.
+
+
+#### **Limitations**
+
+- **Learning Curve**: Steeper for beginners.
+
+- **Maintenance**: Requires continuous updates and effort.
+
+
+## **How AI is Revolutionizing Testing Frameworks**\#
+
+1. **Automated Test Generation**
+
+By leveraging the LLMs predictability, we are able to declare critical paths in our testing phase and generate test cases automatically. This will be significantly more efficient than the traditional manual testing. Tools like Keploy and Testim are great examples for this cause.
+
+2. **Self-Healing Tests**
+
+AI adapts to UI and codebase changes without manual intervention. This automation can bring great benefits to organizations, since there is no energy wasted on these type of mundane tasks. At the end this will help us reduce the maintenance efforts.
+
+3. **Enhanced Test Coverage and Efficiency**
+
+AI is great at covering almost all other possible options in any case. In the matter of testing, this is helpful since AI pinpoints untested areas and optimizes regression test suites. With the help of AI we are able to cover almost all edge cases and have a higher test coverage and efficiency. AI powered code analysis tools are a great example in this case, which are great for coverage insights.
+
+4. **Faster Debugging and Feedback Loops**
+
+Real-time insights achieved by AI are helpful in identifying the root causes of failures and integrate with CI/CD pipelines for smooth testing and deployment. This makes the QA team for have efficient feedback loops and faster continuous integration and delivery of the software.
+
+5. **AI for Predictive Testing**
+
+AI is great for doing analysis in a set of data. We can use AI as an analyser on our feedback loops for the testing phase to help us predict potential failure points based on historical data. By following this approach, we testing teams save time and are able to focus on high risk areas which helps with a more efficient testing process and faster delivery of software.
+
+
+### **Case Studies and Real-World Applications**
+
+The integration of AI in regression testing has significantly enhanced the efficiency and accuracy of software quality assurance. One standout example is **Keploy**, an AI-driven testing tool that has transformed the way API testing is conducted.
+
+Keploy uses AI to **automatically generate test cases**, drastically reducing the time developers spend writing and maintaining them. For instance, in a real-world scenario involving a SaaS platform, Keploy enabled seamless tracking of API changes and created test cases based on production traffic, ensuring zero disruption to the user experience after updates.
+
+#### **Key Impact of Keploy in Regression Testing**
+
+- **Faster Feedback Loops**: By automating test case generation, Keploy provides instant feedback on changes, helping teams identify issues early.
+
+- **Improved Test Coverage**: Keploy intelligently identifies and tests all API endpoints, ensuring comprehensive regression testing.
+
+- **Simplified Integration**: With minimal setup, teams can integrate Keploy into existing workflows without needing extensive training or expertise.
+
+
+Tools like Keploy are paving the way for smarter regression testing, demonstrating how AI can reduce human effort, streamline processes, and ultimately deliver higher-quality software.
+
+### **Conclusion**
+
+We have covered the transition in automated test frameworks and how they improved manual testing. We have also analyzed the progression and impact of artificial intelligence on these testing frameworks.
+
+The time and cost efficiently benefits AI can bring in the software testing landscape are priceless. That is why companies should adapt to these trends and market changes as soon as possible in order to benefit from it to deliver high quality software and product in a lower time period.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Ashkan ebtekar
+
+Author Description:
+
+- As a Microsoft Learn Ambassador and an iOS Developer, I combine my passion for software development and community building to create impactful solutions and empower future tech leaders.
+
+I lead and organize various events and initiatives to promote Microsoft technologies and foster a culture of innovation and collaboration among students.
+- Some of my accomplishments include hosting a weekly hackathon series, mentoring and coaching students, and growing the student community by over 200 members.
+
+I also lead the front-end development of an AI competition platform for one of the Ivy League universities, working with a team of developers and communicating with API and AI models.
+- The platform is now one of the best in the country, attracting attendees from other prestigious colleges.
+
+Through these experiences, I have developed my leadership, software development, and community-building skills, Soft Skills, and SwiftUI.
+- I am always eager to learn new skills, explore new challenges, and make a positive difference in the world..
+
+Show more
+
+[LinkedIn](https://www.linkedin.com/in/ashkan-ebtekari)
+
+[View All Posts](https://keploy.io/blog/authors/Ashkan%20Ebtekar)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+### [What Does Enumerate Mean in Python](https://keploy.io/blog/community/what-does-enumerate-mean-in-python)
+
+Falak Bhati
+
+20 Jun, 2025
+
+When you use loops in Python, there are a lot of times when you don’t just want...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+[](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+### [Smoke Testing vs Regression Testing: What You Need to Know](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+Amaan Bhati
+
+4 Jun, 2025
+
+In the field of software quality assurance, there are two types of testing often referenced, smoke testing...
+
+[](https://keploy.io/blog/community/guide-to-automated-testing-tools-in-2025)
+
+### [Guide to Automated Testing Tools in 2025](https://keploy.io/blog/community/guide-to-automated-testing-tools-in-2025)
+
+Falak Bhati
+
+29 May, 2025
+
+Manual testing gets old fast. You end up clicking through the same workflows over and over, and...
+
+## E2E Testing Strategies
+22 Sep, 2023.[Community](https://keploy.io/blog/community)
+
+# E2e Testing Strategies: Handling Edge Cases While Testing
+
+11 min read
+
+
+
+Written By:Shashwat Gupta
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Shashwat Gupta
+
+Table of Contents
+
+Some Common Edge Cases 😶🌫️Challenges in Testing Edge Cases with E2E TestingStrategies for effective E2E Testing by handling Edge Cases ⚡Conclusion 👋🏻Authored By:#Reviewed By:#
+
+Table of Contents
+
+End-to-end (E2E) testing, often considered the guardian at the gates of software quality, plays a pivotal role in the Software Development Life Cycle (SDLC). In a world where user expectations soar daily, ensuring an application’s robustness is paramount. This is where E2E testing steps into the limelight.
+
+Think of it as a vigilant guard. This guard constantly checks every part of your web application. Its purpose is to ensure that your application remains strong. It performs this action even in unusual situations, which people know as " **edge cases**."
+
+In this blog, we explore E2E Testing Strategies, with a focus on dealing with tricky edge cases. But before we dive into the strategies, let’s first understand what edge cases are.
+
+### Understanding Edge Cases 🧑🏻🏫
+
+
+
+Edge cases, often referred to as boundary cases, are scenarios in software development that represent extreme or uncommon conditions and inputs. These are situations that fall at the very edges or boundaries of the expected or typical behavior of a system. They exhibit their uniqueness and typically involve uncommon or unforeseen user interactions, data inputs, or system conditions.
+
+The critical role of involving edge cases while testing is because they help in:
+
+1. **Identifying vulnerabilities:** Edge cases are often where vulnerabilities and unexpected behavior are most likely to occur. These scenarios may not be well-covered in standard testing procedures. Entering a long password, submitting an empty form, or using special characters in data inputs can all expose vulnerabilities.
+
+2. **Enhancing Software Reliability:** By testing edge cases, you ensure that your software can gracefully handle unusual circumstances. This enhances the overall reliability of the system.
+
+3. **Meeting User Expectations:** Users can be unpredictable, and they might use your software in ways you didn’t anticipate. By testing edge cases, you align your software with user expectations. If someone enters a birthdate from more than 100 years ago, your app should handle it well, even if it’s uncommon.
+
+4. **Avoiding Costly Failures:** Neglecting edge case testing can lead to costly failures and security breaches in a production environment. It’s much more cost-effective to identify and address these issues during the development and testing phases.
+
+
+### Some Common Edge Cases 😶🌫️
+
+It’s important to know typical edge cases because they can cause errors or unexpected behavior in the application. Here are some common examples:
+
+1. **Extreme Data Sizes:**
+ - **Large File Uploads:** Evaluate the application’s ability to handle large file uploads, which can strain server resources and impact performance.
+
+ - **Overflow and Underflow:** Check if the app can handle extremely big or small numbers without any errors or crashes.
+2. **Rare User Interactions:**
+ - **Network Failures:** Introduce network disruptions or slow connections during user interactions to assess how the application gracefully handles such situations.
+
+ - **Concurrency Issues:** Test for race conditions and concurrency problems, where multiple users or processes interact with the application simultaneously.
+3. **Boundary Conditions:**
+ - **Boundary Values:** Check how the application works when using the lowest and highest values for age, quantity, or price.
+
+ - **Pagination:** Test how the application handles edge cases in pagination, like the first and last page or cases where the number of items per page doesn’t evenly divide the total.
+4. **Data Integrity and Database Edge Cases:**
+ - Assess how the application handles situations like database connection failures, duplicate records, or constraint violations.
+5. **Unusual User Inputs:**
+ - **Special Characters:** Test how the application handles user inputs with special characters, such as symbols, emojis, or non-alphanumeric characters.
+
+ - **Long Inputs:** Test the application’s response to unusually long input strings, which may exceed character limits or cause layout issues.
+
+Addressing edge cases like these proactively during testing can significantly improve the overall quality and user experience of your web application.
+
+### Challenges in Testing Edge Cases with E2E Testing
+
+1. **Limited Visibility:** E2E testing faces challenges in identifying and addressing edge cases because of their unexpected nature. Since E2E testing typically follows predefined user flows, testers may overlook edge cases that fall outside these flows.
+
+2. **Data Variability:** E2E testing must account for data variability, especially in edge cases where input data may be extreme or unusual. Ensuring that the application handles such data gracefully in an E2E testing environment is essential for comprehensive coverage.
+
+3. **Complex Interactions:** Edge cases often involve complex user interactions or sequences of actions. E2E testing tools and scripts need to accurately simulate these interactions to ensure the application behaves as expected.
+
+4. **Resource Constraints:** E2E testing doesn’t always mimic real-world limits, such as high CPU or memory usage, leading to unusual situations. This lack of resource emulation can hinder thorough testing.
+
+5. **Cross-Browser and Cross-Device Compatibility:** E2E testing needs different browsers and devices, but situations may differ on each platform. Ensuring consistent behavior across the entire spectrum of supported environments can be challenging.
+
+
+### Strategies for effective E2E Testing by handling Edge Cases ⚡
+
+
+
+By implementing specific strategies and planning your tests, you can easily conduct effective testing to ensure a robust application. Here are some of the best strategies to implement in your testing lifecycle:
+
+1. **Identifying and Prioritizing Relevant Edge Cases:** Begin by identifying the significant uncommon scenarios for your application. Then, prioritize them based on their potential impact on the functionality and user experience of the app. Focus on testing the most critical edge cases first.
+
+2. **Test Data Generation:** Develop a systematic approach to generate test data that covers various edge cases. This may involve creating scripts or using data generation tools to simulate unusual inputs and scenarios.
+
+3. **Leverage Test Automation Frameworks:** Use test automation frameworks to automate end-to-end tests, including scenarios that cover edge cases. These frameworks allow you to define test cases and automate repetitive testing tasks.
+
+4. **Error Handling and Validation:** Pay special attention to error handling and validation mechanisms in your application. Check how the system acts in unexpected situations and make sure it shows the right error messages or responses.
+
+5. **Parameterized Testing:** Use parameterized testing to run the same test case with different input values, including edge cases. This helps ensure comprehensive coverage.
+
+
+### Conclusion 👋🏻
+
+In summary, E2E testing is like a watchful protector in the world of software quality assurance. As user demands rise, ensuring your applications are strong is crucial, and that’s where E2E testing shines. It’s like a vigilant guard, thoroughly checking every part of your software, especially in those tricky situations called "edge cases."
+
+Understanding these edge cases is essential, as they represent the extremities of expected software behavior. They are unique, often unexpected scenarios that can challenge the resilience of your application.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Shashwat gupta
+
+Author Description:
+
+- Hello! I'm Shashwat Gupta, a dedicated B.Tech student pursuing Computer Science & Engineering.
+- Currently, I'm interning as a DevRel Intern at Keploy, an open-source E2E Testing toolkit.
+- My journey in the tech world has equipped me with expertise in building the backend of web applications, creating APIs, and mastering web scraping and Selenium automation..
+
+Show more
+
+[LinkedIn](https://www.linkedin.com/in/shashwhatt/)
+
+[View All Posts](https://keploy.io/blog/authors/Shashwat%20Gupta)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/exploring-the-effectiveness-of-e2e-testing-in-comparison-with-integration-testing)
+
+### [Exploring the Effectiveness of E2E Testing: In Comparison with Integration Testing](https://keploy.io/blog/community/exploring-the-effectiveness-of-e2e-testing-in-comparison-with-integration-testing)
+
+Shashwat Gupta
+
+11 Dec, 2023
+
+In the diverse domain of software development, testing methodologies play a pivotal role in ensuring the robustness...
+
+[](https://keploy.io/blog/community/what-is-the-difference-between-uat-and-e2e-testing)
+
+### [Difference Between UAT vs E2E Testing](https://keploy.io/blog/community/what-is-the-difference-between-uat-and-e2e-testing)
+
+Aditya Tomar
+
+23 Oct, 2023
+
+Hey everyone, I wanted to talk about two important types of testing: UAT and E2E testing. They’re...
+
+[](https://keploy.io/blog/community/testing-nirvana-unveiled-what-why-and-how-in-development)
+
+### [Testing Nirvana Unveiled: What, Why, and How in Development?](https://keploy.io/blog/community/testing-nirvana-unveiled-what-why-and-how-in-development)
+
+Shashwat Gupta
+
+20 Oct, 2023
+
+Traditional bug-fixing methods are no longer sufficient to meet the demands of today’s discerning users. In this...
+
+## Top VS Code Extensions
+20 Dec, 2024.[Community](https://keploy.io/blog/community)
+
+# Top 5 Must-Use Vs Code Extensions For Developers In 2025
+
+12 min read
+
+
+
+Written By:Swapnoneel Saha
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Swapnoneel Saha
+
+Table of Contents
+
+Key Features:Keploy – Simplify Testing and DebuggingKey Features:Docker – Streamline Container DevelopmentKey Features:GitLens – Supercharge GitKey Features:Prettier – Code FormatterKey Features:Honorable MentionsConclusionFAQ’sHow do I install VS Code extensions?Are these extensions free to use?Can I use these extensions with other code editors?How can I ensure extensions don’t slow down VS Code?What’s the best way to keep my extensions updated?Authored By:#Reviewed By:#
+
+Table of Contents
+
+Right tools can make a lot of difference, and in the world of software development, it’s absolutely true. VS Code, with its rich ecosystem of extensions, has become the go-to code editor for developers worldwide. As of 2025, here are the five must-have VS Code extensions that every developer should consider adding to their toolkit. These tools not only save time but also enhance our coding experience, ensuring that you can focus on what truly matters: building amazing software. So, let’s dive in and explore about them a bit!
+
+## **Tabnine** – AI Code Completion\#
+
+I would always prefer Tabnine over GitHub Copilot. This extension provides intelligent code completion, offering suggestions based on the context of your code. It’s like having a personal assistant that understands your coding patterns and best practices, and that would too for free! As developers strive to optimize their workflows, Tabnine proves to be an invaluable asset by reducing manual typing and predicting complex code structures.
+
+
+
+### Key Features:
+
+- Supports over 30 programming languages, including Python, Java, and JavaScript.
+
+- Learns and adapts to your coding style over time, offering personalized suggestions.
+
+- Integrates seamlessly with other VS Code extensions.
+
+- Helps prevent common syntax errors and reduces debugging time.
+
+
+> **Why Use It?** Tabnine speeds up development, reduces boilerplate, and helps you focus on the logic rather than syntax. Its AI-powered capabilities make it ideal for developers juggling multiple projects or languages.
+>
+> ## **Keploy** – Simplify Testing and Debugging\#
+
+Testing is a crucial aspect of software development, and [Keploy](https://marketplace.visualstudio.com/items?itemName=Keploy.keployio) makes it simpler than ever. This extension helps you in doing Unit, Integration, and API testing in Python, JavaScript, TypeScript, Java, PHP, Go, and more. It simplifies test creation and execution directly in Visual Studio Code, making testing easier and more efficient! Also, it’s completely free to use!
+
+
+
+### Key Features:
+
+- Record and replay API requests for efficient debugging.
+
+- Auto-generate unit tests to save time and reduce manual effort.
+
+- Seamless integration with your existing CI/CD pipelines for continuous testing.
+
+- Identifies discrepancies in API behavior across environments.
+
+
+> **Why Use It?** Keploy’s ability to reduce manual testing efforts makes it invaluable for developers working on backend services and APIs. It boosts productivity by allowing developers to focus on building features rather than debugging.
+>
+> ## **Docker** – Streamline Container Development\#
+
+Containerization have become an essential part of modern development, and the Docker extension for VS Code makes working with them effortless. From managing containers to building images, this extension integrates Docker workflows directly into your editor. For teams working with microservices or deploying applications across different environments, Docker simplifies the entire process.
+
+
+
+### Key Features:
+
+- Manage Docker containers, images, and volumes directly from VS Code.
+
+- Build and deploy containerized applications seamlessly.
+
+- Debug inside containers with ease, making troubleshooting much faster.
+
+- Provides visual tools to inspect and manage your container setup.
+
+
+> **Pro Tip**: Combine the Docker extension with Kubernetes tools for end-to-end container orchestration. This duo is perfect for developers managing large-scale, distributed applications.
+>
+> ## **GitLens** – Supercharge Git\#
+
+Version control is at the heart of software development, and GitLens takes your Git experience in VS Code to the next level. It provides unparalleled insights into your code’s history, authorship, and changes. For teams collaborating on large projects, GitLens simplifies the process of understanding code changes and tracking contributions.
+
+
+
+### Key Features:
+
+- View blame annotations directly in the code to understand who made changes and why.
+
+- Explore the history and contributors of a file or block of code.
+
+- Integrates with GitHub and other Git hosting services for enhanced collaboration.
+
+- Visualize branch histories and compare different versions effortlessly.
+
+
+> **Why Use It?**: GitLens makes collaboration seamless and ensures you’re always aware of the history behind your codebase. It’s especially useful for onboarding new team members or revisiting old projects.
+>
+> ## **Prettier** – Code Formatter\#
+
+Writing clean and consistent code is a hallmark of good coding. And, Prettier is a lifesaver when it comes to formatting your code automatically, and does the majority of the work almost single-handedly. Whether you’re working with JavaScript, TypeScript, HTML, or CSS, Prettier ensures your code adheres to defined styling rules, eliminating debates over formatting during code reviews. In team environments, this extension is especially powerful, as it ensures uniformity across your codebase, reducing friction and misunderstandings.
+
+
+
+### Key Features:
+
+- Automatic code formatting on save.
+
+- Supports a wide variety of languages and frameworks.
+
+- Configurable options to suit your coding style.
+
+- Simplifies code reviews by maintaining consistent styles across files and projects.
+
+
+> **Pro Tip**: Pair Prettier with ESLint for seamless linting and formatting. This combination not only enforces best practices but also keeps your codebase error-free.
+>
+> ## Honorable Mentions\#
+
+While the five extensions above are must-haves, there are several others worth checking out:
+
+- **Live Server**: Instantly reload your web pages during development, offering a smooth frontend workflow.
+
+- **ESLint**: Enforce coding standards and catch errors early, ensuring a high-quality codebase.
+
+- **REST Client**: Test APIs directly within VS Code, saving time by eliminating the need for external tools.
+
+- **Path Intellisense**: Autocomplete filenames in your project, speeding up navigation.
+
+- **Markdown Preview Enhanced**: A robust tool for previewing and editing Markdown files.
+
+
+## Conclusion\#
+
+VS Code’s true magic lies in its extensions, and these five (plus a few honorable mentions) are game-changers for developers in 2025. Whether you’re automating tedious tasks, simplifying collaboration, or just making your code look _chef’s kiss_ perfect, these tools have got you covered.
+
+Think of them as your development _Avengers_: Tabnine is your Tony Stark with AI smarts, Keploy is your Hulk smashing bugs, Docker keeps everything _contained_ like Black Widow, GitLens is Captain America leading your version control, and Prettier is Thor—bringing the thunder of clean, polished code!
+
+So, grab these extensions, level up your coding superpowers, and crush your development goals like a pro. With the right tools at your side, you’ll breeze through any project and maybe even have some fun along the way. 🚀
+
+## FAQ’s\#
+
+### How do I install VS Code extensions?
+
+To install extensions in VS Code, open the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. Search for the desired extension, click "Install," and it will be added to your setup.
+
+### Are these extensions free to use?
+
+Most VS Code extensions, including the ones listed in this article, are free or have free tiers. However, some, like Tabnine, offer premium versions with additional features.
+
+### Can I use these extensions with other code editors?
+
+Many extensions, such as Docker and Prettier, are also available for other editors or IDEs, but their specific VS Code integrations make them particularly powerful in this environment.
+
+### How can I ensure extensions don’t slow down VS Code?
+
+To prevent extensions from affecting performance, disable those you aren’t using actively. You can also monitor the Extensions view to see if any extensions are causing delays.
+
+### What’s the best way to keep my extensions updated?
+
+Extensions can be updated automatically if you enable auto-update in VS Code settings. Alternatively, you can manually check for updates in the Extensions view.
+
+
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Swapnoneel saha
+
+Author Description:
+
+- DevRel Engineer at Keploy 🐰 and Technical Writer at TutorialsPoint, with experience in full-stack development, UI/UX design, and Java/Python programming.
+- Currently pursuing B.Tech in CSE from MAKAUT, I'm a 4x hackathon winner and passionate lifelong learner..
+
+[LinkedIn](https://www.linkedin.com/in/swapnoneel-saha-14a3161b6/)
+
+[View All Posts](https://keploy.io/blog/authors/Swapnoneel%20Saha)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-software-architecture)
+
+### [What is Software Architecture Guide: Build Robust Systems](https://keploy.io/blog/community/what-is-software-architecture)
+
+Amaan Bhati
+
+13 Jun, 2025
+
+One of the problems development teams experience is that when they build applications, they are unable to...
+
+[](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+### [Angular vs React : Complete Guide for Development in 2025](https://keploy.io/blog/community/angular-vs-react-complete-guide-for-development-in-2025)
+
+Amaan Bhati
+
+10 Jun, 2025
+
+Frontend coding has been transformed by JavaScript frameworks for more than a decade, with developers leaning on...
+
+[](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+### [Smoke Testing vs Regression Testing: What You Need to Know](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+Amaan Bhati
+
+4 Jun, 2025
+
+In the field of software quality assurance, there are two types of testing often referenced, smoke testing...
+
+[](https://keploy.io/blog/community/testing-methodologies-in-software-testing)
+
+### [Testing Methodologies in Software Testing: A Comprehensive Guide](https://keploy.io/blog/community/testing-methodologies-in-software-testing)
+
+Amaan Bhati
+
+22 May, 2025
+
+Introduction Software testing methodologies are structured approaches that determine how testing activities are planned, executed, and managed...
+
+[](https://keploy.io/blog/community/software-development-tools-in-2025)
+
+### [Top Software Development Tools in 2025](https://keploy.io/blog/community/software-development-tools-in-2025)
+
+Ayush Gupta
+
+19 May, 2025
+
+Software development has never been more dynamic. With rising complexity, fast deployment cycles, and remote collaboration, developers...
+
+[](https://keploy.io/blog/community/a-technical-guide-to-test-mock-data-levels-tools-and-best-practices)
+
+### [A Technical Guide to Test Mock Data: Levels, Tools, and Best Practices](https://keploy.io/blog/community/a-technical-guide-to-test-mock-data-levels-tools-and-best-practices)
+
+Tvisha Raji
+
+16 May, 2025
+
+Mock data is the backbone of modern software development and testing. It allows developers to simulate real-world...
+
+## List Comprehensions in Python
+18 Jun, 2025.[Community](https://keploy.io/blog/community)
+
+# When To Use A List Comprehension In Python
+
+13 min read
+
+
+
+Written By:Achanandhi M
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Achanandhi M
+
+Table of Contents
+
+How to create list in python??#What is List Comprehension?#Example 1: Creating a List of SquaresExample 2: Nested List ComprehensionExample 3: Using If-Else in List ComprehensionExample 4: List Comprehension with FunctionsDifference Between ‘for’ Loop vs. List Comprehension#Explanation:Explanation:How Keploy Helps You Write Unit Tests for Your Python Application — Without Writing a Single Line of Code#1\. PR AgentHere’s what it does:2\. VSCode ExtensionWhen to Use List Comprehensions in Python#Benefits of Using List Comprehensions#Conclusion:#FAQs:#1.How is a list comprehension different from a for loop?2.Can I use list comprehensions with functions?3.Are list comprehensions faster than for loops?4.What is the difference between list comprehensions and generator expressions?5.How can I avoid memory issues with very large lists?Authored By:#Reviewed By:#
+
+Table of Contents
+
+To be honest, most Python developers are not using list comprehensions. Even I, who is writing this blog, never used list comprehensions before. But when I saw some examples, I felt I had to try and use them in my Python code. The reason for this change of mind is that there are a few advantages we get if we implement list comprehensions. Let’s see what these are in this blog today.
+
+**Let’s start from the basics:**
+
+## What is a List?\#
+
+If you ask this question to an 11th-grade school student, they will answer what a list is. Basically, lists allow us to store multiple items in a single variable. Also, a list is a built-in dynamically sized array (it automatically grows and shrinks).
+
+**Learn about best python ide**: [https://keploy.io/blog/community/top-5-best-ides-to-use-for-python-in-2024](https://keploy.io/blog/community/top-5-best-ides-to-use-for-python-in-2024)
+
+We can store all types of items.
+
+›
+
+python
+
+my\_list = \[0, a, \['keploy', 'testing'\], (2, 06, 2025), b\]
+
+print(my\_list)
+
+Lists are mutable in Python. This means you can replace, add or remove elements.
+
+## How to create list in python??\#
+
+We have now refreshed our minds about what a list is. Next comes the main interesting topic: how to create a list in Python. Basically, there are two ways:
+
+›
+
+python
+
+my\_list = \[1,2,3,4,5\]
+
+And less preferable:
+
+›
+
+my\_list =list()
+
+Basically the **list(obj)** is used to transform another sequence into the list.
+
+I never tried the second one we are all familiar with the first one, right? That’s how we have learned it, right?
+
+Now let’s meet the hero of today’s blog.
+
+## What is List Comprehension?\#
+
+List comprehension is a concise way to create lists in Python. It lets you build a new list by applying an expression to each item in an existing list (or any iterable), all in a single line of code.
+
+If you’re still not getting the point—basically, list comprehension allows you to create lists with less code. List comprehensions enhance code performance by being faster and more efficient than traditional for loops. They also improve code readability and conciseness, making your code easier to write and maintain.
+
+Let’s look at the following example.
+
+**Syntax of list comprehension:**
+
+›
+
+python
+
+\[expression for item in iterable\]
+
+- **expression**: The value to put in the new list (often using `item`)
+
+- **item**: Each element from the iterable (e.g., a list or range)
+
+- **iterable**: Any object you can loop over
+
+
+Basic Example:
+
+### **Example 1: Creating a List of Squares**
+
+Create a list of squares for numbers 1 to 5:
+
+›
+
+python
+
+squares = \[x \* x for x inrange(1, 6)\]
+
+print(squares)
+
+Guess the Output?
+
+### **Example 2: Nested List Comprehension**
+
+Create a 3×3 matrix (list of lists) with all values set to 0:
+
+›
+
+python
+
+matrix = \[\[0 for \_ inrange(3)\] for \_ inrange(3)\]
+
+print(matrix)
+
+Guess the Output?
+
+### **Example 3: Using If-Else in List Comprehension**
+
+Create a list where each number from 1 to 5 is "even" or "odd":
+
+›
+
+python
+
+labels = \["even"if x % 2 == 0 else"odd"for x inrange(1, 6)\]
+
+print(labels)
+
+Guess the Output?
+
+### **Example 4: List Comprehension with Functions**
+
+Suppose you have a function that doubles a number. Use it in a list comprehension:
+
+›
+
+python
+
+def double(x):
+
+return x \* 2
+
+numbers = \[1, 2, 3, 4, 5\]
+
+doubled = \[double(x) for x in numbers\]
+
+print(doubled)
+
+Guess the Output?
+
+In the above cases, we saw how list comprehension helps us refactor code, making it easier and simpler to understand. I hope you don’t have any other doubts.
+
+## Difference Between ‘for’ Loop vs. List Comprehension\#
+
+Instead of just seeing and learning from a boring comparison table, we will see the difference in terms of code. We can see, discuss, and learn the differences—but before that, let’s assume the scenario:
+
+**Scenario:**
+
+**Suppose you have a list of numbers, and you want to make a new list containing the square of each even number, but only if it’s greater than 10.**
+
+Let’s use the list:
+
+›
+
+python
+
+numbers = \[1, 4, 6, 9, 12, 15, 18, 21\]
+
+Let’s implement this using FOR Loop:
+
+›
+
+python
+
+result = \[\]
+
+for n in numbers:
+
+if n % 2 == 0:
+
+square = n \* n
+
+if square > 10:
+
+result.append(square)
+
+print(result)
+
+#### **Explanation:**
+
+- You start with an empty list `result`.
+
+- For every number in `numbers`:
+
+
+ - Check if it’s even ( `n % 2 == 0`).
+
+ - If yes, square it.
+
+ - Check if the square is greater than 10.
+
+ - If both conditions are true, add the squared number to `result`.
+
+
+Let implement the same **Using List Comprehension**
+
+›
+
+python
+
+result = \[n \* n for n in numbers if n % 2 == 0 and n \* n > 10\]
+
+print(result)
+
+#### **Explanation:**
+
+- All the logic is condensed into a single line.
+
+- The expression before for is what you want in your new list (n\*n).
+
+- The part after for ” describes what you’re iterating over (for n in numbers).
+
+- The if at the end combines both filtering conditions.
+
+
+With the above two examples, you are able to see the exact difference between the two approaches, right? Then comes to interesting part when to use list comprehensions and the benefits of it.
+
+## How Keploy Helps You Write Unit Tests for Your Python Application — Without Writing a Single Line of Code\#
+
+Keploy has recently released a Unit Testing Agent that generates stable and meaningful unit tests directly in your GitHub PRs — focusing only on what truly matters.
+
+The Keploy Unit Test Agent isn’t just “another AI writing code.” It’s a language-trained, vertical AI built specifically for unit testing.
+
+### 1\. **PR Agent**
+
+Keploy is an AI-powered Unit Testing Agent that generates stable, production-ready unit tests directly in your GitHub PRs — targeting the code that matters most.
+
+#### **Here’s what it does:**
+
+- Uses advanced prompt engineering with validation — including build, run, and coverage checks for every test
+
+- Focuses only on the code changes in the PR — avoiding noisy or irrelevant tests
+
+- Integrates with LLMs like Gemini, GPT, ude, etc., and selects the best output based on your tech stack
+
+- Fully compliant with ISO, GDPR, SOC2, and HIPAA
+
+**Use the below link to install keploy PR agents from github marketplace**:
+
+[https://github.com/marketplace/keploy](https://github.com/marketplace/keploy)
+
+
+### 2\. **VSCode Extension**
+
+You can also try the Unit Testing Agent directly in your VSCode.
+
+With the **Keploy VSCode Extension**, you can generate unit tests right from your IDE — no need to copy and paste code or write prompts. Just a few clicks, and your unit tests are ready!
+
+Use the below link to **install** [**keploy in VSCode**](https://marketplace.visualstudio.com/items?itemName=Keploy.keployio) **:**
+
+## When to Use List Comprehensions in Python\#
+
+- You need to create a new list by transforming or filtering items from another list (or any iterable).
+
+- You want concise, readable code.
+
+
+## Benefits of Using List Comprehensions\#
+
+List comprehensions optimize list generation and help to avoid side effects such as gibberish variables. As a result, you get more concise and readable code. These are the things we have been seeing since the start of this blog.
+
+The first advantage I would say is ease of code writing and reading. You don’t have to be an expert to learn and use lists the list comprehension allows you to write code that is easy to maintain.
+
+Improved execution speed in most comparisons, you might have seen the first approach takes much more time as it needs to execute sequentially and do various steps. But if you see the list comprehension, it executes so fast.
+
+No modification of existing lists. A list comprehension call creates a new list in Python without changing the existing one.
+
+## Conclusion:\#
+
+In today’s blog, we learned some really cool stuff, isn’t it? We also learned how to optimize our Python code by following list comprehensions, so then what are you waiting for? Grab your laptop and start playing with list comprehension.
+
+## FAQs:\#
+
+### 1. **How is a list comprehension different from a for loop?**
+
+A list comprehension is more concise and typically more readable for simple operations, while a `for` loop can handle more complex logic and multiple steps.
+
+### 2. **Can I use list comprehensions with functions?**
+
+Yes! You can call a function inside the expression:
+
+›
+
+defsquare(x): return x \* x
+
+squares = \[square(x) for x inrange(5)\]
+
+### 3. **Are list comprehensions faster than for loops?**
+
+Usually yes, for simple transformations, because they are optimized internally in Python.
+
+### 4. **What is the difference between list comprehensions and generator expressions?**
+
+List comprehensions return a list immediately; generator expressions use parentheses and return a generator, which produces items one at a time (lazy evaluation).
+
+›
+
+python
+
+\# List comprehension
+
+lst = \[x\*x for x inrange(5)\]
+
+\# Generator expression
+
+gen = (x\*x for x inrange(5))
+
+### 5. **How can I avoid memory issues with very large lists?**
+
+For huge datasets, use generator expressions instead of list comprehensions to save memory.
+
+* * *
+
+# Authored By:\#
+
+
+
+Author Details
+
+Author Name: Achanandhi m
+
+Author Description:
+
+- Hi friends! I'm a Developer Advocate at Keploy, passionate about cloud-native technologies, CNCF, testing, and GenAI.
+- I love diving into cutting-edge tools and exploring how they shape the future of software development.
+- I’m always curious to learn, try new things, and share my experiences with the community.
+Outside of tech, you'll find me on the badminton court or with a book in hand.
+- I’m an athlete at heart, and some of my favorites books are "The Alchemist" and "Think Like a Monk" — both inspiring me to push my limits and stay curious.
+Always up for a chat about tech, community building, or a good book! 😊.
+
+Show more
+
+[LinkedIn](https://in.linkedin.com/in/achanandhi-m)
+
+[View All Posts](https://keploy.io/blog/authors/Achanandhi%20M)
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/introduction-to-gitlab-python-api)
+
+### [Introduction to Gitlab Python API](https://keploy.io/blog/community/introduction-to-gitlab-python-api)
+
+Devisri S
+
+6 Jun, 2025
+
+Doing things manually on GitLab is okay, but it can get repetitive and time-consuming. That’s where the...
+
+[](https://keploy.io/blog/community/introduction-to-rest-api-in-python)
+
+### [Introduction to REST API in Python](https://keploy.io/blog/community/introduction-to-rest-api-in-python)
+
+Devisri S
+
+26 May, 2025
+
+APIs (Application Programming Interfaces) are like bridges that let different software systems talk to each other. Among...
+
+[](https://keploy.io/blog/community/how-to-run-pytest-program)
+
+### [How to Run Pytest Program?](https://keploy.io/blog/community/how-to-run-pytest-program)
+
+Achanandhi M
+
+8 May, 2025
+
+When you’re building something in Python—whether it’s a personal project, an API, or a startup idea—one thing...
+
+[](https://keploy.io/blog/community/difference-between-pytest-and-unittest)
+
+### [What is the difference between pytest and unittest](https://keploy.io/blog/community/difference-between-pytest-and-unittest)
+
+Achanandhi M
+
+7 May, 2025
+
+When it comes to testing in Python, two popular frameworks often come into play: unittest vs pytest....
+
+[](https://keploy.io/blog/community/python-get-current-directory)
+
+### [Python Get Current Directory – A Complete Guide](https://keploy.io/blog/community/python-get-current-directory)
+
+Himanshu Mandhyan
+
+23 Apr, 2025
+
+When creating software with Python, the file system is something you will often interact with. You will...
+
+## AI-Powered VS Code Extensions
+3 Feb, 2025.[Community](https://keploy.io/blog/community)
+
+# Top 5 Ai-Powered Vs Code Extensions For Coding & Testing In 2025
+
+13 min read
+
+
+
+Written By:Tvisha Raji
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Tvisha Raji
+
+Table of Contents
+
+Table of Contents
+
+Table of Contents
+
+One of the software industry’s most important pain points in testing is “ [**Coverage**](https://keploy.io/blog/community/understanding-code-coverage-in-software-testing)”. It is manually impossible to generate test cases while covering edge cases and different scenarios with the scale of how much code gets written each day. AI Agents here save time and improve test coverage and reliability. Developers can now focus on core logic while AI handles repetitive and error-prone tasks like writing unit tests.
+
+In fact, a managing partner at Y Combinator (YC) recently highlighted that AI agents, AI systems tailored to specific business functions are on the rise. The rise of AI, driven by advances in large language models (LLMs), offers the potential for more efficient, smaller organizations by automating repetitive, administrative tasks.
+
+In this article, we’ll explore a range of VS Code extensions that use AI to help make writing tests seamless and easier.
+
+## **What Are AI Agents?**\#
+
+AI agents are essentially intelligent systems designed to automate specific business functions or tasks that would typically require human intervention. Think of them as AI-powered "employees" who can perform a wide range of operations, from answering customer queries to managing workflows and even generating [tests in one click](https://keploy.io/blog/community/boost-unit-test-efficiency-using-ai-powered-extensions-for-vs-code).
+
+These agents are highly specialized, often built for a particular vertical or domain. AI agents are tailored to automate repetitive, administrative, or time-consuming tasks within a specific industry, making businesses more efficient and reducing the need for large teams.
+
+**Characteristics of AI Agents in Development**
+
+- **Autonomy**: Operate without constant human guidance.
+
+- **Adaptability**: Learn from data and improve over time.
+
+- **Interactivity**: Engage with users to provide suggestions or perform actions.
+
+- **Goal-oriented**: Designed to achieve specific objectives, such as code completion or test generation.
+
+
+## **How AI Agents Are Transforming Test Generation**\#
+
+AI-powered extensions have become a prime example of how you can automate and speed up integral components of your development process- something like test generation. It may take a lot of context knowledge if you are trying to manually write these test cases. But imagine if an agent could scan through your code in seconds and generate test cases with context for you that too with analyzing code structures, dependencies, and possible edge cases.
+
+### **Benefits of Using AI Agents for Test Generation**
+
+- **Time Efficiency**: Drastically reduce the time spent on writing tests.
+
+- **Improved Test Coverage**: Generate comprehensive tests that cover various scenarios.
+
+- **Early Bug Detection**: Catch potential issues before they progress further in the development cycle.
+
+- **Consistency**: Maintain a consistent approach to testing across different codebases.
+
+
+## Best AI Code Extensions for VS Code in 2024\#
+
+Now, let’s explore the [top AI-powered](https://keploy.io/blog/community/best-ai-coding-tools-in-2025-for-developers/) extensions that integrate seamlessly with VS Code to enhance your test generation process.
+
+### 1\. Keploy
+
+[Keploy](https://keploy.io/) VS Code extension is tailored specifically for testing applications. It allows developers to generate tests automatically in one click based on their existing code and usage patterns, which can drastically reduce the time spent on manual test creation. This extension is particularly useful for teams focused on maintaining high test coverage without the overhead of writing every test case from scratch.
+
+**Features**
+
+- **Automatic Test Generation**: Generates tests based on existing code and usage patterns.
+
+- **Focus on Test Coverage**: Aims to help maintain high test coverage without excessive manual input.
+
+- **Validate Testcase**: Generated testcases are validated and executed as soon as they are created to check if the are useful or not.
+
+
+**Pros**
+
+- **Time-Saving Automation**: Reduces the effort required to write tests manually, allowing developers to focus on other areas of development.
+
+- **Improved Testing Efficiency**: Helps ensure that applications are thoroughly tested with minimal overhead.
+
+
+### 2\. Github Copilot
+
+Imagine a coding buddy within your IDE, it writes your code, completes your code, interprets what you want to convey, and also generates the test cases for you. Trained on billions of lines of code, it transforms natural language prompts into actionable code suggestions.
+
+**Features**
+
+- **Contextual Code Suggestions**: Provides real-time code suggestions based on the current context.
+
+- **Docstring Generation**: Automatically generates documentation comments for functions.
+
+- **Refactoring Suggestions**: Offers recommendations to improve code readability and efficiency.
+
+- **Multi-language Support**: Works with various programming languages.
+
+
+**Pros**
+
+- **Increased Productivity**: Users report up to 55% faster task completion and enhanced job satisfaction
+
+- **Learning Tool**: Great for beginners as it suggests best practices and snippets
+
+- **Seamless Integration**: Directly integrates with Visual Studio Code without disrupting workflow
+
+
+**Cons**
+
+- **Over-reliance Risk**: Developers may become too dependent on suggestions, potentially stunting their coding skills
+
+- **Accuracy Issues**: Sometimes suggests incorrect or inefficient code
+
+- **Licensing Concerns**: Potential issues with copyright when suggesting code snippets
+
+
+### **3\. Tabnine**
+
+Tabnine is another great tool in the AI coding assistant arena. It has the ability to generate the test cases for the functions you wish to. It tends to analyze the coding style and practices that are followed by you can generate test cases for your functions based on existing code.
+
+**Features**
+
+- **AI-Powered Code Completions**: Offers intelligent code completions based on your coding patterns.
+
+- **Team Learning**: Learns from team members’ coding styles to provide tailored suggestions.
+
+- **Multi-language Support**: Compatible with numerous programming languages.
+
+
+**Pros**
+
+- **Speedy Coding**: Significantly reduces the time spent writing repetitive code.
+
+- **Customizable AI Models**: Allows teams to train models on their specific codebases for better accuracy.
+
+- **Integration Options**: Works well with various IDEs, including VS Code.
+
+
+**Cons**
+
+- **Limited Free Version**: The free version has limited functionality compared to the paid plans.
+
+- **Learning Curve**: Some users may find it challenging to configure and optimize its features initially.
+
+- **Occasional Irrelevance**: Suggestions may not always align perfectly with the developer’s intent.
+
+
+### **4\. Bito**
+
+Bito has been gaining traction as an AI tool that not only helps with coding but also focuses on improving productivity through automation. It can assist in generating tests and documentation, which is a huge plus for maintaining clarity in your codebase.
+
+**Features**
+
+- **Automated Snippet Generation**: Quickly generates code snippets and templates for common tasks.
+
+- **Documentation Assistance**: Helps maintain up-to-date documentation alongside code changes.
+
+- **User-Friendly Interface**: Designed for easy integration into existing workflows.
+
+
+**Pros**
+
+- **Productivity Boost**: Streamlines repetitive tasks, allowing developers to focus on more complex problems.
+
+- **Intuitive Design**: Easy to use, making it accessible even for less experienced developers.
+
+- **Versatile Functionality**: Supports various programming languages and frameworks.
+
+
+**Cons**
+
+- **Limited Advanced Features**: May lack some advanced coding assistance features found in competitors like Copilot or Tabnine.
+
+- **Dependency on Internet Connection**: Requires an active Internet connection for optimal functionality.
+
+- **Performance Variability**: Some users report inconsistent performance depending on project complexity.
+
+
+### **5\. Cursor**
+
+Cursor stands out as a VS Code fork that enhances the coding experience significantly. It uses advanced LLM features that are reportedly better than those of GitHub Copilot. One of its coolest features is its predictive capabilities, it can anticipate changes you might want to make in your code, which can save time when writing tests or altering functions
+
+**Features**
+
+- **Predictive Coding Assistance**: Anticipates changes and offers suggestions based on user behavior.
+
+- **Enhanced LLM Capabilities**: Claims to outperform traditional tools in generating accurate code suggestions.
+
+
+**Pros**
+
+- **Innovative Features**: Offers unique predictive capabilities that can save time during coding sessions.
+
+- **User-Centric Design**: Focuses on improving the overall coding experience rather than just completing tasks.
+
+
+**Cons**
+
+- **Newer Tool with Growing Pains**: As a newer tool, it may have bugs or limitations that are still being addressed.
+
+- **Limited Community Support**: This may not have as extensive a user community or resources compared to more established tools.
+
+
+## Which AI Code Extension Should You Use?\#
+
+Choosing the right AI code extension depends on your needs. If you’re looking for general-purpose code completion and suggestions, [**GitHub Copilot** and **Tabnine**](https://keploy.io/blog/community/comparing-github-copilot-vs-chatgpt-for-unit-testing) are solid options.
+
+However, if your primary goal is to automate test generation and improve test coverage without manual effort, **Keploy stands out as the best choice**. Unlike Copilot, which focuses more on writing code, or Tabnine, which learns coding styles, Keploy is designed specifically for [**easiness of test creation**](https://keploy.io/test-case-generation), ensuring your applications are thoroughly tested without extra overhead. With its **one-click test generation and automatic validation**, Keploy helps teams maintain high test coverage while saving countless hours. For developers prioritizing efficient and automated testing, Keploy is the go-to extension. 🚀
+
+## Conclusion\#
+
+AI-powered VS Code extensions are transforming software testing by automating test generation, improving coverage, and enhancing productivity. As AI agents continue to evolve, they will play an increasingly critical role in software development, allowing developers to focus on innovation while ensuring robust testing practices.
+
+## FAQ\#
+
+### **Are AI-generated tests compliant with industry standards?**
+
+AI-generated tests can follow best practices, but compliance with industry standards depends on the tool’s capabilities and user configurations. It’s always recommended to review and refine the generated test cases
+
+### **How do AI-powered test generation tools improve software testing?**
+
+AI-powered tools enhance test coverage by automatically generating comprehensive test cases, identifying edge cases, and reducing manual effort, allowing developers to focus on critical logic.
+
+### **Do AI-generated tests integrate with existing testing frameworks?**
+
+Yes, most AI-powered test generation tools support popular frameworks like Jest, PyTest, JUnit, and Mocha, making integration seamless within existing workflows.
+
+## Author\#
+
+- 
+
+
+
+[Tvisha Raji](https://wp.keploy.io/author/tvisha-raji/ "Tvisha Raji")
+
+
+
+
+Driving product growth at Keploy by aligning tech teams and boosting feature adoption. With experience in GRC, product management, and data, I’m passionate about innovation, people, and meaningful conversations over coffee.
+
+[Website](https://www.linkedin.com/in/tvisha-raji-a068bb1bb/)
+
+
+* * *
+
+# Authored By:\#
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+[](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+### [Smoke Testing vs Regression Testing: What You Need to Know](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+Amaan Bhati
+
+4 Jun, 2025
+
+In the field of software quality assurance, there are two types of testing often referenced, smoke testing...
+
+[](https://keploy.io/blog/community/what-is-agile-testing)
+
+### [Agile Testing Best Practices for Faster, Higher‑Quality Releases](https://keploy.io/blog/community/what-is-agile-testing)
+
+Mohamed Abdullah F
+
+26 May, 2025
+
+Agile Testing has become essential in modern software development, where fast-paced changes, rapid delivery cycles, and evolving...
+
+[](https://keploy.io/blog/community/running-react-code-in-visual-studio-code-and-online)
+
+### [Running React Code in Visual Studio Code and Online](https://keploy.io/blog/community/running-react-code-in-visual-studio-code-and-online)
+
+Ayush Gupta
+
+23 May, 2025
+
+React continues to dominate the front-end development landscape, offering a powerful and flexible library for building modern...
+
+## AI Tools for QA
+12 Feb, 2025.[Community](https://keploy.io/blog/community)
+
+# Top 10 Ai Tools Transforming Software Quality Assurance
+
+14 min read
+
+
+
+Written By:Ashkan Ebtekar
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Ashkan Ebtekar
+
+Table of Contents
+
+Table of Contents
+
+AI has taken the world by storm. It’s implementation is evident everywhere we look.
+
+By the peak of the AI revolution and recent advancements leading organizations understood the importance of embedding it into their system. Following their plan for innovation and long-term success and to stay ahead of the curve companies have made significant investments in AI technologies.
+
+For instance, Microsoft integrated [OpenAI’s GPT technology](https://keploy.io/blog/community/comparing-github-copilot-vs-chatgpt-for-unit-testing) into products like Microsoft 365 Copilot to boost productivity, while Google launched Bard and AI features in Workspace to enhance user experiences.
+
+On the other hand, we have companies that leverage existing tools and resources developed by other companies. This helps them to keep up with the latest changes and trends rather than reinventing the wheel.
+
+A prime example of this approach is integrating AI tools developed by other organizations into their existing systems, enabling them to design and implement AI-driven solutions that deliver impressive results.
+
+## How AI is Transforming the Software Development Lifecycle?
+
+One of the most crucial areas for leveraging AI is within the Software Development Lifecycle of the company. The reason behind it is simple. Digital products are the representation of a company’s presence and services.
+
+And within this context, artificial intelligence have proven to be a game changer. Especially as businesses are trying their best to deliver higher quality software faster more efficiently, and with greater accuracy.
+
+> In 2023, the market for generative AI in the software development lifecycle was estimated to be worth USD 268.10 million globally, reflecting the growing investment in AI-driven development tools.
+
+From improving speed and reducing manual errors, the potential of AI to enhance the SDLC goes beyond these.
+
+1. It fundamentally shifts how companies approach software development.
+
+2. For instance AI-driven tools can automate repetitive tasks such as code review, testing, and even bug fixing. This frees up valuable time for developers to focus on more complex and creative aspects of the project.
+
+3. Moreover, with AI-powered predictive analytics teams can identify potential bottlenecks early in the process.
+
+4. This enables proactive problem-solving and better resource allocation.
+
+
+By incorporating AI into the SDLC we will have more data driven decision making. AI tools can analyze massive volumes of data, from user behavior patterns to historical code performance.
+
+This makes providing actionable insights to refine development strategies easier and faster, which further allows companies to tailor their software solutions to real-time needs and user preferences, ensuring a more personalized product while keeping development costs in check.
+
+## AI-Powered Software Testing: Faster, Smarter, and More Efficient
+
+AI significantly accelerates the testing phase by generating more robust and diverse test cases, including edge cases that human testers might miss. Automated testing powered by AI increases test coverage. But it is not limited to that. It also reduces human error, leading to faster releases without sacrificing quality.
+
+The result? A shorter time to market for new features and updates which enables businesses to remain competitive and adaptable.
+
+> Industry data suggests that AI adoption in software development could reach 90% within the next two years, driven by the tangible benefits AI brings to various stages of software development.
+
+By thinking long term and taking the integration of AI into the SDLC in charge, into tangible business benefits. Higher productivity and improved product quality are great examples what AI can help with.
+
+But beyond that, AI enables businesses to innovate faster and respond to market shifts with agility. This is crucial in an environment where change is constant and competition is fierce. The companies that embrace AI-driven development today are positioning themselves to lead tomorrow, whether in software delivery, customer experience, or revenue growth.
+
+## **1\. Testim**
+
+Testim uses AI to automate self-healing tests, which means the tests can adjust automatically when there are changes to the code. This dramatically reduces the time and effort spent maintaining tests. The platform offers an intuitive interface that makes it easy to run end to end tests. It integrates smoothly with CI/CD pipelines so teams can automate tests without disruption. Testim is great because it dynamically adapts to changes in the code, reducing flaky tests and providing more consistent, reliable results.
+
+## **2\. Keploy**
+
+[Keploy](http://keploy.io/) is a tool designed to make test automation simple and efficient. It automatically generates test cases by analyzing application data, which is a huge time-saver. It also offers mock server capabilities for API testing and helps identify flaky tests, ensuring that your test suite remains reliable. [Keploy](http://keploy.io/) is ideal for developers and QA engineers who want to automate their testing process without sacrificing the reliability of their API performance.
+
+## **3\. Applitools**
+
+By leveraging AI for visual testing Applitools have always been a popular choice for software testers. This helps by detecting UI discrepancies that can be hard to spot manually.
+
+It supports cross browser and cross device testing and makes sure your application looks great on any platform. With integrations into popular testing frameworks, it’s a powerful tool for teams that want to ensure pixel-perfect UI/UX.
+
+What makes Applitools stand out is its ability to focus on the visual side of testing which guarantees that your users get a flawless, consistent experience every time.
+
+## **4\. Mabl**
+
+Mabl combines AI and machine learning to create automated tests quickly and efficiently. It also provides valuable insights into performance and visual regressions, which can help teams identify issues early. The low code interface makes it easy to use for people who may not have deep technical knowledge.
+
+Mabl is excellent because it democratizes test automation which allows non technical users to contribute while still providing powerful analytics for developers.
+
+## **5\. Test.ai**
+
+Test.ai is focused on mobile and web app testing, using AI to automatically identify and test app features. It adapts to changes in the app without requiring constant updates to test scripts, which reduces maintenance. Test.ai is great because it automates much of the testing process. It helps teams ensure their apps are always ready for production without the overhead of manually updating test cases.
+
+## **6\. Functionize**
+
+Functionize uses natural language processing to allow QA teams to create tests in plain English. It makes it easier for non technical users to get involved. The AI-driven test execution speeds up the process and provides fast results. Functionize is cloud-based, which means it scales effortlessly as your testing needs grow. This tool is fantastic for teams who want to empower everyone to create and manage tests without needing in-depth programming skills.
+
+## **7\. SmartBear (TestComplete)**
+
+SmartBear’s TestComplete is a versatile automation platform that supports multiple scripting languages and testing frameworks. It ensures that tests remain stable even as the UI changes with the aid of AI-powered object recognition while integrating seamlessly with CI/CD tools like Jenkins and Azure DevOps.
+
+TestComplete is ideal because it works for both technical and non technical users. This feature makes it a flexible option for diverse teams.
+
+## **8\. Ranorex**
+
+Ranorex offers a great solution for automating testing across various platforms. The AI-enhanced object recognition ensures that even dynamic UIs are tested effectively which helps across various platforms including mobile, web and desktop.
+
+Ranorex also provides detailed reporting and test management tools. This makes it easier to keep track of testing progress. It’s a great choice for teams looking for advanced capabilities but with a user friendly interface that doesn’t overwhelm the testers.
+
+## **9\. Perfecto**
+
+Perfecto offers cloud-based testing for mobile and web apps, ensuring that your tests are scalable and flexible. The AI-powered error analysis quickly identifies the root causes of issues, saving time when debugging. Perfecto also supports testing on real devices, which is crucial for ensuring accurate results. Perfecto is ideal for teams that need to efficiently test across multiple environments and devices.
+
+## **10\. Selenium with AI Add-Ons**
+
+Selenium, a widely used automation tool, can be enhanced with AI-driven plugins that improve element recognition and dynamic UI handling. By integrating these AI add-ons, teams can make their existing Selenium test suites more robust and adaptive. It’s great for teams already using Selenium who want to improve the accuracy and reliability of their tests without completely changing their current setup.
+
+## The Future of Software Testing: How AI is Shaping Quality Assurance
+
+AI has been a game changer in [software testing and test automation](https://keploy.io/blog/community/top-7-test-automation-tools-boost-your-software-testing-efficiency). By taking AI in charge, companies can greatly benefit by significantly reduced manual testing efforts to develop better products and software. We can also point out to the improved accuracy of testers which accelerates the release cycles.
+
+Tools like Testim, Applitools, and Keploy are just a few examples of how AI can be leveraged to make testing smarter, not harder.
+
+AI-driven testing solutions can help streamline processes, reduce errors, and ultimately deliver higher-quality software faster. Whether you’re a developer, [QA engineer](https://keploy.io/blog/community/what-is-quality-engineering-software), or part of a larger team you can greatly benefit from these transitions.
+
+As these tools continue to evolve they will only become more accessible and more powerful. Teams of all sizes work more efficiently and stay ahead of the competition by using them.
+
+The future of test automation is AI, and it’s time to explore how these tools can transform your testing workflows and set you on the path to success.
+
+## **FAQs**
+
+### **How does AI improve the software development lifecycle (SDLC)?**
+
+AI enhances the SDLC by automating repetitive tasks like code reviews, bug detection, and test generation. It also provides predictive analytics to identify bottlenecks early, leading to faster development, improved efficiency, and reduced errors.
+
+### **What are the key benefits of using AI-driven test automation tools?**
+
+AI-driven test automation tools offer benefits such as self-healing tests, enhanced test coverage, reduced maintenance efforts, quicker bug identification, and overall faster release cycles. These tools ensure more reliable and high-quality software.
+
+### **Why is AI important in software testing?**
+
+AI helps software testing by generating comprehensive test cases, identifying UI discrepancies, automating repetitive tests, and predicting potential issues before they arise. This improves accuracy and efficiency while reducing manual effort.
+
+### **What are some of the best AI-powered test automation tools?**
+
+Some of the top AI-powered test automation tools include Testim, Keploy, Applitools, Mabl, [Test.ai](http://test.ai/), Functionize, SmartBear TestComplete, Ranorex, Perfecto, and Selenium with AI add-ons. Each tool offers unique features to enhance testing efficiency.
+
+### **How can companies get started with AI in software testing?**
+
+Companies can start by identifying repetitive testing tasks that AI can automate, selecting AI-driven test automation tools suited to their needs, integrating them into their CI/CD pipelines, and training teams to leverage AI insights for better decision-making.
+
+* * *
+
+# Authored By:\#
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/community/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+[](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+### [Unit Testing vs Regression Testing: A Comprehensive Guide](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+Jiya Bhati
+
+5 Jun, 2025
+
+Ever deployed code only to watch everything crash? We’ve all experienced that sinking feeling ,which is exactly...
+
+[](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+### [Smoke Testing vs Regression Testing: What You Need to Know](https://keploy.io/blog/community/smoke-testing-vs-regression-testing)
+
+Amaan Bhati
+
+4 Jun, 2025
+
+In the field of software quality assurance, there are two types of testing often referenced, smoke testing...
+
+## Gemini vs OpenAI
+9 Jun, 2025.[Community](https://keploy.io/blog/community)[Technology](https://keploy.io/blog/technology)
+
+# Gemini 2.5 Pro Vs Openai O1: Benchmarking Ai Models For Software Testing
+
+18 min read
+
+
+
+Written By:Shubham Jain
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Shubham Jain
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[](https://keploy.io/blog/community/pull-api-data-python)
+
+### [How to Use Python Code for Pulling API Data Efficiently](https://keploy.io/blog/community/pull-api-data-python)
+
+Mohamed Abdullah F
+
+19 Jun, 2025
+
+Do you ever feel like you need a superpower to get the information you need? Especially when...
+
+[](https://keploy.io/blog/community/how-to-get-your-chatgpt-api-key)
+
+### [How to get your ChatGPT API key](https://keploy.io/blog/community/how-to-get-your-chatgpt-api-key)
+
+Achanandhi M
+
+12 Jun, 2025
+
+These days, even a 6th-grade student knows about ChatGPT, right? I’m sure most of you reading this...
+
+[](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+### [Unit Testing vs Regression Testing: A Comprehensive Guide](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+Jiya Bhati
+
+5 Jun, 2025
+
+Ever deployed code only to watch everything crash? We’ve all experienced that sinking feeling ,which is exactly...
+
+## Delete Git Branches Guide
+5 Nov, 2024.[Community](https://keploy.io/blog/community)
+
+# How To Delete Local And Remote Branches In Git: A Complete Guide
+
+11 min read
+
+
+
+Written By:Tvisha Raji
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Tvisha Raji
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/executing-ebpf-in-github-actions)
+
+### [Executing EBPF in Github Actions](https://keploy.io/blog/community/executing-ebpf-in-github-actions)
+
+Shivam Sourav Jha
+
+25 Apr, 2025
+
+Introduction At Keploy, we wanted our tool to be part of the Github pipeline so that developers...
+
+[](https://keploy.io/blog/community/codium-vs-copilot-which-ai-coding-assistant-is-best-for-you)
+
+### [Codium vs Copilot: Which AI Coding Assistant is Best for You?](https://keploy.io/blog/community/codium-vs-copilot-which-ai-coding-assistant-is-best-for-you)
+
+Shubhra Srivastava
+
+4 Apr, 2025
+
+Introduction AI-based code writing assistants have modernized developer practices for coding development and code analysis and enhancement....
+
+[](https://keploy.io/blog/community/best-free-ai-code-generators)
+
+### [AI Code Generator : The Best Free AI Code Generators](https://keploy.io/blog/community/best-free-ai-code-generators)
+
+Amaan Bhati
+
+12 Mar, 2025
+
+Developers often struggle with writing repetitive code, debugging complex logic, and keeping up with evolving programming languages....
+
+[](https://keploy.io/blog/community/how-to-clone-a-project-from-github-using-https-a-complete-guide)
+
+### [How to Clone a Project from GitHub Using HTTPS: A Complete Guide](https://keploy.io/blog/community/how-to-clone-a-project-from-github-using-https-a-complete-guide)
+
+Himanshu Mandhyan
+
+27 Jan, 2025
+
+One of the fundamental skills every developer should have is good project cloning from GitHub. Whether it’s...
+
+[](https://keploy.io/blog/community/continuous-ui-testing-pipeline-browserstack-with-github-actions)
+
+### [Continuous UI Testing Pipeline: BrowserStack with GitHub Actions](https://keploy.io/blog/community/continuous-ui-testing-pipeline-browserstack-with-github-actions)
+
+Khushi Trivedi
+
+25 Dec, 2024
+
+Did you know 88% of users don’t return to sites with poor experiences, even if they offer...
+
+[](https://keploy.io/blog/community/apis-vs-webhooks-make-a-github-webhook)
+
+### [Mastering GitHub Webhooks: Automate Notifications & Stay Informed](https://keploy.io/blog/community/apis-vs-webhooks-make-a-github-webhook)
+
+Sejal Jain
+
+2 Jun, 2023
+
+We all like shopping, right? Let me tell you of this one time I really wanted to...
+
+## Mastering Mocking Guide
+22 Jan, 2025.[Community](https://keploy.io/blog/community)
+
+# Mastering Mocking: A Complete Guide To Mocks And Other Test Doubles
+
+13 min read
+
+
+
+Written By:Tvisha Raji
+
+
+
+Reviewed By:Neha Gupta
+
+Share this
+
+* * *
+
+
+
+
+
+Tvisha Raji
+
+Table of Contents
+
+Table of Contents
+
+Imagine building a system where you want to validate if the logic implemented would fit in when the entire system is built, but for that, you would have to build the entire architecture (well, a lot of resources are spent). Now imagine a way where you can simulate the versions of real objects or components. This is where **_Data Mock comes into play!_**
+
+## **What are Mocks?**
+
+Data Mocks mimic the behavior of actual dependencies to isolate and test specific code units. Unlike real objects, mocks are lightweight, configurable, and often used to validate the interactions between components.
+
+For example, consider an e-commerce application where the payment gateway is a dependency. Testing the checkout process with a live payment gateway would be cumbersome, costly, and risky. Instead, a mock payment gateway can simulate responses like successful payments or declined transactions.
+
+## **Why are mocks important?**
+
+1. **Isolating the Unit Under Test**
+
+Mocks decouple the unit under test (like a class or a method) from its dependencies, ensuring the test focuses solely on the functionality of the unit.
+
+
+> Example: Testing an order placement logic without relying on the database or network calls.
+
+2. **Enhancing Test Performance**
+
+
+Real dependencies like databases, APIs, or third-party services can be slow. Mocks simulate these interactions, speeding up test execution.
+
+3. **Avoiding External Side Effects**
+
+
+Interacting with real-world dependencies (e.g., sending emails or making API calls) in tests can lead to unintended consequences. Mocks prevent such side effects.
+
+
+## **Where to use Data Mocks?**
+
+Mocks are best suited for:
+
+### **1\. Unit Testing**
+
+Focus on testing a single unit of code by mocking its dependencies.
+
+> Example: Testing a `UserService` without requiring a live database.
+
+### **2\. Integration Testing**
+
+When external systems like APIs or databases are unavailable or unreliable, mocks ensure smooth integration tests.
+
+> Example: Simulating responses from a third-party weather API.
+
+### **3\. Handling Unpredictable Dependencies**
+
+Mocks can replace systems that are difficult to replicate in a testing environment, such as:
+
+- Time-based systems (e.g., CRON jobs)
+
+- Randomized data generators
+
+- Machine learning models
+
+
+## **Benefits of using Data Mocks**
+
+1. **Improved Test Accuracy –** By isolating dependencies, you get accurate insights into how the unit under test performs.
+
+2. **Faster Feedback Loops –** Tests execute quicker, enabling rapid iterations and quicker feedback during development.
+
+3. **Flexibility in Testing –** Mocks provide complete control over the behavior of dependencies, allowing you to test a wide range of scenarios.
+
+
+## **What are the different types of Mocking objects?**
+
+1. ### Dummy
+
+
+A dummy is a placeholder value that one would use to simulate something that is not in place yet. If you are trying to build something like a checkout system and the cart logic is not there, you would use a dummy to fill it like a placeholder. You can either choose to use a dummy that is value-based or object based where object-based dummies would require more complex logic.
+
+
+
+
+2. ### Fakes
+
+
+Fakes are simplifed, low-level implementations of the units or services you wish to test. These implementations are optimized for testing purposes, providing just enough functionality to test the system without requiring a full, production-grade setup. While fakes work well in testing environments, their implementations are usually not robust enough for production use.
+
+
+
+
+3. ### Spy
+
+
+A **spy** is like a detective planted inside your code—it does the real work but **takes notes** on what happens behind the scenes. Spies are like mocks but more passive—they **let the code run** and record interactions without interfering. Let’s say you are testing a caching system. You want to confirm that your app calls the cache for frequently accessed items, so you use a **spy** to watch the calls.
+
+
+
+
+4. ### Stub
+
+
+A stub would be a better alternative to a dummy, which interacts with the system by returning a predetermined, hardcoded value. It talks to the service in action and simulates an environment where it returns the data, making it more suitable for controlled test scenarios.
+
+
+
+
+5. ### **Mock**
+
+
+A **mock** is like a stand-in actor you train to behave in a specific way and monitor during your tests. Mocks ensure your system behaves correctly when communicating with external components.
+
+If you’re testing a notification system, but you don’t want to send actual emails or SMS messages. You use a **mock email service** that pretends to send an email and then keeps track of whether you told it to send one.
+
+
+
+
+## **How do Mocks differ from other Mocking objects?**
+
+Mocks are just one type of test double. Here’s how they differ from others:
+
+| **Type** | **Definition** | **Example Use Case** |
+| --- | --- | --- |
+| **Dummy** | Placeholder objects that fulfill parameters but are not used in logic. | Passing a null-like object for unused dependencies. |
+| **Fake** | Lightweight implementations with limited functionality. | In-memory database for testing CRUD operations. |
+| **Stub** | Pre-programmed objects that return specific values. | Stubbed API client returning fixed responses for specific inputs. |
+| **Spy** | Objects that record information about how they were called. | Checking whether a logging service was invoked correctly. |
+| **Mock** | Fully simulated objects that can assert expectations on behavior. | Mocking a payment service to test API interactions. |
+
+### **1\. Ensuring Business Logic Is Correct**
+
+The primary goal of unit testing is to validate that the business logic works as intended. By isolating dependencies, mocks allow you to focus solely on the logic within the unit under test without interference from external systems.
+
+#### **Example**:
+
+Consider an e-commerce system where you’re testing the order calculation logic in a `CheckoutService`. If the `CheckoutService` depends on a `PricingService` that fetches dynamic discounts from an external API, it becomes difficult to validate the calculation in isolation. A mock `PricingService` can provide consistent, pre-defined discount values, ensuring that the test verifies only the correctness of the checkout logic.
+
+### **2\. Handling Dependencies Gracefully**
+
+Dependencies like APIs, databases, or third-party services often introduce unpredictability. They can be slow, unavailable, or prone to failure. Mocks eliminate these issues by simulating the behavior of these dependencies in a controlled environment.
+
+#### **Simulating Failures**
+
+Mocks can replicate failure scenarios, such as timeouts or exceptions, helping you test the robustness of your error-handling mechanisms. For example:
+
+- Mocking a database to simulate a connection timeout.
+
+- Mocking a payment gateway to return "insufficient funds."
+
+
+By doing so, you can ensure your application degrades gracefully and provides meaningful feedback to users in adverse situations.
+
+## **Best Practices for Using Mocks**
+
+1. **Use Dependency Injection**
+
+
+Design your code to accept dependencies via constructors or setters. This makes it easier to inject mocks during testing.
+
+2. **Mock Only External Dependencies**
+
+
+Avoid mocking internal logic or methods of the class under test.
+
+3. **Strike a Balance**
+
+
+Use mocks alongside other tests (e.g., integration tests) to ensure complete coverage.
+
+
+## **Some popular tools for mocking**
+
+Mocking tools simplify the process of isolating and simulating dependencies in your code. These tools offer robust features for creating, configuring, and validating mock objects, making testing more efficient and accurate. Here’s a look at some popular tools across various programming languages:
+
+### 1\. **Keploy**
+
+Keploy is an open-source testing platform that automates the creation of unit and integration tests. Its mocking capabilities allow you to simulate APIs, databases, and other dependencies effortlessly.
+
+**Features:**
+
+- Automated test generation with mocks.
+
+- Language-agnostic support for multiple frameworks.
+
+- Built-in support for error handling and coverage reporting.
+
+**Use Case:** Generate mocks for APIs or services during automated test creation.
+
+
+### 2\. **Jest (JavaScript)**
+
+A JavaScript testing framework with built-in mocking features. Jest is particularly popular for testing React applications but works well with any JavaScript project.
+
+**Features:**
+
+- Mock functions and modules out-of-the-box.
+
+- Spies for tracking function calls.
+
+- Snapshot testing to validate UI components.
+
+**Use Case:** Mocking API calls or browser interactions in front-end applications.
+
+
+### 3\. **Mockito (Java)**
+
+A widely-used Java mocking framework, Mockito allows developers to create mocks, stubs, and spies seamlessly.
+
+**Features:**
+
+- Easy-to-use API for mocking methods and objects.
+
+- Validation of interactions between objects.
+
+- Support for annotations to simplify setup.
+
+**Use Case:** Mocking service dependencies in Spring Boot applications.
+
+
+## **Conclusion**
+
+Mocks are indispensable for creating fast, reliable, and focused tests. They empower developers to test units in isolation, simulate diverse scenarios, and validate interactions with external dependencies. When used wisely, mocks contribute to robust, maintainable, high-quality software.
+
+## **FAQ’s**
+
+### **What are mocks in software testing?**
+
+Mocks are simulated versions of real objects or components used to mimic their behavior in testing scenarios. They help isolate the unit under test by replacing real dependencies with mock objects.
+
+### **How do mocks differ from stubs, spies, and fakes?**
+
+- **Mocks**: Simulated objects with behavior verification capabilities.
+
+- **Stubs**: Pre-programmed objects that return specific responses for predefined inputs.
+
+- **Spies**: Record interactions to verify how methods were called.
+
+- **Fakes**: Lightweight implementations of real dependencies (e.g., an in-memory database).
+
+
+### **When should I use mocks in testing?**
+
+Mocks are ideal for:
+
+- **Unit testing**: To isolate the unit under test from its dependencies.
+
+- **Integration testing**: When external systems are unavailable or unreliable.
+
+- **Simulating failure scenarios**: To test error-handling mechanisms.
+
+
+* * *
+
+# Authored By:\#
+
+# Reviewed By:\#
+
+
+
+Reviewer Details
+
+Reviewer Name: Neha Gupta
+
+Reviewer Description:Building Keploy.io, an EBPF based open source framework to generate test cases and data stubs from API calls.
+
+[View All Posts](https://keploy.io/blog/authors/Neha%20Gupta)
+
+* * *
+
+## More Stories
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+### [Unit Testing vs Regression Testing: A Comprehensive Guide](https://keploy.io/blog/community/unit-testing-vs-regression-testing)
+
+Jiya Bhati
+
+5 Jun, 2025
+
+Ever deployed code only to watch everything crash? We’ve all experienced that sinking feeling ,which is exactly...
+
+[](https://keploy.io/blog/community/what-is-unit-testing)
+
+### [What is Unit Testing?](https://keploy.io/blog/community/what-is-unit-testing)
+
+Ajika Angelo
+
+6 May, 2025
+
+Introduction Jacob Kaplan-Moss, one of the leading developers and co-creators of the Django Python framework, said: Code...
+
+[](https://keploy.io/blog/community/exploring-unit-test-generative-tools)
+
+### [Exploring Unit Test Generative Tools](https://keploy.io/blog/community/exploring-unit-test-generative-tools)
+
+Sarthak Shyngle
+
+9 Apr, 2025
+
+Introduction: Artificial Intelligence (AI) has revolutionized various industries, including software development. One particular area where AI has...
+
+[](https://keploy.io/blog/community/10-unit-testing-best-practices)
+
+### [10 Essential Unit Testing Best Practices for Bug-Free Code](https://keploy.io/blog/community/10-unit-testing-best-practices)
+
+Shubhra Srivastava
+
+21 Mar, 2025
+
+In the constantly changing landscape of software development, code reliability is paramount. One of the best methods...
+
+[](https://keploy.io/blog/community/top-open-source-ai-agents)
+
+### [Open-Source AI Agents: Exploring Best AI Agents](https://keploy.io/blog/community/top-open-source-ai-agents)
+
+Amaan Bhati
+
+20 Feb, 2025
+
+Artificial Intelligence (AI) has transformed industries worldwide, automating tasks, enhancing decision-making and improving efficiencies. Amongst the most...
+
+[](https://keploy.io/blog/community/unit-testing-vs-end-to-end-testing)
+
+### [Unit Testing vs. End-to-End Testing: Key Differences & Best Tools](https://keploy.io/blog/community/unit-testing-vs-end-to-end-testing)
+
+Misba Bagban
+
+10 Feb, 2025
+
+Imagine you’re preparing to launch a new application. You’ve dedicated significant time and effort to writing the...
+
+## Keploy Documentation
+[Skip to main content](https://keploy.io/docs/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+# Welcome to Keploy Documentation! 🚀
+
+This documentation will help you get the most out of Keploy—whether you’re building your first project or leveling up your testing workflow.
+
+## What is Keploy? 🤔
+
+Keploy is your open-source, developer-centric backend testing tool. It makes backend testing easy and productive for engineering teams. Plus, it's easy-to-use, powerful and extensible..🛠️ Keploy also has AI-powered tools that help you generate unit and api tests quickly, helping developers focus on writing code rather than writing tests.
+
+Keploy creates test cases and data mocks/stubs from user-traffic by recording API calls and DB queries, significantly speeding up releases and enhancing reliability. 📈
+
+## Installation Guide 📗
+
+Let's get Keploy up and running on your Windows, Linux, or macOS machine, so you can start crafting test cases in minutes. ⏱️
+
+[\\
+Windows](https://keploy.io/docs/server/installation/) [\\
+Linux](https://keploy.io/docs/server/installation/) [\\
+MacOS](https://keploy.io/docs/server/installation/)
+
+⚠️ Please note that Keploy v2 is currently in development, with the best experience on Linux. Docker support is experimental and may have some limitations for certain use cases.
+
+## Supports
+
+## Languages
+
+- [\\
+Go](https://keploy.io/docs/quickstart/samples-gin/)
+- [\\
+Java](https://keploy.io/docs/quickstart/samples-java/)
+- [\\
+Python](https://keploy.io/docs/quickstart/samples-django/)
+- [\\
+Javascript](https://keploy.io/docs/quickstart/samples-nodejs/)
+- [\\
+Rust](https://keploy.io/docs/quickstart/samples-rust/)
+- [\\
+CSharp](https://keploy.io/docs/quickstart/samples-csharp/)
+
+## Dependencies Support
+
+- [\\
+MongoDB](https://keploy.io/docs/dependencies/mongo/)
+- [\\
+HTTP](https://keploy.io/docs/dependencies/http/)
+- [\\
+PostgresSQL](https://keploy.io/docs/dependencies/postgres/)
+- [\\
+Redis](https://keploy.io/docs/dependencies/redis/)
+- 
+MySQL
+
+- 
+DynamoDB
+
+
+## Products 🛠️
+
+Keploy provides three key products that help you streamline your testing workflow:
+
+- [**Unit Testing Agent**\\
+\\
+- Generate reliable, validated tests as you code, ensuring coverage and stability.](https://keploy.io/docs/running-keploy/unit-test-generator/)
+- [**Integration Testing**\\
+\\
+- Records and replays API calls with mocks for reliable integration testing and stability.](https://keploy.io/docs/keploy-explained/introduction/)
+- [undefined **API Testing Agent**\\
+\\
+- Generates API tests from your docs, covering edge cases, ensuring coverage.](https://keploy.io/docs/running-keploy/api-test-generator/)
+
+## Quick Links
+
+- [What's Keploy?3-20 min reads](https://keploy.io/docs/keploy-explained/introduction/)
+- [Installation Guide10 min read](https://keploy.io/docs/server/installation/)
+- [QuickStart with Go Sample App10 min read](https://keploy.io/docs/quickstart/samples-gin/)
+- [Why Keploy?1 min read](https://keploy.io/docs/keploy-explained/why-keploy/)
+- [Demo Video of Keploy2 min watch](https://www.youtube.com/watch?v=23yQaY81Zho)
+
+## 🐰 Join Our Community Forum
+
+Are you curious, 🤔 or do you have questions burning in your mind? 🔥 Look no further! Join our lively Community Forum where you can:
+
+- [**YouTube** \\
+\\
+Watch tutorials and meetups with Keploy users.](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg)
+- [**Meetup** \\
+\\
+Join our monthly meetup and ask questions!](https://lu.ma/keploy)
+- [**GitHub** \\
+\\
+Give Keploy a star on GitHub (it helps!)](https://github.com/keploy)
+- [**Twitter** \\
+\\
+Follow @keployio for Keploy news and events.](https://twitter.com/keployio)
+- [slack-logo-iconCreated with Sketch Beta.\\
+**Slack** \\
+\\
+Join for live conversations and get support.](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg)
+- [**Blogs** \\
+\\
+Explore blogs on API, Testing, Mocks and Keploy.](https://keploy.io/blog)
+
+We are happy to help you with your 🎤 talks, 📝 blogposts (whether on our blog or yours) or anything else you want to try. Just [get in touch](mailto:hello@keploy.io)!
+
+# Question? 🤔💭
+
+For any support please [join keploy slack community](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) to get help from fellow users, or [book a demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9) if you're exploring enterprise use cases.
+
+## Keploy Blog
+## Keploy Blog
+
+Empowering your tech journey with expert advice and analysis
+
+[Technology](https://keploy.io/blog/technology) [Community](https://keploy.io/blog/community)
+
+
+
+### Top Technology Blogs
+
+[](https://keploy.io/blog/technology/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+### [Gemini 2.5 Pro vs OpenAI o1: Benchmarking AI Models for Software Testing](https://keploy.io/blog/technology/gemini-pro-vs-openai-benchmark-ai-for-software-testing)
+
+Shubham Jain
+
+9 Jun, 2025
+
+This benchmark report provides a side-by-side comparison of Google’s Gemini 2.5 Pro and OpenAI’s o1 models in...
+
+[](https://keploy.io/blog/technology/building-a-cli-tool-in-go-with-cobra-and-viper)
+
+### [Building a CLI Tool in Go with Cobra and Viper](https://keploy.io/blog/technology/building-a-cli-tool-in-go-with-cobra-and-viper)
+
+Charan Kamarapu
+
+28 May, 2025
+
+"The elegance of the command line lies in its ability to combine simple tools to accomplish complex...
+
+[](https://keploy.io/blog/technology/maintaining-auto-generative-api-tests-need-of-de-duplicate-tests)
+
+### [Maintaining Auto-Generative API Tests: Need of de-duplicate tests](https://keploy.io/blog/technology/maintaining-auto-generative-api-tests-need-of-de-duplicate-tests)
+
+Sarthak Shyngle
+
+15 May, 2025
+
+The Evolving Landscape of Auto-Generative Testing In today’s fast-paced development environment, automatically generating tests has become a...
+
+[See all technology blogs](https://keploy.io/blog/technology)
+
+### Top Community Blogs
+
+[](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+### [Python Switch Case: How to Implement Switch Statements in Python](https://keploy.io/blog/community/python-switch-case-how-to-implement)
+
+Abinaya SV
+
+26 Jun, 2025
+
+Have you ever wished Python had a native switch-case statement like C or Java? It would make...
+
+[](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+### [Unit Testing vs Functional Testing : Hands on Guide For Developers](https://keploy.io/blog/community/unit-testing-vs-functional-testing)
+
+Amaan Bhati
+
+25 Jun, 2025
+
+To evaluate our software application’s quality and reliability we are going to have to test our application...
+
+[](https://keploy.io/blog/community/what-is-alpha-testing)
+
+### [Getting Started with Alpha Testing : Definition, Process, and Key Benefits](https://keploy.io/blog/community/what-is-alpha-testing)
+
+Jiya Bhati
+
+24 Jun, 2025
+
+What’s the difference between a software launch that builds customer confidence and one that becomes a costly...
+
+[See all community blogs](https://keploy.io/blog/community)
+
+### What our community thinks
+
+[\\
+\\
+Jay Vasant\\
+\_\_alter123\\
+\\
+> The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20) [\\
+\\
+matsuu@充電期間\\
+\\
+matsuu\\
+\\
+> Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20) [\\
+\\
+Akash Singh\\
+\\
+Kind\_Of\_Akash\\
+\\
+> Hey people, I wanted to share about my first month as an open source contributor at Keploy -Picked up 10 issues including bugs, features, documentation and opened 3 issues. -Submitted 8 PR's, out of which 2 have been merged and rest are on review](https://x.com/Kind_Of_Akash/status/1754207010470736165?s=20) [\\
+\\
+mugi\\
+\\
+mugi\_uno\\
+\\
+> I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[\\
+\\
+Jay Vasant\\
+\_\_alter123\\
+\\
+> The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20) [\\
+\\
+matsuu@充電期間\\
+\\
+matsuu\\
+\\
+> Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20) [\\
+\\
+Akash Singh\\
+\\
+Kind\_Of\_Akash\\
+\\
+> Hey people, I wanted to share about my first month as an open source contributor at Keploy -Picked up 10 issues including bugs, features, documentation and opened 3 issues. -Submitted 8 PR's, out of which 2 have been merged and rest are on review](https://x.com/Kind_Of_Akash/status/1754207010470736165?s=20) [\\
+\\
+mugi\\
+\\
+mugi\_uno\\
+\\
+> I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[\\
+\\
+Jay Vasant\\
+\_\_alter123\\
+\\
+> The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20) [\\
+\\
+matsuu@充電期間\\
+\\
+matsuu\\
+\\
+> Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20) [\\
+\\
+Akash Singh\\
+\\
+Kind\_Of\_Akash\\
+\\
+> Hey people, I wanted to share about my first month as an open source contributor at Keploy -Picked up 10 issues including bugs, features, documentation and opened 3 issues. -Submitted 8 PR's, out of which 2 have been merged and rest are on review](https://x.com/Kind_Of_Akash/status/1754207010470736165?s=20) [\\
+\\
+mugi\\
+\\
+mugi\_uno\\
+\\
+> I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[\\
+\\
+Jay Vasant\\
+\_\_alter123\\
+\\
+> The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20) [\\
+\\
+matsuu@充電期間\\
+\\
+matsuu\\
+\\
+> Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20) [\\
+\\
+Akash Singh\\
+\\
+Kind\_Of\_Akash\\
+\\
+> Hey people, I wanted to share about my first month as an open source contributor at Keploy -Picked up 10 issues including bugs, features, documentation and opened 3 issues. -Submitted 8 PR's, out of which 2 have been merged and rest are on review](https://x.com/Kind_Of_Akash/status/1754207010470736165?s=20) [\\
+\\
+mugi\\
+\\
+mugi\_uno\\
+\\
+> I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20) [\\
+\\
+きょん/kyong\\
+\\
+kyongshiii06\\
+\\
+> I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[\\
+\\
+Shivam Sourav Jha\\
+\\
+ShivamSouravJha\\
+\\
+> Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20) [\\
+\\
+やまもと@視力2.0\\
+\\
+yamamoto\_febc\\
+\\
+> It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20) [\\
+\\
+TadasG\\
+\\
+JustADude404\\
+\\
+> Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20) [\\
+\\
+yadon\\
+\\
+Seipann11\\
+\\
+> Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20) [\\
+\\
+Junichi.Y🐼@休職中\\
+\\
+ymnk\_8752\\
+\\
+> It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20) [\\
+\\
+あんどーぼんばー\\
+\\
+AndooBomber\\
+\\
+> I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[\\
+\\
+Shivam Sourav Jha\\
+\\
+ShivamSouravJha\\
+\\
+> Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20) [\\
+\\
+やまもと@視力2.0\\
+\\
+yamamoto\_febc\\
+\\
+> It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20) [\\
+\\
+TadasG\\
+\\
+JustADude404\\
+\\
+> Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20) [\\
+\\
+yadon\\
+\\
+Seipann11\\
+\\
+> Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20) [\\
+\\
+Junichi.Y🐼@休職中\\
+\\
+ymnk\_8752\\
+\\
+> It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20) [\\
+\\
+あんどーぼんばー\\
+\\
+AndooBomber\\
+\\
+> I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[\\
+\\
+Shivam Sourav Jha\\
+\\
+ShivamSouravJha\\
+\\
+> Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20) [\\
+\\
+やまもと@視力2.0\\
+\\
+yamamoto\_febc\\
+\\
+> It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20) [\\
+\\
+TadasG\\
+\\
+JustADude404\\
+\\
+> Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20) [\\
+\\
+yadon\\
+\\
+Seipann11\\
+\\
+> Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20) [\\
+\\
+Junichi.Y🐼@休職中\\
+\\
+ymnk\_8752\\
+\\
+> It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20) [\\
+\\
+あんどーぼんばー\\
+\\
+AndooBomber\\
+\\
+> I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[\\
+\\
+Shivam Sourav Jha\\
+\\
+ShivamSouravJha\\
+\\
+> Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20) [\\
+\\
+やまもと@視力2.0\\
+\\
+yamamoto\_febc\\
+\\
+> It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20) [\\
+\\
+TadasG\\
+\\
+JustADude404\\
+\\
+> Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20) [\\
+\\
+yadon\\
+\\
+Seipann11\\
+\\
+> Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20) [\\
+\\
+Junichi.Y🐼@休職中\\
+\\
+ymnk\_8752\\
+\\
+> It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20) [\\
+\\
+あんどーぼんばー\\
+\\
+AndooBomber\\
+\\
+> I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+## AI Testing Platform
+The Most Clean AI Testing Platform
+
+Annual(Save 20%)Monthly
+
+API Testing
+
+Unit Testing
+
+New
+
+### API Testing
+
+AI-powered test generation and maintenance of API tests. Ensure your APIs are bug free and reliable.
+
+- Auto test generation
+- Self-healing tests
+- Flake-Proof by Design
+
+### Playground
+
+Taste the magic
+
+$0
+
+[Sign up free](https://app.keploy.io/)
+
+Explore AI testing with minimal limits
+
+- 1 seat
+- 200 suite generations/month
+- 400 suite runs/month
+- 3 AI assertion fixes (trial)
+- Shared CI/CD runner (1)
+- Community support
+
+POPULAR
+
+### Team
+
+Testing for small squads
+
+$19/user/mo
+
+[Upgrade to Team](https://app.keploy.io/)
+
+For AI-first small teams (3-seats min)
+
+- 3 seats minimum
+- 1,000 suite gens/month
+- 2,000 suite runs/month
+- $0.18/gen, $0.06/run overage
+- 100 AI fixes/month
+- 2 parallel CI/CD runners
+- Basic analytics
+- RBAC
+- 24h email support
+
+### Scale
+
+Production-grade, but DIY
+
+$499/workspace/mo
+
+[Go Scale](https://app.keploy.io/)
+
+For AI-Pro teams (15 seats included)
+
+- 15 seats included
+- 10,000 suite gens/month
+- 20,000 suite runs/month
+- $0.12/gen, $0.04/run overage
+- 1,000 AI fixes/month + auto-heal
+- Dedicated runner pool (5)
+- Release dashboards
+- IP allow-listing
+- 24h email & chat support
+- Performance & contract testing
+- Early access to beta features
+- Priority roadmap access
+- Integration with Jira/ServiceNow
+
+### Enterprise
+
+Your rules. Our brains.
+
+Let’s talk
+
+[Book a demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+Custom deployment and support
+
+- Unlimited seats
+- 100,000 suite gens/month
+- 200,000 suite runs/month
+- Best per-unit usage pricing
+- Unlimited AI fixes + advanced context
+- Private high-concurrency runners
+- Advanced analytics & BI export
+- SOC 2, ISO, GDPR compliant
+- Private deployment / BYO-LLM
+- MCP Agent
+- SSO with SCIM provisioning
+- Dedicated CSM, private Slack channel
+- Priority features & timelines
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+10.2K+
+
+GitHub Stars
+
+540K+
+
+Keploy Extension Installs
+
+0K+
+
+Community of Developers
+
+0+
+
+Contributors
+
+## We love when you Tweet!
+
+[I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20)
+
+[It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20)
+
+[Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20)
+
+[I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20)
+
+[I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20)
+
+[Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20)
+
+[Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20)
+
+[Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20)
+
+[It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20)
+
+[I tried keploy, it was amazing. Just wrap and start docker, and then just hit the API with curl or the client and you'll be able to test more and more. This is the golden test.](https://x.com/kyongshiii06/status/1753030333128495470?s=20)
+
+[Why do I like keploy so much? Literally I see many tools and so hard to integrate. I mean update VScode , use the sdk , make this change make that change. With Keploy, don't worry buddy just run your application, we will literally do everything for you. You need to 0 efforts.](https://x.com/ShivamSouravJha/status/1747517726749286713?s=20)
+
+[It is quite easy to create normal tests. On the other hand, abnormal systems may be a little difficult. I think it's okay to use it only for normal systems.](https://x.com/yamamoto_febc/status/1755802346188390531?s=20)
+
+[Based on the communication trace information that can be obtained using eBPF, it is possible to generate a test and a stub server to be used when executing the test.](https://x.com/matsuu/status/1747448928575099236?s=20)
+
+[I tried Keploy, good tool.](https://x.com/AndooBomber/status/1747663021747691808?s=20)
+
+[The point being, maintaining unit tests is terribly difficult, and in general requires more efforts than the actual development itself. I've hardly seen any startups even at good scale able to manage unit tests. If you really think it's a requirement you can try tools like Keploy. But I feel even if you honestly think, manual testing should be always feasible](https://x.com/__alter123/status/1731985031521014236?s=20)
+
+[I think the problem with mock data is that it is difficult to maintain, so if it makes it easier, I think it would be a good idea. The automated testing tool “Keploy” using eBPF is amazing](https://x.com/mugi_uno/status/1745726154924003502?s=20)
+
+[Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your tests—saving you tons of time.](https://x.com/kyongshiii06/status/1746532217336250821?s=20)
+
+[Keploy is seriously amazing, a genius tool crushing issues at lightning speed.](https://x.com/Seipann11/status/1755989987039064103?s=20)
+
+[Keploy is a tool which can automatically generate tests based on data from your running app. It simply attaches to your app, reads the data being passed through, and generates tests with real data. Pretty cool, huh?](https://x.com/JustADude404/status/1746888711491424681?s=20)
+
+[It is amazing! I hear about eBPF a lot, but I don't know what it is.](https://x.com/ymnk_8752/status/1745458928698450057?s=20)
+
+## Trusted, Secure, Community-Driven
+
+
+
+
+
+### Built on Open-Source
+
+
+
+### Trusted by Global Networks
+
+### Industry–
+
+### Leading Security
+
+### & Compliance
+
+Built with enterprise-grade security at its core, Keploy ensures your data is always protected.
+
+In short, No, we do not steal your data
+
+
+
+
+
+## Join the Keploy community
+
+[\\
+\\
+**Twitter** \\
+\\
+Let's talk about regression testing!](https://twitter.com/Keployio) [\\
+\\
+**Github** \\
+\\
+Contribute code to Keploy or report a bug](https://github.com/keploy/keploy) [\\
+\\
+**Slack** \\
+\\
+Connect and chat with other Keploy users](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) [\\
+\\
+**Youtube** \\
+\\
+Learn with Keploy team and community videos](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg) [\\
+\\
+**Linkedin** \\
+\\
+Follow us and connect with other Keploy engineers!](https://www.linkedin.com/company/74471957)
+
+Test with Keploy AI
+
+Get the power of AI to your Testing Pipelines!
+
+[Book a Demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## Automated API Testing
+# Continuous API validation for rock-solid speed you can trust in production
+
+Capture live API traffic, generate tests automatically, and validate your endpoints—all powered by Keploy.
+
+[Try Keploy Free](https://app.keploy.io/)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Sometimes, you just need to see it.
+
+From Traffic to Tests in One Click
+
+One AI-powered suite to generate verify and run API tests in seconds—no manual mocks needed.
+
+
+
+Shareable API Tests
+
+Collaborate seamlessly by sharing test suites across teams in just a few clicks.
+
+
+
+Run in CI/CD
+
+Automatically generate API tests from live traffic and run them in your CI/CD pipeline — no scripting needed. Capture real requests, convert them into test cases, and validate every new build with confidence.
+
+
+
+Test Editing
+
+Make quick edits to your tests and adapt to changes without rewriting from scratch.
+
+
+
+Fix with AI
+
+Automatically fix broken tests with AI and resolve assertion mismatches and failures in one click.
+
+Fully automated API testing
+
+## URL to Test Suite inSeconds
+
+Paste your endpoint, spec, or cURL command and let Keploy build and execute your API tests automatically.
+
+
+
+#### Enter Your Endpoint URL
+
+Paste in the live API URL you want to test—Keploy will ping it and capture real requests and responses.
+
+#### Drop in a cURL Snippet
+
+Provide a sample curl command and Keploy will replay it to auto-generate corresponding test cases.
+
+#### Upload Your OpenAPI Spec
+
+Supply your OpenAPI (Swagger) definition to enrich assertions and ensure full schema coverage.
+
+## AI Mode
+
+# AI-Powered API Testing
+
+Capture real traffic or upload your spec, then let our AI generate, run, and report on tests—so you catch regressions before they reach production.
+
+[Generate API tests now! →](https://app.keploy.io/)
+
+
+
+## AI search market size isgrowing rapidly in 2025
+
+Users are **rapidly shifting** from traditional search engines to AI assistants, creating new visibility channels across major AI models in this **growing market**.
+
+> “As the underlying AI continues to improve at breathtaking speed, the set of human activities that can be handed off to agents will rapidly grow.”
+
+— Rob Toews, Forbes
+
+
+
+Total Active Downloads400K+
+
+Docker Installs2M+
+
+PR Agent Users1000+
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## Integration Testing Automation
+Automate your integration testing workflows for enhanced collaboration.
+
+# Optimize Integration Testingwith Seamless Automation
+
+Achieve reliable and scalable testing for complex systems with zero-code solutions🚀
+
+Trusted by
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Smart generation - Enhanced development
+
+### 👋 Say Hi to 👋
+
+
+
+#### Interdependent Components
+
+Testing integrated systems can be challenging when components are highly interdependent, making it difficult to isolate and identify issues.
+
+#### Complex Environment Setup
+
+Setting up environments that mimic real-world systems can be complex and resource-intensive, often requiring additional infrastructure.
+
+#### Test Data Inconsistencies
+
+Ensuring consistent and relevant data across different integrated components can be difficult, leading to unreliable test results.
+
+#### Limited Test Coverage
+
+Comprehensive coverage is hard to achieve in integration testing due to the complexity of testing all possible interactions between components.
+
+#### Maintenance Overhead
+
+Frequent code changes often lead to increased maintenance of integration tests, which can be both time-consuming and resource-intensive.
+
+#### Debugging Complexity
+
+Identifying and resolving issues within integrated systems is often complex and time-consuming due to the interconnected nature of the components.
+
+Join Waitlist
+
+## Transforming interactions into realistic, diverse, and customizable stubs for precise testing
+
+## Ensure Code Coverage with
+
+#### Automated Test Generation
+
+Automatically generates test cases from API traffic, making it easier to create integration tests without manual effort, ensuring all interactions between components are tested.
+
+#### Zero-Code Testing
+
+Simplify integration testing by allowing developers to test services without writing extensive test scripts, ensuring faster implementation of integration tests.
+
+#### CI/CD Integration
+
+Integrate Keploy with popular CI/CD tools like GitHub, GitLab, Jenkins, and others, enabling developers to incorporate continuous testing into their existing CI pipelines effortlessly.
+
+#### Mocking and Stubbing Support
+
+Keploy supports the creation of mocks and stubs from real API interactions, enabling developers to simulate dependencies in integration tests, which reduces the complexity of setting up test environments.
+
+#### End-to-End Validation
+
+eploy's ability to capture and replay traffic ensures that integration tests cover full end-to-end scenarios, verifying that all services and components interact correctly under various conditions.
+
+#### Test Consistency Across Environments
+
+Keploy helps maintain test consistency by running the same integration tests across different environments without the need for separate configuration, ensuring reliable and repeatable test results.
+
+"Makesiteasytounittestmycomplexsystemswithrealistictestdata."
+
+
+
+Staff Engineer / @Nutanix
+
+## 🐰 Join the Keploy community ✨
+
+[Twitter](https://twitter.com/Keployio "Twitter")[YouTube](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg "YouTube")[GitHub](https://github.com/keploy/keploy "GitHub")[Slack](https://keploy.slack.com/join/shared_invite/zt-2poflru6f-_VAuvQfCBT8fDWv1WwSbkw "Slack")[LinkedIn](https://www.linkedin.com/company/74471957 "LinkedIn")
+
+Where Code Meets Community!
+
+"OurrecentcollaborationwithKeploywastrulyremarkable.Keployteamprovidedexceptionalsupportandremainedhighlyproactivethroughouttheentireexperience.KeployplatformhasaddedbusinessvaluetoMarutiSuzuki."
+
+
+
+Executive Member / @Maruti Suzuki
+
+## Replicate data from any source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## ...in your language
+
+[](https://keploy.io/docs/quickstart/samples-csharp/)[](https://keploy.io/docs/quickstart/samples-rust/)
+
+"We'vehadagreatexperiencewithKeploy—it'ssignificantlyimprovedourtestingprocess.UsingitforourGolangprojectswithPostgresandRedis,Keployhelpsusquicklyidentifyandfixissuesbyreplayingrealuserinteractions.Thishassavedustimeandenhancedourtestthoroughness.We'repleasedwiththeresults."
+
+
+
+Senior Software Engineer / @Wednesday
+
+### Frequently Asked Questions
+
+What is integration testing and why is it important?
+
+Testing interactions between components to ensure they work together. It's crucial for identifying issues between modules and improving software reliability.
+
+How does Keploy automate testing?
+
+Keploy generates test cases from real API traffic and replays them to test integrations automatically, reducing manual effort.
+
+Is Keploy suitable for microservices?
+
+Yes, it captures interactions between microservices, generating tests and mocks for validating service interactions
+
+Does Keploy support CI/CD integration?
+
+Yes, Keploy integrates with CI tools like Jenkins and GitHub Actions for automated integration tests in your CI/CD pipeline.
+
+How does Keploy help with mocking and stubbing?
+
+It creates stubs and mocks from real traffic to simulate dependencies, aiding in isolated and effective testing.
+
+Do I need to code for tests in Keploy?
+
+No, Keploy's zero-code platform automatically generates integration tests from real interactions, eliminating the need for manual coding.
+
+### 🚀 Elevate Your Testing with Keploy!
+
+#### Ready to simplify your testing process?
+
+Click to experience Keploy's magic locally or book a demo for an interactive walkthrough. Embark on a journey to stress-free testing today!
+
+[Book Cloud Demo](https://calendar.app.google/8Ncpff4QnAhpVnYd8)
+
+[Try Locally](https://www.github.com/keploy/keploy)
+
+
+
+## AI Unit Test Generator
+
+
+
+
+
+
+
+
+
+
+# Zero-ConfigUnitTestsGeneratedbyAIinSeconds
+
+Let AI build your tests—so you can build features.
+
+Try on VS CodeInstall on GitHub
+
+
+
+## Trusted by
+
+## Smart Automated Unit Testing
+
+
+
+Catch Bugs Early
+
+Spot issues in isolated code before they snowball into complex production nightmares.
+
+
+
+Refactor with Confidence
+
+Make bold changes without fear-tests ensure nothing else breaks when you break code.
+
+
+
+Speed up Debugging
+
+Make bold changes without fear-tests ensure nothing else breaks when you break code.
+
+
+
+Skip Test Gueswork
+
+LLM's write accurate tests based on your code, so you avoid endless trial-error cycles.
+
+## End-to-End UTG Workflow: Architecture Overview
+
+
+
+All this? Not your problem anymore—with Keploy
+
+
+
+### Failed Test Cases
+
+
+
+### Flaky Tests
+
+
+
+### Build Failure
+
+
+
+### Manual Prompting
+
+
+
+### Missing Coverage
+
+Fully automated Unit testing
+
+## Autogenerate your unit tests in Seconds
+
+Just install Keploy in your GitHub repo. Every pull request gets test files generated, committed, and reported — instantly.
+
+
+
+#### Plugin to your repo
+
+Add Keploy to your GitHub repo or org. No config or setup required — we detect your stack and run tests where it matters.
+
+#### Generate tests on every PR
+
+Once a pull request is opened, just hit “Generate Tests”. Keploy analyzes the diff, writes focused unit tests, and commits them directly.
+
+#### Get coverage and insights
+
+View a detailed report on what was tested, what was missed, and how coverage improved — all within your PR timeline.
+
+## Keploy's Unit Test Generator Ensures
+
+
+
+## Model Evaluation
+
+Keploy UTG analyzes multiple large language models (LLMs) and selects the most accurate and relevant response
+
+LLM
+
+
+
+## Autocomplete Code
+
+AI-powered multiline, fill-in-the-middle code completion for unit tests with seamless multi-editor integrations
+
+Autocomplete
+
+
+
+## Comment Completion
+
+Convert developer executable code into tests using AI-powered suggestions, seamlessly integrating with popular code editors.
+
+Comment
+
+
+
+## Commits to PR
+
+Automatically generate commitable unit test files based on pull requests, integrating seamlessly with your workflow.
+
+Commit
+
+
+
+## CI/CD Ready
+
+Generated tests integrate seamlessly into CI/CD pipelines for automated quality assurance.
+
+Integration
+
+
+
+## Dashboard Results
+
+Delivers real-time, interactive dashboard analytics to monitor key metrics and performance trends at a glance.
+
+Analytics
+
+## Replicate data from any source in your language
+
+LanguagesDatabasesFrameworksCI/CD
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Join the Keploy community
+
+[\\
+\\
+**Twitter** \\
+\\
+Let's talk about regression testing!](https://twitter.com/Keployio) [\\
+\\
+**Github** \\
+\\
+Contribute code to Keploy or report a bug](https://github.com/keploy/keploy) [\\
+\\
+**Slack** \\
+\\
+Connect and chat with other Keploy users](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) [\\
+\\
+**Youtube** \\
+\\
+Learn with Keploy team and community videos](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg) [\\
+\\
+**Linkedin** \\
+\\
+Follow us and connect with other Keploy engineers!](https://www.linkedin.com/company/74471957)
+
+## FAQs
+
+What is Keploy's Unit Test Generator (UTG)?
+
+Keploy's UTG automates the creation of unit tests based on code semantics, enhancing test coverage and reliability.
+
+Does Keploy send your private data to any cloud server for test generation?
+
+No, Keploy does not send any user code to remote systems, except when using the unit test generation feature. When using the UT gen feature, only the source code and the unit test code will be sent to the Large Language Model (LLM) you are using. By default, Keploy uses - litellm to support vast number of LLM backends. Yes, if your organization has its own LLM(a private one), you can use it with Keploy. This ensures that data is not sent to any external systems.
+
+Can Keploy handle large codebases efficiently?
+
+Yes, Keploy is designed to handle large codebases efficiently, though processing time may vary based on project size and complexity.
+
+How does Keploy contribute to improving unit test coverage?
+
+By providing a zero code platform for automated testing, Keploy empowers developers to scale up their unit test coverage without extensive coding knowledge. This integration enhances testing reports, ultimately boosting confidence in the product's quality.
+
+Is Keploy cost-effective for automated unit testing?
+
+Yes, Keploy optimizes costs by automating repetitive testing tasks and improving overall test efficiency.
+
+How does Keploy generate coverage reports?
+
+Keploy generates detailed Cobertura format reports, offering insights into test effectiveness and code quality.
+
+Test with Keploy AI
+
+Get the power of AI to your Testing Pipelines!
+
+[Book a Demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+## Keploy CLI Commands
+[Skip to main content](https://keploy.io/docs/running-keploy/cli-commands/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+### Usage [](https://keploy.io/docs/running-keploy/cli-commands/\#usage "Direct link to Usage")
+
+```codeBlockLines_e6Vv
+keploy [command] [flags]
+
+```
+
+You can use `--help, -h` flag for all the commands to see available flag options and their purpose.
+
+## Modes and Flags [](https://keploy.io/docs/running-keploy/cli-commands/\#modes-and-flags "Direct link to Modes and Flags")
+
+Here are some examples of how to use some common flags:
+
+| Mode | Flags Available |
+| --- | --- |
+| `record` | `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `-n, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `--debug` |
+| `test` | `--apiTimeout`, `-c, --command`, `--config-path`, `--containerName`, `-d, --delay`, `--mongoPassword`, `-n, --net, --networkName`, `--passThroughPorts`, `-p, --path`, `--proxyport`, `-t, --testsets`, `--debug`, `-g, --generateTestReport`, `--removeUnusedMocks`, `--coverage`, `--goCoverage`, `--ignoreOrdering`, `--skip-preview` |
+| `gen` | `--sourceFilePath`, `--testFilePath`, `--coverageReportPath`, `--testCommand`, `--coverageFormat`, `--expectedCoverage`, `--maxIterations`, `--testDir`, `--llmBaseUrl`, `--model`, `--llmApiVersion` |
+| `normailze` | `-p, --path`, `--test-run`, `--tests` |
+| `rerecord` | `--test-sets`, `-t` |
+| `config` | `--generate`, `-p, --path` |
+
+## [record](https://keploy.io/docs/running-keploy/cli-commands/\#record) [](https://keploy.io/docs/running-keploy/cli-commands/\#record "Direct link to record")
+
+The `record` mode in Keploy allows the user to record Keploy testcases from the API calls. The recorded testcases and generated mocks are then saved in the `keploy` directory in the current working directory.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy record [flags]
+
+```
+
+**Available flags:**
+
+- `-c, --command string` \- Command required to start the user application.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record --command "node src/app.js"
+
+```
+
+
+
+
+
+In the command above, `node src/app.js` is the command which starts the user application.
+
+- `--config-path string` \- Path to the Keploy configuration file. The default is ".".
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" --config-path "./config-dir/"
+
+```
+
+
+
+
+
+In the above command, `config-dir` is the directory in the CWD where the Keploy configuration file `keploy.yaml` is stored.
+
+- `--container-name string` \- Name of the docker container in which the user application is running.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "my-app-container"
+
+```
+
+- `-d, --delay uint` \- Delay in seconds to run user application. The default is 5 seconds.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" -d 10
+
+```
+
+- `- n, --network-name string` \- Name of the docker network in which the user application is running.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "my-app-container" -n "my-app-network"
+
+```
+
+- `--pass-through-ports uints` \- Ports of outgoing dependency calls to be ignored as mocks and passed through to the actual dependency. The default is no ports.
+
+- `-p, --path string` \- Path to the local directory where the recorded testcases and generated mocks are to be saved.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" -p "./tests"
+
+```
+
+
+
+
+
+In the above command, `tests` is the directory in the CWD where the recorded testcases and generated mocks are to be stored.
+
+- `--proxy-port uint32` \- Port to choose to run Keploy as a proxy. The default is 16789.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" --proxy-port 8080
+
+```
+
+- `--debug` \- To start recording testcases with debug mode enabled.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" --debug
+
+```
+
+- `rerecord` \- Record certain test-sets again
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy record -c "node src/app.js" --rerecord "test-set-0"
+
+```
+
+
+## [test](https://keploy.io/docs/running-keploy/cli-commands/\#test) [](https://keploy.io/docs/running-keploy/cli-commands/\#test "Direct link to test")
+
+The `test` mode in Keploy allows the user to run the recoded testcases from the API calls and execute assertion. A detailed report is produced after the tests are executed and it's then saved in the yaml format in `keploy/reports` directory in the current working directory.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy test [flags]
+
+```
+
+**Available flags:**
+
+- `--api-timeout uint` \- Timeout in seconds for calling user application. The default is 5 seconds.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --api-timeout 10
+
+```
+
+- `-c, --command string` \- Command required to start the user application.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js"
+
+```
+
+
+
+
+
+In the command above, `node src/app.js` is the command which starts the user application.
+
+- `--config-path string` \- Path to the Keploy configuration file. The default is ".".
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --config-path "./config-dir/"
+
+```
+
+
+
+
+
+In the above command, `config-dir` is the directory in the CWD where the Keploy configuration file `keploy.yaml` is stored.
+
+- `--container-name string` \- Name of the docker container in which the user application is running.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "my-app-container"
+
+```
+
+- `-d, --delay uint` \- Delay in seconds to run user application. The default is 5 seconds.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10
+
+```
+
+- `--mongo-password string` \- Authentication password for mocking MongoDB connection. The default password is "default123".
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --mongo-password "my-password"
+
+```
+
+- `- n, --network-name string` \- Name of the docker network in which the user application is running.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "my-app-container" -n "my-app-network" -d 9
+
+```
+
+- `--pass-through-ports uints` \- Ports of outgoing dependency calls to be ignored as mocks and passed through to the actual dependency. The default is no ports.
+
+- `-p, --path string` \- Path to the local directory where the recorded testcases and generated mocks are saved.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" -d 10 --path "./tests"
+
+```
+
+
+
+
+
+In the above command, `tests` is the directory in the CWD where the recorded testcases and generated mocks are saved.
+
+- `--proxy-port uint32` \- Port to choose to run Keploy as a proxy. The default is 16789.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --proxy-port 8080
+
+```
+
+- `-t, --test-sets strings` \- To specify which specific testsets are to be executed. The default is all testsets.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" -t "test-set-1,test-set-3" --delay 10
+
+```
+
+- `--debug` \- To start executing testcases with debug mode enabled.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10 --debug
+
+```
+
+- `-g, --generate-test-report` \- To generate the test report. The default is true.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10 -g=false
+
+```
+
+- `--remove-unused-mocks` \- To remove unused mocks from mock file. The default is false.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10 --remove-unused-mocks
+
+```
+
+- `--ignore-ordering` \- Ignore the order of elements in an array for a response, with the default value being true.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10 --ignore-ordering
+
+```
+
+- `--skip-coverage` \- skip code coverage computation while running the test cases
+
+- `--skip-preview` \- skip line by line code coverage preview but display the total coverage.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy test -c "node src/app.js" --delay 10 --skip-preview
+
+```
+
+- `--jacoco-agent-path` \- Only applicable for test coverage for Java projects. You can override the jacoco agent jar by providing its path
+
+
+## [gen](https://keploy.io/docs/running-keploy/cli-commands/\#gen) [](https://keploy.io/docs/running-keploy/cli-commands/\#gen "Direct link to gen")
+
+The `gen` cmd in Keploy allows user to generate unit tests using LLM Models.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy gen [flags]
+
+```
+
+**Available flags:**
+
+- `sourceFilePath` \- Path to the source file for which tests are to be generated.
+
+- `testFilePath` \- Path where the generated tests will be saved.
+
+- `coverageReportPath` \- Path to generate the coverage report.
+
+- `testCommand` \- Command to execute tests and generate the coverage report.
+
+- `coverageFormat` \- Type of the coverage report by default report is in "cobertura" format.
+
+- `expectedCoverage` \- Desired coverage percentage by default it is set to be at 100%.
+
+- `maxIterations` \- Maximum number of iterations for refining tests (default 5).
+
+- `testDir` \- Directory where tests will be written.
+
+- `llmBaseUrl` \- Base url of the llm.
+
+- `model` \- Specifies the AI model to use by default it uses "gpt-4o" model.
+
+- `llmApiVersion` \- API version of the llm if any.
+
+
+## [normalize](https://keploy.io/docs/running-keploy/cli-commands/\#normalize) [](https://keploy.io/docs/running-keploy/cli-commands/\#normalize "Direct link to normalize")
+
+The `normalize` cmd in Keploy allows user to change the response of the testcases according to the latest test run response that is executed by the user, this is useful when the API response of the testcases are changed due to code change or any other intentional change in the application.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy normalize [flags]
+
+```
+
+**Available flags:**
+
+- `-p, --path string` \- Path to the local directory where the recorded testcases and generated mocks are to be saved.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy normalize -p "./tests"
+
+```
+
+
+
+
+
+In the above command, `tests` is the directory in the CWD where the recorded testcases and generated mocks are to be stored.
+
+- `--test-run string` \- by default normalization considers the latest test-run to change the response of the testcases but if user want to do it for a particular test-run this flag can be used.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy normalize -p "./tests" --test-run "test-run-10"
+
+```
+
+- `--tests string` \- by default normalization considers all the testcases for normalization but if user want to normalize only few particular testcases this flag can be used
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy normalize -p "./tests" --test-run "test-run-10" --tests "test-set-1:test-case-1 test-case-2,test-set-2:test-case-1 test-case-2"
+
+```
+
+
+## [rerecord](https://keploy.io/docs/running-keploy/cli-commands/\#rerecord) [](https://keploy.io/docs/running-keploy/cli-commands/\#rerecord "Direct link to rerecord")
+
+The `rerecord` cmd allow user to record new keploy testcases/mocks from the existing test cases for the given testset(s)
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy rerecord -c "node src/app.js" -t "test-set-0"
+
+```
+
+## [templatize](https://keploy.io/docs/running-keploy/cli-commands/\#templatize) [](https://keploy.io/docs/running-keploy/cli-commands/\#templatize "Direct link to templatize")
+
+The `templatize` cmd allows the user to templatize important fields in the testcases who's values are used in the request of testcases and that may change in the future.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy templatize [flags]
+
+```
+
+## [config](https://keploy.io/docs/running-keploy/cli-commands/\#config) [](https://keploy.io/docs/running-keploy/cli-commands/\#config "Direct link to config")
+
+The `config` command in Keploy is used to generate the Keploy Configuration File i.e. `keploy.yaml`. The generated configuration file is created in the current working directory.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy config [flags]
+
+```
+
+**Available flags:**
+
+- `--generate` \- Generate a new keploy configration file.
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy config --generate
+
+```
+
+- `-p, --path string` \- Path to the local directory where the Keploy Configuration File will be stored. The default is ".".
+
+
+
+
+
+```codeBlockLines_e6Vv
+keploy config --generate --path "./config-dir/"
+
+```
+
+
+
+
+
+In the above command, `config-dir` is the directory in the CWD where the Keploy configuration file `keploy.yaml` is to be stored.
+
+
+## [example](https://keploy.io/docs/running-keploy/cli-commands/\#example) [](https://keploy.io/docs/running-keploy/cli-commands/\#example "Direct link to example")
+
+The `example` command in Keploy is designed to illustrate the usage of Keploy in various scenarios, showing its capabilities with different types of applications and setups. Below are examples for using Keploy with Golang, Node.js, Java, and Docker applications.
+
+**Usage:**
+
+```codeBlockLines_e6Vv
+keploy example [flags]
+
+```
+
+**Available Flags:**
+
+- `--customSetup` \- Displays commands tailored for custom user-defined setups.
+
+- [Usage](https://keploy.io/docs/running-keploy/cli-commands/#usage)
+- [Modes and Flags](https://keploy.io/docs/running-keploy/cli-commands/#modes-and-flags)
+- [record](https://keploy.io/docs/running-keploy/cli-commands/#record)
+- [test](https://keploy.io/docs/running-keploy/cli-commands/#test)
+- [gen](https://keploy.io/docs/running-keploy/cli-commands/#gen)
+- [normalize](https://keploy.io/docs/running-keploy/cli-commands/#normalize)
+- [rerecord](https://keploy.io/docs/running-keploy/cli-commands/#rerecord)
+- [templatize](https://keploy.io/docs/running-keploy/cli-commands/#templatize)
+- [config](https://keploy.io/docs/running-keploy/cli-commands/#config)
+- [example](https://keploy.io/docs/running-keploy/cli-commands/#example)
+
+## Keploy Installation Guide
+[Skip to main content](https://keploy.io/docs/server/installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy uses eBPF to intercept API calls on network layer and generates test cases and mocks/stubs.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/server/installation/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/server/installation/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/server/installation/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/server/installation/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/server/installation/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/server/installation/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/server/installation/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/server/installation/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/server/installation/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## 🎬 Capturing Testcases [](https://keploy.io/docs/server/installation/\#-capturing-testcases "Direct link to 🎬 Capturing Testcases")
+
+To initiate the recording of API calls, execute this command in your terminal:
+
+```codeBlockLines_e6Vv
+keploy record -c "CMD_TO_RUN_APP"
+
+```
+
+For example, if you're using a simple Golang program, the **CMD\_TO\_RUN\_APP** would resemble:
+
+```codeBlockLines_e6Vv
+keploy record -c "go run main.go"
+
+```
+
+## 🏃 Running Testcases [](https://keploy.io/docs/server/installation/\#-running-testcases "Direct link to 🏃 Running Testcases")
+
+To run the testcases and see if there are any regressions introduced, use this terminal command:
+
+```codeBlockLines_e6Vv
+keploy test -c "CMD_TO_RUN_APP" --delay 10
+
+```
+
+Explore the [Test Coverage Generation Guide](https://keploy.io/docs/server/sdk-installation/go/) for seeing test-coverage with your unit testing library and [Keploy Running Guide](https://keploy.io/docs/running-keploy/configuration-file/) for additional options and tips on customizing your Keploy setup to perfection.
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/server/installation/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/server/installation/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/server/installation/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/server/installation/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/server/installation/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/server/installation/#setting-up-the-docker-desktop-for-wsl-2)
+- [🎬 Capturing Testcases](https://keploy.io/docs/server/installation/#-capturing-testcases)
+- [🏃 Running Testcases](https://keploy.io/docs/server/installation/#-running-testcases)
+
+## Keploy GitHub Integration
+[Skip to main content](https://keploy.io/docs/ci-cd/github/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy can be integrated with GitHub by two methods:-
+
+1. [Using Shell Scripts](https://keploy.io/docs/ci-cd/github/#shell-scripts)
+2. [Using GitHub Actions](https://keploy.io/docs/ci-cd/github/#github-actions)
+
+## Shell Scripts [](https://keploy.io/docs/ci-cd/github/\#shell-scripts "Direct link to Shell Scripts")
+
+GitHub scripts are the easiest way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. You can either add the following script to yout `github workflow` or create a new worflow `.github/workflows/keploy-test.yml`:-
+
+```codeBlockLines_e6Vv
+- name: Checkout Commit
+ uses: actions/checkout@v2
+- name: Keploy Tests
+ id: keploy-run-test
+ run: |
+ curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+ sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+ ...
+
+```
+
+> **Note: if you are using `arm_64` as runner use below to download keploy binary**
+
+`curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp`
+
+### Example with Scripts [](https://keploy.io/docs/ci-cd/github/\#example-with-scripts "Direct link to Example with Scripts")
+
+While using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application with keploy test in GitHub CI, the workflow would like:-
+
+```codeBlockLines_e6Vv
+- name: Checkout Commit
+ uses: actions/checkout@v2
+- name: Set up Node
+ uses: actions/setup-node@v2
+ with:
+ node-version: 18
+
+- name: Keploy Tests
+ id: keploy-run-test
+ run: |
+ curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+ sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+ # Install application dependencies
+ npm install
+
+ # Run the keploy captured tests
+ keploy test -c "node src/app.js"
+
+```
+
+We will get to see output : -
+
+```codeBlockLines_e6Vv
+
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+ version: 2.1.0-alpha23
+
+ 🐰 Keploy: 2024-06-05T04:55:12Z INFO config file not found; proceeding with flags only
+ 🐰 Keploy: 2024-06-05T04:55:12Z WARN Delay is set to 5 seconds, incase your app takes more time to start use --delay to set custom delay
+ 🐰 Keploy: 2024-06-05T04:55:12Z INFO Example usage: keploy test -c "/path/to/user/app" --delay 6
+ 🐰 Keploy: 2024-06-05T04:55:12Z INFO GitHub Actions workflow file generated successfully {"path": "/githubactions/keploy.yml"}
+ 🐰 Keploy: 2024-06-05T04:55:13Z INFO keploy initialized and probes added to the kernel.
+
+ ...
+
+ 🐰 Keploy: 2024-06-05T04:55:16Z INFO starting TCP DNS server at addr :26789
+ 🐰 Keploy: 2024-06-05T04:55:16Z INFO starting UDP DNS server at addr :26789
+ 🐰 Keploy: 2024-06-05T04:55:16Z INFO Proxy started at port:16789
+ 🐰 Keploy: 2024-06-05T04:55:16Z INFO running {"test-set": "test-set-0"}
+
+ Listening on port 8000
+ Connected to MongoDB
+
+ 🐰 Keploy: 2024-06-05T04:55:21Z INFO starting test for of {"test case": "test-1", "test set": "test-set-0"}
+
+ Testrun passed for testcase with id: "test-1"
+
+ --------------------------------------------------------------------
+
+ 🐰 Keploy: 2024-06-05T04:55:21Z INFO result {"testcase id": "test-1", "testset id": "test-set-0", "passed": "true"}
+
+ <=========================================>
+ TESTRUN SUMMARY. For test-set: "test-set-0"
+ Total tests: 1
+ Total test passed: 1
+ Total test failed: 0
+ <=========================================>
+
+ 🐰 Keploy: 2024-06-05T05:18:49Z INFO test run completed {"passed overall": true}
+ 🐰 Keploy: 2024-06-05T05:18:49Z INFO stopping Keploy {"reason": "replay completed successfully"}
+ 🐰 Keploy: 2024-06-05T05:18:49Z INFO proxy stopped...
+ 🐰 Keploy: 2024-06-05T05:18:50Z INFO eBPF resources released successfully...
+
+```
+
+_And... voila! You have successfully integrated keploy in GitHub CI pipeline 🌟_
+
+* * *
+
+## GitHub Actions [](https://keploy.io/docs/ci-cd/github/\#github-actions "Direct link to GitHub Actions")
+
+GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow under `.github/workflow` with the name `keploy-test.yml`: -
+GitHub Actions are a more advanced way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. Create a new workflow under `.github/workflow` with the name `keploy-test.yml`: -
+
+```codeBlockLines_e6Vv
+jobs:
+ my_job:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Test-Report
+ uses: keploy/testgpt@main
+ with:
+ command: "" ## Command to run the application
+
+```
+
+In the above example, we are using the `keploy/testgpt` action to run the test cases.
+
+> - `working-directory` (optional) is the path to the application by default it takes root to find keploy folder.
+> - `delay` (optional) is the time to wait for the application to start.
+> - `command` is the command to run your application.
+
+### Example with Actions [](https://keploy.io/docs/ci-cd/github/\#example-with-actions "Direct link to Example with Actions")
+
+While using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application with keploy test in GitHub CI via actions, the workflow would like:-
+
+```codeBlockLines_e6Vv
+jobs:
+ keploy_test_case:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Test-Report
+ uses: keploy/testgpt@main
+ with:
+ working-directory: /express-mongoose
+ delay: 10
+ command: "node src/app.js"
+
+```
+
+> **Note: `keploy/testgpt` action supports only amd\_64 based runners.**
+
+We will get to see output : -
+
+```codeBlockLines_e6Vv
+Test Mode Starting 🎉
+sudo -E keploy test -c node src/app.js --delay 10 --path ./
+
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+ version: 2.1.0-alpha23
+
+ 🐰 Keploy: 2024-06-05T05:18:35Z INFO config file not found; proceeding with flags only
+ 🐰 Keploy: 2024-06-05T05:18:35Z INFO GitHub Actions workflow file generated successfully {"path": "/githubactions/keploy.yml"}
+ 🐰 Keploy: 2024-06-05T05:18:35Z INFO keploy initialized and probes added to the kernel.
+
+ ...
+
+ 🐰 Keploy: 2024-06-05T05:18:39Z INFO starting TCP DNS server at addr :26789
+ 🐰 Keploy: 2024-06-05T05:18:39Z INFO starting UDP DNS server at addr :26789
+ 🐰 Keploy: 2024-06-05T05:18:39Z INFO Proxy started at port:16789
+ 🐰 Keploy: 2024-06-05T05:18:39Z INFO running {"test-set": "test-set-0"}
+ Listening on port 8000
+ Connected to MongoDB
+ 🐰 Keploy: 2024-06-05T05:18:49Z INFO starting test for of {"test case": "test-1", "test set": "test-set-0"}
+
+ Testrun passed for testcase with id: "test-1"
+
+ --------------------------------------------------------------------
+
+ 🐰 Keploy: 2024-06-05T04:55:21Z INFO result {"testcase id": "test-1", "testset id": "test-set-0", "passed": "true"}
+
+ <=========================================>
+ TESTRUN SUMMARY. For test-set: "test-set-0"
+ Total tests: 1
+ Total test passed: 1
+ Total test failed: 0
+ <=========================================>
+ ...
+ 🐰 Keploy: 2024-06-05T04:55:21Z INFO test run completed {"passed overall": true}
+
+```
+
+_And... voila! You have successfully integrated keploy in GitHub CI pipeline 🌟_
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/ci-cd/github/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Shell Scripts](https://keploy.io/docs/ci-cd/github/#shell-scripts)
+ - [Example with Scripts](https://keploy.io/docs/ci-cd/github/#example-with-scripts)
+- [GitHub Actions](https://keploy.io/docs/ci-cd/github/#github-actions)
+ - [Example with Actions](https://keploy.io/docs/ci-cd/github/#example-with-actions)
+- [Contact Us](https://keploy.io/docs/ci-cd/github/#contact-us)
+
+## End Regressions with Keploy
+# On a mission to end Regressions!
+
+We’ve been developers, just like you—faced the same challenges and frustrations. Our goal is to make testing effortless, so you don’t have to worry about regressions again.
+
+
+
+
+
+
+
+
+
+## The Humans Behind the Code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Want to join our Team Keploy?
+
+[Principal Software Engineer](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+You'll be joining the engineering team as a Principal Software Engineer, leading architectural decisions, mentoring developers, and driving technical excellence in software development. You'll collaborate closely with cross-functional teams to design scalable, high-performance solutions.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+[Developer Relation Engineer](https://forms.gle/waKfnywvhK9PtiTE7)
+
+You'll be joining the Developer Relations team, building strong relationships with the developer community by creating technical content, conducting workshops, and advocating best practices. You will work closely with engineering and product teams to enhance developer experience.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/waKfnywvhK9PtiTE7)
+
+[SDE - I](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+You'll be joining as a Software Development Engineer - I, contributing to the development of high-quality software solutions. You'll work on implementing features, writing clean and efficient code, and collaborating with experienced developers to build innovative products.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+[SDE - II](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+You'll be joining as a Software Development Engineer - II, taking ownership of critical projects, improving system performance, and designing scalable solutions. You'll mentor junior developers and collaborate with teams to build robust software systems.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+[SDE - III](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+You'll be joining as a Software Development Engineer - III, taking ownership of critical projects, improving system performance, and designing scalable solutions. You'll mentor junior developers and collaborate with teams to build robust software systems.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/h5QwT9hLBcsWJavH8)
+
+[Technical Content Writer](https://forms.gle/1QrTtVdeTNhRbDX89)
+
+You'll be joining as a Technical Content Writer, crafting engaging and informative technical documentation, blogs, and tutorials. You'll collaborate with engineers to translate complex topics into easy-to-understand content for developers and customers.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/1QrTtVdeTNhRbDX89)
+
+[Product Designer](https://forms.gle/xuuNKVeKvCBxEaqQA)
+
+You'll be joining as a Product Designer, focusing on creating intuitive and visually appealing user experiences. You'll work closely with developers and stakeholders to design user interfaces, conduct usability research, and enhance overall product design.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/xuuNKVeKvCBxEaqQA)
+
+[SDR (Sales Development Representative Engineer)](https://forms.gle/mEg4rfiqurBSjtym8)
+
+We’re looking for a motivated and experienced Strategic BDR to help us shape the sales process for our innovative SaaS platform handling inbound leads. This is your chance to be part of a fast-paced startup, work closely with the leadership team, and make a meaningful impact in the US market.
+
+Bangalore, India
+
+\-
+
+[Apply Now](https://forms.gle/mEg4rfiqurBSjtym8)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Test with Keploy AI
+
+Get the power of AI to your Testing Pipelines!
+
+[Book a Demo](https://calendar.app.google/cXVaj6hbMUjvmrnt9)
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## Keploy Privacy Policy
+# Privacy Policy
+
+This privacy policy (“Policy”) applies to HybridK8s Pvt Ltd along with its affiliates Keploy Inc herein called as Keploy and was last updated February 2025. We may change or update this policy at any time, and the same will be updated here.
+
+If you are a Keploy user or customer, we shall notify the changes or updates either by sending an email or a notification on the Keploy App (as defined below). Please ensure to read such notices carefully.
+
+We sincerely believe that you should always know what data we collect from you, the purposes for which such data is used, and that you should have the ability to make informed decisions about what you want to share with us. Therefore, we want to be transparent about: (i) how and why we collect, store and use your personal data in the various capacities in which you interact with us; and (ii) the rights that you have to determine the contours of this interaction.
+
+While we would strongly advise you to read the Policy in full, the following summary will give you a snapshot of the salient points covered herein:
+
+- Your personal data relationship with Keploy varies based on the capacity in which you interact with us/avail of our products and solutions (“Services”). You could be: (i) a visitor to [https://www.keploy.io/](https://www.keploy.io/) (“Website”) or any pages thereof (“Visitor”); (ii) a person/entity availing of one of our Services (“Customer”); or (iii) an employee/agent/representative/appointee of a customer who uses the said Service (“User”);
+- Based on whether you are a Visitor, Customer or User, the type of data we collect and the purpose for which we use it will differ and this Policy details such variations;
+- This Policy will clarify the rights available to you vis-à-vis the personal data you share with us.
+
+If you have any queries or concerns with this Policy, please contact our Grievance Officer (refer Section 12). If you do not agree with the Policy, we would advise you to not visit/use the Website or the Keploy application(s)/platform(s) (collectively “App”).
+
+#### INFORMATION WE COLLECT AND HOW WE USE IT
+
+| TYPE OF USER | VISITOR | CUSTOMER | USER |
+| --- | --- | --- | --- |
+| WHAT DATA WE MAY COLLECT | 1. How you behave on the Website, (what pages you land on, how much time you spend, etc.);
2. What device you use to access the Website and its details (model, operating system, etc.);
3. Name; and e-mail. | The name and e-mail of your representative who signs up for a Service on your behalf; and | 1. Your name, e-mail;
2. How you behave in the relevant product environment and use the features;
3. What device you use to access the Website/App and its details (model, operating system, etc.);
4. Cookies and Web Beacon data; |
+| HOW AND WHY, WE USE IT | We use this information to analyse and identify your behaviour and enhance the interactions you have with the Website.
If you submit your details and give us your consent, we may send you newsletters and e-mails to market other products and services we may provid | We collect this data in order to help you register for and facilitate provision of our Services.
If you give us your consent, we may send you newsletters and e-mails to market other products and services we may provide. | We collect this data in order to facilitate provision of our Services.
We will occasionally send you e-mails regarding changes or updates to the Service that you are using. In the event you report an issue with a Service, we may also screen/video record your device only when you use the App for a limited time period to help us better understand how to address the issue.
If you give us your consent, we may send you newsletters and e-mails to market other products and services we may provide. |
+
+Information transferred via the Google API: Keploy’s use and transfer of information received from Google API’s to any other app will adhere to Google API Services User Data Policy, including Limited Use requirements.
+
+FOR THE AVOIDANCE OF ANY DOUBT, WE SHOULD CLARIFY THAT IN THE EVENT WE ANONYMIZE AND AGGREGATE INFORMATION COLLECTED FROM YOU, WE WILL BE ENTITLED TO USE SUCH ANONYMIZED DATA FREELY, WITHOUT ANY RESTRICTIONS OTHER THAN THOSE SET OUT UNDER APPLICABLE LAW.
+
+Where such data is not being used by us to render Services to you, we shall explicitly seek your consent for using the same. You can choose to withdraw this consent at any time, [here](https://www.scrut.io/privacy-policy#).
+
+Keploy uses artificial intelligence (AI) to enhance the services we provide, ensuring that customer data is processed accurately, efficiently, and securely. All AI-driven data processing is performed with a strong commitment to safeguarding customer privacy. We implement strict access controls, encryption, and regular audits to prevent unauthorized access to, or misuse of, your information. Our AI models are trained only on data necessary to deliver our services, and we adhere to industry best practices to anonymize and aggregate data wherever possible to protect customer identities.
+
+We do not use customer data to train external models or for any purpose beyond the agreed-upon scope of our services. Any personal data processed by our AI systems is handled in compliance with applicable data protection laws, including GDPR and CCPA where relevant.
+
+#### YOUR RIGHTS & PREFERENCES AS A DATA SUBJECT
+
+Subject to the GDPR and applicable law’s limitations, the rights afforded to you as a data subject are:
+
+1. RIGHT TO BE INFORMED : You have a right to be informed about the manner in which any of your personal data is collected or used which we have endeavored to do by way of this Policy.
+2. RIGHT OF ACCESS : You have a right to access the personal data you have provided by requesting us to provide you with the same.
+3. RIGHT TO RECTIFICATION : You have a right to request us to amend or update your personal data if it is inaccurate or incomplete.
+4. RIGHT TO ERASURE : You have a right to request us to delete your personal data.
+5. RIGHT TO RESTRICT : You have a right to request us to temporarily or permanently stop processing all or some of your personal data.
+6. RIGHT TO OBJECT : You have a right, at any time, to object to our processing of your personal data under certain circumstances. You have an absolute right to object to us processing your personal data for the purposes of direct marketing.
+7. RIGHT TO DATA PORTABILITY : You have a right to request us to provide you with a copy of your personal data in electronic format and you can transmit that personal data for using another third-party’s product/service.
+8. RIGHT NOT TO BE SUBJECT TO AUTOMATED DECISION-MAKING : You have a right to not be subject to a decision based solely on automated decision making, including profiling.
+
+In case you want to exercise the rights set out above you can contact our Grievance Officer whose details are set out in Section 12 below.
+
+The data provided by you as a Visitor, or when you sign up as a Customer / User or register for our Services will be processed by us for the purpose of rendering Services to you or in order to take steps prior to rendering such Services, at your request. Where such data is not being used by us to render Services to you, we shall explicitly seek your consent for using the same.
+
+Additionally, we may process your data to serve legitimate interests. Accordingly, the grounds on which we can engage in processing are as follows:
+
+| NATURE OF DATA | GROUNDS |
+| --- | --- |
+| Visitor Data | - Consent;
- Performance of a Contract; and
- Legitimate Interest |
+| Account Registration Data | - Compliance with applicable laws;
- Legitimate Interest |
+| Service Usage Data | - Performance of a Contract; and
- Legitimate Interest |
+| Data for Marketing our Services | - Consent; and
- Legitimate Interest |
+
+If you believe we have used your personal data in violation of the rights above or have not responded to your objections, you may lodge a complaint with your local supervisory authority.
+
+Additionally, please note:
+
+- If you are a Customer/User using one of our Services to collect data about an EU data subject from third parties, it shall be your sole obligation to inform such data subject about the source of such data; and
+- We do not collect any Special Categories of Personal Data. Further, if you are a Customer/User, you hereby agree and acknowledge that you shall not, under any circumstances, whether directly or indirectly, use our Services to collect or process Special Categories of Personal Data or transfer to us any such data.
+- The term “Special Categories of Personal Data” shall have the meaning ascribed to it under the GDPR and shall include, without limitation, data pertaining to a data subject’s race, ethnic origin, genetics, political affiliations, biometrics, health or sexual orientation.
+
+Keploy does not sell any data of any of its users/customers/leads. Keploy assures no discrimination against consumers exercising their right of privacy under CCPA
+
+YOUR RIGHTS UNDER INFORMATION TECHNOLOGY (REASONABLE SECURITY PRACTICES AND PROCEDURES AND SENSITIVE PERSONAL DATA OR INFORMATION) RULES, 2011
+
+#### RETENTION OF PERSONAL INFORMATION
+
+We will store any personal data we collect from you as long as it is necessary in order to facilitate your use of the Services and for ancillary legitimate and essential business purposes – these include, without limitation, for improving our Services, attending to technical issues, and dealing with disputes.
+
+We may need to retain your personal data even if you seek deletion thereof, if it is needed to comply with our legal obligations, resolve disputes and enforce our agreements.
+
+If you are a customer, please be advised that: (i) you will need to inform your Leads about how you store and deal with any data you collect from them using one of our Services, in compliance with applicable laws including the GDPR; and (ii) after you terminate your usage of a Service, we may, unless legally prohibited, delete all data provided or collected by you from our servers.
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## Cookie Policy Overview
+# Cookie Policy
+
+- Effective Date: Feb 10, 2025
+- Last Updated on: Feb 10, 2025
+
+This cookie policy (“Policy”) explains how Keploy (HybridK8s Private Limited) or any of its affiliates or subsidiaries hereby collectively referred to as (“Keploy”, “We”, “Us”, “Our”) Processes Personal Data collected from You. We use cookies, web beacons, and other technologies to improve and customize our Sites and Services your experience; to allow you to access and use the Services without re-entering your username or password; to understand the usage of our Services and the interests of our customers; to determine whether an email has been opened and acted upon, and to present you with advertising relevant to your interests. These cookies include:
+
+- Essential website cookies: These cookies and other technologies are essential in order to enable the Services to provide the feature you have requested, such as remembering you have logged in.
+- Functionality cookies: These cookies and similar technologies remember choices you make such as language or search parameters. We use these cookies to provide you with an experience more appropriate with your selections and to make your use of the Services more tailored.
+- Performance and analytics cookies: These cookies and similar technologies collect information on how users interact with the Services and enable us to improve how the Services operate. For example, we use Google Analytics cookies to help us understand how visitors arrive at and browse our products and website to identify areas for improvement such as navigation, user experience, and marketing campaigns.
+- Targeting or advertising cookies: These cookies collect information about your browsing habits in order to make advertising relevant to you. They perform functions like preventing the same ad from continuously re-appearing, ensuring that ads are properly displayed for advertisers, and in some cases selecting advertisements that are based on your interests.
+- Social networking cookies: These cookies are used to enable you to share pages and content that you find interesting on our Sites and Services through third-party social networking and other websites. These cookies may also be linked to targeting/advertising activities.
+
+We value your privacy
+
+We use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies. [Privacy Policy](https://keploy.io/privacy-policy)
+
+CustomizeAccept All
+
+## DevScribe Conference
+
+
+### Conference where Open Source connects Productivity
+
+### &\#9679 Share &\#9679 Learn &\#9679 Innovate
+
+[Register](https://forms.gle/X1XQkbZy9AaARHeZ9)
+
+[Submit CFP](https://forms.gle/1GapWjqvTr82NHbr5)
+
+[22 November 2024](https://forms.gle/X1XQkbZy9AaARHeZ9) at [Google Kyoto West, Bengaluru](https://maps.app.goo.gl/EaFxFcDvkBckeNxJ7)
+
+## Why Attend DevScribe
+
+Learn from each other, move forward together, and celebrate what’s next. Whether you’re a developer, architect, tester, community manager, or something in-between, you’ll…
+
+#### LEARN
+
+Learn about the latest trends in open source and open technologies
+
+#### MEET
+
+Face-to-face problem-solving, discussions, and collaboration
+
+#### ACCEL
+
+Access to experts to help guide you through a complex OS environment
+
+#### DISCOVER
+
+Discover what other companies and projects are working on
+
+#### EXPLORE
+
+Explore career opportunities with the world’s leading technology companies
+
+#### ACCESS
+
+Gain advantage by learning about the latest in innovative open solutions
+
+## SCHEDULE
+
+
+
+### LAST EVENT
+
+
+
+## Sponsor
+
+Please reach out to if you need to register as a Sponsor, email us - devrel\[at\]keploy\[dot\]io
+
+[](https://developers.google.com/ "Go to Google")
+
+### Community Partners
+
+[](https://www.meetup.com/ministry-of-testing-bengaluru/ "Go to MoT")
+
+[](https://keploy.io/ "Go to Keploy")
+
+[](https://community.cncf.io/noida/ "Go to CNCG Noida")
+
+[](https://reactplay.io/ "Go to ReactPlay")
+
+[](https://www.loft.sh/ "Go to Loft")
+
+[](https://www.lambdatest.com/ "Go to Google")
+
+[](https://hoppscotch.com/ "Go to Hoppscotch")
+
+[](https://neo4j.com/ "Go to Neo4j")
+
+## Speakers
+
+
+
+Neha Gupta
+
+[Co-Founder, Keploy](https://www.linkedin.com/in/neha-gup/)
+
+
+
+Siddhant Agrawal
+
+[Developer Relations Lead APAC (Neo4j)](https://www.linkedin.com/in/sidagarwal04/)
+
+
+
+Khushboo Verma
+
+[Platform Engineer at Appwrite](https://www.linkedin.com/in/verma-khushboo)
+
+
+
+Hrittik Roy
+
+[Platform Advocate at LoftLabs](https://www.linkedin.com/in/hrittikhere)
+
+
+
+Sparsh Kesari
+
+[Senior DevRel, LambdaTest](https://www.linkedin.com/in/sparshk98/)
+
+
+
+Ashutosh S. Bhakare
+
+[Google Developer Expert](https://www.linkedin.com/in/abhakare/)
+
+
+
+Balasundaram
+
+[Kubernetes Enthusiasts](https://x.com/balaintwt)
+
+
+
+Gourav Kumar
+
+[Senior Software Engineer, Keploy](https://www.linkedin.com/in/gourav-kumar-b20108173/)
+
+## Pet Clinic Setup
+[Skip to main content](https://keploy.io/docs/quickstart/pet-clinic/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+This is a petclinic app where you can record testcases and mocks by interacting with the UI, and then test them using Keploy.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/pet-clinic/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/pet-clinic/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/pet-clinic/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/pet-clinic/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/pet-clinic/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/pet-clinic/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/pet-clinic/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/pet-clinic/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/pet-clinic/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+This project has two parts - the frontend and backend, since Keploy is a backend testing platform, we need to start the backend part of the project using Keploy and run the frontend as it is.
+
+## Setup the frontend [](https://keploy.io/docs/quickstart/pet-clinic/\#setup-the-frontend "Direct link to Setup the frontend")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-java.git
+cd samples-java/spring-petclinic/spring-petclinic-angular
+npm uninstall -g angular-cli @angular/cli
+npm cache clean
+npm install -g @angular/cli@latest
+npm install --save-dev @angular/cli@latest
+npm i
+
+```
+
+## Start the frontend [](https://keploy.io/docs/quickstart/pet-clinic/\#start-the-frontend "Direct link to Start the frontend")
+
+```codeBlockLines_e6Vv
+npm run start
+
+```
+
+Now it's time to setup the backend of our application. Let's move to the backend directory and get started.
+
+```codeBlockLines_e6Vv
+cd samples-java/spring-petclinic/spring-petclinic-rest
+
+```
+
+You can start the backend using Keploy in 2 ways:
+
+- [Using Keploy's binary](https://keploy.io/docs/quickstart/pet-clinic/#instructions-for-starting-using-binary)
+- [Using Keploy's docker image](https://keploy.io/docs/quickstart/pet-clinic/#instructions-for-starting-using-docker)
+
+# Instructions For Starting Using Binary [](https://keploy.io/docs/quickstart/pet-clinic/\#instructions-for-starting-using-binary "Direct link to Instructions For Starting Using Binary")
+
+Prerequisites For Binary:
+
+1. Node 20.11.0 LTS
+2. OpenJDK 17.0.9
+3. MVN version 3.6.3
+
+## Setup the backend [](https://keploy.io/docs/quickstart/pet-clinic/\#setup-the-backend "Direct link to Setup the backend")
+
+You need to update the postgresql properties, go to
+`spring-petclinic/spring-petclinic-rest/src/main/resources/application-postgresql.properties`
+and change
+
+```codeBlockLines_e6Vv
+spring.datasource.url=jdbc:postgresql://mypostgres:5432/petclinic
+
+```
+
+to
+
+```codeBlockLines_e6Vv
+spring.datasource.url=jdbc:postgresql://localhost:5432/petclinic
+
+```
+
+and then build the jar using:
+
+```codeBlockLines_e6Vv
+mvn clean install -Dmaven.test.skip=true
+
+```
+
+## Spin up the database [](https://keploy.io/docs/quickstart/pet-clinic/\#spin-up-the-database "Direct link to Spin up the database")
+
+```codeBlockLines_e6Vv
+docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 --name mypostgres postgres:15.2
+
+```
+
+## Recording the testcases with Keploy [](https://keploy.io/docs/quickstart/pet-clinic/\#recording-the-testcases-with-keploy "Direct link to Recording the testcases with Keploy")
+
+```codeBlockLines_e6Vv
+keploy record -c "java -jar target/spring-petclinic-rest-3.0.2.jar"
+
+```
+
+
+
+Now you can start interacting with the UI and Keploy will automatically create the testcases and mocks for it in a folder named 'keploy'.
+
+## Running the testcases using Keploy [](https://keploy.io/docs/quickstart/pet-clinic/\#running-the-testcases-using-keploy "Direct link to Running the testcases using Keploy")
+
+```codeBlockLines_e6Vv
+keploy test -c "java -jar target/spring-petclinic-rest-3.0.2.jar" --delay 20
+
+```
+
+🎉 Hooray! You've made it to the end of the binary section! 🎉
+
+Next we move on to the instructions to start the application using docker.
+
+# Instructions For Starting Using Docker [](https://keploy.io/docs/quickstart/pet-clinic/\#instructions-for-starting-using-docker "Direct link to Instructions For Starting Using Docker")
+
+Prerequisites For Docker:
+
+1. Docker Desktop 4.25.2 and above
+
+Here we just need to change the command used to start the application.
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name javaApp --build-delay 100
+
+```
+
+
+
+## Running the testcases using Keploy [](https://keploy.io/docs/quickstart/pet-clinic/\#running-the-testcases-using-keploy-1 "Direct link to Running the testcases using Keploy")
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name javaApp --build-delay 50 --delay 20
+
+```
+
+Your CLI should look something like this
+
+
+
+This is a summary of the test cases recorded
+
+
+
+Here `delay` is the time it takes for your application to get started, after which Keploy will start running the testcases. If your application takes longer than 10s to get started, you can change the `delay` accordingly.
+`buildDelay` is the time that it takes for the image to get built. This is useful when you are building the docker image from your docker compose file itself.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/pet-clinic/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/pet-clinic/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/pet-clinic/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/pet-clinic/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/pet-clinic/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/pet-clinic/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/pet-clinic/#setting-up-the-docker-desktop-for-wsl-2)
+- [Setup the frontend](https://keploy.io/docs/quickstart/pet-clinic/#setup-the-frontend)
+- [Start the frontend](https://keploy.io/docs/quickstart/pet-clinic/#start-the-frontend)
+- [Setup the backend](https://keploy.io/docs/quickstart/pet-clinic/#setup-the-backend)
+- [Spin up the database](https://keploy.io/docs/quickstart/pet-clinic/#spin-up-the-database)
+- [Recording the testcases with Keploy](https://keploy.io/docs/quickstart/pet-clinic/#recording-the-testcases-with-keploy)
+- [Running the testcases using Keploy](https://keploy.io/docs/quickstart/pet-clinic/#running-the-testcases-using-keploy)
+- [Running the testcases using Keploy](https://keploy.io/docs/quickstart/pet-clinic/#running-the-testcases-using-keploy-1)
+- [Contact Us](https://keploy.io/docs/quickstart/pet-clinic/#contact-us)
+
+## Keploy Node.js Sample
+[Skip to main content](https://keploy.io/docs/quickstart/samples-nodejs/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-nodejs/\#introduction "Direct link to Introduction")
+
+A simple sample CRUD application and see how seamlessly Keploy integrates with Express and MongoDB. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-nodejs/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-nodejs/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-nodejs/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-nodejs/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-nodejs/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-nodejs/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-nodejs/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-nodejs/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-nodejs/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-nodejs/\#get-started- "Direct link to Get Started! 🎬")
+
+Clone the repository and move to express-mongoose folder
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/express-mongoose
+
+# Install the dependencies
+npm install
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-nodejs/\#installation- "Direct link to Installation 📥")
+
+Depending on your OS, choose your adventure:
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as MongoDb on Docker container](https://keploy.io/docs/quickstart/samples-nodejs/#using-docker-compose-)
+- [Using Docker container for mongoDb and running application locally](https://keploy.io/docs/quickstart/samples-nodejs/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-nodejs/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as MongoDb on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-nodejs/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Fire up the application and mongoDB instance with Keploy. Keep an eye on the two key flags:
+`-c`: Command to run the app (e.g., `docker compose up`).
+
+`--container-name`: The container name in the `docker-compose.yml` for traffic interception.
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "nodeMongoApp" --build-delay 50
+
+```
+
+🔥 Challenge time! Generate some test cases. How? Just **make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+#### Let's generate the testcases. [](https://keploy.io/docs/quickstart/samples-nodejs/\#lets-generate-the-testcases "Direct link to Let's generate the testcases.")
+
+Make API Calls using [Postman](https://postman.com/) or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+```codeBlockLines_e6Vv
+curl --request POST \
+--url http://localhost:8000/students \
+ --header 'content-type: application/json' \
+ --data '{
+ "name":"John Do",
+ "email":"john@xyiz.com",
+ "phone":"0123456799"
+ }'
+
+```
+
+Here's a peek of what you get:
+
+```codeBlockLines_e6Vv
+Student registration successful!
+
+```
+
+🎉 Woohoo! With a simple API call, you've crafted a test case with a mock! Dive into the Keploy directory and feast your eyes on the newly minted `test-1.yml` and `mocks.yml`
+
+_Time to perform more API magic!_
+Follow the breadcrumbs... or Make more API Calls
+
+```codeBlockLines_e6Vv
+curl --request GET \
+--url http://localhost:8080/students
+
+```
+
+Or simply wander over to your browser and visit `http://localhost:8000/students`.
+
+Did you spot the new test and mock scrolls in your project library? Awesome! 👏
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-nodejs/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "nodeMongoApp" --build-delay 50 --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Your results should be looking all _snazzy_, like this:
+
+
+
+Worry not, just add the ever-changing fields (like our **ts** here) to the **noise parameter** to **dodge those assertions**.
+
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-nodejs/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-nodejs/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (mongoDB) chill on Docker. Ready? Let's get the party started!🎉
+
+If you are using WSL on windows then use below to start wsl in the user's home directory:
+
+```codeBlockLines_e6Vv
+wsl ~
+
+```
+
+First things first, update the MongoDB URL on line 4, in **`db/connection.js`**, from `mongodb://mongoDb:27017/keploy` to `mongodb://127.0.0.1:27017/keploy`.
+
+#### 🍃 Kickstart MongoDB [](https://keploy.io/docs/quickstart/samples-nodejs/\#-kickstart-mongodb "Direct link to 🍃 Kickstart MongoDB")
+
+We are going to run a mongo docker container which requires an existing docker network. We need to run the following command to create the required docker network:
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+Now, let's breathe life into your mongo container. A simple spell should do the trick:
+
+```codeBlockLines_e6Vv
+docker compose up mongo
+
+```
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-nodejs/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy record -c 'node src/app.js'
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+#### Let's generate the testcases. [](https://keploy.io/docs/quickstart/samples-nodejs/\#lets-generate-the-testcases-1 "Direct link to Let's generate the testcases.")
+
+Make API Calls using [Postman](https://postman.com/) or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+```codeBlockLines_e6Vv
+curl --request POST \
+--url http://localhost:8000/students \
+--header 'content-type: application/json' \
+--data '{
+ "name":"John Do",
+ "email":"john@xyiz.com",
+ "phone":"0123456799"
+ }'
+
+```
+
+Here's a peek of what you get:
+
+```codeBlockLines_e6Vv
+Student registration successful!
+
+```
+
+🎉 Woohoo! Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+
+
+Now, the real fun begins. Let's weave more spells!
+
+🚀 Follow the URL road...!
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8080/students
+
+```
+
+Or simply wander over to your browser and visit `http://localhost:8000/students`.
+
+Did you spot the new test and mock scrolls in your project library? Awesome! 👏
+
+### Run Tests 🏁 [](https://keploy.io/docs/quickstart/samples-nodejs/\#run-tests- "Direct link to Run Tests 🏁")
+
+Ready to put your spells to the test?
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c "node src/app.js" --delay 10
+
+```
+
+Worry not, just add the ever-changing fields (like our **ts** here) to the **noise parameter** to **dodge those assertions**.
+
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-nodejs/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-nodejs/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-nodejs/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-nodejs/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-nodejs/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-nodejs/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-nodejs/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-nodejs/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-nodejs/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-nodejs/#get-started-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-nodejs/#installation-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-nodejs/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-nodejs/#lights-camera-record-)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-nodejs/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-nodejs/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-nodejs/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-nodejs/#-roll-the-tape---recording-time)
+ - [Run Tests 🏁](https://keploy.io/docs/quickstart/samples-nodejs/#run-tests-)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-nodejs/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-nodejs/#contact-us)
+
+## Keploy URL Shortener
+[Skip to main content](https://keploy.io/docs/quickstart/samples-gin/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-gin/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of URL shorteners and see how seamlessly Keploy integrates with Gin and MongoDB Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-gin/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-gin/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-gin/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-gin/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-gin/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-gin/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-gin/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-gin/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-gin/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Clone the sample URL shortener app 🧪 [](https://keploy.io/docs/quickstart/samples-gin/\#clone-the-sample-url-shortener-app- "Direct link to Clone the sample URL shortener app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/gin-mongo
+go mod download
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-gin/\#installation- "Direct link to Installation 📥")
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as MongoDb on Docker container](https://keploy.io/docs/quickstart/samples-gin/#using-docker-compose-)
+- [Using Docker container for mongoDb and running application locally](https://keploy.io/docs/quickstart/samples-gin/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-gin/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as MongoDb on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-gin/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Fire up the application and mongoDB instance with Keploy. Keep an eye on the two key flags:
+`-c`: Command to run the app (e.g., `docker compose up`).
+
+`--container-name`: The container name in the `docker-compose.yml` for traffic interception.
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "ginMongoApp"
+
+```
+
+Getting logs like this? Perfect! 👌
+
+
+
+🔥 Challenge time! Generate some test cases. How? Just **make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+#### Generate shortened url [](https://keploy.io/docs/quickstart/samples-gin/\#generate-shortened-url "Direct link to Generate shortened url")
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8080/url \
+ --header 'content-type: application/json' \
+ --data '{
+ "url": "https://google.com"
+}'
+
+```
+
+Here's a peek of what you get:
+
+```codeBlockLines_e6Vv
+{
+ "ts": 1645540022,
+ "url": "http://localhost:8080/Lhr4BWAi"
+}
+
+```
+
+🎉 Woohoo! With a simple API call, you've crafted a test case with a mock! Dive into the Keploy directory and feast your eyes on the newly minted `test-1.yml` and `mocks.yml`
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8080/url
+ header:
+ Accept: "*/*"
+ Content-Length: "33"
+ Content-Type: application/json
+ Host: localhost:8080
+ User-Agent: curl/7.77.0
+ body: |-
+ {
+ "url": "https://google.com"
+ }
+ body_type: ""
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "65"
+ Content-Type: application/json; charset=utf-8
+ Date: Sun, 01 Oct 2023 15:15:47 GMT
+ body: '{"ts":1696173347979970488,"url":"http://localhost:8080/Lhr4BWAi"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1696173352
+
+```
+
+this is how the generated **mock.yml** will look like:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Mongo
+name: mocks
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"update":"url-shortener","ordered":true,"writeConcern":{"w":"majority"},"lsid":{"id":{"$binary":{"base64":"eRaUQwDxR2qw3Jcbpn0Gfw==","subType":"04"}}},"$db":"keploy"} }, { SectionSingle identifier: updates , msgs: [ {"q":{"_id":"Lhr4BWAi"},"u":{"$set":{"_id":"Lhr4BWAi","created":{"$date":{"$numberLong":"1696173347975"}},"updated":{"$date":{"$numberLong":"1696173347975"}},"url":"https://google.com"}},"upsert":true} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 301
+ requestId: 11
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"update":"url-shortener","ordered":true,"writeConcern":{"w":"majority"},"lsid":{"id":{"$binary":{"base64":"eRaUQwDxR2qw3Jcbpn0Gfw==","subType":"04"}}},"$db":"keploy"} }'
+ - '{ SectionSingle identifier: updates , msgs: [ {"q":{"_id":"Lhr4BWAi"},"u":{"$set":{"_id":"Lhr4BWAi","created":{"$date":{"$numberLong":"1696173347975"}},"updated":{"$date":{"$numberLong":"1696173347975"}},"url":"https://google.com"}},"upsert":true} ] }'
+ checksum: 0
+ read_delay: 41060962050
+ responses:
+ - header:
+ length: 60
+ requestId: 14
+ responseTo: 11
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"nModified":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 2506709
+ created: 1696173347
+
+```
+
+_Time to perform more API magic!_
+Follow the breadcrumbs... or the shortened URLs:
+
+#### Redirect to original url from shortened url [](https://keploy.io/docs/quickstart/samples-gin/\#redirect-to-original-url-from-shortened-url "Direct link to Redirect to original url from shortened url")
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8080/Lhr4BWAi
+
+```
+
+Or just type `http://localhost:8080/Lhr4BWAi` in your browser. Your choice!
+
+Spotted the new test and mock files in your project? High five! 🙌
+
+
+
+Want to see if everything works as expected?
+
+### Run Tests 🏃♀️ [](https://keploy.io/docs/quickstart/samples-gin/\#run-tests-%EF%B8%8F "Direct link to Run Tests 🏃♀️")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "ginMongoApp" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Your results should be looking all _snazzy_, like this:
+
+
+
+Did you spot that the ts (timestamp) is showing some differences? Yep, time has a way of doing that! 🕰️
+
+Worry not, just add the ever-changing fields (like our **ts** here) to the **noise parameter** to **dodge those assertions**.
+
+> Pro tip: Add `body.ts` to noise in `test-x.yaml`.
+
+
+
+Run that keploy record command once more and watch as everything falls into place with all tests passing!🌟
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-gin/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+* * *
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-gin/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (mongoDB) chill on Docker. Ready? Let's get the party started!🎉
+
+If you are using WSL on Windows then use below to start wsl in the user's home directory:
+
+```codeBlockLines_e6Vv
+wsl ~
+
+```
+
+First things first, update the MongoDB URL to `localhost:27017` on **line 21** of our trusty `main.go` file.
+
+
+
+### 🍃 Kickstart MongoDB [](https://keploy.io/docs/quickstart/samples-gin/\#-kickstart-mongodb "Direct link to 🍃 Kickstart MongoDB")
+
+Let's breathe life into your mongo container. A simple spell should do the trick:
+
+```codeBlockLines_e6Vv
+docker compose up mongo
+
+```
+
+### 📼 Recording Time! [](https://keploy.io/docs/quickstart/samples-gin/\#-recording-time "Direct link to 📼 Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+keploy record -c "go run main.go handler.go"
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app. Whether you're using `go run main.go handler.go` or the binary path like `./test-app-url-shortener`, it's your call.
+If you're seeing logs that resemble the ones below, you're on the right track:
+
+
+
+Alright! With the app alive and kicking, let's weave some test cases. Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+#### Generate shortened url [](https://keploy.io/docs/quickstart/samples-gin/\#generate-shortened-url-1 "Direct link to Generate shortened url")
+
+✨ A pinch of URL magic:
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8080/url \
+ --header 'content-type: application/json' \
+ --data '{
+ "url": "https://google.com"
+}'
+
+```
+
+And... voila! A shortened URL appears:
+
+```codeBlockLines_e6Vv
+{
+ "ts": 1645540022,
+ "url": "http://localhost:8080/Lhr4BWAi"
+}
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8080/url
+ header:
+ Accept: "*/*"
+ Content-Length: "33"
+ Content-Type: application/json
+ Host: localhost:8080
+ User-Agent: curl/7.77.0
+ body: |-
+ {
+ "url": "https://google.com"
+ }
+ body_type: ""
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "65"
+ Content-Type: application/json; charset=utf-8
+ Date: Sun, 01 Oct 2023 15:15:47 GMT
+ body: '{"ts":1696173347979970488,"url":"http://localhost:8080/Lhr4BWAi"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1696173352
+
+```
+
+this is how the generated **mock.yml** will look like:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Mongo
+name: mocks
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"update":"url-shortener","ordered":true,"writeConcern":{"w":"majority"},"lsid":{"id":{"$binary":{"base64":"eRaUQwDxR2qw3Jcbpn0Gfw==","subType":"04"}}},"$db":"keploy"} }, { SectionSingle identifier: updates , msgs: [ {"q":{"_id":"Lhr4BWAi"},"u":{"$set":{"_id":"Lhr4BWAi","created":{"$date":{"$numberLong":"1696173347975"}},"updated":{"$date":{"$numberLong":"1696173347975"}},"url":"https://google.com"}},"upsert":true} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 301
+ requestId: 11
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"update":"url-shortener","ordered":true,"writeConcern":{"w":"majority"},"lsid":{"id":{"$binary":{"base64":"eRaUQwDxR2qw3Jcbpn0Gfw==","subType":"04"}}},"$db":"keploy"} }'
+ - '{ SectionSingle identifier: updates , msgs: [ {"q":{"_id":"Lhr4BWAi"},"u":{"$set":{"_id":"Lhr4BWAi","created":{"$date":{"$numberLong":"1696173347975"}},"updated":{"$date":{"$numberLong":"1696173347975"}},"url":"https://google.com"}},"upsert":true} ] }'
+ checksum: 0
+ read_delay: 41060962050
+ responses:
+ - header:
+ length: 60
+ requestId: 14
+ responseTo: 11
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"nModified":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 2506709
+ created: 1696173347
+
+```
+
+_Time to perform more API magic!_
+Follow the breadcrumbs... or the shortened URLs:
+
+#### Redirect to original url from shortened url [](https://keploy.io/docs/quickstart/samples-gin/\#redirect-to-original-url-from-shortened-url-1 "Direct link to Redirect to original url from shortened url")
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8080/Lhr4BWAi
+
+```
+
+Or just type `http://localhost:8080/Lhr4BWAi` in your browser. Your choice!
+
+Spotted the new test and mock files in your project? High five! 🙌
+
+
+
+Want to see if everything works as expected?
+
+### 🏃♀️ Run Tests [](https://keploy.io/docs/quickstart/samples-gin/\#%EF%B8%8F-run-tests "Direct link to 🏃♀️ Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "ginMongoApp" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Your results should be looking all _snazzy_, like this:
+
+
+
+Did you spot that the ts (timestamp) is showing some differences? Yep, time has a way of doing that! 🕰️
+
+Worry not, just add the ever-changing fields (like our **ts** here) to the **noise parameter** to **dodge those assertions**.
+
+> Pro tip: Add `body.ts` to noise in `test-x.yaml`.
+
+
+
+Run that `keploy test` command once more and watch as everything falls into place with all tests passing! 🌟
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+### 🎉 Wrapping it up [](https://keploy.io/docs/quickstart/samples-gin/\#-wrapping-it-up "Direct link to 🎉 Wrapping it up")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-gin/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-gin/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-gin/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-gin/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-gin/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-gin/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-gin/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-gin/#setting-up-the-docker-desktop-for-wsl-2)
+- [Clone the sample URL shortener app 🧪](https://keploy.io/docs/quickstart/samples-gin/#clone-the-sample-url-shortener-app-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-gin/#installation-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-gin/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-gin/#lights-camera-record-)
+ - [Run Tests 🏃♀️](https://keploy.io/docs/quickstart/samples-gin/#run-tests-%EF%B8%8F)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-gin/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-gin/#running-app-locally-on-linuxwsl-)
+ - [🍃 Kickstart MongoDB](https://keploy.io/docs/quickstart/samples-gin/#-kickstart-mongodb)
+ - [📼 Recording Time!](https://keploy.io/docs/quickstart/samples-gin/#-recording-time)
+ - [🏃♀️ Run Tests](https://keploy.io/docs/quickstart/samples-gin/#%EF%B8%8F-run-tests)
+ - [🎉 Wrapping it up](https://keploy.io/docs/quickstart/samples-gin/#-wrapping-it-up)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-gin/#contact-us)
+
+## Keploy Django Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-django/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+🪄 Dive into the world of User CRUD Apps and see how seamlessly Keploy integrated with Djangoand [PostgreSQL](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-django/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-django/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-django/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-django/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-django/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-django/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-django/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-django/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-django/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-django/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample user data CRUD app 🧪 [](https://keploy.io/docs/quickstart/samples-django/\#clone-a-sample-user-data-crud-app- "Direct link to Clone a sample user data CRUD app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/django-postgres/django_postgres
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-django/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-django/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-django/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-django/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-django/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+#### Start Postgres Instance [](https://keploy.io/docs/quickstart/samples-django/\#start-postgres-instance "Direct link to Start Postgres Instance")
+
+Start the Postgres instance using the `docker-compose` file-
+
+```codeBlockLines_e6Vv
+docker compose up -d postgres
+
+```
+
+Change the database configuration in `django_postgres/settings.py` file to:
+
+```codeBlockLines_e6Vv
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql',
+ 'NAME': 'usersdb',
+ 'USER': 'postgres',
+ 'PASSWORD': 'postgres',
+ 'HOST': 'mypostgres',
+ 'PORT': '5432',
+ }
+}
+
+```
+
+Build the app image:
+
+```codeBlockLines_e6Vv
+docker build -t django-app:1.0 .
+
+```
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker run -p 8000:8000 --name djangoApp --network keploy-network django-app:1.0"
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-django/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "Jane Smith",
+ "email": "jane.smith@example.com",
+ "password": "smith567",
+ "website": "www.janesmith.com"
+ }'
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/'
+
+```
+
+**3\. Make a PUT request**
+
+```codeBlockLines_e6Vv
+curl --location --request PUT 'http://127.0.0.1:8000/user/' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "Jane Smith",
+ "email": "smith.jane@example.com",
+ "password": "smith567",
+ "website": "www.smithjane.com"
+ }'
+
+```
+
+**4\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/'
+
+```
+
+**5\. Make a DELETE request**
+
+```codeBlockLines_e6Vv
+ curl --location --request DELETE 'http://127.0.0.1:8000/user/'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/user/
+ header:
+ Accept: "*/*"
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ body_type: ""
+ timestamp: 2023-11-05T12:49:22.444698436+05:30
+ resp:
+ status_code: 200
+ header:
+ Allow: POST, OPTIONS, GET
+ Content-Length: "31"
+ Content-Type: application/json
+ Cross-Origin-Opener-Policy: same-origin
+ Date: Sun, 05 Nov 2023 07:19:22 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.10.12
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '{"message": "No Users Found!!"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-05T12:49:24.85684599+05:30
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ - header.Allow
+ - header.Vary
+ created: 1699168764
+curl: |
+ curl --request GET \
+ --url http://127.0.0.1:8000/user/ \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Host: 127.0.0.1:8000' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Postgres
+ name: mocks
+ spec:
+ metadata: {}
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT "application_user"."id", "application_user"."name", "application_user"."email", "application_user"."password", "application_user"."website" FROM "application_user"
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt:
+ - 0
+ - 0
+ - 0
+ - 0
+ command_complete:
+ - command_tag:
+ - 83
+ - 69
+ - 76
+ - 69
+ - 67
+ - 84
+ - 32
+ - 48
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{name: [105, 100], table_oid: 24705, table_attribute_number: 1, data_type_oid: 2950, data_type_size: 16, type_modifier: -1, format: 0}, {name: [110, 97, 109, 101], table_oid: 24705, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {name: [101, 109, 97, 105, 108], table_oid: 24705, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: 258, format: 0}, {name: [112, 97, 115, 115, 119, 111, 114, 100], table_oid: 24705, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {name: [119, 101, 98, 115, 105, 116, 101], table_oid: 24705, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2023-11-05T12:49:22.471612071+05:30
+ restimestampmock: 2023-11-05T12:49:22.47169658+05:30
+
+```
+
+Want to see if everything works as expected?
+
+#### Run Tests [](https://keploy.io/docs/quickstart/samples-django/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker run -p 8000:8000 --rm --network keploy-network --name djangoApp django-app:1.0" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-django/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-django/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (PostgreSQL) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-django/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Using the docker-compose file we will start our Postgres instance:-
+
+```codeBlockLines_e6Vv
+docker compose up -d postgres
+
+```
+
+Now let's get the app up and running:
+
+```codeBlockLines_e6Vv
+#To setup the virtual environment, run:
+python3 -m virtualenv venv
+source venv/bin/activate
+
+#To install dependencies, run:
+pip3 install -r requirements.txt
+
+# To create the required tables in the database, run:
+python3 manage.py makemigrations
+python3 manage.py migrate
+
+```
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy record -c "python3 manage.py runserver"
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-django/\#generate-testcases-1 "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "Jane Smith",
+ "email": "jane.smith@example.com",
+ "password": "smith567",
+ "website": "www.janesmith.com"
+ }'
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/'
+
+```
+
+**3\. Make a PUT request**
+
+```codeBlockLines_e6Vv
+curl --location --request PUT 'http://127.0.0.1:8000/user/' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "Jane Smith",
+ "email": "smith.jane@example.com",
+ "password": "smith567",
+ "website": "www.smithjane.com"
+ }'
+
+```
+
+**4\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/user/'
+
+```
+
+**5\. Make a DELETE request**
+
+```codeBlockLines_e6Vv
+ curl --location --request DELETE 'http://127.0.0.1:8000/user/'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/user/
+ header:
+ Accept: "*/*"
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ body_type: ""
+ timestamp: 2023-11-05T12:49:22.444698436+05:30
+ resp:
+ status_code: 200
+ header:
+ Allow: POST, OPTIONS, GET
+ Content-Length: "31"
+ Content-Type: application/json
+ Cross-Origin-Opener-Policy: same-origin
+ Date: Sun, 05 Nov 2023 07:19:22 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.10.12
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '{"message": "No Users Found!!"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-05T12:49:24.85684599+05:30
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ - header.Allow
+ - header.Vary
+ created: 1699168764
+curl: |
+ curl --request GET \
+ --url http://127.0.0.1:8000/user/ \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Host: 127.0.0.1:8000' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Postgres
+ name: mocks
+ spec:
+ metadata: {}
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT "application_user"."id", "application_user"."name", "application_user"."email", "application_user"."password", "application_user"."website" FROM "application_user"
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt:
+ - 0
+ - 0
+ - 0
+ - 0
+ command_complete:
+ - command_tag:
+ - 83
+ - 69
+ - 76
+ - 69
+ - 67
+ - 84
+ - 32
+ - 48
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{name: [105, 100], table_oid: 24705, table_attribute_number: 1, data_type_oid: 2950, data_type_size: 16, type_modifier: -1, format: 0}, {name: [110, 97, 109, 101], table_oid: 24705, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {name: [101, 109, 97, 105, 108], table_oid: 24705, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: 258, format: 0}, {name: [112, 97, 115, 115, 119, 111, 114, 100], table_oid: 24705, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {name: [119, 101, 98, 115, 105, 116, 101], table_oid: 24705, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2023-11-05T12:49:22.471612071+05:30
+ restimestampmock: 2023-11-05T12:49:22.47169658+05:30
+
+```
+
+Want to see if everything works as expected?
+
+#### Run Tests [](https://keploy.io/docs/quickstart/samples-django/\#run-tests-1 "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy test -c "python3 manage.py runserver" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-django/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-django/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-django/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-django/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-django/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-django/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-django/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-django/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-django/#get-started-)
+- [Clone a sample user data CRUD app 🧪](https://keploy.io/docs/quickstart/samples-django/#clone-a-sample-user-data-crud-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-django/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-django/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-django/#lights-camera-record-)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-django/#generate-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-django/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-django/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-django/#-roll-the-tape---recording-time)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-django/#generate-testcases-1)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-django/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-django/#contact-us)
+
+## Keploy Quickstart Guide
+[Skip to main content](https://keploy.io/docs/quickstart/samples-csharp/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-csharp/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of User Authentication apps and see how seamlessly Keploy integrates with [.Net](https://dotnet.microsoft.com/en-us/) and [Postgres](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-csharp/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-csharp/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-csharp/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-csharp/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-csharp/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-csharp/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-csharp/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-csharp/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-csharp/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-csharp/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample user authentication app 🧪 [](https://keploy.io/docs/quickstart/samples-csharp/\#clone-a-sample-user-authentication-app- "Direct link to Clone a sample user authentication app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-csharp.git && cd samples-csharp
+
+# start the database instance
+docker-compose up
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-csharp/\#installation- "Direct link to Installation 📥")
+
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-csharp/#running-app-locally-on-linuxwsl-)
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-csharp/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Redis) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-csharp/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+We need to run the migration command before starting our application:
+
+```codeBlockLines_e6Vv
+dotnet ef migrations add InitialMigration
+dotnet ef database update
+
+```
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+keploy record -c "dotnet run"
+
+```
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+#### Generate testcases [](https://keploy.io/docs/quickstart/samples-csharp/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Create User**
+
+```codeBlockLines_e6Vv
+curl -k -X POST -H "Content-Type: application/json" -d '{"name":"Sarthak Shnygle","age":23}' http://localhost:5249/api/user
+
+```
+
+This will return the response:
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "name": "Sarthak Shnygle",
+ "age": 23
+}
+
+```
+
+**2\. Get the User**
+
+```codeBlockLines_e6Vv
+curl -k http://localhost:5249/api/user
+
+```
+
+This will return the OTP verification response:
+
+```codeBlockLines_e6Vv
+[\
+ {\
+ "id": 1,\
+ "name": "Sarthak Shnygle",\
+ "age": 23\
+ }\
+]
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5249/api/user
+ header:
+ Accept: "*/*"
+ Content-Length: "37"
+ Content-Type: application/json
+ Host: localhost:5249
+ User-Agent: curl/8.2.1
+ body: '{"age":"23","name":"Sarthak Shnygle"}'
+ body_type: ""
+ timestamp: 2023-12-15T10:31:57.291484259Z
+ host: ""
+ resp:
+ status_code: 201
+ header:
+ Content-Type: application/json; charset=utf-8
+ Date: Fri, 15 Dec 2023 10:31:57 GMT
+ Location: http://localhost:5249/api/User/3
+ Server: Kestrel
+ body: '{"id":3,"name":"Sarthak Shnygle","age":23}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-12-15T10:31:59.566772512Z
+ objects: []
+ assertions:
+ noise:
+ body.age: []
+ header.Date: []
+ created: 1702636319
+curl: |-
+ curl --request POST \
+ --url http://localhost:5249/api/user \
+ --header 'Host: localhost:5249' \
+ --header 'User-Agent: curl/8.2.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{"age":"23","name":"Sarthak Shnygle"}'
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-csharp/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "dotnet run" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-csharp/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-csharp/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-csharp/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-csharp/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-csharp/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-csharp/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-csharp/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-csharp/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-csharp/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-csharp/#get-started-)
+- [Clone a sample user authentication app 🧪](https://keploy.io/docs/quickstart/samples-csharp/#clone-a-sample-user-authentication-app-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-csharp/#installation-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-csharp/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-csharp/#-roll-the-tape---recording-time)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-csharp/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-csharp/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-csharp/#contact-us)
+
+## Keploy Rust Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-rust/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-rust/\#introduction "Direct link to Introduction")
+
+This is a sample app to test Keploy integration capabilities using rust and MongoDb. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-rust/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-rust/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-rust/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-rust/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-rust/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-rust/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-rust/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-rust/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-rust/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-rust/\#get-started- "Direct link to Get Started! 🎬")
+
+## Setup app [](https://keploy.io/docs/quickstart/samples-rust/\#setup-app "Direct link to Setup app")
+
+Now that we have bun installed, we will setup our application.
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-rust && cd samples-rust/gql-mongo
+
+```
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-rust/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We will be using Docker compose to run Mongo on Docker container.
+
+### Let's start the MongoDB Instance [](https://keploy.io/docs/quickstart/samples-rust/\#lets-start-the-mongodb-instance "Direct link to Let's start the MongoDB Instance")
+
+```codeBlockLines_e6Vv
+docker compose up -d
+
+```
+
+### Capture testcase [](https://keploy.io/docs/quickstart/samples-rust/\#capture-testcase "Direct link to Capture testcase")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy record -c 'cargo run'
+
+```
+
+#### Generate testcase [](https://keploy.io/docs/quickstart/samples-rust/\#generate-testcase "Direct link to Generate testcase")
+
+Go to the [http://127.0.0.1:8000](http://127.0.0.1:8000/) and create some queries.
+
+We will get the following output in our terminal
+
+
+
+### Run the testcases [](https://keploy.io/docs/quickstart/samples-rust/\#run-the-testcases "Direct link to Run the testcases")
+
+Now, let's run the keploy in test mode again:-
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c 'cargo run'
+
+```
+
+
+
+_Voila!! Our testcases has passed 🌟_
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-rust/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-rust/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-rust/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-rust/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-rust/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-rust/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-rust/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-rust/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-rust/#get-started-)
+- [Setup app](https://keploy.io/docs/quickstart/samples-rust/#setup-app)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-rust/#running-app-locally-on-linuxwsl-)
+ - [Let's start the MongoDB Instance](https://keploy.io/docs/quickstart/samples-rust/#lets-start-the-mongodb-instance)
+ - [Capture testcase](https://keploy.io/docs/quickstart/samples-rust/#capture-testcase)
+ - [Run the testcases](https://keploy.io/docs/quickstart/samples-rust/#run-the-testcases)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-rust/#contact-us)
+
+## Responsible Disclosure
+[Skip to main content](https://keploy.io/docs/security/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+## Responsible Disclosure
+
+If you have any concerns about security or would like to report a security issue, please reach out to our team at [hello@keploy.io](mailto:hello@keploy.io).
+
+We promise not to bring legal action against people who do the following:
+
+- Share with us the full details of any problem they've found.
+- Keep the issue private until we've had a reasonable time to address it.
+- Don't intentionally harm our service or exfiltrate data from it
+
+## Keploy Privacy Policy
+[Skip to main content](https://keploy.io/docs/privacy-policy/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Keploy Inc. Privacy Policy
+
+Last updated: April 28th, 2024
+
+Keploy Inc. operates [https://keploy.io](https://keploy.io/) and [https://docs.keploy.io](https://keploy.io/docs)(the "Sites"). Please read this Privacy Policy carefully to understand our policies and practices in relation to the collection, processing, and storage of your personal information. By accessing or using our Services (defined below), you understand that we will process your personal information as described in this Privacy Policy. If you do not agree with or are not comfortable with any aspect of this Privacy Policy, you should immediately discontinue access or use of our Services.
+
+We use your Personal Information only for providing and improving the Sites. By using the Sites, you agree to the collection and use of information in accordance with this policy.
+
+## Information Collection And Use
+
+As you navigate through and interact with our Website, we may use automatic data collection technologies to collect certain information about your equipment, browsing actions, and patterns, including: (a) details of your visits to our Website, including traffic data, location data, logs, and other communication data and the resources that you access and use our Services; and (b) information about your computer and internet connection, including your IP address, operating system, and browser type. The information we collect automatically helps us to improve our Services and to deliver a better and more personalized service, including by enabling us to: (i) estimate our audience size and usage patterns; (ii) store information about your preferences, allowing us to customize our Services according to your individual interests; (iii) speed up your searches; and (iv) recognize you when you return to our Services. For more information about the cookies and tracking technologies we may use please review the Cookie section below. ("Personal Information").
+
+## Log Data
+
+Like many site operators, we collect information that your browser sends whenever you visit our Sites ("Log Data"). This Log Data may include information such as your computer's Internet Protocol ("IP") address, browser type, browser version, the pages of our Sites that you visit, the time and date of your visit, the time spent on those pages and other statistics. In addition, we may use third party services such as Google Analytics that collect, monitor and analyze this data.
+
+## Communications
+
+Depending on the method of collection, we may use your Personal Information to contact you with newsletters, marketing or promotional materials and other information that we believe is relevant for you.
+
+## Cookies
+
+Cookies are files with a small amount of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and stored on your computer's hard drive.
+
+Like many sites, we use "cookies" to collect information. You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Sites.
+
+## Security
+
+The security of your Personal Information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security.
+
+We have implemented appropriate technical and organizational measures designed to secure your information, or any data you, your employees, or agents provide to us pursuant to your role as an employee of another business (“Business Data”), from accidental loss and from unauthorized access, use, alteration, and disclosure. For more information on our security practices please refer to: [keploy.io/docs/security.](https://keploy.io/docs/security)
+
+The safety and security of your information depends on you. Where we have given you (or where you have chosen) a password for access to certain parts of our Services you are responsible for keeping this password confidential. We ask you not to share your password with anyone.
+
+## Changes To This Privacy Policy
+
+This Privacy Policy is effective as of April 28th 2024 and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.
+
+We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy.
+
+If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website.
+
+## Contact Us
+
+If you have any questions about this Privacy Policy, please contact us- [hello@keploy.io](mailto:hello@keploy.io).
+
+## Keploy Contribution Guide
+[Skip to main content](https://keploy.io/docs/keploy-explained/contribution-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Welcome to the world of Keploy development! Here, we'll get you up and running smoothly, making your Keploy journey a breeze.
+
+### 1\. **Setting Up Your Platform**: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#1-setting-up-your-platform "Direct link to 1-setting-up-your-platform")
+
+Running Keploy on macOS or Windows? No problem! You'll need to create a Linux VM.
+
+- For macOS, install [Lima](https://github.com/lima-vm/lima#installation).
+- If you're on Windows, install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
+
+Note: Linux Users are good to go.
+
+### 2\. **Pre-requisites**: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#2-pre-requisites "Direct link to 2-pre-requisites")
+
+First things first, ensure you have [Golang](https://go.dev/doc/install) installed.
+
+### 3\. **Cloning Keploy Repository**: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#3-cloning-keploy-repository "Direct link to 3-cloning-keploy-repository")
+
+Time to get your hands on Keploy! Run these commands to clone the repository and download those Go dependencies:
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/keploy.git && cd keploy
+go mod download
+
+```
+
+### 4\. Running Keploy on v2: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#4-running-keploy-on-v2 "Direct link to 4. Running Keploy on v2:")
+
+The Keploy CLI operates by capturing all network traffic between your application and its dependencies.
+It meticulously records API calls, database queries, and any other interactions your application engages in.
+
+Once the recording phase is complete, Keploy can effortlessly generate test cases and data mocks in YAML format.
+
+#### Keploy operates in two modes: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#keploy-operates-in-two-modes "Direct link to Keploy operates in two modes:")
+
+- `record`: Capture Keploy test cases from API calls.
+- `test`: Execute recorded test cases and validate assertions.
+
+To dive into Keploy, you can use the [gin-mongo URL Shortener](https://github.com/keploy/samples-go/tree/main/gin-mongo) sample application:
+
+#### Let's clone sample app repo: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#lets-clone-sample-app-repo "Direct link to Let's clone sample app repo:")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/gin-mongo
+go mod download # Download dependencies:
+go build -o gin-mongo-binary # Generate binary of the application:
+
+```
+
+### Now let's try running keploy: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#now-lets-try-running-keploy "Direct link to Now let's try running keploy:")
+
+#### Capturing Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#capturing-test-cases "Direct link to Capturing Test Cases:")
+
+```codeBlockLines_e6Vv
+ go run -exec "sudo -E env 'PATH=$PATH'" -tags=viper_bind_struct main.go record -c "path/to/go/binary/of/application"
+
+```
+
+After entering record mode, send requests to your application to generate test cases.
+
+#### Running Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#running-test-cases "Direct link to Running Test Cases:")
+
+```codeBlockLines_e6Vv
+go run -exec "sudo -E env 'PATH=$PATH'" -tags=viper_bind_struct main.go test -c "path/to/go/binary/of/application" --delay 10
+
+```
+
+Run Keploy server to expose test APIs:
+
+```codeBlockLines_e6Vv
+go run -exec "sudo -E env 'PATH=$PATH'" -tags=viper_bind_struct main.go test -c "path/to/go/binary/of/application" --delay 10 --coverage
+
+```
+
+Generated test cases can be found inside the Keploy directory.
+
+### 5\. Setup Keploy using Binary: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#5-setup-keploy-using-binary "Direct link to 5. Setup Keploy using Binary:")
+
+#### Generate Keploy Binary: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#generate-keploy-binary "Direct link to Generate Keploy Binary:")
+
+```codeBlockLines_e6Vv
+go build -race -tags=viper_bind_struct -o keploy . && sudo mv keploy /usr/local/bin
+
+```
+
+#### Capturing Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#capturing-test-cases-1 "Direct link to Capturing Test Cases:")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH="$PATH" keploy record -c "path/to/go/binary"
+
+```
+
+#### Running Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#running-test-cases-1 "Direct link to Running Test Cases:")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH="$PATH" keploy test -c "path/to/go/binary" --delay 10
+
+```
+
+Note: Use the `--debug` flag to run Keploy in debug mode for detailed logs.
+
+### 6\. Setup Keploy via Docker: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#6-setup-keploy-via-docker "Direct link to 6. Setup Keploy via Docker:")
+
+#### Install the Keploy Docker Image: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#install-the-keploy-docker-image "Direct link to Install the Keploy Docker Image:")
+
+```codeBlockLines_e6Vv
+docker pull ghcr.io/keploy/keploy
+
+```
+
+#### Create Keploy Alias: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#create-keploy-alias "Direct link to Create Keploy Alias:")
+
+```codeBlockLines_e6Vv
+alias keployV2='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -it -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy'
+
+```
+
+#### Capture Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#capture-test-cases "Direct link to Capture Test Cases:")
+
+```codeBlockLines_e6Vv
+keployV2 record -c "docker run -p 8080:8080 --name --network keploy-network --rm "" --containerName
+
+```
+
+#### Running Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#running-test-cases-2 "Direct link to Running Test Cases:")
+
+```codeBlockLines_e6Vv
+keployV2 test --c "docker run -p 8080:8080 --name --network keploy-network --rm " --delay 10
+
+```
+
+### 7\. Testing Locally Built Docker Image: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#7-testing-locally-built-docker-image "Direct link to 7. Testing Locally Built Docker Image:")
+
+#### Build Docker Image: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#build-docker-image "Direct link to Build Docker Image:")
+
+Run the below command inside the keploy respository and make sure there is no directory by the name of keploy inside the main keploy repository.
+
+```codeBlockLines_e6Vv
+sudo docker image build -t ghcr.io/keploy/keploy:v2-dev .
+
+```
+
+#### Create Alias: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#create-alias "Direct link to Create Alias:")
+
+```codeBlockLines_e6Vv
+alias keployV2='sudo docker run --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock -v '"$HOME"'/.keploy-config:/root/.keploy-config -v '"$HOME"'/.keploy:/root/.keploy --rm ghcr.io/keploy/keploy:v2-dev'
+
+```
+
+#### Remember setting up the Keploy binary. See [Setup Keploy using Binary](https://keploy.io/docs/keploy-explained/contribution-guide/\#5-setup-keploy-using-binary) for details. [](https://keploy.io/docs/keploy-explained/contribution-guide/\#remember-setting-up-the-keploy-binary-see-setup-keploy-using-binary-for-details "Direct link to remember-setting-up-the-keploy-binary-see-setup-keploy-using-binary-for-details")
+
+#### Capture Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#capture-test-cases-1 "Direct link to Capture Test Cases:")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH="$PATH" keployV2 record -c "docker run -p 8080:8080 --name --network keploy-network --rm "" --containerName
+
+```
+
+#### Running Test Cases: [](https://keploy.io/docs/keploy-explained/contribution-guide/\#running-test-cases-3 "Direct link to Running Test Cases:")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH="$PATH" keployV2 test --c "docker run -p 8080:8080 --name --network keploy-network --rm " --delay 10
+
+```
+
+There you have it! With this guide, you're all set to dive into Keploy development. Happy testing! 🧪🔍💻
+
+> **Note** :\- Run `go run github.com/99designs/gqlgen generate --config pkg/graph/gqlgen.yml` to generate the graphql server stubs which can be used when working with unit testing libraries like JUnit, PyTest, etc..
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/contribution-guide/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [1\. **Setting Up Your Platform**:](https://keploy.io/docs/keploy-explained/contribution-guide/#1-setting-up-your-platform)
+- [2\. **Pre-requisites**:](https://keploy.io/docs/keploy-explained/contribution-guide/#2-pre-requisites)
+- [3\. **Cloning Keploy Repository**:](https://keploy.io/docs/keploy-explained/contribution-guide/#3-cloning-keploy-repository)
+- [4\. Running Keploy on v2:](https://keploy.io/docs/keploy-explained/contribution-guide/#4-running-keploy-on-v2)
+- [Now let's try running keploy:](https://keploy.io/docs/keploy-explained/contribution-guide/#now-lets-try-running-keploy)
+- [5\. Setup Keploy using Binary:](https://keploy.io/docs/keploy-explained/contribution-guide/#5-setup-keploy-using-binary)
+- [6\. Setup Keploy via Docker:](https://keploy.io/docs/keploy-explained/contribution-guide/#6-setup-keploy-via-docker)
+- [7\. Testing Locally Built Docker Image:](https://keploy.io/docs/keploy-explained/contribution-guide/#7-testing-locally-built-docker-image)
+- [Contact Us](https://keploy.io/docs/keploy-explained/contribution-guide/#contact-us)
+
+## Automated API Testing
+[Skip to main content](https://keploy.io/docs/keploy-explained/introduction/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy creates backend **API tests with built-in-mocks** or stubs **by recording your application network calls** making
+your testing process not only faster than unit tests but also incredibly efficient.
+
+
+
+Keploy acts a proxy in your application that captures and replays all network interaction served to application from any
+source.
+
+### Step 1 : Record Unique Network Interactions as Test Case [](https://keploy.io/docs/keploy-explained/introduction/\#step-1--record-unique-network-interactions-as-test-case "Direct link to Step 1 : Record Unique Network Interactions as Test Case")
+
+Once you start the application in record mode to capture API calls as test cases.
+
+Now, when the application serves an API, all the unique network interactions are stored within Keploy server as a
+test-case.
+
+
+
+### Step 2 : Replay Test-Cases [](https://keploy.io/docs/keploy-explained/introduction/\#step-2--replay-test-cases "Direct link to Step 2 : Replay Test-Cases")
+
+Let's say you developed new application version(v2). To test locally, start the Keploy in test mode to replay all
+recorded API calls/test-cases previously captured in record-mode.
+
+Now, when the application starts:
+
+- Keploy will download all the previously recorded test-cases/API calls with a 5 sec delay(configurable application
+build time).
+- When the application will try to talk to any dependencies like DBs, Routers, vendor services, Keploy will intercept
+and provide the previously recorded dependency response.
+
+> **Note:** _You didn't need to setup test-environment here. 🙅🏻♀️_
+
+- Keploy will compare the API response to the previously captured response and a report will be generated on the Keploy
+console.
+
+You can test with Keploy locally or can integrate Keploy with popular testing-frameworks and existing CI pipelines.
+
+> **Note:** You can generate test cases from any environment which has all the infrastructure dependencies setup. Please consider using this to generate tests from low-traffic environments first. The deduplication feature necessary for high-traffic environments is currently experimental.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/introduction/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+## Key Features [](https://keploy.io/docs/keploy-explained/introduction/\#key-features "Direct link to Key Features")
+
+Keploy is built for a wide variety of use-cases, however, to kick things off, let's dive into some key features that
+make Keploy stand out from the rest of the testing platforms out there.
+
+## 🧩 Combined Test Coverage in CI/CD: [](https://keploy.io/docs/keploy-explained/introduction/\#-combined-test-coverage-in-cicd "Direct link to 🧩 Combined Test Coverage in CI/CD:")
+
+#### Run Tests with Mocks Anywhere You Like [](https://keploy.io/docs/keploy-explained/introduction/\#run-tests-with-mocks-anywhere-you-like "Direct link to Run Tests with Mocks Anywhere You Like")
+
+Keploy has [native integrations](https://keploy.io/docs/concepts/general-glossary/#4-interoperability) with your unit-testing libraries
+like `go-test`, `jUnit`, `jest`, `pyTest`. Keploy gives combined test-coverage and can also be integrated in existing CI
+pipelines easily within `go-test`, `jUnit`, `jest`, `pyTest` workflows.
+
+
+
+Run tests with mocks anywhere you like— **locally on the CLI**, in your **CI pipeline**, or even across a **Kubernetes**
+**cluster**. It's testing wherever you want it! 🌍
+
+## 📽️ Works for Complex API Flows [](https://keploy.io/docs/keploy-explained/introduction/\#%EF%B8%8F-works-for-complex-api-flows "Direct link to 📽️ Works for Complex API Flows")
+
+#### Can easily record complex API flows and replay them as tests and stubs. [](https://keploy.io/docs/keploy-explained/introduction/\#can-easily-record-complex-api-flows-and-replay-them-as-tests-and-stubs "Direct link to Can easily record complex API flows and replay them as tests and stubs.")
+
+With Keploy, you can effortlessly record and replay intricate, distributed API flows as mocks and stubs. It's like
+having a time machine for your tests! ⏳
+
+Keploy will record all API calls and their subsequent network traffic served by the application. You can utilize your
+favorite API management tools like [Postman](https://www.postman.com/) or
+even [Curl](https://curl.se/) to generate test cases.
+
+Keploy automatically [mocks](https://keploy.io/docs/concepts/general-glossary/#1-api-data-mocking) network/external dependencies for **all**
+**CRUD operations** with correct responses.
+
+
+
+Once recorded, you have the flexibility to replay and simulate the same flow with mutations/write calls locally or
+within your CI environment without needing to connect to external services/dependencies.
+
+No more data dumps, stubs, or mocks for dependencies like DBs, internal services, or third-party services like twilio,
+shopify, or stripe are required anymore. 💡
+
+
+
+[Idempotency](https://keploy.io/docs/concepts/general-glossary/#2-idempotency) guarantees are also **not required** in the application.
+Multiple Reads after write operations can be replicated automatically too. 🔄
+
+## ♻️ Multi-Purpose Mocks [](https://keploy.io/docs/keploy-explained/introduction/\#%EF%B8%8F-multi-purpose-mocks "Direct link to ♻️ Multi-Purpose Mocks")
+
+#### Re-Use Mocks for Testing Servers [](https://keploy.io/docs/keploy-explained/introduction/\#re-use-mocks-for-testing-servers "Direct link to Re-Use Mocks for Testing Servers")
+
+Keploy generated dependency mocks can also be used as test case for the server. These tests can be used for use-cases
+like chaos testing, e2e testing, integration testing, api and regression testing. 🌟
+
+## 🌐 Code-less EBPF Instrumentation [](https://keploy.io/docs/keploy-explained/introduction/\#-code-less-ebpf-instrumentation "Direct link to 🌐 Code-less EBPF Instrumentation")
+
+#### Network Layer Integration makes it Light-Weight [](https://keploy.io/docs/keploy-explained/introduction/\#network-layer-integration-makes-it-light-weight "Direct link to Network Layer Integration makes it Light-Weight")
+
+Keploy uses EBPF like a secret sauce to make integration code-less, language agnostic, and oh-so-lightweight. 🍲
+
+## 🔍 Accurate Noise Detection [](https://keploy.io/docs/keploy-explained/introduction/\#-accurate-noise-detection "Direct link to 🔍 Accurate Noise Detection")
+
+#### Eliminates random fields for Assertion [](https://keploy.io/docs/keploy-explained/introduction/\#eliminates-random-fields-for-assertion "Direct link to Eliminates random fields for Assertion")
+
+Keploy identifies [noisy fields](https://keploy.io/docs/concepts/general-glossary/#3-noisy-field) in the responses accurately like (
+timestamps, random values) to ensure high quality tests.
+
+As the application serves the API, Keploy re-run that API request with the captured dependency mocks.
+
+Keploy identifies differences in API responses, marking them as random/noisy fields. 🧐✅
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/introduction/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Step 1 : Record Unique Network Interactions as Test Case](https://keploy.io/docs/keploy-explained/introduction/#step-1--record-unique-network-interactions-as-test-case)
+- [Step 2 : Replay Test-Cases](https://keploy.io/docs/keploy-explained/introduction/#step-2--replay-test-cases)
+- [Contact Us](https://keploy.io/docs/keploy-explained/introduction/#contact-us)
+- [Key Features](https://keploy.io/docs/keploy-explained/introduction/#key-features)
+- [🧩 Combined Test Coverage in CI/CD:](https://keploy.io/docs/keploy-explained/introduction/#-combined-test-coverage-in-cicd)
+- [📽️ Works for Complex API Flows](https://keploy.io/docs/keploy-explained/introduction/#%EF%B8%8F-works-for-complex-api-flows)
+- [♻️ Multi-Purpose Mocks](https://keploy.io/docs/keploy-explained/introduction/#%EF%B8%8F-multi-purpose-mocks)
+- [🌐 Code-less EBPF Instrumentation](https://keploy.io/docs/keploy-explained/introduction/#-code-less-ebpf-instrumentation)
+- [🔍 Accurate Noise Detection](https://keploy.io/docs/keploy-explained/introduction/#-accurate-noise-detection)
+- [Contact Us](https://keploy.io/docs/keploy-explained/introduction/#contact-us)
+
+## Keploy Testing Toolkit
+[Skip to main content](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/keploy-explained/introduction/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+Keploy is functional testing toolkit for developers.
+It **generates E2E tests for APIs (KTests)** along with **mocks or stubs(KMocks)** by
+recording real API calls.
+
+KTests can be imported as mocks for consumers and vice-versa.
+
+
+
+Merge KTests with unit testing libraries(like Go-Test, JUnit..) to **track combined test-coverage**.
+
+KMocks can also be referenced in existing tests or use anywhere (including any testing framework).
+KMocks can also be used as tests for the server.
+
+## Keploy Features [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#keploy-features "Direct link to Keploy Features")
+
+### 1\. Convert API calls from anywhere to Test-Case [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#1-convert-api-calls-from-anywhere-to-test-case "Direct link to 1. Convert API calls from anywhere to Test-Case")
+
+Keploy captures all the API calls and subsequent network traffic served by the application. You can use any existing API management tools like [Postman](https://www.postman.com/), [Curl](https://curl.se/) to generate test-case.
+
+
+
+### 2\. Automatically mock Mutations [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#2-automatically-mock-mutations "Direct link to 2. Automatically mock Mutations")
+
+Keploy automatically [mocks](https://keploy.io/docs/1.0.0/concepts/general-glossary/#1-api-data-mocking) network/external dependencies for **all CRUD operations** with correct responses.
+
+Data dumps, stubs or mocks for dependencies like DBs, internal services, or third party services like twilio, shopify or stripe are **not required**.
+
+
+
+Please check list of currently supported dependencies in [Go, Java and Node](https://keploy.io/#integrations).
+
+Keploy can safely replay writes or mutations by capturing from local or other environments and replaying without API chaining.
+
+
+
+[Idempotency](https://keploy.io/docs/1.0.0/concepts/general-glossary/#2-idempotency) guarantees are also **not required** in the application. Multiple Reads after write operations can be replicated automatically too.
+
+### 3\. Accurate Noise Detection [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#3-accurate-noise-detection "Direct link to 3. Accurate Noise Detection")
+
+Keploy identifies [noisy fields](https://keploy.io/docs/1.0.0/concepts/general-glossary/#3-noisy-field) in the responses accurately like (timestamps, random values) to ensure high quality tests.
+
+As the application serves the API, Keploy re-run that API request with the captured dependency mocks.
+
+Keploy then compares if the responses of the API requests disagree with each other.
+If any of the fields of the API responses are different they are marked as random/non-deterministic fields.
+
+### 4\. Native interoperability [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#4-native-interoperability "Direct link to 4. Native interoperability")
+
+Keploy has [native integrations](https://keploy.io/docs/1.0.0/concepts/general-glossary/#4-interoperability) with popular testing libraries like `go-test`, `jUnit`, `jest`.
+Code coverage will be reported with existing and Keploy recorded test cases and can also be integrated in
+existing CI pipelines easily.
+
+
+
+### 5\. Easy Integration Framework for new Libraries [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#5-easy-integration-framework-for-new-libraries "Direct link to 5. Easy Integration Framework for new Libraries")
+
+Keploy has Instrumentation/Integration framework to easily add the new libraries/drivers within ~100 lines of code.
+Please check-out the [contribution guide](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/).
+
+## Keploy SDK [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#keploy-sdk "Direct link to Keploy SDK")
+
+A Keploy SDK is a language-specific library that offers APIs to do the following:
+
+1. Capture all the network calls like
+ - API Request
+ - Dependency calls
+ - API Response
+2. Replay the API request with captured dependency mocks to identify noisy fields.
+
+3. Replay all the test-cases captured and mock the dependencies for the application
+
+
+Comparing the expected and actual responses for an API call happens at the [Keploy Server](https://keploy.io/docs/1.0.0/go/installation/).
+
+A Keploy SDK mocks the external dependencies while testing APIs, eliminating the need to setup test-environment.
+This allows the application to isolate itself from external dependencies.
+
+### Integrate SDK [](https://keploy.io/docs/1.0.0/keploy-explained/introduction/\#integrate-sdk "Direct link to Integrate SDK")
+
+**Choose programming language to integrate [Keploy SDK](https://keploy.io/docs/application-development/).**
+
+- [Keploy Features](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#keploy-features)
+ - [1\. Convert API calls from anywhere to Test-Case](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#1-convert-api-calls-from-anywhere-to-test-case)
+ - [2\. Automatically mock Mutations](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#2-automatically-mock-mutations)
+ - [3\. Accurate Noise Detection](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#3-accurate-noise-detection)
+ - [4\. Native interoperability](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#4-native-interoperability)
+ - [5\. Easy Integration Framework for new Libraries](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#5-easy-integration-framework-for-new-libraries)
+- [Keploy SDK](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#keploy-sdk)
+ - [Integrate SDK](https://keploy.io/docs/1.0.0/keploy-explained/introduction/#integrate-sdk)
+
+## Keploy Java Sample
+[Skip to main content](https://keploy.io/docs/quickstart/samples-java/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+A sample Employee-Manager app to test Keploy integration capabilities using **SpringBoot**
+and **PostgreSQL**.
+
+> If you are **macOS users** please try the application using docker compose.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-java/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-java/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-java/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-java/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-java/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-java/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-java/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-java/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-java/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Setup Employee-Manager App [](https://keploy.io/docs/quickstart/samples-java/\#setup-employee-manager-app "Direct link to Setup Employee-Manager App")
+
+### Application Pre-Requisites [](https://keploy.io/docs/quickstart/samples-java/\#application-pre-requisites "Direct link to Application Pre-Requisites")
+
+- Java 1.8+ or <17 ☕
+- Maven 🛠️
+
+Clone the repository and install the dependencies
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-java && cd samples-java/employee-manager
+mvn clean install -Dmaven.test.skip=true
+
+```
+
+You can start the backend using Keploy in 2 ways:
+
+- [Using Keploy's binary](https://keploy.io/docs/quickstart/samples-java/#instructions-for-starting-using-binary)
+- [Using Keploy's docker image](https://keploy.io/docs/quickstart/samples-java/#instructions-for-starting-using-docker)
+
+## Instructions For Starting Using Binary [](https://keploy.io/docs/quickstart/samples-java/\#instructions-for-starting-using-binary "Direct link to Instructions For Starting Using Binary")
+
+### Setup the backend [](https://keploy.io/docs/quickstart/samples-java/\#setup-the-backend "Direct link to Setup the backend")
+
+You need to update the postgresql properties, go to
+`employee-manager/src/main/resources/application-postgresql.properties`
+and change
+
+```codeBlockLines_e6Vv
+spring.datasource.url=jdbc:postgresql://postgres:5432/keploy-test/
+
+```
+
+to
+
+```codeBlockLines_e6Vv
+spring.datasource.url=jdbc:postgresql://localhost:5432/keploy-test/
+
+```
+
+and then build the jar using:
+
+```codeBlockLines_e6Vv
+mvn clean install -Dmaven.test.skip=true
+
+```
+
+### Start the Postgres DB 🐳 [](https://keploy.io/docs/quickstart/samples-java/\#start-the-postgres-db- "Direct link to Start the Postgres DB 🐳")
+
+```codeBlockLines_e6Vv
+docker run -e POSTGRES_USER=keploy-user -e POSTGRES_PASSWORD=keploy -e POSTGRES_DB=postgres -p 5432:5432 --name postgres postgres:15.2
+
+```
+
+Note: You may have to use sudo if you are not part of the docker group.
+
+### Capture the testcases 🎬 [](https://keploy.io/docs/quickstart/samples-java/\#capture-the-testcases- "Direct link to Capture the testcases 🎬")
+
+```codeBlockLines_e6Vv
+keploy record -c "java -jar target/springbootapp-0.0.1-SNAPSHOT.jar"
+
+```
+
+
+
+Now let's run a few tests to capture some more scenarios:
+
+#### Generate testcases 📝 [](https://keploy.io/docs/quickstart/samples-java/\#generate-testcases- "Direct link to Generate testcases 📝")
+
+To generate testcases we just need to **make some API calls.** You can use [Postman](https://www.postman.com/) or simply `curl`
+
+1. Make an employee entry 📥
+
+```codeBlockLines_e6Vv
+curl --location --request POST 'http://localhost:8080/api/employees' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "firstName": "Myke",
+ "lastName": "Tyson",
+ "email": "mt@gmail.com",
+ "timestamp":1
+}'
+
+```
+
+this will return the response or an entry. The timestamp would automatically be ignored during testing because it'll
+always be different.
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "firstName": "Myke",
+ "lastName": "Tyson",
+ "email": "mt@gmail.com",
+ "timestamp": 1661493301
+}
+
+```
+
+2. Fetch recorded info about employees
+
+```codeBlockLines_e6Vv
+curl --location --request GET 'http://localhost:8080/api/employees/1'
+
+```
+
+or by querying through the browser `http://localhost:8080/api/employees/1`
+
+Now both these API calls were captured as **editable** testcases and written to `keploy/test` folder. The keploy
+directory would also have `mock.yml` file.
+
+Now, let's see the magic! 🪄💫
+
+### Run the test cases [](https://keploy.io/docs/quickstart/samples-java/\#run-the-test-cases "Direct link to Run the test cases")
+
+First lets shutdown the database to verify that keploy's magic is taking care of the database mocking. No need to worry
+about the database anymore! 🎉
+
+```codeBlockLines_e6Vv
+docker-compose down
+
+```
+
+Now, let's run the keploy in test mode: -
+
+```codeBlockLines_e6Vv
+keploy test -c "java -jar target/springbootapp-0.0.1-SNAPSHOT.jar" --delay 10
+
+```
+
+This will run the testcases and generate the report in `keploy/reports` folder. You will see the following output:-
+
+````codeBlockLines_e6Vv
+🐰 Keploy: 2025-04-17T13:30:11+05:30 INFO starting test for of {"test case": "[test-1]", "test set": "[test-set-0]"}
+2025-04-17 13:30:11.410 INFO 28035 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
+2025-04-17 13:30:11.410 INFO 28035 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
+2025-04-17 13:30:11.410 INFO 28035 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
+Testrun failed for testcase with id: "test-1"
+
+--------------------------------------------------------------------
+
++-------------------------------------------------------------------------------------------------------------+
+| DIFFS TEST-1 |
++-------------------------------------------------------------------------------------------------------------+
+| EXPECT HEADER | ACTUAL HEADER |
+| -----------------------------------------------------+----------------------------------------------------- |
+| | |
+| |
+| EXPECT BODY | ACTUAL BODY |
+| -----------------------------------------------------+----------------------------------------------------- |
+| { | { |
+| "timestamp": "1744871332" , | "timestamp": "1744876811" , |
+| lastName:Tyson | lastName:Tyson |
+| } | } |
+| | |
+| |
++-------------------------------------------------------------------------------------------------------------+
+🐰 Keploy: 2025-04-17T13:30:11+05:30 INFO result {"testcase id": "[test-1]", "testset id": "[test-set-0]", "passed": "[false]"}
+🐰 Keploy: 2025-04-17T13:30:11+05:30 INFO starting test for of {"test case": "[test-2]", "test set": "[test-set-0]"}
+Testrun passed for testcase with id: "test-2"
+
+--------------------------------------------------------------------
+
+🐰 Keploy: 2025-04-17T13:30:11+05:30 INFO result {"testcase id": "[test-2]", "testset id": "[test-set-0]", "passed": "[true]"}
+
+ <=========================================>
+ TESTRUN SUMMARY. For test-set: "test-set-0"
+ Total tests: 2
+ Total test passed: 1
+ Total test failed: 1
+ Time Taken: "10.37 s"
+ <=========================================>
+<=========================================>```
+
+````
+
+Did you spot that the `timestamp` is showing some differences? Yep, time has a way of doing that! 🕰️
+
+Worry not, just add the ever-changing fields (like our **ts** here) to the **noise parameter** to **dodge those assertions**.
+
+> Pro tip: Add `body.timestamp` to noise in `keploy.yml`.
+
+
+
+Run that `keploy test` command once more and watch as everything falls into place with all tests passing! 🌟
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+Next we move on to the instructions to start the application using docker.
+
+## Instructions For Starting Using Docker [](https://keploy.io/docs/quickstart/samples-java/\#instructions-for-starting-using-docker "Direct link to Instructions For Starting Using Docker")
+
+Prerequisites For Docker:
+
+1. Docker Desktop 4.25.2 and above or docker cli installed
+
+Here we just need to change the command used to start the application.
+
+### Capture the testcases 🎬 [](https://keploy.io/docs/quickstart/samples-java/\#capture-the-testcases--1 "Direct link to Capture the testcases 🎬")
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name javaApp --build-delay 100
+
+```
+
+
+
+Now let's run a few tests to capture some more scenarios:
+
+#### Generate testcases 📝 [](https://keploy.io/docs/quickstart/samples-java/\#generate-testcases--1 "Direct link to Generate testcases 📝")
+
+To generate testcases we just need to **make some API calls.** You can use [Postman](https://www.postman.com/) or simply `curl`
+
+1. Make an employee entry 📥
+
+```codeBlockLines_e6Vv
+curl --location --request POST 'http://localhost:8080/api/employees' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "firstName": "Myke",
+ "lastName": "Tyson",
+ "email": "mt@gmail.com",
+ "timestamp":1
+}'
+
+```
+
+this will return the response or an entry. The timestamp would automatically be ignored during testing because it'll
+always be different.
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "firstName": "Myke",
+ "lastName": "Tyson",
+ "email": "mt@gmail.com",
+ "timestamp": 1661493301
+}
+
+```
+
+2. Fetch recorded info about employees
+
+```codeBlockLines_e6Vv
+curl --location --request GET 'http://localhost:8080/api/employees/1'
+
+```
+
+or by querying through the browser `http://localhost:8080/api/employees/1`
+
+Now both these API calls were captured as **editable** testcases and written to `keploy/test` folder. The keploy
+directory would also have `mock.yml` file.
+
+Now, let's see the magic! 🪄💫
+
+### Running the testcases using Keploy [](https://keploy.io/docs/quickstart/samples-java/\#running-the-testcases-using-keploy "Direct link to Running the testcases using Keploy")
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name javaApp --build-delay 50 --delay 20
+
+```
+
+Your CLI should look something like this
+
+
+
+This is a summary of the test cases recorded
+
+
+
+Here `delay` is the time it takes for your application to get started, after which Keploy will start running the testcases. If your application takes longer than 10s to get started, you can change the `delay` accordingly.
+`buildDelay` is the time that it takes for the image to get built. This is useful when you are building the docker image from your docker compose file itself.
+
+### 🎉 Wrapping it up [](https://keploy.io/docs/quickstart/samples-java/\#-wrapping-it-up "Direct link to 🎉 Wrapping it up")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+## 🚀 Wanna try Keploy in CI/CD? [](https://keploy.io/docs/quickstart/samples-java/\#-wanna-try-keploy-in-cicd "Direct link to 🚀 Wanna try Keploy in CI/CD?")
+
+We got you 😎
+
+Here’s how to set it up with GitHub Actions:
+
+👉 [Keploy + GitHub CI/CD Guide](https://keploy.io/docs/ci-cd/github)
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-java/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-java/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-java/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-java/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-java/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-java/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-java/#setting-up-the-docker-desktop-for-wsl-2)
+- [Setup Employee-Manager App](https://keploy.io/docs/quickstart/samples-java/#setup-employee-manager-app)
+ - [Application Pre-Requisites](https://keploy.io/docs/quickstart/samples-java/#application-pre-requisites)
+- [Instructions For Starting Using Binary](https://keploy.io/docs/quickstart/samples-java/#instructions-for-starting-using-binary)
+ - [Setup the backend](https://keploy.io/docs/quickstart/samples-java/#setup-the-backend)
+ - [Start the Postgres DB 🐳](https://keploy.io/docs/quickstart/samples-java/#start-the-postgres-db-)
+ - [Capture the testcases 🎬](https://keploy.io/docs/quickstart/samples-java/#capture-the-testcases-)
+ - [Run the test cases](https://keploy.io/docs/quickstart/samples-java/#run-the-test-cases)
+- [Instructions For Starting Using Docker](https://keploy.io/docs/quickstart/samples-java/#instructions-for-starting-using-docker)
+ - [Capture the testcases 🎬](https://keploy.io/docs/quickstart/samples-java/#capture-the-testcases--1)
+ - [Running the testcases using Keploy](https://keploy.io/docs/quickstart/samples-java/#running-the-testcases-using-keploy)
+ - [🎉 Wrapping it up](https://keploy.io/docs/quickstart/samples-java/#-wrapping-it-up)
+- [🚀 Wanna try Keploy in CI/CD?](https://keploy.io/docs/quickstart/samples-java/#-wanna-try-keploy-in-cicd)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-java/#contact-us)
+
+## MongoDB Wire Protocol
+[Skip to main content](https://keploy.io/docs/dependencies/mongo/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/dependencies/mongo/\#introduction "Direct link to Introduction")
+
+The MongoDB Wire Protocol is a simple socket-based, request-response style protocol. Clients communicate with the database server through a regular TCP/IP socket. Clients should connect to the database with a regular TCP/IP socket.
+
+**Port :** The default port number for `mongod` and `mongos` instances is 27017. The port number for `mongod` and `mongos` is configurable and may vary.
+
+**Byte Ordering :** All integers in the MongoDB wire protocol use little-endian byte order: that is, least-significant byte first.
+
+**Message Types :** MongoDB uses the `OP_MSG` opcode for both client requests and database replies. There are several message formats used in older versions of MongoDB which have been deprecated in favor of `OP_MSG`.
+
+For more information, check out mongodb-wire-protocol/#standard-message-header section.
+
+## How it works ? [](https://keploy.io/docs/dependencies/mongo/\#how-it-works- "Direct link to How it works ?")
+
+When the application sends requests to MongoDB, those requests/responses are in the form of "wiremessages," which are low-level data packets. These wiremessages are intercepted by the Keploy proxy before reaching the actual MongoDB instance.
+
+Once intercepted, the proxy's functionality includes parsing these wiremessages, which involves extracting the relevant data and metadata from the packets. After parsing, the extracted information is transformed into a human-readable and editable format. This format could be more user-friendly and easy to understand, making it convenient for developers and administrators to analyze and manipulate the data if necessary. Hence, this proxy serves as an intermediary that captures and mocks the traffic calls.
+
+The system is built to support wiremessage `MongoDB version => 5.1.X`, which refers to the specific version of the communication protocol used between the application and the MongoDB server. This version indicates the specific structure and rules governing the wiremessages exchanged between the two components.
+
+## Example of message queries [](https://keploy.io/docs/dependencies/mongo/\#example-of-message-queries "Direct link to Example of message queries")
+
+In general, each message consists of a standard message header followed by request-specific data. The standard message header is structured as follows:
+
+```codeBlockLines_e6Vv
+struct MsgHeader {
+ int32 messageLength; // total message size, including this
+ int32 requestID; // identifier for this message
+ int32 responseTo; // requestID from the original request (used in responses from the database)
+ int32 opCode; // message type
+}
+
+```
+
+`OP_MSG` is an extensible message format used to encode both client requests and server replies on the wire.
+`OP_MSG` has the following format:
+
+```codeBlockLines_e6Vv
+OP_MSG {
+ MsgHeader header; // standard message header
+ uint32 flagBits; // message flags
+ Sections[] sections; // data sections
+ optional checksum; // optional CRC-32C checksum
+}
+
+```
+
+**Note**
+
+- MongoDB 5.1 removes support for both `OP_QUERY` find operations and `OP_QUERY` commands. As an exception, `OP_QUERY` is still supported for running the `hello` and `isMaster` commands as part of the connection handshake.
+
+- In version 4.2, MongoDB removes the deprecated internal `OP_COMMAND` and `OP_COMMANDREPLY` protocol.
+
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/dependencies/mongo/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/dependencies/mongo/#introduction)
+- [How it works ?](https://keploy.io/docs/dependencies/mongo/#how-it-works-)
+- [Example of message queries](https://keploy.io/docs/dependencies/mongo/#example-of-message-queries)
+- [Contact Us](https://keploy.io/docs/dependencies/mongo/#contact-us)
+
+## HTTP Protocol Overview
+[Skip to main content](https://keploy.io/docs/dependencies/http/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/dependencies/http/\#introduction "Direct link to Introduction")
+
+HTTP (Hypertext Transfer Protocol) `Wire Protocol` refers to the underlying communication mechanism that enables the transfer of data between a client (such as a web browser) and a server over the internet. It defines how messages are formatted and transmitted, including rules for their semantics, status codes, headers, and other aspects.
+
+**Port :** HTTP typically uses port `80 for non-secure` connections (HTTP) and port `443 for secure connections` (HTTPS). These are default ports, but HTTP servers can technically be configured to listen on any port.
+
+**Byte Ordering :** It operates at the application layer of the `TCP/IP stack`, where byte ordering is not a concern. However, if encryption is involved (e.g., HTTPS), then cryptographic algorithms may have specific byte ordering requirements, but this is handled at a lower level than HTTP.
+
+**Message Types :** In the context of HTTP, there are primarily two types of messages:
+
+1. _HTTP Request Messages_: These messages are sent from the client to the server to request resources or perform actions. They contain information such as the request method (e.g., GET, POST), the requested URL, headers (such as Accept, User-Agent), and optionally a message body (for methods like POST). Example:-
+
+```codeBlockLines_e6Vv
+GET /index.html HTTP/1.1
+Host: www.example.com
+User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
+Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
+
+```
+
+2. _HTTP Response Messages_: These messages are sent from the server to the client in response to a request. They contain a status line indicating the outcome of the request (e.g., status code 200 for success), headers providing metadata about the response (such as Content-Type, Content-Length), and optionally a message body containing the requested resource or data. Example:-
+
+```codeBlockLines_e6Vv
+HTTP/1.1 200 OK
+Date: Fri, 24 May 2024 12:00:00 GMT
+Content-Type: text/html; charset=UTF-8
+Content-Length: 1234
+Server: Apache
+
+```
+
+## How it works ? [](https://keploy.io/docs/dependencies/http/\#how-it-works- "Direct link to How it works ?")
+
+The http parser is basically divided into two sections, `encode` and `decode`, the encode function is used during the keploy record mode when we need to process the user traffic and store it in mocks and whereas the decode function is used in the test mode when we need to match the mock with the request, decode the information from the mock and write it back to the user.
+
+So in the record mode, the encode function is provided with the initial request, which is written to the destination connection and checked if the request is chunked, if it is then parser keeps reading the request from the client connection and write it to the destination connection.
+
+Next, if the request contains the expect header or not. The expect header is used by a client when sending very large requests. So it is basically used to ask the server if it is ready to accept such a large req or not, if it is, then the server responds with a `"100-continue"` response. This is what we also check by writing the request to the destination connection and reading the response from it. We start reading the response and we handle chunking in that case as well. Then finally, keploy parse the request and response to store it in mocks.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/dependencies/http/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/dependencies/http/#introduction)
+- [How it works ?](https://keploy.io/docs/dependencies/http/#how-it-works-)
+- [Contact Us](https://keploy.io/docs/dependencies/http/#contact-us)
+
+## Postgres Wire Protocol
+[Skip to main content](https://keploy.io/docs/dependencies/postgres/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/dependencies/postgres/\#introduction "Direct link to Introduction")
+
+The [Postgres Wire Protocol](https://www.postgresql.org/docs/current/protocol.html/) is a communication protocol used for client-server interaction in PostgreSQL, allowing clients to communicate with the PostgreSQL database server for executing queries, retrieving results, and performing various database operations.
+
+**Port :** The default port number for `postgres` or `pgAdmin` instances is 5432. The port number for `postgres` or `pgAdmin` is configurable and may vary.
+
+**Byte Ordering :** All integers in the PostgresQL wire protocol use big-endian byte order: that is, most-significant byte first.
+
+**Message Types :** The PostgreSQL wire protocol uses various message types to facilitate communication between clients and the server. These messages include client-initiated types like `StartupMessage` for connection initiation, Query for executing SQL commands, and `Terminate` for ending sessions, as well as server responses like `RowDescription` for describing result sets, DataRow for transmitting row data, and `CommandComplete` for signaling query completion. Each message type is identified by a single-byte type code, followed by a length field and message-specific content.
+
+## How it works ? [](https://keploy.io/docs/dependencies/postgres/\#how-it-works- "Direct link to How it works ?")
+
+Keploy intercepts the traffic and act as a middle to the `sourceConnection`(client) and `destConnection`(server). So Keploy acts as **destination** for the real client and as client for the real **destination Connection**. So whenever traffic is intercepted keploy gets the byte data and from which we need to ensure the protocol which the connection is using it can be Postgres, mongo etc.. Once keploy identifies it as Postgres keploy send it into the Postgres parser.
+
+Once intercepted, the Keploy's functionality includes parsing these wiremessages, which involves extracting the relevant data and metadata from the packets. After parsing, the extracted information is transformed into a human-readable and editable format. This format could be more user-friendly and easy to understand, making it convenient for developers and administrators to analyze and manipulate the data if necessary. Hence, this proxy serves as an intermediary that captures and mocks the traffic calls. Keploy user `pgproto3` library as base to store the this data into go structs.
+
+## Examples of Message Query [](https://keploy.io/docs/dependencies/postgres/\#examples-of-message-query "Direct link to Examples of Message Query")
+
+In general, each message consists of a standard message header followed by request-specific data. Here are the few request (frontend) and response(backend) structs in which the data is saved:
+
+```codeBlockLines_e6Vv
+type PostgresSpec struct {
+ Metadata map[string]string `json:"metadata" yaml:"metadata"`
+ PostgresRequests []Backend `json:"RequestBin,omitempty"`
+ PostgresResponses []Frontend `json:"ResponseBin,omitempty"`
+ ReqTimestampMock time.Time `json:"ReqTimestampMock,omitempty"`
+ ResTimestampMock time.Time `json:"ResTimestampMock,omitempty"`
+}
+
+```
+
+In above, backend and frontend are the structs representing PostgreSQL requests and responses : -
+
+```codeBlockLines_e6Vv
+// Backend is PG Request Packet Transcoder
+type Backend struct {
+ PacketTypes []string `json:"header,omitempty" yaml:"header,omitempty,flow"`
+ Identfier string `json:"identifier,omitempty" yaml:"identifier,omitempty"`
+ Length uint32 `json:"length,omitempty" yaml:"length,omitempty"`
+ Payload string `json:"payload,omitempty" yaml:"payload,omitempty"`
+ Bind pgproto3.Bind `yaml:"-"`
+ Binds []pgproto3.Bind `json:"bind,omitempty" yaml:"bind,omitempty"`
+ // other fields...
+}
+
+type Frontend struct {
+ PacketTypes []string `json:"header,omitempty" yaml:"header,omitempty,flow"`
+ Identfier string `json:"identifier,omitempty" yaml:"identifier,omitempty"`
+ Length uint32 `json:"length,omitempty" yaml:"length,omitempty"`
+ Payload string `json:"payload,omitempty" yaml:"payload,omitempty"`
+ AuthenticationOk pgproto3.AuthenticationOk `json:"authentication_ok,omitempty" yaml:"authentication_ok,omitempty"`
+ AuthenticationCleartextPassword pgproto3.AuthenticationCleartextPassword `json:"authentication_cleartext_password,omitempty" yaml:"authentication_cleartext_password,omitempty"`
+ // other fields...
+}
+
+type StartupPacket struct {
+ Length uint32
+ ProtocolVersion uint32
+}
+
+type RegularPacket struct {
+ Identifier byte
+ Length uint32
+ Payload []byte
+}
+
+```
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/dependencies/postgres/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/dependencies/postgres/#introduction)
+- [How it works ?](https://keploy.io/docs/dependencies/postgres/#how-it-works-)
+- [Examples of Message Query](https://keploy.io/docs/dependencies/postgres/#examples-of-message-query)
+- [Contact Us](https://keploy.io/docs/dependencies/postgres/#contact-us)
+
+## Redis Wire Protocol
+[Skip to main content](https://keploy.io/docs/dependencies/redis/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/dependencies/redis/\#introduction "Direct link to Introduction")
+
+The Redis wire protocol is a simple, text-based protocol used to communicate with the Redis server over a TCP/IP socket. It follows a request-response model where the client sends a command to the server, and the server responds with a reply.
+
+**Port :** The default port for a `Redis` server is 6379.
+
+**Byte Ordering :** Redis uses little-endian byte order, particularly in its binary protocol formats like in RDB (Redis Database) and AOF (Append-Only File) persistence formats.
+
+**Message Types :** Redis commands are sent from the client to the server as an array of bulk strings. This is known as the RESP (REdis Serialization Protocol) format. Each command is represented by a list of strings, where the first string is the command name, followed by its arguments.
+
+For more information, check out Redis serialization protocol specification from redis docs.
+
+## How it works ? [](https://keploy.io/docs/dependencies/redis/\#how-it-works- "Direct link to How it works ?")
+
+### Record Mode [](https://keploy.io/docs/dependencies/redis/\#record-mode "Direct link to Record Mode")
+
+In record mode, the encode function is utilized. Its primary responsibility is to process incoming user traffic and store this data in mock files. For Redis specifically, the function starts by reading the first 5 bytes of the incoming call to identify the type of call.
+
+Redis commands are distinguished by specific initial characters such as `'+', '-', ':', '$', '*', '_', '#', ',', '(', '!', '=', '%', '~', '>'`.
+
+The record mode process begins with the `RecordOutgoing` function, which initiates by reading the initial request from the client. This request is then encoded using the encodeRedis function. This function logs the request, writes it to the destination server, and processes the responses. The responses are read, written back to the client, and stored in the mock files. If there are any remaining responses before reaching the end of the stream, these are also sent to the client and stored.
+
+### Test Mode [](https://keploy.io/docs/dependencies/redis/\#test-mode "Direct link to Test Mode")
+
+In test mode, the decode function is activated. Its role is to match incoming requests with pre-recorded mocks, decode the necessary information, and write it back to the user.
+
+The test mode process starts with the `MockOutgoing` function, which reads the initial request from the client. The request is then decoded using the `decodeRedis` function. This function reads the request stream, attempts to match the request with existing mocks using a fuzzy matching algorithm, and retrieves the corresponding responses. If a match is found, the responses are decoded and written back to the client.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/dependencies/redis/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/dependencies/redis/#introduction)
+- [How it works ?](https://keploy.io/docs/dependencies/redis/#how-it-works-)
+ - [Record Mode](https://keploy.io/docs/dependencies/redis/#record-mode)
+ - [Test Mode](https://keploy.io/docs/dependencies/redis/#test-mode)
+- [Contact Us](https://keploy.io/docs/dependencies/redis/#contact-us)
+
+## Automated Testing Solutions
+[Skip to main content](https://keploy.io/docs/keploy-explained/why-keploy/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+| **Feature** | **Automated Test-Scripting Tools** | **Record-Replay Traffic Tools** | **Keploy** |
+| --- | --- | --- | --- |
+| **Test Scripting** | Manual test script creation. | Record user traffic as tests scripts. | Automatic user traffic recording as test scripts. |
+| **Mocking Dependencies** | Manual mock/stub writing. | Setup test environments for dependencies. | Automatic mocking of dependencies CRUD operations. |
+| **Test Coverage** | Coverage reliant on script quality. | Coverage based on recorded traffic. | Line coverage derived from code quality. |
+| **Code-Less Integration** | Requires scripting for integration. | Relies on traffic replication pipelines and mock scripts. | Uses EBPF for no-code, language-agnostic integration. |
+| **Noise Detection** | Manual noise and data noise identification. | Limited capability to filter noisy parameters. | Accurate noise detection, flagging random/noisy fields. |
+| **Ease of Use** | Moderate learning curve for scripting. | Difficulty in recording interactions and test environment management. | User-friendly with quick adoption. |
+| **CI/CD Integration** | Integration via unit test libraries in CI/CD pipelines. | Limited CI/CD integration, specific environments required. | Easy integration using unit test libraries in CI/CD. |
+| **Flexibility** | Scripting offers flexibility but is time-consuming. | Limited flexibility tied to recorded traffic. | Highly flexible for various API flows, versatile mocks, and test cases. |
+| **Effort Required for 100% Test Coverage** | Requires 50% of development time. | Requires 100% of development time. | Requires only 1% of development time. |
+| **Community/Support** | Support varies based on tool popularity. | May have limited support. | Active community and documentation. |
+
+### Join the Keploy adventure! [](https://keploy.io/docs/keploy-explained/why-keploy/\#join-the-keploy-adventure "Direct link to Join the Keploy adventure!")
+
+⭐ If you're excited about what's coming, show some love by [starring Keploy on GitHub](https://github.com/keploy/keploy)
+
+🤙 We're happy to hear from you in-case you want to deep-dive. [Schedule a demo](https://calendar.app.google/3mHeyaoKg3A2qkqF6) – because the best tests are yet to come! 🚀🎉
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/why-keploy/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Join the Keploy adventure!](https://keploy.io/docs/keploy-explained/why-keploy/#join-the-keploy-adventure)
+- [Contact Us](https://keploy.io/docs/keploy-explained/why-keploy/#contact-us)
+
+## Hacktoberfest Contribution Guide
+[Skip to main content](https://keploy.io/docs/hacktoberfest/contribution-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Celebrate Open Source with Hacktoberfest [](https://keploy.io/docs/hacktoberfest/contribution-guide/\#celebrate-open-source-with-hacktoberfest "Direct link to Celebrate Open Source with Hacktoberfest")
+
+Hacktoberfest is a month-long celebration of open-source software run by DigitalOcean. Hacktoberfest is open to everyone, from first-time contributors to seasoned open-source developers.
+
+_Your open-source journey begins with a pull request._
+
+
+
+## Hacktoberfest Journey with Keploy [](https://keploy.io/docs/hacktoberfest/contribution-guide/\#hacktoberfest-journey-with-keploy "Direct link to Hacktoberfest Journey with Keploy")
+
+If you’ve ever wanted to contribute to open source, now is your chance! You can contribute to several Keploy projects participating this year’s Hacktoberfest.
+
+Anyone around the globe who desires to help drive the growth of open source and make positive contributions to an ever-growing community. All backgrounds and skill levels are encouraged to participate.
+
+#### Code Contributribution to Keploy Projects includes: [](https://keploy.io/docs/hacktoberfest/contribution-guide/\#code-contributribution-to-keploy-projects-includes "Direct link to Code Contributribution to Keploy Projects includes:")
+
+- 🛠️ Bug fixes
+- 👉 New features
+- 👨💻 Build Sample Apps
+
+#### Non-code contributions include: [](https://keploy.io/docs/hacktoberfest/contribution-guide/\#non-code-contributions-include "Direct link to Non-code contributions include:")
+
+-  Documentation
+-  Create a Tutorial
+-  Blog writing
+-  Translation
+
+- [Celebrate Open Source with Hacktoberfest](https://keploy.io/docs/hacktoberfest/contribution-guide/#celebrate-open-source-with-hacktoberfest)
+- [Hacktoberfest Journey with Keploy](https://keploy.io/docs/hacktoberfest/contribution-guide/#hacktoberfest-journey-with-keploy)
+
+## Unit Test Generator
+[Skip to main content](https://keploy.io/docs/running-keploy/unit-test-generator/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy's Unit Test Generator (UTG) simplifies testing by generating high-quality, maintainable unit tests with minimal manual effort. Inspired by Meta’s LLM research, it uses code semantics and Large Language Models (LLMs) to produce meaningful test cases.
+
+To fit into modern development workflows, Keploy now supports multiple methods for unit test generation - ranging from automated pull request comments to a one-click VS Code extension
+
+Keploy's UTG aims to:
+
+- **Automate unit test generation:** Reduce manual effort by generating tests automatically.
+- **Improve edge case coverage:** Catch complex scenarios often missed manually.
+- **Boost test coverage:** Make comprehensive coverage achievable as your codebase grows.
+
+### Try the Unit Test Generator in two ways: [](https://keploy.io/docs/running-keploy/unit-test-generator/\#try-the-unit-test-generator-in-two-ways "Direct link to Try the Unit Test Generator in two ways:")
+
+1. **PR Agent**: Install a GitHub App on your repo to automatically generate tests when you create a pull request.
+
+2. **VS Code Extension**: Generate test files with a single click directly from your IDE.
+
+
+- [Try the Unit Test Generator in two ways:](https://keploy.io/docs/running-keploy/unit-test-generator/#try-the-unit-test-generator-in-two-ways)
+
+## Rename Test Cases
+[Skip to main content](https://keploy.io/docs/running-keploy/rename-testcases/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Rename Test-Cases [](https://keploy.io/docs/running-keploy/rename-testcases/\#rename-test-cases "Direct link to Rename Test-Cases")
+
+To name your test case, make an API call and **add a header field** whose key is set to `Keploy-Test-Name` and value is set to the name you want for your test case.
+
+### Example [](https://keploy.io/docs/running-keploy/rename-testcases/\#example "Direct link to Example")
+
+To demonstrate this, let's consider the [gin-mongo](https://github.com/keploy/samples-go/tree/main/gin-mongo) sample application.
+
+1. Clone the repository and build the application.
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go && cd samples-go/gin-mongo
+go build
+
+```
+
+2. Run keploy in record mode and provide the path to the binary.
+
+```codeBlockLines_e6Vv
+sudo -E keploy record -c "./test-app-url-shortener"
+
+```
+
+3. Make an api call and add a header field with key set to `Keploy-Test-Name` and value set to the name you want for your testcase, let's say 'renametest'.
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8080/url \
+ --header 'content-type: application/json' \
+ --header 'Keploy-Test-Name: renamed-test' \
+ --data '{
+ "url": "https://google.com"
+}'
+
+```
+
+5. Test case with the name `renamed-test.yaml` has been successfully created. 🎉
+
+## Rename Test-Sets [](https://keploy.io/docs/running-keploy/rename-testcases/\#rename-test-sets "Direct link to Rename Test-Sets")
+
+To rename your test set, you can manually override the default name from `test-set-0` to a `kTest-0` in the `keploy` folder.
+
+- [Rename Test-Cases](https://keploy.io/docs/running-keploy/rename-testcases/#rename-test-cases)
+ - [Example](https://keploy.io/docs/running-keploy/rename-testcases/#example)
+- [Rename Test-Sets](https://keploy.io/docs/running-keploy/rename-testcases/#rename-test-sets)
+
+## Docker Test Cases
+[Skip to main content](https://keploy.io/docs/running-keploy/docker-tls/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+### Recording Testcases and Data Mocks [](https://keploy.io/docs/running-keploy/docker-tls/\#recording-testcases-and-data-mocks- "Direct link to recording-testcases-and-data-mocks-")
+
+1. To record test cases and data mocks, follow these steps in the **root directory** of your application. Ensure that you have the following prerequisites in place:
+
+- If you're running via **docker-compose**, ensure to include the `` under your application service in the docker-compose.yaml file [like this](https://github.com/keploy/samples-python/blob/9d6cf40da2eb75f6e035bedfb30e54564785d5c9/flask-mongo/docker-compose.yml#L14).
+- You must run all of the containers on the same network when you're using **docker run command** (you can add your custom **network name** using `--network` flag in **docker run command**).
+- In your **Docker Compose** file, every container should run on the same network.
+- `Docker_CMD_to_run_user_container` refers to the Docker **command for launching** the application.
+- Add the required commands to your DockerFile as stated below.
+
+2. Add the following commands to your Dockerfile to download the `ca.crt` file and the `setup_ca.sh` script.
+
+```codeBlockLines_e6Vv
+ # Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)
+ RUN apt-get update && apt-get install -y ca-certificates
+ # Download the ca.crt file and the setup_ca.sh script
+ ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/ca.crt ca.crt
+ ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/setup_ca.sh setup_ca.sh
+ # Give execute permission to the setup_ca.sh script
+ RUN chmod +x setup_ca.sh
+
+ # Run the CA setup script and then run the application server
+ CMD ["/bin/bash", "-c", "source ./setup_ca.sh && "]
+
+```
+
+To capture test cases, **Execute** the following command within your application's **root directory**.
+
+```codeBlockLines_e6Vv
+keploy record -c "Docker_CMD_to_run_user_container --network " --container-name ""
+
+```
+
+Make API calls using [Postman](https://www.postman.com/), or cURL commands.
+
+Keploy will capture the API calls you've conducted, generating test suites comprising **test cases (KTests) and data mocks (KMocks)** in `YAML` format.
+
+### Running Testcases [](https://keploy.io/docs/running-keploy/docker-tls/\#running-testcases "Direct link to Running Testcases")
+
+To execute the test cases, follow these steps in the **root directory** of your application.
+
+When using **docker-compose** to start the application, it's important to ensure that the `--container-name` parameter matches the container name in your `docker-compose.yaml` file.
+
+```codeBlockLines_e6Vv
+keploy test -c "Docker_CMD_to_run_user_container --network " --container-name "" --delay 20
+
+```
+
+Voilà! 🧑🏻💻 We have the tests with data mocks running! 🐰🎉
+
+You'll be able to see the test cases that ran with the results report on the console as well as locally in the `testReport` directory.
+
+- [Recording Testcases and Data Mocks](https://keploy.io/docs/running-keploy/docker-tls/#recording-testcases-and-data-mocks-)
+- [Running Testcases](https://keploy.io/docs/running-keploy/docker-tls/#running-testcases)
+
+## Keploy Configuration Guide
+[Skip to main content](https://keploy.io/docs/running-keploy/configuration-file/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/running-keploy/configuration-file/\#introduction "Direct link to Introduction")
+
+Tired of specifying the same container name, app command, or delay, filters for each record or test command? 😴
+
+Introducing **Keploy-config** 🎉 \- It is a YAML-based file that will allow you to define the testing configurations, including container setups, delays, and any other relevant parameters.
+
+## Getting Started: [](https://keploy.io/docs/running-keploy/configuration-file/\#getting-started "Direct link to Getting Started:")
+
+We will be using a sample app to demonstrate working of Keploy configuration file.
+
+To generate a keploy-config file, run:
+
+```codeBlockLines_e6Vv
+keploy config --generate --path "./config-dir/"
+
+```
+
+For demonstration purposes, we are using the [root directory of the echo-sql application](https://github.com/keploy/samples-go/tree/main/echo-sql). We can place it wherever we want to inside the project.
+
+After successful execution of the command, a default initialized config file named as `keploy.yaml` has been created with the content as shown below:
+
+```codeBlockLines_e6Vv
+path: ""
+command: "./echo-psql-url-shortener"
+port: 0
+proxyPort: 16789
+dnsPort: 26789
+debug: false
+disableTele: false
+inDocker: false
+generateGithubActions: true
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ apiTimeout: 5
+ coverage: false
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: "default@123"
+ language: ""
+ removeUnusedMocks: false
+record:
+ recordTimer: 0s
+ filters: []
+configPath: ""
+bypassRules: []
+cmdType: "native"
+enableTesting: false
+keployContainer: "keploy-v2"
+keployNetwork: "keploy-network"
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
+
+```
+
+## Using the Config File [](https://keploy.io/docs/running-keploy/configuration-file/\#using-the-config-file "Direct link to Using the Config File")
+
+The Keploy-config file eliminates the need to repeatedly specify parameters for each record or test command. The parameters in the file correspond to the flags in the Keploy [CLI Command Docs](http://keploy.io/docs/running-keploy/cli-commands/).Using keploy-config can help to reduce the record and test command to just:
+
+### Record Command: [](https://keploy.io/docs/running-keploy/configuration-file/\#record-command "Direct link to Record Command:")
+
+```codeBlockLines_e6Vv
+keploy record
+
+```
+
+### Test Command: [](https://keploy.io/docs/running-keploy/configuration-file/\#test-command "Direct link to Test Command:")
+
+```codeBlockLines_e6Vv
+keploy test
+
+```
+
+Visit the [CLI Command Docs](http://keploy.io/docs/running-keploy/cli-commands/) to know more about the flags/parameters and their usage.
+
+## Configuration Sections [](https://keploy.io/docs/running-keploy/configuration-file/\#configuration-sections "Direct link to Configuration Sections")
+
+### Record Section [](https://keploy.io/docs/running-keploy/configuration-file/\#record-section "Direct link to Record Section")
+
+The `record` section in the Keploy-config file allows you to define parameters for recording API calls.
+
+- **`path`**: Path to the project where recording occurs. (Mandatory field)
+
+- **`command`**: Command executed during recording.
+
+- **`proxyport`**: Port number for the proxy. Default is 0.
+
+- **`containerName`**: Name of the container during recording.
+
+- **`networkName`**: Network name for the container during recording.
+
+- **`delay`**: Delay in seconds before recording each request. Default is 5 seconds.
+
+- **`filters`**: API calls to the application to avoid recording.
+
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+record:
+ filters:
+ - path: "/user/app"
+ urlMethods: ["GET"]
+ headers: {"^asdf*": "^test"}
+ host: "dc.services.visualstudio.com"
+
+```
+
+This will avoid recording the API calls to the path `/user/app` with the method `GET`, headers starting with `asdf` and host `dc.services.visualstudio.com`.
+
+- **`tests`**: Filters to record Tests.
+
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+tests:
+ filters:
+ - path: ""
+ urlMethods: []
+ headers: {}
+ host: ""
+
+```
+
+- **`bypassRules`**: A bypass for mocking API calls.
+
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+bypassRules:
+ filters:
+ - path: ""
+ host: ""
+ port: 0
+
+```
+
+### Test Section [](https://keploy.io/docs/running-keploy/configuration-file/\#test-section "Direct link to Test Section")
+
+The `test` section in the Keploy-config file allows you to define parameters for testing API calls.
+
+- **`path`**: Path to the project where testing occurs. (Mandatory field)
+
+- **`command`**: Command executed during testing.
+
+- **`proxyport`**: Port number for the proxy during testing. Default is 0.
+
+- **`containerName`**: Name of the container during testing.
+
+- **`networkName`**: Network name for the container during testing.
+
+- **`ignoreOrdering`**: When set to `true`, ignores the order of array elements in response bodies during testing.
+
+- **`selectedTests`**: : Selected tests to run.
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+selectedTests:
+ "test-set-1": ["test-1", "test-2"]
+ "test-set-2": []
+
+```
+
+- **`globalNoise`**: Noisy fields to be ignored at global/test-set level.
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+globalNoise:
+global:
+ body: {"url": ["https?://\S+"]}
+test-sets: {}
+
+```
+
+- **`delay`**: Delay in seconds before testing each request. Default is 5 seconds.
+
+- **`apiTimeout`**: Timeout in seconds for API calls during testing. Default is 5 seconds.
+
+- **` bypassRules`**: A bypass for mocking API calls.
+
+
+
+
+
+```codeBlockLines_e6Vv
+bypassRules:
+filters:
+ - path: ""
+ host: ""
+ port: 0
+
+```
+
+- **`withCoverage`**: Whether to generate coverage reports during testing. Default is `false`.
+
+- **`coverageReportPath`**: Path to store the coverage report.
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+coverageReportPath: "/path/to/coverage/report"
+
+```
+
+
+The tests section in the Keploy-config file allows you to define parameters for recording test scenarios during API calls.
+
+- **`filters`**: Filters to record specific tests based on path, HTTP methods, headers, and host.
+
+Example:
+
+
+
+
+
+```codeBlockLines_e6Vv
+tests:
+ filters:
+ - path: "/user/app"
+ urlMethods: ["GET"]
+ headers:
+ "^asdf*": "^test"
+ host: "dc.services.visualstudio.com"
+
+```
+
+The tests section enables you to specify conditions for recording tests during API calls. The filters subsection allows you to define specific criteria, such as path, HTTP methods, headers, and host, to record relevant test scenarios.
+
+- **`path`**: Specifies the path for which the test should be recorded. It defines the URL path of the API endpoint.
+
+- **`urlMethods`**: Specifies the HTTP methods for which the test should be recorded. It allows you to focus on specific HTTP methods like GET, POST, etc.
+
+- **`headers`**: Specifies headers and their values for which the test should be recorded. It enables you to filter tests based on specific headers.
+
+- **`host`**: Specifies the host for which the test should be recorded. It defines the domain or IP address of the API server.
+
+
+#### Using Test Filters Together or Independently [](https://keploy.io/docs/running-keploy/configuration-file/\#using-test-filters-together-or-independently "Direct link to Using Test Filters Together or Independently")
+
+You can use the **`path`**, **`urlMethods`**, **`headers`**, and **`host`** filters together or independently based on your testing scenarios. This flexibility allows you to precisely define the conditions under which tests are recorded.
+
+### Bypass Rules Section [](https://keploy.io/docs/running-keploy/configuration-file/\#bypass-rules-section "Direct link to Bypass Rules Section")
+
+The `bypassRules` section in the Keploy-config file allows you to define parameters for bypassing and mocking API calls.
+
+Example:
+
+```codeBlockLines_e6Vv
+bypassRules:
+ - path: "/user/app"
+ port: 8080
+ - port: 8081
+ - host: "dc.services.visualstudio.com"
+ - port: 8081
+ host: "dc.services.visualstudio.com"
+ path: "/user/app"
+
+```
+
+The `bypassRules` section provides a way to bypass and mock API calls during testing. The filters subsection allows you to define specific conditions for applying stubs, such as path, port, and host. You can use these filters together or independently based on your testing scenarios.
+
+- **`path`**: Specifies the path for which the stub should be applied. It defines the URL path of the API endpoint.
+
+- **`port`**: Specifies the port for which the stub should be applied. It defines the network port on which the API call is made.
+
+- **`host`**: Specifies the host for which the stub should be applied. It defines the domain or IP address of the API server.
+
+
+In the provided example:
+
+- The first bypass rule applies to the path "/user/app" and the port 8080.
+- The second bypass rule applies to the port 8081.
+- The third bypass rule applies to the host "dc.services.visual
+
+## Advanced Noise Filtering: [](https://keploy.io/docs/running-keploy/configuration-file/\#advanced-noise-filtering "Direct link to Advanced Noise Filtering:")
+
+Earlier the only way to add the [noisy fields](http://keploy.io/docs/concepts/general-glossary/#3-noisy-field) was by modifying individual test file (testcase level). Now, With the introduction of config file, users can add the noisy fields at test-set and global level through config file itself.
+
+### Global Noise [](https://keploy.io/docs/running-keploy/configuration-file/\#global-noise "Direct link to Global Noise")
+
+The `global subsection` of `globalNoise` is used to define parameters that are globally ignored for all API calls during testing. It enables you to filter out consistent noise, ensuring a cleaner evaluation of responses.
+
+**Note** \- The examples below support both the xml as well as the json type responses.
+
+```codeBlockLines_e6Vv
+globalNoise:
+global: {body: {
+ # To ignore some values for a field, pass regex patterns to the corresponding array value
+ "url": ['https?://\S+', 'http://\S+'],
+ }, header: {
+ # To ignore the entire field, pass an empty array
+ "Date": [],
+ }}
+
+```
+
+**Note:** For marking entire response body as global noise use -
+
+```codeBlockLines_e6Vv
+globalNoise:
+global: {body: {"*": "*"}}
+
+```
+
+1. **`global`**:
+
+- **`body`**: Defines patterns to ignore for the response body, such as filtering out URLs. Example: `{"url": ['https?://\S+', 'http://\S+']}`
+- **`header`**: Specifies headers or header values to be ignored globally. Example: `{"Date": []}`
+
+2. **`test-sets`**: This section is left empty in the example. It allows you to specify additional noise parameters for specific test sets, offering tailored noise filtering for different testing scenarios.
+
+### Test-Set Noise [](https://keploy.io/docs/running-keploy/configuration-file/\#test-set-noise "Direct link to Test-Set Noise")
+
+Under the `test-sets` subsection of `globalNoise`, you can define noise parameters specific to a particular test set. This ensures that certain noise is only ignored for the API calls associated with that specific test set.
+
+```codeBlockLines_e6Vv
+test-sets: {test-set-1: {body: {
+ # ignore all the values for the "uuid" field
+ "uuid": [],
+ }, header: {
+ # we can also pass the exact value to ignore for a field
+ "User-Agent": ["PostmanRuntime/7.34.0"],
+ }}}
+
+```
+
+**`test-set-1`**:
+
+- **`body`**: Defines patterns to ignore for the response body within the specified test set.
+- **`header`**: Specifies headers or header values to be ignored for the specified test set. Example: `{"User-Agent": ["PostmanRuntime/7.34.0"]}`
+
+## Handling Deeply Nested JSON Fields in Keploy Configuration 🧩 [](https://keploy.io/docs/running-keploy/configuration-file/\#handling-deeply-nested-json-fields-in-keploy-configuration- "Direct link to Handling Deeply Nested JSON Fields in Keploy Configuration 🧩")
+
+When dealing with deeply nested JSON fields in the response body, it’s important to correctly specify the path to the fields in the Keploy configuration file. Here’s an example to illustrate how to add a nested `token` field to the global noise configuration.
+
+### Example JSON Response 📄 [](https://keploy.io/docs/running-keploy/configuration-file/\#example-json-response- "Direct link to Example JSON Response 📄")
+
+Consider the following JSON response:
+
+```codeBlockLines_e6Vv
+{
+"data": {
+ "signUp": {
+ "id": "100",
+ "email": "keploy@test.com",
+ "firstName": "keploy",
+ "lastName": "keploy",
+ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImNyZWF0ZWRBdCI6IjIwMjQtMDUtMjJUMTA6NDk6MjIuNjI0WiIsImlkIjoxMDAsImZpcnN0TmFtZSI6InNhZ2FyIiwibGFzdE5hbWUiOiJ0b21hciIsImVtYWlsIjoic2FnYXJAdGVzdC5jb20iLCJwYXNzd29yZCI6IjU1ZjQ1MTg2OWI3OTZlMmFlZmU3ODA2ZjA0YTJlMzBkIiwidXBkYXRlZEF0IjoiMjAyNC0wNS0yMlQxMDo0OToyMi4wMzlaIiwiZGVsZXRlZEF0IjpudWxsfSwiaWF0IjoxNzE2Mzc0OTYyLCJleHAiOjE3MTY0NjEzNjJ9.21A-gz8QLnbx2bhpzMcezENjTGWKhBfwU4o2paFuEVM",
+ "createdAt": "2024-05-22T10:49:22.624Z",
+ "deletedAt": null,
+ "updatedAt": "2024-05-22T10:49:22.039Z"
+ }
+}
+}
+
+```
+
+### Adding Nested Fields to the Configuration ⚙️ [](https://keploy.io/docs/running-keploy/configuration-file/\#adding-nested-fields-to-the-configuration-%EF%B8%8F "Direct link to Adding Nested Fields to the Configuration ⚙️")
+
+To add the `token` field inside the `signUp` object in the global noise configuration, you need to specify the complete path to the field.
+
+```codeBlockLines_e6Vv
+globalNoise:
+fields:
+ - path: "data.signUp.token"
+ - path: "data.signUp.createdAt"
+ - path: "data.signUp.updatedAt"
+ - path: "data.signUp.deletedAt"
+
+```
+
+In this example:
+
+- `data.signUp.token` refers to the `token` field inside the nested `signUp` object.
+- Similarly, other nested fields like `createdAt`, `updatedAt`, and `deletedAt` are specified.
+
+By specifying the path in this manner, Keploy will correctly identify and handle these deeply nested fields in the configuration.
+
+### **Note**: [](https://keploy.io/docs/running-keploy/configuration-file/\#note "Direct link to note")
+
+The `globalNoise` and `test-sets` are optional fields in the config file. If not specified, the default value for both fields is an empty object `{}`. This flexibility allows you to seamlessly integrate advanced noise filtering based on your testing requirements.
+
+## Conclusion [](https://keploy.io/docs/running-keploy/configuration-file/\#conclusion "Direct link to Conclusion")
+
+Congratulations! You've now explored the features and configuration options provided by `Keploy-config`.
+
+Now armed with Keploy-config, you are ready to embark on a more organized and productive journey of recording and testing APIs with Keploy. Feel free to explore additional features, customize configurations, and refer to the [CLI Command Docs](http://keploy.io/docs/running-keploy/cli-commands/) for more details on available flags and parameters.
+
+Happy testing and may your APIs always return the expected results! 🚀
+
+- [Introduction](https://keploy.io/docs/running-keploy/configuration-file/#introduction)
+- [Getting Started:](https://keploy.io/docs/running-keploy/configuration-file/#getting-started)
+- [Using the Config File](https://keploy.io/docs/running-keploy/configuration-file/#using-the-config-file)
+ - [Record Command:](https://keploy.io/docs/running-keploy/configuration-file/#record-command)
+ - [Test Command:](https://keploy.io/docs/running-keploy/configuration-file/#test-command)
+- [Configuration Sections](https://keploy.io/docs/running-keploy/configuration-file/#configuration-sections)
+ - [Record Section](https://keploy.io/docs/running-keploy/configuration-file/#record-section)
+ - [Test Section](https://keploy.io/docs/running-keploy/configuration-file/#test-section)
+ - [Bypass Rules Section](https://keploy.io/docs/running-keploy/configuration-file/#bypass-rules-section)
+- [Advanced Noise Filtering:](https://keploy.io/docs/running-keploy/configuration-file/#advanced-noise-filtering)
+ - [Global Noise](https://keploy.io/docs/running-keploy/configuration-file/#global-noise)
+ - [Test-Set Noise](https://keploy.io/docs/running-keploy/configuration-file/#test-set-noise)
+- [Handling Deeply Nested JSON Fields in Keploy Configuration 🧩](https://keploy.io/docs/running-keploy/configuration-file/#handling-deeply-nested-json-fields-in-keploy-configuration-)
+ - [Example JSON Response 📄](https://keploy.io/docs/running-keploy/configuration-file/#example-json-response-)
+ - [Adding Nested Fields to the Configuration ⚙️](https://keploy.io/docs/running-keploy/configuration-file/#adding-nested-fields-to-the-configuration-%EF%B8%8F)
+ - [**Note**:](https://keploy.io/docs/running-keploy/configuration-file/#note)
+- [Conclusion](https://keploy.io/docs/running-keploy/configuration-file/#conclusion)
+
+## Custom Mocks Guide
+[Skip to main content](https://keploy.io/docs/running-keploy/custom-mocks/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+If you can't run a dependency service and want to mock it, keploy supports adding manually written mocks.
+
+When adding a mock to the Keploy mock file, it's crucial to ensure that all fields are accurately filled out and that the **timestamps align with the request and response timestamps** of the mock's respective test case.
+This document provides a schema and guidelines to assist you in this process.
+
+## Mocks Schema [](https://keploy.io/docs/running-keploy/custom-mocks/\#mocks-schema "Direct link to Mocks Schema")
+
+```codeBlockLines_e6Vv
+- version: api.keploy.io/v1beta1
+ kind: Http
+ name:
+ spec:
+ request:
+ method:
+ proto_major: 1
+ proto_minor: 1
+ url:
+ header:
+ body:
+ timestamp:
+ response:
+ status_code:
+ header:
+ body:
+ timestamp:
+___
+
+```
+
+### Field Descriptions [](https://keploy.io/docs/running-keploy/custom-mocks/\#field-descriptions "Direct link to Field Descriptions")
+
+- `version`: `api.keploy.io/v1beta1`
+- `kind`: Since custom mocks are HTTP mocks, the kind is `Http`.
+- `name`: The name of the mock needs to be **unique**.
+- `request`: The request details.
+ - `method`: The HTTP method (e.g., GET, POST).
+ - `url`: The URL of the request.
+ - `header`: The array of request headers.
+ - `body`: The request body.
+ - `timestamp`: The timestamp of the request, which must match the timestamp of the request in the associated test case.
+- `response`: The response details.
+ - `status_code`: The HTTP status code of the response.
+ - `header`: The response headers.
+ - `body`: The response body.
+ - `timestamp`: The timestamp of the response, which must match the timestamp of the response in the associated test case.
+
+## Guidelines for Adding a Mock [](https://keploy.io/docs/running-keploy/custom-mocks/\#guidelines-for-adding-a-mock "Direct link to Guidelines for Adding a Mock")
+
+1. **Ensure Unique Name**: Each mock must have a unique `name` to avoid conflicts.
+2. **Match Timestamps**: The `timestamp` fields in both the request and response sections must be within the associated testcase timestamps. This ensures that the mock is accurately linked to the correct point in the test case's execution.
+3. **Provide Accurate Details**: Ensure that the method, URL, headers, and body accurately reflect the request and response you intend to mock.
+
+## Example [](https://keploy.io/docs/running-keploy/custom-mocks/\#example "Direct link to Example")
+
+```codeBlockLines_e6Vv
+---
+version: api.keploy.io/v1beta1
+kind: Http
+name: mock-n
+spec:
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:9966/petclinic/api/owners
+ header:
+ Accept: application/json, text/plain, */*
+ Accept-Encoding: gzip, deflate, br
+ Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
+ Connection: keep-alive
+ Content-Length: "128"
+ Content-Type: application/json
+ Host: localhost:9966
+ Origin: http://localhost:4200
+ Referer: http://localhost:4200/
+ Sec-Ch-Ua: '"Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"'
+ Sec-Ch-Ua-Mobile: ?0
+ Sec-Ch-Ua-Platform: '"macOS"'
+ Sec-Fetch-Dest: empty
+ Sec-Fetch-Mode: cors
+ Sec-Fetch-Site: same-site
+ User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
+ body: '{"id":null,"firstName":"Bugs","lastName":"Bunny","address":"Rabbit Hole","city":"California","telephone":"9911229933"}'
+ timestamp: 2024-02-19T13:14:27.885643357Z
+
+ resp:
+ status_code: 201
+ header:
+ Access-Control-Allow-Origin: "*"
+ Access-Control-Expose-Headers: errors, content-type
+ Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+ Connection: keep-alive
+ Content-Type: application/json
+ Date: Mon, 19 Feb 2024 13:14:28 GMT
+ Expires: "0"
+ Keep-Alive: timeout=60
+ Location: /api/owners/1
+ Pragma: no-cache
+ Vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ X-Xss-Protection: "0"
+ body: '{"firstName":"Jhon","lastName":"Doe","address":"Rabbit Hole","city":"California","telephone":"9911229933","id":1,"pets":[]}'
+ timestamp: 2024-02-19T13:14:28.145240844Z
+---
+
+```
+
+- [Mocks Schema](https://keploy.io/docs/running-keploy/custom-mocks/#mocks-schema)
+ - [Field Descriptions](https://keploy.io/docs/running-keploy/custom-mocks/#field-descriptions)
+- [Guidelines for Adding a Mock](https://keploy.io/docs/running-keploy/custom-mocks/#guidelines-for-adding-a-mock)
+- [Example](https://keploy.io/docs/running-keploy/custom-mocks/#example)
+
+## Keploy Templatize Guide
+[Skip to main content](https://keploy.io/docs/running-keploy/keploy-templatize/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Sometimes keploy test and keploy rerecord fail because there are fields which are noisy but they are used in requests so when their values change, the subsequent requests also fail.
+
+eg: If an application is returning a JWT token in the response of a testcase and that token is being used in the request of another testcase, then that testcase will also fail when a new token is issued and the test is still using the old one that has been expired.
+
+Templatize, as its name suggests, templatizes the testcases, so now the JWT token's original value will be replaced by a template in both the response of one testcase and the request of the other testcase and a config file will be created which will contain a map of the template key mapped to its value. Now in the test mode or rerecord mode, whenever a new token is issued where the template is placed, it will update the template value in the map and use that value in the subequent testcases where the template is placed.
+
+## Keploy Templatize Example [](https://keploy.io/docs/running-keploy/keploy-templatize/\#keploy-templatize-example "Direct link to Keploy Templatize Example")
+
+You can use the following command to templatize your testsets.
+
+```codeBlockLines_e6Vv
+sudo -E env 'PATH=$PATH' keploy templatize
+
+```
+
+By default, it templatizes all the testsets in the keploy folder. If you want to templatize a particular testset, you can pass the testset flag like
+
+```codeBlockLines_e6Vv
+sudo -E env 'PATH=$PATH' keploy templatize -t="test-set-1"
+
+```
+
+> **Note**
+>
+> Even though you can use templatize multiple times, even on testsets that have already been templatized, but it is not reversible. So make sure you create a copy of your keploy folder before trying it out.
+
+- [Keploy Templatize Example](https://keploy.io/docs/running-keploy/keploy-templatize/#keploy-templatize-example)
+
+## Keploy SDK Installation
+[Skip to main content](https://keploy.io/docs/server/sdk-installation/go/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+To get the coverage report, first make sure all the requirements are met and then run Keploy test as usual with your application command:
+
+```codeBlockLines_e6Vv
+keploy test -c "your_application_command"
+
+```
+
+After successful execution of this command, A coverage report would be generated inside the test-run folder of keploy/reports.
+
+```codeBlockLines_e6Vv
+keploy
+├── reports
+│ └── test-run-0
+│ ├── coverage.yaml
+│ └── test-set-0-report.yaml
+└── test-set-0
+ ├── mocks.yaml
+ └── tests
+ ├── test-1.yaml
+ └── test-2.yaml
+
+```
+
+## 🛠️ Language Specific Requirements [](https://keploy.io/docs/server/sdk-installation/go/\#%EF%B8%8F-language-specific-requirements "Direct link to 🛠️ Language Specific Requirements")
+
+| Programming Language | Prerequisites |
+| --- | --- |
+| go | 1\. The application should have a graceful shutdown to stop the API server on `SIGTERM` or `SIGINT` signals. Refer [appendix](https://keploy.io/docs/server/sdk-installation/go/#graceful-shutdown) for basic implementation of graceful shutdown function.
2\. The go binary should be built with `-cover` flag. |
+
+## Graceful Shutdown [](https://keploy.io/docs/server/sdk-installation/go/\#graceful-shutdown "Direct link to Graceful Shutdown")
+
+It is important that the application is shutdown gracefully. In case of Golang, function for graceful shutdown:
+
+```codeBlockLines_e6Vv
+func GracefulShutdown() {
+ stopper := make(chan os.Signal, 1)
+ // listens for interrupt and SIGTERM signal
+ signal.Notify(stopper, os.Interrupt, os.Kill, syscall.SIGKILL, syscall.SIGTERM)
+ go func() {
+ select {
+ case <-stopper:
+ os.Exit(0)
+ }
+ }()
+}
+
+func main() {
+
+ port := "8080"
+
+ r := gin.Default()
+
+ r.GET("/:param", getURL)
+ r.POST("/url", putURL)
+ // should be called before starting the API server from main()
+ GracefulShutdown()
+
+ r.Run()
+}
+
+```
+
+## Usage [](https://keploy.io/docs/server/sdk-installation/go/\#usage "Direct link to Usage")
+
+For keploy test coverage the binary must built with `-cover` flag:
+
+```codeBlockLines_e6Vv
+go build -cover
+
+```
+
+To get the coverage data for unit tests :
+
+```codeBlockLines_e6Vv
+go test -cover ./... -args -test.gocoverdir="PATH_TO_UNIT_COVERAGE_FILES"
+
+```
+
+To merge coverage data of unit tests with Keploy provided coverage :
+
+```codeBlockLines_e6Vv
+go tool covdata textfmt -i="PATH_TO_UNIT_COVERAGE_FILES","./coverage-reports" -o combined-coverage.txt
+
+```
+
+To get the coverage related information for merged coverage data :
+
+```codeBlockLines_e6Vv
+go tool cover -func combined-coverage.txt
+
+```
+
+- [🛠️ Language Specific Requirements](https://keploy.io/docs/server/sdk-installation/go/#%EF%B8%8F-language-specific-requirements)
+- [Graceful Shutdown](https://keploy.io/docs/server/sdk-installation/go/#graceful-shutdown)
+- [Usage](https://keploy.io/docs/server/sdk-installation/go/#usage)
+
+## OpenHospital Setup Guide
+[Skip to main content](https://keploy.io/docs/quickstart/openhospital/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+This is a openhospital app where you can record testcases and mocks by interacting with the UI, and then test them using Keploy.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/openhospital/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/openhospital/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/openhospital/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/openhospital/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/openhospital/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/openhospital/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/openhospital/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/openhospital/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/openhospital/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+This project has Three parts - the UI, Core and API, since Keploy is a backend testing platform, we need to start the Backend of the project using Keploy and run the frontend as it is.
+
+If you want to try this quickstart setup on a Mac, use Lima. If you're on Windows, use WSL.
+
+## Setup the Core [](https://keploy.io/docs/quickstart/openhospital/\#setup-the-core "Direct link to Setup the Core")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/openhospital-core
+git checkout integration-with-keploy
+mvn clean install -DskipTests=true
+docker compose up
+
+```
+
+Note: If you face any issues while setting up the database, please try running docker compose up again. The issue should not occur the second time.
+
+## Setup the Backend [](https://keploy.io/docs/quickstart/openhospital/\#setup-the-backend "Direct link to Setup the Backend")
+
+Now it's time to setup the backend of our application. Let's Install the Openhospital API and get started.
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/openhospital-api
+git checkout integration-with-keploy
+mvn clean install -DskipTests=true
+
+```
+
+Now it's time to start the Backend using Keploy cli:
+
+# Instructions For Starting Using Binary [](https://keploy.io/docs/quickstart/openhospital/\#instructions-for-starting-using-binary "Direct link to Instructions For Starting Using Binary")
+
+Prerequisites For Binary:
+
+1. Node 20.11.0 LTS
+2. OpenJDK 17.0.9
+3. MVN version 3.6.3
+
+## Recording the testcases with Keploy [](https://keploy.io/docs/quickstart/openhospital/\#recording-the-testcases-with-keploy "Direct link to Recording the testcases with Keploy")
+
+```codeBlockLines_e6Vv
+keploy record -c "java -cp "target/openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.launch.JarLauncher"
+
+```
+
+
+
+## Start the frontend [](https://keploy.io/docs/quickstart/openhospital/\#start-the-frontend "Direct link to Start the frontend")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/openhospital-ui
+git checkout integration-with-keploy
+npm install
+npm start
+
+```
+
+Note: Login with username `admin` and password `admin`
+
+
+
+If you followed all the steps correctly, you should see a UI similar to the one shown above.
+
+Now you can start interacting with the UI and Keploy will automatically create the testcases and mocks for it in a folder named 'keploy'
+
+## Running the testcases using Keploy [](https://keploy.io/docs/quickstart/openhospital/\#running-the-testcases-using-keploy "Direct link to Running the testcases using Keploy")
+
+```codeBlockLines_e6Vv
+keploy test -c "java -cp "target/openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.launch.JarLauncher" --delay 40
+
+```
+
+🎉 Hooray! You've made it to the end of the binary section! 🎉
+
+Your CLI should look something like this
+
+
+
+This is a summary of the test cases recorded
+
+
+
+Here `delay` is the time it takes for your application to get started, after which Keploy will start running the testcases. If your application takes longer than 10s to get started, you can change the `delay` accordingly.
+`buildDelay` is the time that it takes for the image to get built. This is useful when you are building the docker image from your docker compose file itself.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/openhospital/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/openhospital/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/openhospital/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/openhospital/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/openhospital/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/openhospital/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/openhospital/#setting-up-the-docker-desktop-for-wsl-2)
+- [Setup the Core](https://keploy.io/docs/quickstart/openhospital/#setup-the-core)
+- [Setup the Backend](https://keploy.io/docs/quickstart/openhospital/#setup-the-backend)
+- [Recording the testcases with Keploy](https://keploy.io/docs/quickstart/openhospital/#recording-the-testcases-with-keploy)
+- [Start the frontend](https://keploy.io/docs/quickstart/openhospital/#start-the-frontend)
+- [Running the testcases using Keploy](https://keploy.io/docs/quickstart/openhospital/#running-the-testcases-using-keploy)
+- [Contact Us](https://keploy.io/docs/quickstart/openhospital/#contact-us)
+
+## Keploy Cloud Installation
+[Skip to main content](https://keploy.io/docs/keploy-cloud/cloud-installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction 📘 [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#introduction- "Direct link to Introduction 📘")
+
+#### Welcome to the Keploy Cloud Guide! [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#welcome-to-the-keploy-cloud-guide "Direct link to Welcome to the Keploy Cloud Guide!")
+
+In this guide, you will find information about Keploy Cloud, onboarding, features, and how to use them.
+
+#### Requesting a Keploy Cloud Account [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#requesting-a-keploy-cloud-account "Direct link to Requesting a Keploy Cloud Account")
+
+To request a Keploy Cloud account, please complete the request form [here](https://forms.gle/jGBbyRyh9H7AKXZX6). Our team will review your request and get back to you as soon as possible.
+
+#### Getting Started with Keploy Cloud [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#getting-started-with-keploy-cloud "Direct link to Getting Started with Keploy Cloud")
+
+Once your account is set up, you can start exploring features of Keploy Cloud. Here are some key features to can get started with:
+
+- **Time Freezing** ❄️: Keploy Cloud allows you to freeze/rollback the time in every test run, back to when the test case was recorded. This allows developers to ensure time-sensitive objects don’t expire or change, making tests consistent and more reliable.
+
+- **AI-Driven Test Generation** 🧠: Keploy will automatically uncover your API's edge cases and generate test cases to expose more code paths, thereby increasing code coverage.
+
+- **Test Deduplication** 📊 : Keploy detects duplicate/redundant tests automatically, which will be particularly useful if you plan to record numerous scenarios from a live environment and wish to retain only unique scenario tests.
+
+- **Keploy Console** 📈: We are ensuring a smooth experience of visualising bugs found with Keploy and sharing reports with your team.
+
+- **Asynchronous Processes Support** ⏱ : Keploy V2 captures and replays asynchronous tasks effectively. We're also incorporating support for adding custom user-defined behaviours or assertions.
+
+- **Mock Registry** 📂: The Mock Registry is a system designed to handle large mock files by uploading them to cloud storage, preventing these sizable files from being committed to Git repositories. This approach optimizes repository size and performance while maintaining an efficient and streamlined development workflow.
+
+
+To get started with Keploy Cloud, you will need to install the Keploy Cloud Agent and authenticate your account.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Installation 🛠️ [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#installation-%EF%B8%8F "Direct link to Installation 🛠️")
+
+Install and Validate the Keploy Cloud Agent by following the steps below:
+
+```codeBlockLines_e6Vv
+curl --silent -O -L https://keploy.io/ent/install.sh && source install.sh
+
+```
+
+Enter your **API Key** when prompted, ask your org Admin to re-regenerate the API key in case you lose it.
+
+Once validated, you can start using Keploy Cloud to record-test.
+
+### Need Help? [](https://keploy.io/docs/keploy-cloud/cloud-installation/\#need-help "Direct link to Need Help?")
+
+If you have any questions or need assistance, our support team is here to help. You can reach out to us through our support portal, Slack or by emailing us at hello\[at\]keploy.io.
+
+- [Introduction 📘](https://keploy.io/docs/keploy-cloud/cloud-installation/#introduction-)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/keploy-cloud/cloud-installation/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Installation 🛠️](https://keploy.io/docs/keploy-cloud/cloud-installation/#installation-%EF%B8%8F)
+ - [Need Help?](https://keploy.io/docs/keploy-cloud/cloud-installation/#need-help)
+
+## Install Keploy on MacOS
+[Skip to main content](https://keploy.io/docs/keploy-explained/mac-linux/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+### Downloading and running Keploy in Native using Debian on MacOS [](https://keploy.io/docs/keploy-explained/mac-linux/\#downloading-and-running-keploy-in-native-using-debian-on-macos "Direct link to Downloading and running Keploy in Native using Debian on MacOS")
+
+1. Open the terminal Session.
+2. Run the following command. This installs homebrew and makes it easier to manage software and packages on macOS
+
+```codeBlockLines_e6Vv
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+
+```
+
+3. Now, with the help of homebrew, we would install Lima (Linux Virtual Machine) by running this command.
+
+```codeBlockLines_e6Vv
+brew install lima
+
+```
+
+4. Create a Debian instance.
+
+```codeBlockLines_e6Vv
+limactl create template://debian-12
+
+```
+
+5. Start the instance
+
+```codeBlockLines_e6Vv
+limactl start debian-12
+
+```
+
+6. Enter the shell of the running linux instance
+
+```codeBlockLines_e6Vv
+limactl shell debian-12
+
+```
+
+7. Now you are in the linux shell of the debian instance. Now, run the following command to go the `Users` into your directory
+
+```codeBlockLines_e6Vv
+cd /Users
+
+```
+
+8. Replace the `Username` with your macOS username in the following command. This will take you to your macOS home directory. (You might need to allow access to Terminal.app in a popup)
+
+```codeBlockLines_e6Vv
+cd /{Username}
+
+```
+
+9. Run the following command to install Keploy
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+10. Run the following command to install Zsh
+
+```codeBlockLines_e6Vv
+sudo apt-get -y install zsh
+
+```
+
+**Why?** : zsh (Z Shell) is an advanced shell that offers enhanced features compared to the default bash shell. It provides better autocompletion, advanced globbing, improved history management, and more customization options.
+
+11. Install Git
+
+```codeBlockLines_e6Vv
+sudo apt-get -y install git
+
+```
+
+12. Install 'Oh-my-zsh'
+
+```codeBlockLines_e6Vv
+sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
+
+```
+
+**Why?** : oh-my-zsh is a framework for managing your zsh configuration. It comes with a collection of plugins, themes, and helpful features that enhance the zsh experience.
+
+13. Commands to Install docker
+
+```codeBlockLines_e6Vv
+sudo apt-get -y update
+
+```
+
+```codeBlockLines_e6Vv
+sudo apt-get -y install ca-certificates curl
+
+```
+
+```codeBlockLines_e6Vv
+sudo install -m 0755 -d /etc/apt/keyrings
+
+```
+
+```codeBlockLines_e6Vv
+sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
+
+```
+
+```codeBlockLines_e6Vv
+sudo chmod a+r /etc/apt/keyrings/docker.asc
+
+```
+
+```codeBlockLines_e6Vv
+echo \
+ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
+ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
+ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+
+```
+
+```codeBlockLines_e6Vv
+sudo apt-get -y update
+
+```
+
+```codeBlockLines_e6Vv
+sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
+
+```
+
+14. Add docker to sudoers
+
+```codeBlockLines_e6Vv
+sudo groupadd docker
+
+```
+
+```codeBlockLines_e6Vv
+sudo gpasswd -a $USER docker
+
+```
+
+- [Downloading and running Keploy in Native using Debian on MacOS](https://keploy.io/docs/keploy-explained/mac-linux/#downloading-and-running-keploy-in-native-using-debian-on-macos)
+
+## No-Code Contributions
+[Skip to main content](https://keploy.io/docs/hacktoberfest/no-code-contribution/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+There are many ways to contribute to Keploy projects without writing a single line of code. You can help with:
+
+-  Used Keploy:- Tell the community about it in an awesome blog post.
+
+-  Improve Documentation:- As the more detailed the documentation is, better it will be for people who are looking for help.
+
+-  Create a tutorial:- They provide instructions on how to use a tool or service in a step-by-step manner.
+
+-  Translation:- Add a new translation to for our README.md
+
+## Keploy GitLab Integration
+[Skip to main content](https://keploy.io/docs/ci-cd/gitlab/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy can integrated with GitLab CI to streamline your testing process and ensure continuous testing as part of your CI/CD pipeline.
+
+## Create pipeline [](https://keploy.io/docs/ci-cd/gitlab/\#create-pipeline "Direct link to Create pipeline")
+
+To integrate the Keploy in `GitLab`, we first need to install and setup by adding the following steps to our `.gitlab-ci.yml` : -
+
+```codeBlockLines_e6Vv
+---
+stages:
+ - test
+
+keploy-test-job: # This job runs in the test stage.
+ image: ubuntu:22.04
+ stage: test
+ before_script:
+ ## Add the dependencies
+ - apt-get update && apt-get install -y curl python3 python3-pip git kmod linux-headers-generic bpfcc-tools sudo
+ - git clone https://github.com/keploy/samples-python
+ - cd flask-mongo
+ - mkdir -p /sys/kernel/debug
+ - mkdir -p /sys/kernel/tracing
+
+ script:
+ ## Steps to install Keploy and run application
+ ...
+
+```
+
+> **Note: if you are using `arm_64` as runner use below to download keploy binary**
+
+`curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp`
+
+Now that we have Keploy installed, and all ready, we need switch to path where `keploy` folder is present in our application and install all the application related dependencies. Since we are using [flask-mongo](https://github.com/keploy/samples-python) sample-application, steps in our `script:` would look like below:-
+
+```codeBlockLines_e6Vv
+script:
+ ## Steps to install Keploy and run application
+ # Install Keploy
+ - curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+ # Mount required filesystems
+ - mount -t debugfs nodev /sys/kernel/debug || true
+ - mount -t tracefs nodev /sys/kernel/tracing || true
+
+ # Run Keploy tests
+ - pip3 install -r requirements.txt
+ - keploy test -c "python3 app.py" --delay 50
+
+```
+
+In your `.gitlab-ci.yml file`, in last step we have `keploy test` command to run your keploy generated test suite, this sets up Keploy to replay the interactions it has generated and perform CI Testing.
+
+### 📝 Note [](https://keploy.io/docs/ci-cd/gitlab/\#-note "Direct link to 📝 Note")
+
+Did you notice some weird stuff in the pipeline? Like `kmod`, `linux-headers`, `/sys/kernel/debug`...and thought, _"Wait, am I hacking the kernel or something?"_ 😅
+
+Don’t worry — these are just there because **Keploy uses eBPF** (a cool Linux feature) to trace your app’s behavior.
+
+So we install `kmod`, `linux-headers-generic`, and `bpfcc-tools` to make that tracing possible.
+
+Some CI systems don’t have `/sys/kernel/debug` and `/sys/kernel/tracing` by default, so we create them and mount `debugfs` and `tracefs` — it’s like giving Keploy the **backstage pass** it needs to watch your app in action.
+
+No black magic. Just some low-level Linux stuff helping your tests run like magic! 🪄✨
+
+We will get to see output : -
+
+```codeBlockLines_e6Vv
+$ keploy test -c "python3 app.py" --delay 50
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+version: 2.5.1
+🐰 Keploy: 2025-04-14T16:22:12Z WARN python language detected. please use --language to manually set the language if needed
+🐰 Keploy: 2025-04-14T16:22:13Z INFO keploy initialized and probes added to the kernel.
+🐰 Keploy: 2025-04-14T16:22:14Z INFO starting UDP DNS server at addr :26789
+🐰 Keploy: 2025-04-14T16:22:14Z INFO Keploy has taken control of the DNS resolution mechanism, your application may misbehave if you have provided wrong domain name in your application code.
+🐰 Keploy: 2025-04-14T16:22:14Z INFO Proxy started at port:16789
+🐰 Keploy: 2025-04-14T16:22:14Z INFO running {"test-set": "[test-set-0]"}
+🐰 Keploy: 2025-04-14T16:22:14Z INFO starting TCP DNS server at addr :26789
+ * Serving Flask app 'app'
+ * Debug mode: on
+WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
+ * Running on all addresses (0.0.0.0)
+ * Running on http://127.0.0.1:6000
+ * Running on http://127.0.0.1:6000
+Press CTRL+C to quit
+ * Restarting with stat
+ * Debugger is active!
+ * Debugger PIN: 100-754-563
+🐰 Keploy: 2025-04-14T16:23:04Z INFO starting test for of {"test case": "[test-1]", "test set": "[test-set-0]"}
+127.0.0.1 - - [14/Apr/2025 16:23:04] "POST /students HTTP/1.1" 200 -
+Testrun passed for testcase with id: "test-1"
+--------------------------------------------------------------------
+🐰 Keploy: 2025-04-14T16:23:04Z INFO result {"testcase id": "[test-1]", "testset id": "[test-set-0]", "passed": "[true]"}
+ <=========================================>
+ TESTRUN SUMMARY. For test-set: "test-set-0"
+ Total tests: 1
+ Total test passed: 1
+ Total test failed: 0
+ Time Taken: "50.01 s"
+ <=========================================>
+ COMPLETE TESTRUN SUMMARY.
+ Total tests: 1
+ Total test passed: 1
+ Total test failed: 0
+ Total time taken: "50.01 s"
+ Test Suite Name Total Test Passed Failed Time Taken
+ "test-set-0" 1 1 0 "50.01 s"
+<=========================================>
+🐰 Keploy: 2025-04-14T16:23:05Z INFO calculating coverage for the test run and inserting it into the report
+Wrote JSON report to coverage.json
+🐰 Keploy: 2025-04-14T16:23:05Z INFO [Total Coverage Percentage: 64%]
+🐰 Keploy: 2025-04-14T16:23:05Z INFO stopping Keploy {"reason": "replay completed successfully"}
+🐰 Keploy: 2025-04-14T16:23:05Z INFO proxy stopped...
+🐰 Keploy: 2025-04-14T16:23:05Z INFO eBPF resources released successfully...
+Cleaning up project directory and file based variables
+00:00
+Job succeeded
+
+```
+
+_And... voila! You have successfully integrated keploy in GitLab CI/CD pipeline 🌟_
+
+Integrating Keploy with GitLab CI automates the testing process, ensuring that tests are run with every commit and merge request. And by running tests automatically in CI pipeline, you can catch issues early and ensure that your application remains stable and reliable.
+
+### 📦 Need the Full Pipeline? [](https://keploy.io/docs/ci-cd/gitlab/\#-need-the-full-pipeline "Direct link to 📦 Need the Full Pipeline?")
+
+If you’re thinking, “This pipeline looks cool, but I need the _whole thing_ to integrate with your application!” — well, you're in luck! Check it out [here](https://github.com/keploy/samples-python) and get ready to copy-paste your way to success! ✨🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/ci-cd/gitlab/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Create pipeline](https://keploy.io/docs/ci-cd/gitlab/#create-pipeline)
+ - [📝 Note](https://keploy.io/docs/ci-cd/gitlab/#-note)
+ - [📦 Need the Full Pipeline?](https://keploy.io/docs/ci-cd/gitlab/#-need-the-full-pipeline)
+- [Contact Us](https://keploy.io/docs/ci-cd/gitlab/#contact-us)
+
+## Keploy Jenkins Integration
+[Skip to main content](https://keploy.io/docs/ci-cd/jenkins/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+Keploy can integrated with Jenkins to ensure continuous testing as part of your CI/CD pipeline.
+
+## Prerequisites [](https://keploy.io/docs/ci-cd/jenkins/\#prerequisites "Direct link to Prerequisites")
+
+- Jenkins installed and running
+- Sudo access with `"NOPASSWORD"` via `jenkins ALL=(ALL) NOPASSWD: ALL`.
+
+Open terminal and run `sudo visudo` command to open the sudoers file and add the below line at the end of the file.
+
+```codeBlockLines_e6Vv
+jenkins ALL=(ALL) NOPASSWD: ALL
+
+```
+
+## Create a Pipeline [](https://keploy.io/docs/ci-cd/jenkins/\#create-a-pipeline "Direct link to Create a Pipeline")
+
+Use the template below to install Keploy in your Jenkins pipeline using a script : -
+
+```codeBlockLines_e6Vv
+pipeline {
+ agent any
+ stages {
+ stage('Install Keploy') {
+ steps {
+ sh '''
+ curl --silent -O -L https://keploy.io/install.sh && bash install.sh
+ '''
+ }
+ }
+ }
+}
+
+```
+
+> **Note: if you are using `arm_64` as runner use below to download keploy binary**
+
+`curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp`
+
+### Example [](https://keploy.io/docs/ci-cd/jenkins/\#example "Direct link to Example")
+
+Now that we have Keploy installed, and all ready, we need switch to path where `keploy` folder is present in our application and install all the application related dependencies. Since we are using [gin-mongo](https://github.com/keploy/samples-go/tree/main/gin-mongo) sample-application, steps in our `script` would look like below:-
+
+```codeBlockLines_e6Vv
+pipeline {
+ agent any
+ stages {
+ stage('Install Dependencies') {
+ steps {
+ sh 'sudo apt-get update && sudo apt-get install -y curl kmod linux-headers-generic bpfcc-tools git golang-go'
+ }
+ }
+ stage('Clone and Setup App') {
+ steps {
+ sh '''
+ rm -rf samples-go
+ git clone 'https://github.com/keploy/samples-go'
+ cd gin-mongo
+ go mod tidy
+ '''
+ }
+ }
+ stage('Install Keploy') {
+ steps {
+ sh '''
+ curl --silent -O -L https://keploy.io/install.sh && bash install.sh
+ '''
+ }
+ }
+ stage('Prepare eBPF Hooks') {
+ steps {
+ sh '''
+ sudo mkdir -p /sys/kernel/debug
+ sudo mkdir -p /sys/kernel/tracing
+ sudo mount -t debugfs nodev /sys/kernel/debug || true
+ sudo mount -t tracefs nodev /sys/kernel/tracing || true
+ '''
+ }
+ }
+ stage('Run Keploy Tests') {
+ steps {
+ sh '''
+ cd gin-mongo
+ sudo -E keploy test -c "go run main.go handler.go" --disableANSI
+ '''
+ }
+ }
+ }
+}
+
+```
+
+### 📝 Note [](https://keploy.io/docs/ci-cd/jenkins/\#-note "Direct link to 📝 Note")
+
+Did you notice some weird stuff in the pipeline? Like `kmod`, `linux-headers`, `/sys/kernel/debug`...and thought, _"Wait, am I hacking the kernel or something?"_ 😅
+
+Don’t worry — these are just there because **Keploy uses eBPF** (a cool Linux feature) to trace your app’s behavior.
+
+So we install `kmod`, `linux-headers-generic`, and `bpfcc-tools` to make that tracing possible.
+
+Some CI systems don’t have `/sys/kernel/debug` and `/sys/kernel/tracing` by default, so we create them and mount `debugfs` and `tracefs` — it’s like giving Keploy the **backstage pass** it needs to watch your app in action.
+
+No black magic. Just some low-level Linux stuff helping your tests run like magic! 🪄✨
+
+We would output something like below:-
+
+```codeBlockLines_e6Vv
+Started by `user admin`
+
+...
+
+sudo -E keploy test -c go run main.go handler.go --disableANSI
+
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+version: 2.5.2
+
+2025-04-18T04:06:50.413Z INFO provider/cmd.go:504 Color encoding is disabled
+2025-04-18T04:06:50.413Z WARN provider/cmd.go:726 Delay is set to 5 seconds, incase your app takes more time to start use --delay to set custom delay
+2025-04-18T04:06:50.413Z INFO provider/cmd.go:730 Example usage: keploy test -c "/path/to/user/app" --delay 6
+2025-04-18T04:06:50.413Z WARN replay/replay.go:140 go language detected. please use --language to manually set the language if needed
+2025-04-18T04:06:50.413Z WARN golang/utils.go:28 cover flag not found in command, skipping coverage calculation
+2025-04-18T04:06:51.104Z INFO hooks/hooks.go:436 keploy initialized and probes added to the kernel.
+
+[GIN-debug] GET /:param --> main.GetURL (3 handlers)
+[GIN-debug] POST /url --> main.PutURL (3 handlers)
+2025-04-18T04:06:57.585Z INFO pkg/util.go:123 starting test for of {"test case": "[test-1]", "test set": "[test-set-0]"}
+[GIN] 2025/04/18 - 04:06:57 | 200 | 2.109927ms | ::1 | POST "/url"
+Testrun passed for testcase with id: "test-1"
+
+--------------------------------------------------------------------
+
+2025-04-18T04:06:57.588Z INFO replay/replay.go:717 result {"testcase id": "[test-1]", "testset id": "[test-set-0]", "passed": "[true]"}
+2025-04-18T04:06:57.593Z INFO pkg/util.go:123 starting test for of {"test case": "[test-2]", "test set": "[test-set-0]"}
+[GIN] 2025/04/18 - 04:06:57 | 303 | 852.601µs | ::1 | GET "/Lhr4BWAi"
+Testrun passed for testcase with id: "test-2"
+
+--------------------------------------------------------------------
+
+2025-04-18T04:06:57.597Z INFO replay/replay.go:717 result {"testcase id": "[test-2]", "testset id": "[test-set-0]", "passed": "[true]"}
+
+ <=========================================>
+ TESTRUN SUMMARY. For test-set: "test-set-0"
+ Total tests: 2
+ Total test passed: 2
+ Total test failed: 0
+ Time Taken: "5.02 s"
+ <=========================================>
+
+```
+
+_And... voila! You have successfully integrated keploy in Jenkins CI/CD pipeline 🌟_
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/ci-cd/jenkins/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Prerequisites](https://keploy.io/docs/ci-cd/jenkins/#prerequisites)
+- [Create a Pipeline](https://keploy.io/docs/ci-cd/jenkins/#create-a-pipeline)
+ - [Example](https://keploy.io/docs/ci-cd/jenkins/#example)
+ - [📝 Note](https://keploy.io/docs/ci-cd/jenkins/#-note)
+- [Contact Us](https://keploy.io/docs/ci-cd/jenkins/#contact-us)
+
+## Keploy Quickstart Guide
+[Skip to main content](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of REST API and see how seamlessly Keploy integrates with [Spring-Boot](https://github.com/spring-projects/spring-boot) and MongoDB Buckle up, it's gonna be a fun ride! 🎢
+
+## Pre-Requisite 🛠️ [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#pre-requisite-%EF%B8%8F "Direct link to Pre-Requisite 🛠️")
+
+- Install JDK and add JAVA\_HOME in environment variable.
+- Install [Maven](https://maven.apache.org/install.html)
+- Install [Docker](https://docs.docker.com/engine/install/)
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#get-started- "Direct link to Get Started! �🎬")
+
+### Set up the Mongo database [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#set-up-the-mongo-database "Direct link to Set up the Mongo database")
+
+Create a docker network -
+
+```codeBlockLines_e6Vv
+docker network create backend
+
+```
+
+Start the MongoDB instance -
+
+```codeBlockLines_e6Vv
+docker run -p 27017:27017 --name spring-boot-mongo --network backend mongo
+
+```
+
+### Clone the sample REST API CRUD app 🧪 [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#clone-the-sample-rest-api-crud-app- "Direct link to Clone the sample REST API CRUD app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-java.git && cd samples-java/spring-boot-mongo
+mvn wrapper:wrapper
+./mvnw clean install
+
+```
+
+> **Note**: For Windows, use `mvnw.cmd clean install`
+
+## Install Keploy 📥 [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#install-keploy- "Direct link to Install Keploy 📥")
+
+First things first, If you are using WSL on windows then use below to start wsl in the user's home directory:
+
+```codeBlockLines_e6Vv
+wsl ~
+
+```
+
+Alright, let's equip ourselves with the **latest Keploy binary**:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+If everything goes right, your screen should look a bit like this:
+
+
+
+## Run Application [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#run-application "Direct link to Run Application")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (mongoDB) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+keploy record -c "./mvnw spring-boot:run"
+
+```
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/potions' \
+--header 'Content-Type: application/json' \
+--data ' {
+ "name": "Strength Potion v2",
+ "description": "Enhances the drinker'\''s physical strength temporarily.",
+ "bottle": 3,
+ "quantity": 150
+ }'
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location --request GET 'http://localhost:8080/potions'
+
+```
+
+> Take a note of the `id` and replace the `UUID_OF_POTION` with the `id` in the upcoming API requests!
+
+**3\. Make a PUT request**
+
+```codeBlockLines_e6Vv
+ curl --location --request PUT 'http://localhost:8080/potions/UUID_OF_POTION' \
+ --header 'Content-Type: application/json' \
+ --data ' {
+ "name": "Strength Potion",
+ "description": "Enhances the drinker'\''s physical strength temporarily.",
+ "bottle": 5,
+ "quantity": 200
+ }'
+
+```
+
+**4\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location --request GET 'http://localhost:8080/potions/UUID_OF_POTION'
+
+```
+
+**5\. Make a DELETE request**
+
+```codeBlockLines_e6Vv
+curl --location --request DELETE 'http://localhost:8080/potions/UUID_OF_POTION'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-x.yml` and `mocks.yml`.
+
+Want to see if everything works as expected?
+
+### Run Tests 🏁 [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#run-tests- "Direct link to Run Tests 🏁")
+
+Ready to put your spells to the test?
+
+```codeBlockLines_e6Vv
+keploy test -c "./mvnw spring-boot:run" --delay 15
+
+```
+
+This will run the tests and generate the report in the `Keploy/reports` directory in the CWD.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. We provided you with some data in [potions.json](https://github.com/keploy/samples-java/blob/main/spring-boot-mongo/potions.json). Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+## Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/java-spring-boot-mongo/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#introduction)
+- [Pre-Requisite 🛠️](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#pre-requisite-%EF%B8%8F)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#get-started-)
+ - [Set up the Mongo database](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#set-up-the-mongo-database)
+ - [Clone the sample REST API CRUD app 🧪](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#clone-the-sample-rest-api-crud-app-)
+- [Install Keploy 📥](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#install-keploy-)
+- [Run Application](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#run-application)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#-roll-the-tape---recording-time)
+ - [Generate testcases](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#generate-testcases)
+ - [Run Tests 🏁](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#run-tests-)
+- [Wrapping it up 🎉](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/java-spring-boot-mongo/#contact-us)
+
+## Spring Boot XML APIs
+[Skip to main content](https://keploy.io/docs/quickstart/java-spring-boot-xml/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#introduction "Direct link to Introduction")
+
+🌟 Explore creating REST APIs with XML responses using [Spring-Boot](https://github.com/spring-projects/spring-boot). Discover the ease of integrating XML serialization through JAXB. Let's dive right in! 🚀
+
+## Pre-Requisite 🛠️ [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#pre-requisite-%EF%B8%8F "Direct link to Pre-Requisite 🛠️")
+
+- Install Java 17 and set JAVA\_HOME environment variable.
+- Install [Maven](https://maven.apache.org/install.html)
+- Install [Docker](https://docs.docker.com/engine/install/) (optional)
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#get-started- "Direct link to Get Started! 🎬")
+
+### Clone and Build the Application [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#clone-and-build-the-application "Direct link to Clone and Build the Application")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-java.git
+cd spring-boot-xml/naive-spring-boot
+mvn clean install
+
+```
+
+### Run the Application [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#run-the-application "Direct link to Run the Application")
+
+Start the Spring Boot application with:
+
+```codeBlockLines_e6Vv
+mvn spring-boot:run
+
+```
+
+> **Note**: For Windows users, commands remain the same.
+
+## API Endpoints 📡 [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#api-endpoints- "Direct link to API Endpoints 📡")
+
+### Get User Data (XML) [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#get-user-data-xml "Direct link to Get User Data (XML)")
+
+- **Endpoint**: `GET /api/user`
+
+Make a request using `curl`:
+
+```codeBlockLines_e6Vv
+curl -X GET -H \"Accept: application/xml\" http://localhost:8080/api/user
+
+```
+
+- **Endpoint**: `GET /api/users`
+
+Make a request using `curl`:
+
+```codeBlockLines_e6Vv
+curl -X GET http://localhost:8080/api/users -H "Accept: application/xml"
+
+```
+
+- **Endpoint**: `GET /api/people`
+
+Make a request using `curl`:
+
+```codeBlockLines_e6Vv
+curl -X GET http://localhost:8080/api/people -H "Accept: application/xml"
+
+```
+
+### Example XML Response [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#example-xml-response "Direct link to Example XML Response")
+
+```codeBlockLines_e6Vv
+
+ John Doe
+ 30
+ 0101233333
+
+
+```
+
+## Integrating with Keploy 📥 [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#integrating-with-keploy- "Direct link to Integrating with Keploy 📥")
+
+Harness Keploy's test generation capabilities easily:
+
+### Install Keploy [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#install-keploy "Direct link to Install Keploy")
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+or
+
+### Install the cloud version - [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#install-the-cloud-version-- "Direct link to Install the cloud version -")
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/ent/install.sh && source install.sh
+
+```
+
+### Record Test Cases [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#record-test-cases "Direct link to Record Test Cases")
+
+```codeBlockLines_e6Vv
+keploy record -c "java -jar target/XML-0.0.1-SNAPSHOT.jar"
+
+```
+
+Start recording interactions by running:
+
+```codeBlockLines_e6Vv
+keploy record -c "java -jar target/XML-0.0.1-SNAPSHOT.jar"
+
+```
+
+Then, invoke the API using `curl` or your favorite API testing tool.
+
+### Run Generated Tests [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#run-generated-tests "Direct link to Run Generated Tests")
+
+Execute recorded tests:
+
+```codeBlockLines_e6Vv
+keploy test -c "java -jar target/XML-0.0.1-SNAPSHOT.jar" --delay 10
+
+```
+
+Review generated test reports in `Keploy/reports`.
+
+## Handling Failing Tests ⚠️ [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#handling-failing-tests-%EF%B8%8F "Direct link to Handling Failing Tests ⚠️")
+
+If you encounter failing tests due to variable or irrelevant data, like timestamps or dynamically generated fields, you can add them to the global noise configuration in your `keploy.yml`:
+
+**Example:**
+
+
+
+```codeBlockLines_e6Vv
+globalNoise:
+ global:
+ header.Date: []
+ body:
+ # To ignore some values for a field, pass regex patterns to the corresponding array value
+ UserList: []
+
+```
+
+After updating `keploy.yml` with the above configuration, rerun your tests, and the issue should be resolved.
+
+
+
+## Dependencies 📚 [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#dependencies- "Direct link to Dependencies 📚")
+
+- Spring Boot
+- Spring Web
+- JAXB (XML serialization)
+
+## Wrapping Up 🎉 [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#wrapping-up- "Direct link to Wrapping Up 🎉")
+
+Fantastic! You've successfully navigated creating and testing XML APIs with Spring Boot and Keploy. Keep exploring, experimenting, and innovating! If you have any queries, we're here to help!
+
+## Contact Us [](https://keploy.io/docs/quickstart/java-spring-boot-xml/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/java-spring-boot-xml/#introduction)
+- [Pre-Requisite 🛠️](https://keploy.io/docs/quickstart/java-spring-boot-xml/#pre-requisite-%EF%B8%8F)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/java-spring-boot-xml/#get-started-)
+ - [Clone and Build the Application](https://keploy.io/docs/quickstart/java-spring-boot-xml/#clone-and-build-the-application)
+ - [Run the Application](https://keploy.io/docs/quickstart/java-spring-boot-xml/#run-the-application)
+- [API Endpoints 📡](https://keploy.io/docs/quickstart/java-spring-boot-xml/#api-endpoints-)
+ - [Get User Data (XML)](https://keploy.io/docs/quickstart/java-spring-boot-xml/#get-user-data-xml)
+ - [Example XML Response](https://keploy.io/docs/quickstart/java-spring-boot-xml/#example-xml-response)
+- [Integrating with Keploy 📥](https://keploy.io/docs/quickstart/java-spring-boot-xml/#integrating-with-keploy-)
+ - [Install Keploy](https://keploy.io/docs/quickstart/java-spring-boot-xml/#install-keploy)
+ - [Install the cloud version -](https://keploy.io/docs/quickstart/java-spring-boot-xml/#install-the-cloud-version--)
+ - [Record Test Cases](https://keploy.io/docs/quickstart/java-spring-boot-xml/#record-test-cases)
+ - [Run Generated Tests](https://keploy.io/docs/quickstart/java-spring-boot-xml/#run-generated-tests)
+- [Handling Failing Tests ⚠️](https://keploy.io/docs/quickstart/java-spring-boot-xml/#handling-failing-tests-%EF%B8%8F)
+- [Dependencies 📚](https://keploy.io/docs/quickstart/java-spring-boot-xml/#dependencies-)
+- [Wrapping Up 🎉](https://keploy.io/docs/quickstart/java-spring-boot-xml/#wrapping-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/java-spring-boot-xml/#contact-us)
+
+## Keploy Integration Sample
+[Skip to main content](https://keploy.io/docs/quickstart/samples-echo/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-echo/\#introduction "Direct link to Introduction")
+
+A sample url shortener app to test Keploy integration capabilities using Echo and [PostgreSQL](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-echo/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-echo/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-echo/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-echo/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-echo/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-echo/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-echo/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-echo/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-echo/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-echo/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample URL shortener app 🧪 [](https://keploy.io/docs/quickstart/samples-echo/\#clone-a-sample-url-shortener-app- "Direct link to Clone a sample URL shortener app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/echo-sql
+go mod download
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-echo/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-echo/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-echo/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-echo/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-echo/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+#### Start Postgres Instance [](https://keploy.io/docs/quickstart/samples-echo/\#start-postgres-instance "Direct link to Start Postgres Instance")
+
+Using the docker-compose file we will start our postgres instance:-
+
+```codeBlockLines_e6Vv
+# Start Postgres
+docker compose up
+
+```
+
+#### Creating Docker Volume [](https://keploy.io/docs/quickstart/samples-echo/\#creating-docker-volume "Direct link to Creating Docker Volume")
+
+```codeBlockLines_e6Vv
+docker volume create --driver local --opt type=debugfs --opt device=debugfs debugfs
+
+```
+
+### Capture the Testcases [](https://keploy.io/docs/quickstart/samples-echo/\#capture-the-testcases "Direct link to Capture the Testcases")
+
+Now, we will create the binary of our application:-
+
+```codeBlockLines_e6Vv
+docker build -t echo-app:1.0 .
+
+```
+
+Once we have our binary file ready,this command will start the recording of API calls using ebpf:-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker run -p 8082:8082 --name echoSqlApp --network keploy-network echo-app:1.0"
+
+```
+
+Make API Calls using Hoppscotch, Postman or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+#### Generate testcases [](https://keploy.io/docs/quickstart/samples-echo/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to make some API calls. You can use [Postman](https://www.postman.com/) or simply `curl`
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8082/url \
+ --header 'content-type: application/json' \
+ --data '{
+ "url": "https://github.com"
+}'
+
+```
+
+this will return the shortened url. The ts would automatically be ignored during testing because it'll always be different.
+
+```codeBlockLines_e6Vv
+{
+ "ts": 1647802058801841100,
+ "url": "http://localhost:8082/GuwHCgoQ"
+}
+
+```
+
+#### Redirect to original URL from shortened URL [](https://keploy.io/docs/quickstart/samples-echo/\#redirect-to-original-url-from-shortened-url "Direct link to Redirect to original URL from shortened URL")
+
+##### 1\. By using Curl Command [](https://keploy.io/docs/quickstart/samples-echo/\#1-by-using-curl-command "Direct link to 1. By using Curl Command")
+
+```codeBlockLines_e6Vv
+curl --request GET \
+ --url http://localhost:8082/GuwHCgoQ
+
+```
+
+2. Or by querying through the browser `http://localhost:8082/GuwHCgoQ`
+
+Now both these API calls were captured as **editable** testcases and written to `keploy/tests` folder. The keploy directory would also have `mocks` file that contains all the outputs of postgres operations. Here's what the folder structure look like:
+
+
+
+Now, let's see the magic! ✨💫
+
+Want to see if everything works as expected?
+
+### Run the Testcases [](https://keploy.io/docs/quickstart/samples-echo/\#run-the-testcases "Direct link to Run the Testcases")
+
+Now that we have our testcase captured, we will add `ts` to noise field in `test-*.yaml` files.
+
+**1\. On line 32 we will add " `- body.ts`" under the " `header.data`".**
+
+Now let's run the test mode (in the echo-sql directory, not the Keploy directory).
+
+```codeBlockLines_e6Vv
+keploy test -c "docker run -p 8082:8082 --name echoSqlApp --network keploy-network echo-app:1.0" --delay 10
+
+```
+
+output should look like
+
+
+
+So no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-echo/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-echo/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Postgres) chill on Docker. Ready? Let's get the party started!🎉
+Using the docker-compose file we will start our Postgres instance:-
+
+```codeBlockLines_e6Vv
+docker-compose up -d
+
+```
+
+> **Since we are using docker to run the application, we need to update the `postgres` host on line 28 in `main.go`, update the host to `localhost`.**
+
+Now, we will create the binary of our application:-
+
+```codeBlockLines_e6Vv
+go build -cover
+
+```
+
+### Capture the Testcases [](https://keploy.io/docs/quickstart/samples-echo/\#capture-the-testcases-1 "Direct link to Capture the Testcases")
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy record -c "./echo-psql-url-shortener"
+
+```
+
+
+
+#### Generate testcases [](https://keploy.io/docs/quickstart/samples-echo/\#generate-testcases-1 "Direct link to Generate testcases")
+
+To genereate testcases we just need to make some API calls. You can use Postman, Hoppscotch, or simply curl
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8082/url \
+ --header 'content-type: application/json' \
+ --data '{
+ "url": "https://google.com"
+}'
+
+```
+
+this will return the shortened url.
+
+```codeBlockLines_e6Vv
+{
+ "ts": 1645540022,
+ "url": "http://localhost:8082/Lhr4BWAi"
+}
+
+```
+
+#### Redirect to original url from shòrtened url [](https://keploy.io/docs/quickstart/samples-echo/\#redirect-to-original-url-from-sho%CC%80rtened-url "Direct link to Redirect to original url from shòrtened url")
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8082/Lhr4BWAi
+
+```
+
+or by querying through the browser `http://localhost:8082/Lhr4BWAi`
+
+Now, let's see the magic! 🪄💫
+
+Now both these API calls were captured as a testcase and should be visible on the Keploy CLI. You should be seeing an app named keploy folder with the test cases we just captured and data mocks created
+
+### Run the captured testcases [](https://keploy.io/docs/quickstart/samples-echo/\#run-the-captured-testcases "Direct link to Run the captured testcases")
+
+Now that we have our testcase captured, run the test file.
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy record -c "./echo-psql-url-shortener" --delay 10
+
+```
+
+So no need to setup dependencies like mongoDB, web-go locally or write mocks for your testing.
+
+The application thinks it's talking to mongoDB 😄
+
+We will get output something like this:
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-echo/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-echo/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-echo/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-echo/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-echo/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-echo/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-echo/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-echo/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-echo/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-echo/#get-started-)
+- [Clone a sample URL shortener app 🧪](https://keploy.io/docs/quickstart/samples-echo/#clone-a-sample-url-shortener-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-echo/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-echo/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-echo/#lights-camera-record-)
+ - [Capture the Testcases](https://keploy.io/docs/quickstart/samples-echo/#capture-the-testcases)
+ - [Run the Testcases](https://keploy.io/docs/quickstart/samples-echo/#run-the-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-echo/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-echo/#running-app-locally-on-linuxwsl-)
+ - [Capture the Testcases](https://keploy.io/docs/quickstart/samples-echo/#capture-the-testcases-1)
+ - [Run the captured testcases](https://keploy.io/docs/quickstart/samples-echo/#run-the-captured-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-echo/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-echo/#contact-us)
+
+## Keploy Integration Guide
+[Skip to main content](https://keploy.io/docs/quickstart/samples-bunjs/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+This is a sample app to test Keploy integration capabilities using Bun.js and MongoDB.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-bunjs/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-bunjs/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-bunjs/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-bunjs/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-bunjs/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-bunjs/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-bunjs/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-bunjs/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-bunjs/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-bunjs/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample user data CRUD app 🧪 [](https://keploy.io/docs/quickstart/samples-bunjs/\#clone-a-sample-user-data-crud-app- "Direct link to Clone a sample user data CRUD app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/bun-mongo
+
+# First Install bun and then its dependencies using the command below:
+
+bun install
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-bunjs/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-bunjs/#running-app-locally-on-linuxwsl-)
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-bunjs/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (MongoDB) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-bunjs/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Install the dependencies. Note: using this command directly without installing bun might give an error like `zsh: command not found: bun`
+
+```codeBlockLines_e6Vv
+bun install
+
+```
+
+This command will essentailly make a fresh docker-network named as `keploy-network `
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+Using the docker-compose file we will start our Postgres instance:-
+
+```codeBlockLines_e6Vv
+docker-compose up -d mongo
+
+```
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH Keploy record -c 'bun run supabun.ts'
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-bunjs/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --request POST localhost:4200/save
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --request GET localhost:4200/fetch
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+````codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:4200/save
+ header:
+ Accept: "*/*"
+ Host: localhost:4200
+ User-Agent: curl/8.2.1
+ body: ""
+ timestamp: 2024-02-24T11:16:49.156825536Z
+ resp:
+ status_code: 200
+ header:
+ Access-Control-Allow-Credentials: "true"
+ Access-Control-Allow-Headers: "*"
+ Access-Control-Allow-Methods: POST
+ Access-Control-Allow-Origin: "*"
+ Access-Control-Exposed-Headers: "*"
+ Content-Length: "16"
+ Content-Type: application/json;charset=utf-8
+ Date: Sat, 24 Feb 2024 11:16:49 GMT
+ Vary: "*"
+ body: '{"success":true}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-02-24T11:16:51.280382177Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1708773411
+curl: |
+ curl --request POST \
+ --url http://localhost:4200/save \
+ --header 'User-Agent: curl/8.2.1' \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:4200' \
+
+```yaml
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "nodejs|Mongoose","version": "5.9.1|7.6.8"},"platform": "Bun v1.0.29, LE","os": {"name": "linux","architecture": "x64","version": "6.5.0-17-generic","type": "Linux"}},"compression": ["none"]}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 298
+ requestId: 1
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"nodejs|Mongoose","version":"5.9.1|7.6.8"},"platform":"Bun v1.0.29, LE","os":{"name":"linux","architecture":"x64","version":"6.5.0-17-generic","type":"Linux"}},"compression":["none"]}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 3
+ responseTo: 1
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"65d9cff2df019fd437739fbf"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1708773364196"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 623599
+ created: 1708773364
+ reqTimestampMock: 2024-02-24T11:16:04.196109922Z
+ resTimestampMock: 2024-02-24T11:16:04.197231354Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-1
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"create":"animals","lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 98
+ requestId: 3
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"create":"animals","lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }'
+ checksum: 0
+ read_delay: 6520498
+ responses:
+ - header:
+ length: 38
+ requestId: 5
+ responseTo: 3
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 602253
+ created: 1708773364
+ reqTimestampMock: 2024-02-24T11:16:04.254900776Z
+ resTimestampMock: 2024-02-24T11:16:04.25581579Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-2
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 65536, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"maxAwaitTimeMS":{"$numberInt":"10000"},"topologyVersion":{"processId":{"$oid":"65d9cff2df019fd437739fbf"},"counter":{"$numberLong":"0"}},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 134
+ requestId: 4
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 65536
+ sections:
+ - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"maxAwaitTimeMS":{"$numberInt":"10000"},"topologyVersion":{"processId":{"$oid":"65d9cff2df019fd437739fbf"},"counter":{"$numberLong":"0"}},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 531789033
+ responses:
+ - header:
+ length: 313
+ requestId: 6
+ responseTo: 4
+ Opcode: 2013
+ message:
+ flagBits: 2
+ sections:
+ - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"65d9cff2df019fd437739fbf"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1708773374735"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 10006875186
+ created: 1708773374
+ reqTimestampMock: 2024-02-24T11:16:04.728966188Z
+ resTimestampMock: 2024-02-24T11:16:14.736354258Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-3
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 55
+ requestId: 6
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 10013801234
+ responses:
+ - header:
+ length: 304
+ requestId: 9
+ responseTo: 6
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ismaster":true,"topologyVersion":{"processId":{"$oid":"65d9cff2df019fd437739fbf"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1708773384750"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"3"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 361888
+ created: 1708773384
+ reqTimestampMock: 2024-02-24T11:16:24.750477084Z
+ resTimestampMock: 2024-02-24T11:16:24.751206134Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-4
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"animals","documents":[{"name":"Cow","sound":"Moo","_id":{"$oid":"65d9d02107882a00d23b5ac0"},"__v":{"$numberInt":"0"}}],"ordered":true,"lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 187
+ requestId: 9
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"insert":"animals","documents":[{"name":"Cow","sound":"Moo","_id":{"$oid":"65d9d02107882a00d23b5ac0"},"__v":{"$numberInt":"0"}}],"ordered":true,"lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }'
+ checksum: 0
+ read_delay: 44940206029
+ responses:
+ - header:
+ length: 45
+ requestId: 14
+ responseTo: 9
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 4726351
+ created: 1708773409
+ reqTimestampMock: 2024-02-24T11:16:49.196056727Z
+ resTimestampMock: 2024-02-24T11:16:49.201252579Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-5
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"animals","filter":{"name":"Cow"},"limit":{"$numberInt":"1"},"singleBatch":true,"batchSize":{"$numberInt":"1"},"lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 163
+ requestId: 11
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"animals","filter":{"name":"Cow"},"limit":{"$numberInt":"1"},"singleBatch":true,"batchSize":{"$numberInt":"1"},"lsid":{"id":{"$binary":{"base64":"zOPs0UhFTzaDZlU+iad5xg==","subType":"04"}}},"$db":"keploy"} }'
+ checksum: 0
+ read_delay: 8924817543
+ responses:
+ - header:
+ length: 166
+ requestId: 17
+ responseTo: 11
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"65d9cd7b1052611b2d2aaf42"},"name":"Cow","sound":"Moo","__v":{"$numberInt":"0"}}],"id":{"$numberLong":"0"},"ns":"keploy.animals"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 574025
+ created: 1708773418
+ reqTimestampMock: 2024-02-24T11:16:58.126078397Z
+ resTimestampMock: 2024-02-24T11:16:58.127001556Z
+
+````
+
+Want to see if everything works as expected?
+
+#### Run Tests [](https://keploy.io/docs/quickstart/samples-bunjs/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c 'bun run supabun.ts'
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-bunjs/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-bunjs/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-bunjs/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-bunjs/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-bunjs/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-bunjs/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-bunjs/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-bunjs/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-bunjs/#get-started-)
+- [Clone a sample user data CRUD app 🧪](https://keploy.io/docs/quickstart/samples-bunjs/#clone-a-sample-user-data-crud-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-bunjs/#installation-keploy)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-bunjs/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-bunjs/#-roll-the-tape---recording-time)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-bunjs/#generate-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-bunjs/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-bunjs/#contact-us)
+
+## Keploy NextJS Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-nextjs/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-nextjs/\#introduction "Direct link to Introduction")
+
+This is a sample app to test Keploy integration capabilities using NextJS and Postgres with Drizzle ORM. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-nextjs/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-nextjs/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-nextjs/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-nextjs/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-nextjs/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-nextjs/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-nextjs/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-nextjs/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-nextjs/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-nextjs/\#get-started- "Direct link to Get Started! 🎬")
+
+Now that we have bun installed, we will se tup our application.
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typscript/nextjs-postgres
+
+## Download node modules
+npm install
+
+# start the database instance
+docker-compose up
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-nextjs/\#installation- "Direct link to Installation 📥")
+
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-nextjs/#running-app-locally-on-linuxwsl-)
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-nextjs/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Redis) chill on Docker. Ready? Let's get the party started!🎉
+
+### Capture testcase [](https://keploy.io/docs/quickstart/samples-nextjs/\#capture-testcase "Direct link to Capture testcase")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy record -c 'npm run dev'
+
+```
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls!
+
+#### Generate testcases [](https://keploy.io/docs/quickstart/samples-nextjs/\#generate-testcases "Direct link to Generate testcases")
+
+**1\. Create Post request**
+
+```codeBlockLines_e6Vv
+curl -X POST -H "Content-Type: application/json" -d '{"name":"John","email":"doe@example.com"}' http://localhost:3000/api/users
+
+```
+
+This will return the response:
+
+```codeBlockLines_e6Vv
+{
+ "users": [\
+ {\
+ "id": 3,\
+ "name": "John",\
+ "email": "doe@example.com",\
+ "createdAt": "2024-03-27T10:07:30.172Z"\
+ }\
+ ]
+}
+
+```
+
+**2\. Make Get Request**
+
+```codeBlockLines_e6Vv
+curl -X GET http://localhost:3000/api/users
+
+```
+
+
+
+Give yourself a pat on the back! With that simple spell, you've conjured up test cases with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-nextjs/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c "npm run dev" --delay 10
+
+```
+
+
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-nextjs/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-nextjs/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-nextjs/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-nextjs/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-nextjs/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-nextjs/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-nextjs/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-nextjs/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-nextjs/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-nextjs/#get-started-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-nextjs/#installation-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-nextjs/#running-app-locally-on-linuxwsl-)
+ - [Capture testcase](https://keploy.io/docs/quickstart/samples-nextjs/#capture-testcase)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-nextjs/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-nextjs/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-nextjs/#contact-us)
+
+## Node JWT Sample
+[Skip to main content](https://keploy.io/docs/quickstart/samples-node-jwt/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-node-jwt/\#introduction "Direct link to Introduction")
+
+A simple sample CRUD application to test using Keploy build with Node, JWT and Postgres. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-node-jwt/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-node-jwt/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-node-jwt/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-node-jwt/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-node-jwt/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-node-jwt/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-node-jwt/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-node-jwt/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#get-started- "Direct link to Get Started! 🎬")
+
+## Setup application [](https://keploy.io/docs/quickstart/samples-node-jwt/\#setup-application "Direct link to Setup application")
+
+Clone the repository and move to express-mongo folder
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/node-jwt
+
+# Install the dependencies
+npm install
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#installation- "Direct link to Installation 📥")
+
+Depending on your OS, choose your adventure:
+There are 2 ways you can run this sample application.
+
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-node-jwt/#running-app-locally-on-linuxwsl-)
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-node-jwt/#using-docker-compose-)
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (postgres) chill on Docker. Ready? Let's get the party started!🎉
+
+If you are using WSL on windows then use below to start wsl in the user's home directory:
+
+```codeBlockLines_e6Vv
+wsl ~
+
+```
+
+### Let's start the Postgres Instance [](https://keploy.io/docs/quickstart/samples-node-jwt/\#lets-start-the-postgres-instance "Direct link to Let's start the Postgres Instance")
+
+```codeBlockLines_e6Vv
+docker-compose up -d
+
+```
+
+## Capture the testcases [](https://keploy.io/docs/quickstart/samples-node-jwt/\#capture-the-testcases "Direct link to Capture the testcases")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy record -c 'node app.js'
+
+```
+
+### Let's Generate the testcases. [](https://keploy.io/docs/quickstart/samples-node-jwt/\#lets-generate-the-testcases "Direct link to Let's Generate the testcases.")
+
+Make API Calls using [Postman](https://postman.com/) or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+1. Create User
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signup' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"user",
+ "email":"user@keploy.io",
+ "password":"1234"
+}'
+
+```
+
+we will get the output:
+
+```codeBlockLines_e6Vv
+{"message": "User was registered successfully!"}
+
+```
+
+We will get the following output in our terminal
+
+
+
+Let's go ahead create few more testcases for different endpoints!
+
+2. Create Admin User
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signup' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"admin",
+ "email":"admin@keploy.io",
+ "password":"1234",
+ "role":["admin"]
+}'
+
+```
+
+we will get the output:
+
+```codeBlockLines_e6Vv
+{"message": "User was registered successfully!"}
+
+```
+
+3. User Signin
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signin' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"user",
+ "email":"user@keploy.io",
+ "password":"1234"
+}'
+
+```
+
+We will get access token once the user has signed in:
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "username": "user",
+ "email": "user@keploy.io",
+ "roles": ["ROLE_USER"],
+ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzEzNzY0ODY1LCJleHAiOjE3MTM3NjUwNDV9.5LSU1A1jxIbIQFS6Tq26ENNWZBinFt2cJQZ7swpipbc"
+}
+
+```
+
+4. Access user Content
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/test/all'
+
+```
+
+We will get:
+
+```codeBlockLines_e6Vv
+Public Content
+
+```
+
+5. Access user Content
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/test/user' \
+--header 'x-access-token: '
+
+```
+
+We will get
+
+```codeBlockLines_e6Vv
+User Content
+
+```
+
+## Running the testcases [](https://keploy.io/docs/quickstart/samples-node-jwt/\#running-the-testcases "Direct link to Running the testcases")
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c 'npm run app.js' --delay 10
+
+```
+
+Our testcases will fail as the token would expire and new Token will generated again when we are using testmode. To make sure that testcases do not fail, we have use [timeFreezing](https://keploy.io/docs/keploy-cloud/time-freezing/).
+Our testcases will fail as the token would expire and new Token will generated again when we are using testmode. To make sure that testcases do not fail, we have use [timeFreezing](https://keploy.io/docs/keploy-cloud/time-freezing/).
+
+
+
+But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
+But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
+
+```codeBlockLines_e6Vv
+ noise:
+ | - header.Date
+ | - header.Etag
+ | - body.accessToken
+
+```
+
+Now, let's run the keploy in test mode again:-
+
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+* * *
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+Since we have setup our sample-app using docker, we need to update the postgres host on line 2, in `config/db.config.js`, from `localhost` to `postgres`.
+
+## Capture the testcases [](https://keploy.io/docs/quickstart/samples-node-jwt/\#capture-the-testcases-1 "Direct link to Capture the testcases")
+
+We will run the keploy in record mode with docker-compose to start our application:-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker-compose up" --container-name "jwtSqlApp"
+
+```
+
+#### Let's generate the testcases. [](https://keploy.io/docs/quickstart/samples-node-jwt/\#lets-generate-the-testcases-1 "Direct link to Let's generate the testcases.")
+
+Make API Calls using [Postman](https://postman.com/) or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+1. Create User
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signup' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"user",
+ "email":"user@keploy.io",
+ "password":"1234"
+}'
+
+```
+
+we will get the output:
+
+```codeBlockLines_e6Vv
+{"message": "User was registered successfully!"}
+
+```
+
+We will get the following output in our terminal
+
+
+
+Let's go ahead create few more testcases for different endpoints!
+
+2. Create Admin User
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signup' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"admin",
+ "email":"admin@keploy.io",
+ "password":"1234",
+ "role":["admin"]
+}'
+
+```
+
+we will get the output:
+
+```codeBlockLines_e6Vv
+{"message": "User was registered successfully!"}
+
+```
+
+3. User Signin
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/auth/signin' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "username":"user",
+ "email":"user@keploy.io",
+ "password":"1234"
+}'
+
+```
+
+We will get access token once the user has signed in:
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "username": "user",
+ "email": "user@keploy.io",
+ "roles": ["ROLE_USER"],
+ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzEzNzY0ODY1LCJleHAiOjE3MTM3NjUwNDV9.5LSU1A1jxIbIQFS6Tq26ENNWZBinFt2cJQZ7swpipbc"
+}
+
+```
+
+4. Access user Content
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/test/all'
+
+```
+
+We will get:
+
+```codeBlockLines_e6Vv
+Public Content
+
+```
+
+5. Access user Content
+
+```codeBlockLines_e6Vv
+curl --location 'http://localhost:8080/api/test/user' \
+--header 'x-access-token: '
+
+```
+
+We will get
+
+```codeBlockLines_e6Vv
+User Content
+
+```
+
+## Running the testcases [](https://keploy.io/docs/quickstart/samples-node-jwt/\#running-the-testcases-1 "Direct link to Running the testcases")
+
+```codeBlockLines_e6Vv
+keploy test -c 'sudo docker-compose up' --container-name "jwtSqlApp" --delay 10
+
+```
+
+Our testcases will fail as the token would expire and new Token will generated again when we are using testmode. To make sure that testcases do not fail, we have use [timeFreezing](https://keploy.io/docs/keploy-cloud/time-freezing/).
+
+
+
+But for this application, the Token expiration is 10 mins so let's go ahead and test the application within 10 mins. Let's add the `Etag` and `accessToken` as the noise in the `test-3.yml` on line 45 under `header.Date`. The file would look like:-
+
+```codeBlockLines_e6Vv
+ noise:
+ | - header.Date
+ | - header.Etag
+ | - body.accessToken
+
+```
+
+Now, let's run the keploy in test mode again:-
+
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-node-jwt/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-node-jwt/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-node-jwt/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-node-jwt/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-node-jwt/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-node-jwt/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-node-jwt/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-node-jwt/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-node-jwt/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-node-jwt/#get-started-)
+- [Setup application](https://keploy.io/docs/quickstart/samples-node-jwt/#setup-application)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-node-jwt/#installation-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-node-jwt/#running-app-locally-on-linuxwsl-)
+ - [Let's start the Postgres Instance](https://keploy.io/docs/quickstart/samples-node-jwt/#lets-start-the-postgres-instance)
+- [Capture the testcases](https://keploy.io/docs/quickstart/samples-node-jwt/#capture-the-testcases)
+ - [Let's Generate the testcases.](https://keploy.io/docs/quickstart/samples-node-jwt/#lets-generate-the-testcases)
+- [Running the testcases](https://keploy.io/docs/quickstart/samples-node-jwt/#running-the-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-node-jwt/#wrapping-it-up-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-node-jwt/#using-docker-compose-)
+- [Capture the testcases](https://keploy.io/docs/quickstart/samples-node-jwt/#capture-the-testcases-1)
+- [Running the testcases](https://keploy.io/docs/quickstart/samples-node-jwt/#running-the-testcases-1)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-node-jwt/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-node-jwt/#contact-us)
+
+## Keploy CRUD Quickstart
+[Skip to main content](https://keploy.io/docs/quickstart/crud-nodejs/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Intoduction 📌 [](https://keploy.io/docs/quickstart/crud-nodejs/\#intoduction- "Direct link to Intoduction 📌")
+
+A sample **_CRUD_** application to see how Keploy integrates effortlessly with **_Express.js_** and **_MongoDB_**. Get ready to see the power of Keploy 🔅🔅.
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/crud-nodejs/\#get-started- "Direct link to Get Started! 🎬")
+
+Clone the repository and move to crud-API folder
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/crud-API
+
+# Install the dependencies
+npm install
+
+```
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/crud-nodejs/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/crud-nodejs/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/crud-nodejs/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/crud-nodejs/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/crud-nodejs/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/crud-nodejs/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/crud-nodejs/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/crud-nodejs/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/crud-nodejs/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+🎉 Wohoo! We are all set to use Keploy.
+
+## 🎬 Capturing Testcases [](https://keploy.io/docs/quickstart/crud-nodejs/\#-capturing-testcases "Direct link to 🎬 Capturing Testcases")
+
+To begin recording your application's API calls, open your terminal and navigate to your application directory using the cd command. Then, execute the following command:
+
+```codeBlockLines_e6Vv
+keploy record -c "npm start"
+
+```
+
+Make API Calls using Hoppscotch, Postman or curl command. Keploy will capture those calls to generate the test-suites containing testcases and data mocks.
+
+**1\. Give Product details**
+
+**_POST REQUEST_**
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:3000/api/products \
+ --header 'content-type: application/json' \
+ --data '{
+ "name" : "airpods",
+ "quantity": 4,
+ "price": 20000
+}'
+
+```
+
+Here's a response of what you get:
+
+```codeBlockLines_e6Vv
+{
+ "name": "airpods",
+ "quantity": 4,
+ "price": 20000,
+ "_id": "6629499175a4795410ee4012",
+ "createdAt": "2024-04-24T18:04:01.499Z",
+ "updatedAt": "2024-04-24T18:04:01.499Z",
+ "__v": 0
+}
+
+```
+
+**2\. Get the Product details**
+
+**_GET REQUEST_**
+
+```codeBlockLines_e6Vv
+curl --location --request GET 'http://localhost:3000/api/products/:id'
+
+```
+
+Replace the :id, with the id of the product of which you want the details in the upcoming API request!
+
+**3\. Update the Product details**
+
+**_PUT REQUEST_**
+
+```codeBlockLines_e6Vv
+curl --location --request PUT 'http://localhost:3000/api/products/:id' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "airpods",
+ "quantity": 4,
+ "price": 20000
+ }'
+
+```
+
+**4\. Delete a Product details**
+
+**_DELETE REQUEST_**
+
+```codeBlockLines_e6Vv
+curl --location --request DELETE 'http://localhost:8080/potions/:id'
+
+```
+
+🎉 Easy right! Just one API call and you've whipped up a test case with a mock. Check out the Keploy directory to find your shiny new `test-1.yml` and `mocks.yml` files.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:3000/
+ header:
+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
+ Accept-Encoding: gzip, deflate, br
+ Accept-Language: en-GB,en
+ Connection: keep-alived
+ Host: localhost:3000
+ If-None-Match: W/"22-1zTtRKCtWDH+a9AlmEC9xS1mvKM"
+ Sec-Ch-Ua: '"Chromium";v="122", "Not(A:Brand";v="24", "Brave";v="122"'
+ Sec-Ch-Ua-Mobile: ?0
+ Sec-Ch-Ua-Platform: '"Linux"'
+ Sec-Fetch-Dest: document
+ Sec-Fetch-Mode: navigate
+ Sec-Fetch-Site: none
+ Sec-Fetch-User: ?1
+ Sec-Gpc: "1"
+ Upgrade-Insecure-Requests: "1"
+ User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
+ body: ""
+ timestamp: 2024-04-22T14:59:23.376284154+05:30
+ resp:
+ status_code: 304
+ header:
+ Connection: keep-alive
+ Date: Mon, 22 Apr 2024 09:29:23 GMT
+ Etag: W/"22-1zTtRKCtWDH+a9AlmEC9xS1mvKM"
+ Keep-Alive: timeout=5
+ X-Powered-By: Express
+ body: ""
+ status_message: Not Modified
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-04-22T14:59:23.516347365+05:30
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1713778163
+curl: |
+ curl --request GET \
+ --url http://localhost:3000/ \
+ --header 'Sec-Fetch-User: ?1' \
+ --header 'Sec-Fetch-Dest: document' \
+ --header 'Upgrade-Insecure-Requests: 1' \
+ --header 'Sec-Gpc: 1' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Sec-Fetch-Mode: navigate' \
+ --header 'Accept-Language: en-GB,en' \
+ --header 'Host: localhost:3000' \
+ --header 'If-None-Match: W/"22-1zTtRKCtWDH+a9AlmEC9xS1mvKM"' \
+ --header 'Sec-Ch-Ua-Mobile: ?0' \
+ --header 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
+ --header 'Sec-Fetch-Site: none' \
+ --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8' \
+ --header 'Connection: keep-alive' \
+ --header 'Sec-Ch-Ua: "Chromium";v="122", "Not(A:Brand";v="24", "Brave";v="122"' \
+ --header 'Sec-Ch-Ua-Platform: "Linux"' \
+
+```
+
+## Run keploy test [](https://keploy.io/docs/quickstart/crud-nodejs/\#run-keploy-test "Direct link to Run keploy test")
+
+Want to see it in action? Run the following command to execute your Keploy tests
+
+```codeBlockLines_e6Vv
+keploy test -c "npm run" --delay 10
+
+```
+
+Great job following along 🥳! Now, let's dive deeper and explore how to do Keploy integration with jest test 📌
+
+## Get Keploy jest sdk [](https://keploy.io/docs/quickstart/crud-nodejs/\#get-keploy-jest-sdk "Direct link to Get Keploy jest sdk")
+
+```codeBlockLines_e6Vv
+npm i @keploy/sdk nyc jest
+
+```
+
+## Update package file [](https://keploy.io/docs/quickstart/crud-nodejs/\#update-package-file "Direct link to Update package file")
+
+Update the `package.json` file that runs the application:
+
+```codeBlockLines_e6Vv
+ "scripts": {
+ //other scripts
+ "test": "jest --coverage --collectCoverageFrom='src/**/*.{js,jsx}'",
+ "coverage": "nyc npm test && npm run coverage:merge && npm run coverage:report",
+ "coverage:merge": "mkdir -p ./coverage && nyc merge ./coverage .nyc_output/out.json",
+ "coverage:report": "nyc report --reporter=lcov --reporter=text"
+ //other scripts
+ }
+
+```
+
+## Usage [](https://keploy.io/docs/quickstart/crud-nodejs/\#usage "Direct link to Usage")
+
+For the code coverage for the keploy API tests using the jest integration, you need to add the following test to your Jest test file. It can be called as `keploy.test.js`. Jest test file. It can be called as `keploy.test.js`.
+
+```codeBlockLines_e6Vv
+const {expect} = require("@jest/globals");
+const keploy = require("@keploy/sdk");
+const timeOut = 300000;
+
+describe(
+ "Keploy Server Tests",
+ () => {
+ test(
+ "TestKeploy",
+ (done) => {
+ const cmd = "npm start";
+ const options = {};
+ keploy.Test(cmd, options, (err, res) => {
+ if (err) {
+ done(err);
+ } else {
+ expect(res).toBeTruthy(); // Assert the test result
+ done();
+ }
+ });
+ },
+ timeOut
+ );
+ },
+ timeOut
+);
+
+```
+
+Now let's run jest tests along keploy using command
+
+```codeBlockLines_e6Vv
+npm test
+
+```
+
+To get Combined coverage with keploy test coverage
+
+```codeBlockLines_e6Vv
+npm run coverage
+
+```
+
+## Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/crud-nodejs/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congratulations! You've conquered Keploy and unleashed its power for effortless testing in your NodeJS application. With Jest by your side, you can ensure rock-solid code coverage. Time to go forth and build amazing things! 🧑🏻💻
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/crud-nodejs/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Intoduction 📌](https://keploy.io/docs/quickstart/crud-nodejs/#intoduction-)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/crud-nodejs/#get-started-)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/crud-nodejs/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/crud-nodejs/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/crud-nodejs/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/crud-nodejs/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/crud-nodejs/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/crud-nodejs/#setting-up-the-docker-desktop-for-wsl-2)
+- [🎬 Capturing Testcases](https://keploy.io/docs/quickstart/crud-nodejs/#-capturing-testcases)
+- [Run keploy test](https://keploy.io/docs/quickstart/crud-nodejs/#run-keploy-test)
+- [Get Keploy jest sdk](https://keploy.io/docs/quickstart/crud-nodejs/#get-keploy-jest-sdk)
+- [Update package file](https://keploy.io/docs/quickstart/crud-nodejs/#update-package-file)
+- [Usage](https://keploy.io/docs/quickstart/crud-nodejs/#usage)
+- [Wrapping it up 🎉](https://keploy.io/docs/quickstart/crud-nodejs/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/crud-nodejs/#contact-us)
+
+## Keploy Quickstart Guide
+[Skip to main content](https://keploy.io/docs/quickstart/express-postgresql-prisma/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#introduction "Direct link to Introduction")
+
+A sample Task Management application and see how seamlessly Keploy integrates with Express, [PostgreSQL](https://www.postgresql.org/) and Prisma ORM. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#get-started- "Direct link to Get Started! 🎬")
+
+### Prerequisites [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#prerequisites "Direct link to Prerequisites")
+
+Ensure you have the following installed:
+
+- Docker
+- Node.js and npm
+- Keploy CLI
+
+Clone the repository and move to express-postgresql-prisma folder
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript.git
+cd samples-typescript/express-postgresql-prisma
+
+```
+
+### Running App Locally on Linux/WSL [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#running-app-locally-on-linuxwsl "Direct link to Running App Locally on Linux/WSL")
+
+#### Install the dependencies [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#install-the-dependencies "Direct link to Install the dependencies")
+
+```codeBlockLines_e6Vv
+npm install
+
+```
+
+#### Set up environment variables: [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#set-up-environment-variables "Direct link to Set up environment variables:")
+
+```codeBlockLines_e6Vv
+cp .env.example .env
+
+```
+
+#### Start PostgreSQL Container [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#start-postgresql-container "Direct link to Start PostgreSQL Container")
+
+```codeBlockLines_e6Vv
+docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
+
+```
+
+> Note: PostgreSQL Password is `mysecretpassword`
+
+#### Update the `.env` file with your PostgreSQL connection string: [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#update-the-env-file-with-your-postgresql-connection-string "Direct link to update-the-env-file-with-your-postgresql-connection-string")
+
+```codeBlockLines_e6Vv
+PORT=3000
+DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/postgres"
+
+```
+
+#### Migrate the database: [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#migrate-the-database "Direct link to Migrate the database:")
+
+```codeBlockLines_e6Vv
+npm run generate
+npm run migrate init
+
+```
+
+```codeBlockLines_e6Vv
+root@Linus:~/samples-typescript/express-postgresql-prisma# npm run migrate init
+
+> task-manager@1.0.0 migrate
+> prisma migrate dev --name init
+
+Environment variables loaded from .env
+Prisma schema loaded from prisma/schema.prisma
+Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432"
+
+Applying migration `20240730015533_initial_migration`
+Applying migration `20240731010434_due_date_type_change_to_string`
+
+The following migration(s) have been applied:
+
+migrations/
+ └─ 20240730015533_initial_migration/
+ └─ migration.sql
+ └─ 20240731010434_due_date_type_change_to_string/
+ └─ migration.sql
+
+Your database is now in sync with your schema.
+
+✔ Generated Prisma Client (v5.17.0) to ./node_modules/@prisma/clie
+nt in 50ms
+
+┌─────────────────────────────────────────────────────────┐
+│ Update available 5.17.0 -> 5.19.0 │
+│ Run the following to update │
+│ npm i --save-dev prisma@latest │
+│ npm i @prisma/client@latest │
+└─────────────────────────────────────────────────────────┘
+
+```
+
+#### Start the application: [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#start-the-application "Direct link to Start the application:")
+
+```codeBlockLines_e6Vv
+npm run dev
+
+```
+
+```codeBlockLines_e6Vv
+Server is listening at PORT 3000
+
+ Server: http://localhost:3000
+ API Docs: http://localhost:3000/api/docs
+
+```
+
+> Note: The application will run on `http://localhost:3000`.
+
+Now we walkthrough how to leverage Keploy to automatically generate test cases for the application, and later test the application using Keploy.
+
+#### Generate Test Cases [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#generate-test-cases "Direct link to Generate Test Cases")
+
+> Note: Build the application first using `npm run build`
+
+```codeBlockLines_e6Vv
+keploy record -c "npm start"
+
+```
+
+```codeBlockLines_e6Vv
+root@Linus:~/samples-typescript/express-postgresql-prisma# keploy record -c "npm start"
+🐰 Keploy: 2024-08-28T09:48:30+05:30 INFO config file not found; proceeding with flags only
+
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+version: 2.3.0-beta14
+
+🐰 Keploy: 2024-08-28T09:48:30+05:30 INFO Generated config file based on the flags that are used
+🐰 Keploy: 2024-08-28T09:48:32+05:30 INFO keploy initialized and probes added to the kernel.
+🐰 Keploy: 2024-08-28T09:48:32+05:30 INFO Keploy has taken control of the DNS resolution mechanism, your application may misbehave if you have provided wrong domain name in your application code.
+🐰 Keploy: 2024-08-28T09:48:32+05:30 INFO Proxy started at port:16789
+🐰 Keploy: 2024-08-28T09:48:32+05:30 INFO starting TCP DNS server at addr :26789
+🐰 Keploy: 2024-08-28T09:48:32+05:30 INFO starting UDP DNS server at addr :26789
+
+> task-manager@1.0.0 start
+> node dist/index.js
+
+Server is listening at PORT 3000
+
+ Server: http://localhost:3000
+ API Docs: http://localhost:3000/api/docs
+
+```
+
+The above command will start recording the API calls made to the application and will generate a test case in the `testcases/` directory.
+
+> 💡 You can use Postman or any other API testing tool to test the API calls. Additionally, the application will run a swagger UI on `http://localhost:3000/api/docs` to visualize the API calls.
+
+### Running App using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#running-app-using-docker-compose- "Direct link to Running App using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as PostreSql on Docker container.
+
+Lights, Camera, Record! 🎥
+Fire up the application and mongoDB instance with Keploy. Keep an eye on the two key flags: -c: Command to run the app (e.g., docker compose up).
+
+--container-name: The container name in the docker-compose.yml for traffic interception.
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "express-postgresql-prisma-app" --build-delay 50
+
+```
+
+**🔥 Challenge time!** Generate some test cases. How? Just make some API calls. Postman, Hoppscotch or even curl - take your pick!
+
+### Interact with Application [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#interact-with-application "Direct link to Interact with Application")
+
+Make API Calls using [Postman](https://www.postman.com/) or [cURL](https://curl.se/) command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+### API Routes [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#api-routes "Direct link to API Routes")
+
+#### Add Task [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#add-task "Direct link to Add Task")
+
+- **URL:** `/api/v1/task/add`
+- **Method:** `POST`
+- **Description:** Add a new task.
+- **Request Body:**
+
+
+
+
+```codeBlockLines_e6Vv
+{
+ "author": "John Doe",
+ "title": "Complete the report",
+ "description": "Complete the quarterly report by end of the week",
+ "dueDate": "2024-08-01",
+ "status": "Pending",
+ "priority": 3
+}
+
+```
+
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'POST' \
+ 'http://localhost:3000/api/v1/task/add' \
+ -H 'accept: application/json' \
+ -H 'Content-Type: application/json' \
+ -d '{
+ "author": "John Doe",
+ "title": "Complete the report",
+ "description": "Complete the quarterly report by end of the week",
+ "dueDate": "2024-08-01",
+ "status": "Pending",
+ "priority": 3
+}'
+
+```
+
+#### View All Tasks [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#view-all-tasks "Direct link to View All Tasks")
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'GET' \
+ 'http://localhost:3000/api/v1/task/view' \
+ -H 'accept: application/json'
+
+```
+
+#### View Task by ID [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#view-task-by-id "Direct link to View Task by ID")
+
+- **URL:** `/api/v1/task/view/:id`
+- **Method:** `GET`
+- **Description:** Retrieve a specific task by its ID.
+- **Request Params:** `id` (task ID)
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'GET' \
+ 'http://localhost:3000/api/v1/task/view/1' \
+ -H 'accept: application/json'
+
+```
+
+#### Change Task Priority [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#change-task-priority "Direct link to Change Task Priority")
+
+- **URL:** `/api/v1/task/change-priority/:id`
+- **Method:** `PUT`
+- **Description:** Update the priority of a specific task.
+- **Request Params:** `id` (task ID)
+- **Request Body:**
+
+
+
+
+```codeBlockLines_e6Vv
+{
+ "priority": 3
+}
+
+```
+
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'PUT' \
+ 'http://localhost:3000/api/v1/task/change-priority/1' \
+ -H 'accept: application/json' \
+ -H 'Content-Type: application/json' \
+ -d '{
+ "priority": 3
+}'
+
+```
+
+#### Update Task [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#update-task "Direct link to Update Task")
+
+- **URL:** `/api/v1/task/update/:id`
+- **Method:** `PUT`
+- **Description:** Update details of a specific task.
+- **Request Params:** `id` (task ID)
+- **Request Body:**
+
+
+
+
+```codeBlockLines_e6Vv
+{
+ "author": "John Doe",
+ "title": "Complete the report",
+ "description": "Complete the quarterly report by end of the week",
+ "dueDate": "2024-08-01",
+ "status": "Pending",
+ "priority": 3
+}
+
+```
+
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'PUT' \
+ 'http://localhost:3000/api/v1/task/update/2' \
+ -H 'accept: application/json' \
+ -H 'Content-Type: application/json' \
+ -d '{
+ "author": "John Doe",
+ "title": "Complete the report",
+ "description": "Complete the quarterly report by end of the week",
+ "dueDate": "2024-08-01",
+ "status": "Pending",
+ "priority": 3
+}'
+
+```
+
+#### Delete Task [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#delete-task "Direct link to Delete Task")
+
+- **URL:** `/api/v1/task/delete/:id`
+- **Method:** `DELETE`
+- **Description:** Delete a specific task.
+- **Request Params:** `id` (task ID)
+
+Using `curl`
+
+```codeBlockLines_e6Vv
+curl -X 'DELETE' \
+ 'http://localhost:3000/api/v1/task/delete/1' \
+ -H 'accept: application/json'
+
+```
+
+> 🐰 Test Data and Configuration: After recording the interactions, a `keploy` folder will be created containing the recorded test data. Additionally, a `keploy.yml` file will be created as the configuration file.
+
+### Test the Application using Keploy [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#test-the-application-using-keploy "Direct link to Test the Application using Keploy")
+
+#### on Linux/WSL [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#on-linuxwsl "Direct link to on Linux/WSL")
+
+```codeBlockLines_e6Vv
+keploy test -c "npm start"
+
+```
+
+#### On Docker Compose 🐳 [](https://keploy.io/docs/quickstart/express-postgresql-prisma/\#on-docker-compose- "Direct link to On Docker Compose 🐳")
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "nodeMongoApp" --build-delay 50 --delay 10
+
+```
+
+> The **--delay** flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Keploy will replay the recorded interactions and validate the responses against the expected results.
+
+```codeBlockLines_e6Vv
+Node.js v22.7.0
+🐰 Keploy: 2024-08-28T10:14:14+05:30 WARN To enable storing mocks in cloud please use disableMockUpload flag/configuration
+
+ <=========================================>
+ COMPLETE TESTRUN SUMMARY.
+ Total tests: 7
+ Total test passed: 7
+ Total test failed: 0
+ Total time taken: "5.66 s"
+
+ Test Suite Name Total Test Passed Failed Time Taken
+
+ "test-set-0" 7 7 0 "5.66 s"
+<=========================================>
+
+🐰 Keploy: 2024-08-28T10:14:14+05:30 INFO calculating coverage for the test run and inserting it into the report
+🐰 Keploy: 2024-08-28T10:14:14+05:30 INFO [Total Coverage Percentage: 86.16%]
+🐰 Keploy: 2024-08-28T10:14:14+05:30 INFO stopping Keploy {"reason": "replay completed successfully"}
+🐰 Keploy: 2024-08-28T10:14:14+05:30 INFO proxy stopped...
+🐰 Keploy: 2024-08-28T10:14:17+05:30 INFO eBPF resources released successfully...
+
+```
+
+Voila! 🎉 You have successfully tested the application using Keploy. Keploy also generates coverage reports for the test-suites.
+
+- [Introduction](https://keploy.io/docs/quickstart/express-postgresql-prisma/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/express-postgresql-prisma/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/express-postgresql-prisma/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/express-postgresql-prisma/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/express-postgresql-prisma/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/express-postgresql-prisma/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/express-postgresql-prisma/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/express-postgresql-prisma/#get-started-)
+ - [Prerequisites](https://keploy.io/docs/quickstart/express-postgresql-prisma/#prerequisites)
+ - [Running App Locally on Linux/WSL](https://keploy.io/docs/quickstart/express-postgresql-prisma/#running-app-locally-on-linuxwsl)
+ - [Running App using Docker Compose 🐳](https://keploy.io/docs/quickstart/express-postgresql-prisma/#running-app-using-docker-compose-)
+ - [Interact with Application](https://keploy.io/docs/quickstart/express-postgresql-prisma/#interact-with-application)
+ - [API Routes](https://keploy.io/docs/quickstart/express-postgresql-prisma/#api-routes)
+ - [Test the Application using Keploy](https://keploy.io/docs/quickstart/express-postgresql-prisma/#test-the-application-using-keploy)
+
+## Keploy TypeScript Quickstart
+[Skip to main content](https://keploy.io/docs/quickstart/samples-typescript/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-typescript/\#introduction "Direct link to Introduction")
+
+This is a sample app to test Keploy integration capabilities using Typescript and Nhost Let's get started without delaying any further! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-typescript/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-typescript/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-typescript/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-typescript/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-typescript/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-typescript/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-typescript/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-typescript/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-typescript/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-typescript/\#get-started- "Direct link to Get Started! 🎬")
+
+### Setup app [](https://keploy.io/docs/quickstart/samples-typescript/\#setup-app "Direct link to Setup app")
+
+Clone and install the necessary packages with the below command
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/ts-nhost
+
+```
+
+```codeBlockLines_e6Vv
+npm install
+
+```
+
+### Creating .env [](https://keploy.io/docs/quickstart/samples-typescript/\#creating-env "Direct link to Creating .env")
+
+Create a .env file which should contain `HASURA_ADMIN_SECRET` and `GRAPHQL_ENDPOINT` (as mentioned in ts-nhost/sample.env)
+
+Steps on how to generate your HASURA\_ADMIN\_SECRET and GRAPHQL\_ENDPOINT :
+
+1. Go to nhost
+2. Sign Up/Sign In and create new project
+3. Go to Hasura Console and open Hasura (Make sure to save your secret key before going to the next step)
+4. Get the `x-hasura-admin-secret` and `GraphQL Endpoint` and name them as `HASURA_ADMIN_SECRET` and `GRAPHQL_ENDPOINT ` respectively in .env
+
+## Running the Application 📥 [](https://keploy.io/docs/quickstart/samples-typescript/\#running-the-application- "Direct link to Running the Application 📥")
+
+There are 2 ways you can run this sample application.
+
+- [Running Natively on Linux/WSL](https://keploy.io/docs/quickstart/samples-typescript/#running-natively-on-linuxwsl)
+- [Running the app using Docker](https://keploy.io/docs/quickstart/samples-typescript/#running-the-app-using-docker)
+
+## Running Natively on Linux/WSL [](https://keploy.io/docs/quickstart/samples-typescript/\#running-natively-on-linuxwsl "Direct link to Running Natively on Linux/WSL")
+
+We're about to set up our sample application right on Linux, with a twist—our GraphQL backend will be powered by Hasura through Nhost. And to add a bit of flair, we’ll handle the database management with Nhost’s cloud-based service.
+
+Ready to dive in? Let’s make this setup as smooth as a breeze! 🌟
+
+### Start recording tests: [](https://keploy.io/docs/quickstart/samples-typescript/\#start-recording-tests "Direct link to Start recording tests:")
+
+```codeBlockLines_e6Vv
+sudo -E env "PATH=$PATH" keploy record -c 'ts-node src/app.ts'
+
+```
+
+`sudo -E`: Runs the command with elevated privileges while preserving the user environment.
+
+`env "PATH=$PATH"`: Ensures that the current PATH environment variable is preserved and used.
+
+`keploy record`: Invokes Keploy in recording mode.
+
+`-c 'ts-node src/app.ts`': Specifies the command to start your application (in this case, using ts-node to execute the TypeScript application entry point).
+
+### Generating the test cases [](https://keploy.io/docs/quickstart/samples-typescript/\#generating-the-test-cases "Direct link to Generating the test cases")
+
+1. Create User
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:3000/users \
+ --header 'Host: localhost:3000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "email": "a@gmail.com",
+ "password": "123456789",
+ "locale": "en",
+ "displayName": "A"
+ }'
+
+```
+
+2. Get User
+
+```codeBlockLines_e6Vv
+ curl --request GET \
+ --url http://localhost:3000/users \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:3000'
+
+```
+
+3. Delete User
+
+```codeBlockLines_e6Vv
+ curl --request DELETE \
+ --url http://localhost:3000/users/ \
+ --header 'Host: localhost:3000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json'
+
+```
+
+Voila we have captured our api calls!
+
+Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+This is a sample of what your yaml file would look like
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:3000/users
+ header:
+ Accept: '*/*'
+ Content-Length: "113"
+ Content-Type: application/json
+ Host: localhost:3000
+ User-Agent: curl/8.6.0
+ body: |-
+ {
+ "email": "arpit@gmail.com",
+ "password": "123456789",
+ "locale": "en",
+ "displayName": "Arpit"
+ }
+ timestamp: 2024-07-31T21:13:23.94427882Z
+ resp:
+ status_code: 200
+ header:
+ Access-Control-Allow-Origin: '*'
+ Connection: keep-alive
+ Content-Length: "142"
+ Content-Type: application/json; charset=utf-8
+ Date: Wed, 31 Jul 2024 21:13:24 GMT
+ Etag: W/"8e-qRQmCOp8z1PPQCp1OFSshzkDzmQ"
+ Keep-Alive: timeout=5
+ X-Powered-By: Express
+ body: '{"message":"Successfully created a user","user":{"id":"f14a7f34-c7c6-4c60-a81f-7ca895e08af0","displayName":"Arpit","email":"arpit@gmail.com"}}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-07-31T21:13:27.09463946Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722460407
+curl: |-
+ curl --request POST \
+ --url http://localhost:3000/users \
+ --header 'Host: localhost:3000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "email": "arpit@gmail.com",
+ "password": "123456789",
+ "locale": "en",
+ "displayName": "Arpit"
+ }'
+
+```
+
+### Running the test cases [](https://keploy.io/docs/quickstart/samples-typescript/\#running-the-test-cases "Direct link to Running the test cases")
+
+Now, let's put things to test and run the keploy in test mode again:-
+
+```codeBlockLines_e6Vv
+sudo -E env "PATH=$PATH" keploy test -c 'ts-node src/app.ts' --delay 10
+
+```
+
+Voila!! Our test cases have passed 🌟
+
+You will be able to see the summary of your test cases run in your terminal!
+
+Now its time for you to experiment further with different API calls and tweak the responses accordingly!
+
+## Running the app using Docker [](https://keploy.io/docs/quickstart/samples-typescript/\#running-the-app-using-docker "Direct link to Running the app using Docker")
+
+We will be using Docker compose to run the application as well as GraphQL on Docker container.
+
+### Capture the testcases [](https://keploy.io/docs/quickstart/samples-typescript/\#capture-the-testcases "Direct link to Capture the testcases")
+
+We will run the keploy in record mode with docker-compose to start our application:-
+
+```codeBlockLines_e6Vv
+keploy record -c "sudo docker-compose up" --containerName "ts-nhost"
+
+```
+
+
+
+### Generate the testcases [](https://keploy.io/docs/quickstart/samples-typescript/\#generate-the-testcases "Direct link to Generate the testcases")
+
+Let's generate the testcases.
+
+Make API Calls using Hoppscotch, Postman or cURL command. Keploy will capture those calls to generate test suites containing test cases and data mocks.
+
+1. Create User
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:3000/users \
+ --header 'Host: localhost:3000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "email": "arpit@gmail.com",
+ "password": "123456789",
+ "locale": "en",
+ "displayName": "Arpit"
+ }'
+
+```
+
+2. Get User
+
+```codeBlockLines_e6Vv
+ curl --request GET \
+ --url http://localhost:3000/users \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:3000'
+
+```
+
+3. Delete User
+
+```codeBlockLines_e6Vv
+ curl --request DELETE \
+ --url http://localhost:3000/users/ \
+ --header 'Host: localhost:3000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json'
+
+```
+
+### Running the testcases [](https://keploy.io/docs/quickstart/samples-typescript/\#running-the-testcases "Direct link to Running the testcases")
+
+Let's run our captured test cases
+
+```codeBlockLines_e6Vv
+keploy test -c 'sudo docker-compose up' --containerName "ts-nhost" --delay 10
+
+```
+
+This is what your response should look like!
+
+
+
+## Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-typescript/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+🎉 **Congratulations on Reaching This Milestone!** 🎉
+
+You've successfully tested the tool and created your mocks and test cases—fantastic work! Now that you've laid a solid foundation, it's time to elevate your achievements even further.
+
+Here’s to building more, innovating, and reaching new heights with your project! 🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-typescript/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-typescript/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-typescript/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-typescript/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-typescript/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-typescript/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-typescript/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-typescript/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-typescript/#get-started-)
+ - [Setup app](https://keploy.io/docs/quickstart/samples-typescript/#setup-app)
+ - [Creating .env](https://keploy.io/docs/quickstart/samples-typescript/#creating-env)
+- [Running the Application 📥](https://keploy.io/docs/quickstart/samples-typescript/#running-the-application-)
+- [Running Natively on Linux/WSL](https://keploy.io/docs/quickstart/samples-typescript/#running-natively-on-linuxwsl)
+ - [Start recording tests:](https://keploy.io/docs/quickstart/samples-typescript/#start-recording-tests)
+ - [Generating the test cases](https://keploy.io/docs/quickstart/samples-typescript/#generating-the-test-cases)
+ - [Running the test cases](https://keploy.io/docs/quickstart/samples-typescript/#running-the-test-cases)
+- [Running the app using Docker](https://keploy.io/docs/quickstart/samples-typescript/#running-the-app-using-docker)
+ - [Capture the testcases](https://keploy.io/docs/quickstart/samples-typescript/#capture-the-testcases)
+ - [Generate the testcases](https://keploy.io/docs/quickstart/samples-typescript/#generate-the-testcases)
+ - [Running the testcases](https://keploy.io/docs/quickstart/samples-typescript/#running-the-testcases)
+- [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-typescript/#wrapping-it-up-)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-typescript/#contact-us)
+
+## Keploy Redis Quickstart
+[Skip to main content](https://keploy.io/docs/quickstart/samples-redis/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-redis/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of User Authentication apps and see how seamlessly Keploy integrates with Gin and Redis. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-redis/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-redis/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-redis/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-redis/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-redis/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-redis/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-redis/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-redis/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-redis/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-redis/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample user authentication app 🧪 [](https://keploy.io/docs/quickstart/samples-redis/\#clone-a-sample-user-authentication-app- "Direct link to Clone a sample user authentication app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/gin-redis
+go mod download
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-redis/\#installation- "Direct link to Installation 📥")
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-redis/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-redis/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-redis/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-redis/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+#### Setup the Redis Database 📦 [](https://keploy.io/docs/quickstart/samples-redis/\#setup-the-redis-database- "Direct link to Setup the Redis Database 📦")
+
+Start the Redis instance using the `docker-compose` file-
+
+```codeBlockLines_e6Vv
+docker compose up redis
+
+```
+
+Now, we will create the docker image of our application:-
+
+```codeBlockLines_e6Vv
+docker build -t gin-app:1.0 .
+
+```
+
+### Capture the test-cases- [](https://keploy.io/docs/quickstart/samples-redis/\#capture-the-test-cases- "Direct link to Capture the test-cases-")
+
+```codeBlockLines_e6Vv
+keploy record -c "docker run -p 3001:3001 --network --name ginRedisApp gin-app:1.0"
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+#### 1\. Request OTP [](https://keploy.io/docs/quickstart/samples-redis/\#1-request-otp "Direct link to 1. Request OTP")
+
+```codeBlockLines_e6Vv
+curl --location 'localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav'
+
+```
+
+This will return the OTP response:
+
+```codeBlockLines_e6Vv
+{
+ "status": "true",
+ "message": "OTP Generated successfully",
+ "otp": "5486"
+}
+
+```
+
+**2\. Verify OTP**
+
+```codeBlockLines_e6Vv
+curl --location 'localhost:3001/api/verifyCode' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "otp":2121,
+ "email":"something@gmail.com"
+}'
+
+```
+
+This will return the OTP verification response:
+
+```codeBlockLines_e6Vv
+{
+ "status": "true",
+ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YWx1ZSI6ImdtYWlsLmNvbSIsImV4cCI6MTY5ODc1ODIyNn0.eVrNACUY93g-5tu8fxb2BEOs1wn2iCe8wVpUYU6OLSE",
+ "username": "shivamsourav",
+ "message": "OTP authenticated successfully"
+}
+
+```
+
+🎉 Woohoo! With a simple API call, you've crafted a test case with a mock! Dive into the Keploy directory and feast your eyes on the newly minted `test-1.yml` and `mocks.yml`
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav
+ url_params:
+ email: something@gmail.com
+ username: shivamsourav
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate, br
+ Connection: keep-alive
+ Host: localhost:3001
+ Postman-Token: 2db91281-a5bf-49e0-be0d-c6293c833910
+ User-Agent: PostmanRuntime/7.33.0
+ body: ""
+ body_type: ""
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "69"
+ Content-Type: application/json; charset=utf-8
+ Date: Tue, 31 Oct 2023 09:17:00 GMT
+ body: '{"status":"true","message":"OTP Generated successfully","otp":"5486"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - body.otp
+ - header.Date
+ created: 1698743822
+curl: |
+ curl --request GET \
+ --url http://localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav \
+ --header 'Host: localhost:3001' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Connection: keep-alive' \
+ --header 'User-Agent: PostmanRuntime/7.33.0' \
+ --header 'Accept: */*' \
+ --header 'Postman-Token: 2db91281-a5bf-49e0-be0d-c6293c833910' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*1\r\n$4\r\nping\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+PONG\r\n"
+ ---
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*5\r\n$3\r\nset\r\n$19\r\nsomething@gmail.com\r\n$38\r\n{\"otp\":5486,\"username\":\"shivamsourav\"}\r\n$2\r\nex\r\n$5\r\n14400\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ ---
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nget\r\n$19\r\nsomething@gmail.com\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$38\r\n{\"otp\":5486,\"username\":\"shivamsourav\"}\r\n"
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-redis/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "sudo docker run -p 3001:3001 --rm --network --name ginRedisApp gin-app:1.0" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-redis/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-redis/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Redis) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-redis/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Start the Redis database using docker-compose:
+
+```codeBlockLines_e6Vv
+docker compose up redis
+
+```
+
+We'll create a binary of our application:
+
+```codeBlockLines_e6Vv
+go build -o gin-redis
+
+```
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy record -c "./gin-redis"
+
+```
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+#### Generate testcases [](https://keploy.io/docs/quickstart/samples-redis/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Request OTP**
+
+```codeBlockLines_e6Vv
+curl --location 'localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav'
+
+```
+
+This will return the OTP response:
+
+```codeBlockLines_e6Vv
+{
+ "status": "true",
+ "message": "OTP Generated successfully",
+ "otp": "5486"
+}
+
+```
+
+**2\. Verify OTP**
+
+```codeBlockLines_e6Vv
+curl --location 'localhost:3001/api/verifyCode' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "otp":2121,
+ "email":"something@gmail.com"
+}'
+
+```
+
+This will return the OTP verification response:
+
+```codeBlockLines_e6Vv
+{
+ "status": "true",
+ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YWx1ZSI6ImdtYWlsLmNvbSIsImV4cCI6MTY5ODc1ODIyNn0.eVrNACUY93g-5tu8fxb2BEOs1wn2iCe8wVpUYU6OLSE",
+ "username": "shivamsourav",
+ "message": "OTP authenticated successfully"
+}
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav
+ url_params:
+ email: something@gmail.com
+ username: shivamsourav
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate, br
+ Connection: keep-alive
+ Host: localhost:3001
+ Postman-Token: 2db91281-a5bf-49e0-be0d-c6293c833910
+ User-Agent: PostmanRuntime/7.33.0
+ body: ""
+ body_type: ""
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "69"
+ Content-Type: application/json; charset=utf-8
+ Date: Tue, 31 Oct 2023 09:17:00 GMT
+ body: '{"status":"true","message":"OTP Generated successfully","otp":"5486"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - body.otp
+ - header.Date
+ created: 1698743822
+curl: |
+ curl --request GET \
+ --url http://localhost:3001/api/getVerificationCode?email=something@gmail.com&username=shivamsourav \
+ --header 'Host: localhost:3001' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Connection: keep-alive' \
+ --header 'User-Agent: PostmanRuntime/7.33.0' \
+ --header 'Accept: */*' \
+ --header 'Postman-Token: 2db91281-a5bf-49e0-be0d-c6293c833910' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*1\r\n$4\r\nping\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+PONG\r\n"
+ ---
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*5\r\n$3\r\nset\r\n$19\r\nsomething@gmail.com\r\n$38\r\n{\"otp\":5486,\"username\":\"shivamsourav\"}\r\n$2\r\nex\r\n$5\r\n14400\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ ---
+ version: api.keploy.io/v1beta2
+ kind: Generic
+ name: mocks
+ spec:
+ metadata: {}
+ genericrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nget\r\n$19\r\nsomething@gmail.com\r\n"
+ genericresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$38\r\n{\"otp\":5486,\"username\":\"shivamsourav\"}\r\n"
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-redis/\#run-tests-1 "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+sudo -E keploy test -c "./gin-redis" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-redis/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-redis/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-redis/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-redis/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-redis/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-redis/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-redis/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-redis/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-redis/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-redis/#get-started-)
+- [Clone a sample user authentication app 🧪](https://keploy.io/docs/quickstart/samples-redis/#clone-a-sample-user-authentication-app-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-redis/#installation-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-redis/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-redis/#lights-camera-record-)
+ - [Capture the test-cases-](https://keploy.io/docs/quickstart/samples-redis/#capture-the-test-cases-)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-redis/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-redis/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-redis/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-redis/#-roll-the-tape---recording-time)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-redis/#run-tests-1)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-redis/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-redis/#contact-us)
+
+## Keploy Mux Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-mux/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-mux/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of Product catelog and see how seamlessly Keploy integrates with [Mux](https://github.com/gorilla/mux) and [Postgres](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-mux/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-mux/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-mux/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-mux/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-mux/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-mux/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-mux/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-mux/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-mux/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-mux/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample Product Catalog App🧪 [](https://keploy.io/docs/quickstart/samples-mux/\#clone-a-sample-product-catalog-app "Direct link to Clone a sample Product Catalog App🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/mux-sql
+go mod download
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-mux/\#installation- "Direct link to Installation 📥")
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-mux/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-mux/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-mux/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-mux/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Fire up the application and Postgres instance with Keploy. Keep an eye on the two key flags:
+`-c`: Command to run the app (e.g., `docker compose up`).
+
+`--container-name`: The container name in the `docker-compose.yml` for traffic interception.
+
+#### Capture the TestCase [](https://keploy.io/docs/quickstart/samples-mux/\#capture-the-testcase "Direct link to Capture the TestCase")
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "muxSqlApp" --build-delay 50
+
+```
+
+🔥 Challenge time! Generate some test cases. How? Just **make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+#### Generate a Test Case [](https://keploy.io/docs/quickstart/samples-mux/\#generate-a-test-case "Direct link to Generate a Test Case")
+
+```codeBlockLines_e6Vv
+curl --request POST \
+--url http://localhost:8010/product \
+--header 'content-type: application/json' \
+--data '{
+ "name":"Bubbles",
+ "price": 123
+}'
+
+```
+
+Here's a peek of what you get:
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "name": "Bubbles",
+ "price": 123
+}
+
+```
+
+🎉 Woohoo! With a simple API call, you've crafted a test case with a mock! Dive into the Keploy directory and feast your eyes on the newly minted `test-1.yml` and `mocks.yml`
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8010/product
+ header:
+ Accept: "*/*"
+ Content-Length: "46"
+ Content-Type: application/json
+ Host: localhost:8010
+ User-Agent: curl/8.1.2
+ body: |-
+ {
+ "name":"Bubbles",
+ "price": 123
+ }
+ body_type: ""
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "37"
+ Content-Type: application/json
+ Date: Mon, 09 Oct 2023 06:51:16 GMT
+ body: '{"id":4,"name":"Bubbles","price":123}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1696834280
+
+```
+
+this is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: AAAAZgADAABleHRyYV9mbG9hdF9kaWdpdHMAMgB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHBvc3RncmVzAGNsaWVudF9lbmNvZGluZwBVVEY4AGRhdGVzdHlsZQBJU08sIE1EWQAA
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: UgAAAAwAAAAF0ykSRQ==
+---
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: cAAAAChtZDU3ZmY0ZTZhZGEzMThlZDJiYWM5ODQyY2YwNmEyODE2MwA=
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: UgAAAAgAAAAAUwAAABZhcHBsaWNhdGlvbl9uYW1lAABTAAAAGWNsaWVudF9lbmNvZGluZwBVVEY4AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABtJbnRlcnZhbFN0eWxlAHBvc3RncmVzAFMAAAAUaXNfc3VwZXJ1c2VyAG9uAFMAAAAZc2VydmVyX2VuY29kaW5nAFVURjgAUwAAADFzZXJ2ZXJfdmVyc2lvbgAxMC41IChEZWJpYW4gMTAuNS0yLnBnZGc5MCsxKQBTAAAAI3Nlc3Npb25fYXV0aG9yaXphdGlvbgBwb3N0Z3JlcwBTAAAAI3N0YW5kYXJkX2NvbmZvcm1pbmdfc3RyaW5ncwBvbgBTAAAAEVRpbWVab25lAFVUQwBLAAAADAAAAB6JC1lnWgAAAAVJ
+---
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: UAAAAEUASU5TRVJUIElOVE8gcHJvZHVjdHMobmFtZSwgcHJpY2UpIFZBTFVFUygkMSwgJDIpIFJFVFVSTklORyBpZAAAAEQAAAAGUwBTAAAABA==
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: MQAAAAR0AAAADgACAAAAGQAABqRUAAAAGwABaWQAAABAAgABAAAAFwAE/////wAAWgAAAAVJ
+
+```
+
+#### Fetch Product from Catalog [](https://keploy.io/docs/quickstart/samples-mux/\#fetch-product-from-catalog "Direct link to Fetch Product from Catalog")
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8010/products
+
+```
+
+Or just type `http://localhost:8010/products` in your browser. Your choice!
+
+Spotted the new test and mock files in your project? High five! 🙌
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-mux/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "muxSqlApp" --build-delay 50 --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-mux/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-mux/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Postgres) chill on Docker. Ready? Let's get the party started!🎉
+
+First things first, update the First things first, update the postgres host on **line 10** in main.go, update the host to `localhost`.
+
+#### 🍃 Kickstart PostgresDB [](https://keploy.io/docs/quickstart/samples-mux/\#-kickstart-postgresdb "Direct link to 🍃 Kickstart PostgresDB")
+
+Let's breathe life into your Postgres container. A simple spell should do the trick:
+
+```codeBlockLines_e6Vv
+docker compose up postgres
+
+```
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-mux/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy record -c "go run main.go app.go"
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app. Whether you're using `go run main.go app.go` or the binary path like `./test-app-product-catelog`, it's your call.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+#### Generate a Test Case [](https://keploy.io/docs/quickstart/samples-mux/\#generate-a-test-case-1 "Direct link to Generate a Test Case")
+
+✨ A pinch of URL magic:
+
+```codeBlockLines_e6Vv
+curl --request POST \
+--url http://localhost:8010/product \
+--header 'content-type: application/json' \
+--data '{
+ "name":"Bubbles",
+ "price": 123
+ }'
+
+```
+
+And... voila! A Product entry appears:
+
+```codeBlockLines_e6Vv
+{
+ "id": 1,
+ "name": "Bubbles",
+ "price": 123
+}
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8010/product
+ header:
+ Accept: "*/*"
+ Content-Length: "46"
+ Content-Type: application/json
+ Host: localhost:8010
+ User-Agent: curl/8.1.2
+ body: |-
+ {
+ "name":"Bubbles",
+ "price": 123
+ }
+ body_type: ""
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "37"
+ Content-Type: application/json
+ Date: Mon, 09 Oct 2023 06:51:16 GMT
+ body: '{"id":4,"name":"Bubbles","price":123}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1696834280
+
+```
+
+this is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: AAAAZgADAABleHRyYV9mbG9hdF9kaWdpdHMAMgB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHBvc3RncmVzAGNsaWVudF9lbmNvZGluZwBVVEY4AGRhdGVzdHlsZQBJU08sIE1EWQAA
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: UgAAAAwAAAAF0ykSRQ==
+---
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: cAAAAChtZDU3ZmY0ZTZhZGEzMThlZDJiYWM5ODQyY2YwNmEyODE2MwA=
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: UgAAAAgAAAAAUwAAABZhcHBsaWNhdGlvbl9uYW1lAABTAAAAGWNsaWVudF9lbmNvZGluZwBVVEY4AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABtJbnRlcnZhbFN0eWxlAHBvc3RncmVzAFMAAAAUaXNfc3VwZXJ1c2VyAG9uAFMAAAAZc2VydmVyX2VuY29kaW5nAFVURjgAUwAAADFzZXJ2ZXJfdmVyc2lvbgAxMC41IChEZWJpYW4gMTAuNS0yLnBnZGc5MCsxKQBTAAAAI3Nlc3Npb25fYXV0aG9yaXphdGlvbgBwb3N0Z3JlcwBTAAAAI3N0YW5kYXJkX2NvbmZvcm1pbmdfc3RyaW5ncwBvbgBTAAAAEVRpbWVab25lAFVUQwBLAAAADAAAAB6JC1lnWgAAAAVJ
+---
+version: api.keploy.io/v1beta2
+kind: Postgres
+name: mocks
+spec:
+ metadata: {}
+ postgresrequests:
+ - origin: client
+ message:
+ - type: binary
+ data: UAAAAEUASU5TRVJUIElOVE8gcHJvZHVjdHMobmFtZSwgcHJpY2UpIFZBTFVFUygkMSwgJDIpIFJFVFVSTklORyBpZAAAAEQAAAAGUwBTAAAABA==
+ postgresresponses:
+ - origin: server
+ message:
+ - type: binary
+ data: MQAAAAR0AAAADgACAAAAGQAABqRUAAAAGwABaWQAAABAAgABAAAAFwAE/////wAAWgAAAAVJ
+
+```
+
+Now, the real fun begins. Let's weave more spells!
+
+#### Fetch Product from Catalog [](https://keploy.io/docs/quickstart/samples-mux/\#fetch-product-from-catalog-1 "Direct link to Fetch Product from Catalog")
+
+🚀 Follow the URL road...!
+
+```codeBlockLines_e6Vv
+curl --request GET \ --url http://localhost:8010/products
+
+```
+
+Or simply wander over to your browser and visit `http://localhost:8010/products`.
+
+Did you spot the new test and mock scrolls in your project library? Awesome! 👏
+
+
+
+### Run Tests 🏁 [](https://keploy.io/docs/quickstart/samples-mux/\#run-tests- "Direct link to Run Tests 🏁")
+
+Ready to put your spells to the test?
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keploy test -c "go run main.go app.go" --delay 10
+
+```
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-mux/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-mux/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-mux/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-mux/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-mux/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-mux/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-mux/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-mux/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-mux/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-mux/#get-started-)
+- [Clone a sample Product Catalog App🧪](https://keploy.io/docs/quickstart/samples-mux/#clone-a-sample-product-catalog-app)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-mux/#installation-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-mux/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-mux/#lights-camera-record-)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-mux/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-mux/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-mux/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-mux/#-roll-the-tape---recording-time)
+ - [Run Tests 🏁](https://keploy.io/docs/quickstart/samples-mux/#run-tests-)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-mux/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-mux/#contact-us)
+
+## Keploy MySQL Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-mysql/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-mysql/\#introduction "Direct link to Introduction")
+
+A sample url shortener app to test Keploy integration capabilities using [Mux](https://github.com/gorilla/mux) and MySQL. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-mysql/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-mysql/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-mysql/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-mysql/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-mysql/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-mysql/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-mysql/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-mysql/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-mysql/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-mysql/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a sample URL shortener app 🧪 [](https://keploy.io/docs/quickstart/samples-mysql/\#clone-a-sample-url-shortener-app- "Direct link to Clone a sample URL shortener app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/mux-mysql
+go mod download
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-mysql/\#installation-keploy "Direct link to Installation Keploy")
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as MySQL on Docker container](https://keploy.io/docs/quickstart/samples-mysql/#using-docker-compose-)
+- [Using Docker container for MySQL and running application locally](https://keploy.io/docs/quickstart/samples-mysql/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-mysql/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as MySQL on Docker container.
+
+### Start MySQL Instance [](https://keploy.io/docs/quickstart/samples-mysql/\#start-mysql-instance "Direct link to Start MySQL Instance")
+
+```codeBlockLines_e6Vv
+docker run -p 3306:3306 --rm --name mysql --network keploy-network -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest
+
+```
+
+#### Creating Docker Volume [](https://keploy.io/docs/quickstart/samples-mysql/\#creating-docker-volume "Direct link to Creating Docker Volume")
+
+```codeBlockLines_e6Vv
+docker volume create --driver local --opt type=debugfs --opt device=debugfs debugfs
+
+```
+
+### Capture the Testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#capture-the-testcases "Direct link to Capture the Testcases")
+
+Now, we will create the docker image of our application:-
+
+```codeBlockLines_e6Vv
+docker build -t url-short .
+
+```
+
+Once we have our Docker image file ready,this command will start the recording of API calls using ebpf:-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker run -p 8080:8080 --name urlshort --rm --network keploy-network url-short:latest"
+
+```
+
+Make API Calls using Postman or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to make some API calls. You can use [Postman](https://www.postman.com/) or simply `curl`
+
+#### Generate shortened url [](https://keploy.io/docs/quickstart/samples-mysql/\#generate-shortened-url "Direct link to Generate shortened url")
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8080/create \
+ --header 'content-type: application/json' \
+ --data '{
+ "link": "https://github.com"
+}'
+
+```
+
+this will return the shortened url. The ts would automatically be ignored during testing because it'll always be different.
+
+```codeBlockLines_e6Vv
+{
+ "message":"Converted",
+ "link":"http://localhost:8080/links/1",
+ "status":true
+}
+
+```
+
+#### Access all the shortened urls [](https://keploy.io/docs/quickstart/samples-mysql/\#access-all-the-shortened-urls "Direct link to Access all the shortened urls")
+
+```codeBlockLines_e6Vv
+curl --request GET http://localhost:8080/all
+
+```
+
+Now both these API calls were captured as **editable** testcases and written to `keploy/tests` folder. The keploy directory would also have `mocks` file that contains all the outputs of MySQL operations. Here's what the folder structure look like:
+
+
+
+Now, let's see the magic! ✨💫
+
+Want to see if everything works as expected?
+
+### Run the Testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#run-the-testcases "Direct link to Run the Testcases")
+
+Now let's run the test mode (in the echo-sql directory, not the Keploy directory).
+
+```codeBlockLines_e6Vv
+keploy test -c "docker run -p 8080:8080 --name urlshort --rm --network keploy-network url-short:latest" --delay 10
+
+```
+
+output should look like
+
+
+
+So no need to setup fake database/apis MySQL or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to MySQL 😄**
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-mysql/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-mysql/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (MySQL) chill on Docker. Ready? Let's get the party started!🎉
+
+> To establish a network for your application using Keploy on Docker, follow these steps.
+> If you're using a docker-compose network, replace keploy-network with your app's `docker_compose_network_name` below.
+
+### Let's start the MySQL Instance [](https://keploy.io/docs/quickstart/samples-mysql/\#lets-start-the-mysql-instance "Direct link to Let's start the MySQL Instance")
+
+```codeBlockLines_e6Vv
+docker run -p 3306:3306 --rm --name mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest
+
+```
+
+Now, we will create the binary of our application:-
+
+```codeBlockLines_e6Vv
+export ConnectionString="root:my-secret-pw@tcp(localhost:3306)/mysql"
+
+go build -o main
+
+```
+
+### Capture the Testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#capture-the-testcases-1 "Direct link to Capture the Testcases")
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy record -c "./main"
+
+```
+
+
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#generate-testcases-1 "Direct link to Generate testcases")
+
+To generate testcases we just need to make some API calls. You can use Postman, Hoppscotch, or simply curl
+
+#### Generate shortened url [](https://keploy.io/docs/quickstart/samples-mysql/\#generate-shortened-url-1 "Direct link to Generate shortened url")
+
+```codeBlockLines_e6Vv
+curl --request POST \
+ --url http://localhost:8080/create \
+ --header 'content-type: application/json' \
+ --data '{
+ "link": "https://google.com"
+}'
+
+```
+
+this will return the shortened url.
+
+```codeBlockLines_e6Vv
+{
+ "message": "Converted",
+ "link": "http://localhost:8080/links/1",
+ "status": true
+}
+
+```
+
+#### Redirect to original url from shortened url [](https://keploy.io/docs/quickstart/samples-mysql/\#redirect-to-original-url-from-shortened-url "Direct link to Redirect to original url from shortened url")
+
+```codeBlockLines_e6Vv
+curl -request GET localhost:8080/links/1
+
+```
+
+Now, let's see the magic! 🪄💫
+
+Now both these API calls were captured as a testcase and should be visible on the Keploy CLI. You should be seeing an app named keploy folder with the test cases we just captured and data mocks created
+
+### Run the captured testcases [](https://keploy.io/docs/quickstart/samples-mysql/\#run-the-captured-testcases "Direct link to Run the captured testcases")
+
+Now that we have our testcase captured, run the test file.
+
+```codeBlockLines_e6Vv
+sudo -E PATH=$PATH keploy test -c "./main" --delay 10
+
+```
+
+So no need to setup dependencies like MySQL, web-go locally or write mocks for your testing.
+
+The application thinks it's talking to MySQL 😄
+
+We will get output something like this:
+
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-mysql/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-mysql/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-mysql/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-mysql/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-mysql/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-mysql/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-mysql/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-mysql/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-mysql/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-mysql/#get-started-)
+- [Clone a sample URL shortener app 🧪](https://keploy.io/docs/quickstart/samples-mysql/#clone-a-sample-url-shortener-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-mysql/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-mysql/#using-docker-compose-)
+ - [Start MySQL Instance](https://keploy.io/docs/quickstart/samples-mysql/#start-mysql-instance)
+ - [Capture the Testcases](https://keploy.io/docs/quickstart/samples-mysql/#capture-the-testcases)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-mysql/#generate-testcases)
+ - [Run the Testcases](https://keploy.io/docs/quickstart/samples-mysql/#run-the-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-mysql/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-mysql/#running-app-locally-on-linuxwsl-)
+ - [Let's start the MySQL Instance](https://keploy.io/docs/quickstart/samples-mysql/#lets-start-the-mysql-instance)
+ - [Capture the Testcases](https://keploy.io/docs/quickstart/samples-mysql/#capture-the-testcases-1)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-mysql/#generate-testcases-1)
+ - [Run the captured testcases](https://keploy.io/docs/quickstart/samples-mysql/#run-the-captured-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-mysql/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-mysql/#contact-us)
+
+## Keploy FastHttp Guide
+[Skip to main content](https://keploy.io/docs/quickstart/samples-fasthttp/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/samples-fasthttp/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of CRUD applications and see how seamlessly Keploy integrates with [FastHttp](https://github.com/valyala/fasthttp) and [Postgres](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-fasthttp/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-fasthttp/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-fasthttp/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-fasthttp/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-fasthttp/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-fasthttp/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-fasthttp/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-fasthttp/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Clone the sample CRUD application 🧪 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#clone-the-sample-crud-application- "Direct link to Clone the sample CRUD application 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-go.git && cd samples-go/fasthttp-postgres
+go mod download
+
+```
+
+## Installation 📥 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#installation- "Direct link to Installation 📥")
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose: running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-fasthttp/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-fasthttp/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker Compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Fire up the application and Postgres instance with Keploy. Keep an eye on the two key flags:
+`-c`: Command to run the app (e.g., `docker compose up`).
+
+`--container-name`: The container name in the `docker-compose.yml` for traffic interception.
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "fasthttpPostgresApp"
+
+```
+
+Getting logs like this? Perfect! 👌
+
+
+🔥 Challenge time! Generate some test cases. How? Just **make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's create some users and books:
+
+#### Post Requests [](https://keploy.io/docs/quickstart/samples-fasthttp/\#post-requests "Direct link to Post Requests")
+
+```codeBlockLines_e6Vv
+curl -X POST -H "Content-Type: application/json" -d '{"name":"Author Name"}' http://localhost:8080/authors
+curl -X POST -H "Content-Type: application/json" -d '{"title":"Book Title","author_id":1}' http://localhost:8080/books
+
+```
+
+#### Get Request [](https://keploy.io/docs/quickstart/samples-fasthttp/\#get-request "Direct link to Get Request")
+
+```codeBlockLines_e6Vv
+curl -i http://localhost:8080/books
+
+```
+
+🎉 Woohoo! With simple API calls, you've crafted test cases with mocks! Dive into the Keploy directory and feast your eyes on the newly minted `test-1.yml` and `mocks.yml`.
+
+Here's a peek of what you get:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8080/authors
+ header:
+ Accept: "*/*"
+ Content-Length: "22"
+ Content-Type: application/json
+ Host: localhost:8080
+ User-Agent: curl/7.88.1
+ body: '{"name":"Author Name"}'
+ timestamp: 2024-06-24T13:05:47.732915734+05:30
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "0"
+ Date: Mon, 24 Jun 2024 07:35:47 GMT
+ Server: Server
+ body: ""
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-24T13:05:49.810554677+05:30
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1719214549
+curl: |-
+ curl --request POST \
+ --url http://localhost:8080/authors \
+ --header 'Host: localhost:8080' \
+ --header 'User-Agent: curl/7.88.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{"name":"Author Name"}'
+
+```
+
+This is how the generated **mock.yml** will look like:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-0
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 96
+ payload: AAAAYAADAAB1c2VyAHBvc3RncmVzAGNsaWVudF9lbmNvZGluZwBVVEY4AGV4dHJhX2Zsb2F0X2RpZ2l0cwAyAGRhdGFiYXNlAGRiAGRhdGVzdHlsZQBJU08sIE1EWQAA
+ startup_message:
+ protocolversion: 196608
+ parameters:
+ client_encoding: UTF8
+ database: db
+ datestyle: ISO, MDY
+ extra_float_digits: "2"
+ user: postgres
+ auth_type: 0
+ postgresresponses:
+ - header: [R]
+ identifier: ServerResponse
+ length: 96
+ authentication_md5_password:
+ salt: [200, 42, 157, 175]
+ msg_type: 82
+ auth_type: 5
+ reqtimestampmock: 2024-06-24T13:05:47.736932812+05:30
+ restimestampmock: 2024-06-24T13:05:47.74668502+05:30
+connectionId: "0"
+
+```
+
+_Time to perform more API magic!_
+
+#### Get All Books [](https://keploy.io/docs/quickstart/samples-fasthttp/\#get-all-books "Direct link to Get All Books")
+
+```codeBlockLines_e6Vv
+curl -i http://localhost:8080/books
+
+```
+
+Or just type `http://localhost:8080/books` in your browser. Your choice!
+
+Spotted the new test and mock files in your project? High five! 🙌
+
+### Run Tests 🏃♀️ [](https://keploy.io/docs/quickstart/samples-fasthttp/\#run-tests-%EF%B8%8F "Direct link to Run Tests 🏃♀️")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "fasthttpPostgresApp" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Your results should be looking like this:
+
+
+
+Did you spot that the ts (timestamp) is showing some differences? Yep, time has a way of doing that! 🕰️
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+* * *
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (Postgres) chill on Docker. Ready? Let's get the party started! 🎉
+
+If you are using WSL on Windows then use below to start WSL in the user's home directory:
+
+```codeBlockLines_e6Vv
+wsl ~
+
+```
+
+First things first, update the Postgres URL to `localhost:5432` on **line 21** of our trusty `main.go` file.
+
+### 🍃 Kickstart Postgres [](https://keploy.io/docs/quickstart/samples-fasthttp/\#-kickstart-postgres "Direct link to 🍃 Kickstart Postgres")
+
+Let's breathe life into your Postgres container. A simple spell should do the trick:
+
+```codeBlockLines_e6Vv
+docker compose up postgres
+
+```
+
+### 📼 Recording Time! [](https://keploy.io/docs/quickstart/samples-fasthttp/\#-recording-time "Direct link to 📼 Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+go build -cover
+keploy record -c "./app"
+
+```
+
+Keep an eye out for the `-c` flag! It's the command charm to run the app. Whether you're using `go run main.go` or the binary path like `./app`, it's your call.
+If you're seeing logs that resemble the ones below, you're on the right track:
+
+
+
+Alright! With the app alive and kicking, let's weave some test cases. Making some API calls! Postman, Hoppscotch,
+
+or even the classic curl - take your pick!
+
+Time to create some users and books:
+
+#### Post Requests [](https://keploy.io/docs/quickstart/samples-fasthttp/\#post-requests-1 "Direct link to Post Requests")
+
+```codeBlockLines_e6Vv
+curl -X POST -H "Content-Type: application/json" -d '{"name":"Author Name"}' http://localhost:8080/authors
+curl -X POST -H "Content-Type: application/json" -d '{"title":"Book Title","author_id":1}' http://localhost:8080/books
+
+```
+
+#### Get Request [](https://keploy.io/docs/quickstart/samples-fasthttp/\#get-request-1 "Direct link to Get Request")
+
+```codeBlockLines_e6Vv
+curl -i http://localhost:8080/books
+
+```
+
+🎉 Look at you go! With a few simple API calls, you've crafted test cases with mocks! Peek into the Keploy directory and behold the freshly minted `test-1.yml` and `mocks.yml`.
+
+### 🏃♀️ Run the Tests! [](https://keploy.io/docs/quickstart/samples-fasthttp/\#%EF%B8%8F-run-the-tests "Direct link to 🏃♀️ Run the Tests!")
+
+Time to put it all to the test:
+
+```codeBlockLines_e6Vv
+keploy test -c "./app" --delay 5
+
+```
+
+> That `--delay` flag? Just a little pause (in seconds) to let your app catch its breath before the test cases start rolling in.
+
+When all is said and done, your test results should look a little something like this:
+
+
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold! ✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fasthttp/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-fasthttp/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Introduction](https://keploy.io/docs/quickstart/samples-fasthttp/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-fasthttp/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-fasthttp/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-fasthttp/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-fasthttp/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-fasthttp/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-fasthttp/#setting-up-the-docker-desktop-for-wsl-2)
+- [Clone the sample CRUD application 🧪](https://keploy.io/docs/quickstart/samples-fasthttp/#clone-the-sample-crud-application-)
+- [Installation 📥](https://keploy.io/docs/quickstart/samples-fasthttp/#installation-)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-fasthttp/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-fasthttp/#lights-camera-record-)
+ - [Run Tests 🏃♀️](https://keploy.io/docs/quickstart/samples-fasthttp/#run-tests-%EF%B8%8F)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fasthttp/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-fasthttp/#running-app-locally-on-linuxwsl-)
+ - [🍃 Kickstart Postgres](https://keploy.io/docs/quickstart/samples-fasthttp/#-kickstart-postgres)
+ - [📼 Recording Time!](https://keploy.io/docs/quickstart/samples-fasthttp/#-recording-time)
+ - [🏃♀️ Run the Tests!](https://keploy.io/docs/quickstart/samples-fasthttp/#%EF%B8%8F-run-the-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fasthttp/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-fasthttp/#contact-us)
+
+## Keploy Flask Integration
+[Skip to main content](https://keploy.io/docs/quickstart/samples-flask/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+🪄 Dive into the world of Student CRUD Apps and see how seamlessly Keploy integrated with Flask and MongoDB Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-flask/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-flask/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-flask/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-flask/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-flask/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-flask/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-flask/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-flask/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-flask/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-flask/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone a simple Student Management API 🧪 [](https://keploy.io/docs/quickstart/samples-flask/\#clone-a-simple-student-management-api- "Direct link to Clone a simple Student Management API 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/flask-mongo
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-flask/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Mongo on Docker container](https://keploy.io/docs/quickstart/samples-flask/#using-docker-compose-)
+- [Using Docker container for Mongo and running application locally](https://keploy.io/docs/quickstart/samples-flask/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-flask/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Mongo on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-flask/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "flask-app" --buildDelay 50
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-flask/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+1. **Make a POST request:**
+
+```codeBlockLines_e6Vv
+curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+
+```
+
+2. **Make a GET request:**
+
+```codeBlockLines_e6Vv
+curl http://localhost:6000/students
+
+```
+
+3. **Make a PUT request:**
+
+```codeBlockLines_e6Vv
+curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+
+```
+
+4. **Make a DELETE request:**
+
+```codeBlockLines_e6Vv
+curl -X DELETE http://localhost:6000/students/12345
+
+```
+
+And once you are done, you can stop the recording and give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **keploy** directory and you'll discover your handiwork in `tests` directory and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+# Generated by Keploy (2.4.16)
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:6000/students
+ header:
+ Accept: "*/*"
+ Content-Length: "54"
+ Content-Type: application/json
+ Host: localhost:6000
+ User-Agent: curl/8.7.1
+ body: '{"student_id": "12345", "name": "John Doe", "age": 20}'
+ timestamp: 2025-04-02T13:12:05.255523333Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "48"
+ Content-Type: application/json
+ Date: Wed, 02 Apr 2025 13:12:05 GMT
+ Server: Werkzeug/2.2.2 Python/3.9.21
+ body: |
+ {
+ "message": "Student created successfully"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2025-04-02T13:12:07.292707847Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1743599527
+curl: |-
+ curl --request POST \
+ --url http://localhost:6000/students \
+ --header 'Host: localhost:6000' \
+ --header 'User-Agent: curl/8.7.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data "{\"student_id\": \"12345\", \"name\": \"John Doe\", \"age\": 20}"
+
+```
+
+This is how the `mocks.yml` looks like:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo","version": "4.4.1"},"os": {"type": "Linux","name": "Linux","architecture": "aarch64","version": "6.1.0-32-cloud-arm64"},"platform": "CPython 3.9.21.final.0"}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 269
+ requestId: 846930886
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo","version":"4.4.1"},"os":{"type":"Linux","name":"Linux","architecture":"aarch64","version":"6.1.0-32-cloud-arm64"},"platform":"CPython 3.9.21.final.0"}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 3
+ responseTo: 846930886
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"67ed3773a2f7dd8385defa99"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1743599485435"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 990489
+ created: 1743599485
+ reqTimestampMock: 2025-04-02T13:11:25.434864042Z
+ resTimestampMock: 2025-04-02T13:11:25.436114528Z
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-flask/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "flask-app" --buildDelay 50 --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-flask/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-flask/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (MongoDB) chill on Docker. Ready? Let's get the party started!🎉
+
+## Install all dependencies [](https://keploy.io/docs/quickstart/samples-flask/\#install-all-dependencies "Direct link to Install all dependencies")
+
+```codeBlockLines_e6Vv
+pip install -r requirements.txt
+
+```
+
+## Start the MongoDB server [](https://keploy.io/docs/quickstart/samples-flask/\#start-the-mongodb-server "Direct link to Start the MongoDB server")
+
+```codeBlockLines_e6Vv
+sudo service mongod start
+
+```
+
+## Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-flask/\#lights-camera-record--1 "Direct link to Lights, Camera, Record! 🎥")
+
+To initiate the recording of API calls, execute this command in your terminal:
+
+```codeBlockLines_e6Vv
+keploy record -c "python3 app.py"
+
+```
+
+Now, your app will start running, and you have to make some API calls to generate the test cases!!
+
+1. **Make a POST request:**
+
+```codeBlockLines_e6Vv
+curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+
+```
+
+2. **Make a GET request:**
+
+```codeBlockLines_e6Vv
+curl http://localhost:6000/students
+
+```
+
+3. **Make a PUT request:**
+
+```codeBlockLines_e6Vv
+curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+
+```
+
+4. **Make a DELETE request:**
+
+```codeBlockLines_e6Vv
+curl -X DELETE http://localhost:6000/students/12345
+
+```
+
+And once you are done, you can stop the recording and give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **keploy** directory and you'll discover your handiwork in `tests` directory and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:6000/students
+ header:
+ Accept: "*/*"
+ Content-Length: "54"
+ Content-Type: application/json
+ Host: localhost:6000
+ User-Agent: curl/8.7.1
+ body: '{"student_id": "12345", "name": "John Doe", "age": 20}'
+ timestamp: 2025-04-02T13:12:05.255523333Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "48"
+ Content-Type: application/json
+ Date: Wed, 02 Apr 2025 13:12:05 GMT
+ Server: Werkzeug/2.2.2 Python/3.9.21
+ body: |
+ {
+ "message": "Student created successfully"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2025-04-02T13:12:07.292707847Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1743599527
+curl: |-
+ curl --request POST \
+ --url http://localhost:6000/students \
+ --header 'Host: localhost:6000' \
+ --header 'User-Agent: curl/8.7.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data "{\"student_id\": \"12345\", \"name\": \"John Doe\", \"age\": 20}"
+
+```
+
+This is how the `mocks.yml` looks like:
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo","version": "4.4.1"},"os": {"type": "Linux","name": "Linux","architecture": "aarch64","version": "6.1.0-32-cloud-arm64"},"platform": "CPython 3.9.21.final.0"}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 269
+ requestId: 846930886
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo","version":"4.4.1"},"os":{"type":"Linux","name":"Linux","architecture":"aarch64","version":"6.1.0-32-cloud-arm64"},"platform":"CPython 3.9.21.final.0"}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 3
+ responseTo: 846930886
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"67ed3773a2f7dd8385defa99"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1743599485435"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 990489
+ created: 1743599485
+ reqTimestampMock: 2025-04-02T13:11:25.434864042Z
+ resTimestampMock: 2025-04-02T13:11:25.436114528Z
+
+```
+
+## Run the tests [](https://keploy.io/docs/quickstart/samples-flask/\#run-the-tests "Direct link to Run the tests")
+
+Now, it's time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "python3 app.py" --delay 10
+
+```
+
+Now, you can also try different API calls, tweak the DB response in the mocks.yml, or fiddle with the request or response in test-x.yml. Run the tests again and see the magic unfold!
+
+## Check Test Coverage [](https://keploy.io/docs/quickstart/samples-flask/\#check-test-coverage "Direct link to Check Test Coverage")
+
+We have a `test-app.py` where all the unit test cases has been written. Now using Keploy, we can check it's code coverage!!
+Now to run your unit tests with Keploy, you can run the command given below:
+
+```codeBlockLines_e6Vv
+python3 -m coverage run -p --data-file=.coverage.unit -m pytest -s test_keploy.py test_app.py
+
+```
+
+To combine the coverage from the unit tests, and Keploy's API tests we can use the command below:
+
+```codeBlockLines_e6Vv
+python3 -m coverage combine
+
+```
+
+Finally, to generate the coverage report for the test run, you can run:
+
+```codeBlockLines_e6Vv
+python3 -m coverage report
+
+```
+
+and if you want the coverage in an html file, you can run:
+
+```codeBlockLines_e6Vv
+python3 -m coverage html
+
+```
+
+## Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-flask/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-flask/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-flask/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-flask/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-flask/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-flask/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-flask/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-flask/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-flask/#get-started-)
+- [Clone a simple Student Management API 🧪](https://keploy.io/docs/quickstart/samples-flask/#clone-a-simple-student-management-api-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-flask/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-flask/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-flask/#lights-camera-record-)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-flask/#generate-testcases)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-flask/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-flask/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-flask/#running-app-locally-on-linuxwsl-)
+- [Install all dependencies](https://keploy.io/docs/quickstart/samples-flask/#install-all-dependencies)
+- [Start the MongoDB server](https://keploy.io/docs/quickstart/samples-flask/#start-the-mongodb-server)
+- [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-flask/#lights-camera-record--1)
+- [Run the tests](https://keploy.io/docs/quickstart/samples-flask/#run-the-tests)
+- [Check Test Coverage](https://keploy.io/docs/quickstart/samples-flask/#check-test-coverage)
+- [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-flask/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-flask/#contact-us)
+
+## Keploy FastAPI Guide
+[Skip to main content](https://keploy.io/docs/quickstart/samples-fastapi/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+🪄 Dive into the world of User CRUD Apps and see how seamlessly Keploy integrated with FastAPI and [PostgreSQL](https://www.postgresql.org/). Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-fastapi/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-fastapi/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-fastapi/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-fastapi/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-fastapi/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-fastapi/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-fastapi/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-fastapi/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-fastapi/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Setup the PostgreSQL Database 📦 [](https://keploy.io/docs/quickstart/samples-fastapi/\#setup-the-postgresql-database- "Direct link to Setup the PostgreSQL Database 📦")
+
+## Clone the sample Student Data CRUD app 🧪 [](https://keploy.io/docs/quickstart/samples-fastapi/\#clone-the-sample-student-data-crud-app- "Direct link to Clone the sample Student Data CRUD app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/fastapi-postgres
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-fastapi/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker compose : running application as well as Postgres on Docker container](https://keploy.io/docs/quickstart/samples-fastapi/#using-docker-compose-)
+- [Using Docker container for Postgres and running application locally](https://keploy.io/docs/quickstart/samples-fastapi/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-fastapi/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Postgres on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-fastapi/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "fastapi-app" --build-delay 50
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-fastapi/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "name": "Eva White",
+ "email": "evawhite@example.com",
+ "password": "evawhite111"
+ }'
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/'
+
+```
+
+**3\. Make a PUT request**
+
+```codeBlockLines_e6Vv
+curl --location --request PUT 'http://127.0.0.1:8000/students/1' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "John Dow",
+ "email": "doe.john@example.com",
+ "password": "johndoe123",
+ "stream": "Arts"
+ }'
+
+```
+
+**4\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/1'
+
+```
+
+**5\. Make a DELETE request**
+
+```codeBlockLines_e6Vv
+curl --location --request DELETE 'http://127.0.0.1:8000/students/1'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/students/
+ header:
+ Accept: "*/*"
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ body_type: ""
+ timestamp: 2023-11-06T10:42:43.046337785+05:30
+ resp:
+ status_code: 404
+ header:
+ Content-Length: "29"
+ Content-Type: application/json
+ Date: Mon, 06 Nov 2023 05:12:42 GMT
+ Server: uvicorn
+ body: '{"detail":"Data not found!!"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-06T10:42:45.959907593+05:30
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1699247565
+curl: |
+ curl --request GET \
+ --url http://127.0.0.1:8000/students/ \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Host: 127.0.0.1:8000' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Postgres
+ name: mocks
+ spec:
+ metadata: {}
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students LIMIT 100 OFFSET 0
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt:
+ - 0
+ - 0
+ - 0
+ - 0
+ command_complete:
+ - command_tag:
+ - 83
+ - 69
+ - 76
+ - 69
+ - 67
+ - 84
+ - 32
+ - 48
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2023-11-06T10:42:43.063446464+05:30
+ restimestampmock: 2023-11-06T10:42:43.063544657+05:30
+
+```
+
+Want to see if everything works as expected?
+
+#### Run Tests [](https://keploy.io/docs/quickstart/samples-fastapi/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker compose up" --container-name "fastapi-app" --build-delay 50 --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fastapi/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-fastapi/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (PostgreSQL) chill on Docker. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-fastapi/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+keploy record -c "uvicorn application.main:app --reload"
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-fastapi/\#generate-testcases-1 "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**1\. Make a POST request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "name": "Eva White",
+ "email": "evawhite@example.com",
+ "password": "evawhite111"
+ }'
+
+```
+
+**2\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/'
+
+```
+
+**3\. Make a PUT request**
+
+```codeBlockLines_e6Vv
+curl --location --request PUT 'http://127.0.0.1:8000/students/1' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "John Dow",
+ "email": "doe.john@example.com",
+ "password": "johndoe123",
+ "stream": "Arts"
+ }'
+
+```
+
+**4\. Make a GET request**
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/students/1'
+
+```
+
+**5\. Make a DELETE request**
+
+```codeBlockLines_e6Vv
+curl --location --request DELETE 'http://127.0.0.1:8000/students/1'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta2
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/students/
+ header:
+ Accept: "*/*"
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ body_type: ""
+ timestamp: 2023-11-06T10:42:43.046337785+05:30
+ resp:
+ status_code: 404
+ header:
+ Content-Length: "29"
+ Content-Type: application/json
+ Date: Mon, 06 Nov 2023 05:12:42 GMT
+ Server: uvicorn
+ body: '{"detail":"Data not found!!"}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-06T10:42:45.959907593+05:30
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1699247565
+curl: |
+ curl --request GET \
+ --url http://127.0.0.1:8000/students/ \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Host: 127.0.0.1:8000' \
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+ version: api.keploy.io/v1beta2
+ kind: Postgres
+ name: mocks
+ spec:
+ metadata: {}
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students LIMIT 100 OFFSET 0
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt:
+ - 0
+ - 0
+ - 0
+ - 0
+ command_complete:
+ - command_tag:
+ - 83
+ - 69
+ - 76
+ - 69
+ - 67
+ - 84
+ - 32
+ - 48
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2023-11-06T10:42:43.063446464+05:30
+ restimestampmock: 2023-11-06T10:42:43.063544657+05:30
+
+```
+
+Want to see if everything works as expected?
+
+#### Run Tests [](https://keploy.io/docs/quickstart/samples-fastapi/\#run-tests-1 "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "uvicorn application.main:app --reload" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fastapi/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-fastapi/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-fastapi/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-fastapi/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-fastapi/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-fastapi/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-fastapi/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-fastapi/#setting-up-the-docker-desktop-for-wsl-2)
+- [Setup the PostgreSQL Database 📦](https://keploy.io/docs/quickstart/samples-fastapi/#setup-the-postgresql-database-)
+- [Clone the sample Student Data CRUD app 🧪](https://keploy.io/docs/quickstart/samples-fastapi/#clone-the-sample-student-data-crud-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-fastapi/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-fastapi/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-fastapi/#lights-camera-record-)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-fastapi/#generate-testcases)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fastapi/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-fastapi/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-fastapi/#-roll-the-tape---recording-time)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-fastapi/#generate-testcases-1)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fastapi/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-fastapi/#contact-us)
+
+## Keploy FastAPI Twilio
+[Skip to main content](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+🪄 Dive into the world of SMS Sending Apps and see how seamlessly Keploy can be integrated with FastAPI and Twilio . Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#get-started- "Direct link to Get Started! 🎬")
+
+## Setup the Twilio Account 💬 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#setup-the-twilio-account- "Direct link to Setup the Twilio Account 💬")
+
+You can get your Twilio credentials by signing in to Twilio Console.
+Once you get the `Twilio Account SID, Auth Token, and Phone Number`, modify the `.env` file with your credentials.
+
+## Clone the Sample App 🧪 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#clone-the-sample-app- "Direct link to Clone the Sample App 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/fastapi-twilio
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+There are 2 ways you can run this sample application.
+
+- [Using Docker : running application](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#using-docker-compose-)
+- [Running application locally](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#running-app-locally-on-linuxwsl-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Mongo on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Create the docker image of the app:
+
+```codeBlockLines_e6Vv
+docker build -t fastapi-twilio:1.0 .
+
+```
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker run -p 8000:8000 --name fastapi-twilio fastapi-twilio:1.0"
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**Make the POST requests**
+
+1. Replace the place holder below i.e. `YOUR_REGISTERED_PERSONAL_PHONE_NUMBER` with your registered personal phone number that you linked with Twilio.
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+--header 'Content-Type: application/json' \
+--data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "YOUR_REGISTERED_PERSONAL_PHONE_NUMBER",
+}'
+
+```
+
+2. Replace the place holder below i.e. `SOME_WRONG_PHONE_NUMBER` with any wrong phone number and make the request.
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+--header 'Content-Type: application/json' \
+--data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "SOME_WRONG_PHONE_NUMBER",
+}'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/send-sms/
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate, br
+ Connection: keep-alive
+ Content-Length: "75"
+ Content-Type: application/json
+ Host: 127.0.0.1:8000
+ Postman-Token: c871b715-7aae-46b6-8e0d-1341aa426624
+ User-Agent: PostmanRuntime/7.34.0
+ body: |-
+ {
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "+91700004379"
+ }
+ body_type: ""
+ timestamp: 2023-11-14T14:56:25.800517709+05:30
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "73"
+ Content-Type: application/json
+ Date: Tue, 14 Nov 2023 09:26:25 GMT
+ Server: uvicorn
+ body: '{"message":"Failed to send SMS. Please check the provided phone number."}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-14T14:56:32.013566624+05:30
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1699953992
+curl: |-
+ curl --request POST \
+ --url http://127.0.0.1:8000/send-sms/ \
+ --header 'User-Agent: PostmanRuntime/7.34.0' \
+ --header 'Accept: */*' \
+ --header 'Postman-Token: c871b715-7aae-46b6-8e0d-1341aa426624' \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Connection: keep-alive' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "+91700004379"
+ }'
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: mocks
+spec:
+ metadata:
+ name: Http
+ operation: POST
+ type: HTTP_CLIENT
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: /2010-04-01/Accounts/AC19413687d9ce28c80cda944730f8b286/Messages.json
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate
+ Authorization: Basic QUMxOTQxMzY4N2Q5Y2UyOGM4MGNkYTk0NDczMGY4YjI4NjpjMTc0MDc5YzU2NTA0N2FmYWJmNDk5MWI2ZGQ1MmFiYg==
+ Connection: keep-alive
+ Content-Length: "81"
+ Content-Type: application/x-www-form-urlencoded
+ User-Agent: python-requests/2.31.0
+ body: Body=Test%2C+testtt%2C+testttttttssss+%3A%29&From=%2B16413324066&To=%2B9170000437
+ body_type: ""
+ timestamp: 0001-01-01T00:00:00Z
+ resp:
+ status_code: 400
+ header:
+ Access-Control-Allow-Credentials: "true"
+ Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Idempotency-Key
+ Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
+ Access-Control-Allow-Origin: "*"
+ Access-Control-Expose-Headers: ETag
+ Connection: keep-alive
+ Content-Length: 335,335
+ Content-Type: application/json
+ Date: Tue, 14 Nov 2023 09:27:21 GMT
+ Twilio-Concurrent-Requests: "1"
+ Twilio-Request-Duration: "0.080"
+ Twilio-Request-Id: RQb54d7f05d29e83bc89889cc136bcd99d
+ X-Api-Domain: api.twilio.com
+ X-Home-Region: us1
+ X-Powered-By: AT-5000
+ X-Shenanigans: none
+ body: '{"code": 21608, "message": "The number +917000XXXX is unverified. Trial accounts cannot send messages to unverified numbers; verify +917000XXXX at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers", "more_info": "https://www.twilio.com/docs/errors/21608", "status": 400}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ objects: []
+ created: 1699954041
+ reqTimestampMock: 2023-11-14T14:57:20.914415283+05:30
+ resTimestampMock: 2023-11-14T14:57:21.298027703+05:30
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#run-tests "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "docker run -p 8000:8000 --name fastapi-twilio fastapi-twilio:1.0" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the Twilio response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#wrapping-it-up- "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+**\\*\\*\\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\_\\_\\_\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\*\*\***\\*\\*\\*\*\* **\\*\\*\\***
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We'll be running our sample application right on Linux. Ready? Let's get the party started!🎉
+
+### 📼 Roll the Tape - Recording Time! [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#-roll-the-tape---recording-time "Direct link to 📼 Roll the Tape - Recording Time!")
+
+Install Python's virtual environment library:
+
+```codeBlockLines_e6Vv
+pip3 install virtualenv
+
+```
+
+Create a virtual environment and activate it:
+
+```codeBlockLines_e6Vv
+python3 -m virtualenv venv && source venv/bin/activate
+
+```
+
+Install the dependencies using the `requirements.txt` file:
+
+```codeBlockLines_e6Vv
+pip3 install -r requirements.txt
+
+```
+
+Ready, set, record! Here's how:
+
+```codeBlockLines_e6Vv
+keploy record -c "uvicorn application.main:app --reload"
+
+```
+
+Keep an eye out for the `-c ` flag! It's the command charm to run the app.
+
+Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+### Generate testcases [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#generate-testcases-1 "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+**Make the POST requests**
+
+1. Replace the place holder below i.e. `YOUR_REGISTERED_PERSONAL_PHONE_NUMBER` with your registered personal phone number that you linked with Twilio.
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+--header 'Content-Type: application/json' \
+--data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "YOUR_REGISTERED_PERSONAL_PHONE_NUMBER",
+}'
+
+```
+
+2. Replace the place holder below i.e. `SOME_WRONG_PHONE_NUMBER` with any wrong phone number and make the request.
+
+```codeBlockLines_e6Vv
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+--header 'Content-Type: application/json' \
+--data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "SOME_WRONG_PHONE_NUMBER",
+}'
+
+```
+
+Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/send-sms/
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate, br
+ Connection: keep-alive
+ Content-Length: "75"
+ Content-Type: application/json
+ Host: 127.0.0.1:8000
+ Postman-Token: c871b715-7aae-46b6-8e0d-1341aa426624
+ User-Agent: PostmanRuntime/7.34.0
+ body: |-
+ {
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "+91700004379"
+ }
+ body_type: ""
+ timestamp: 2023-11-14T14:56:25.800517709+05:30
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "73"
+ Content-Type: application/json
+ Date: Tue, 14 Nov 2023 09:26:25 GMT
+ Server: uvicorn
+ body: '{"message":"Failed to send SMS. Please check the provided phone number."}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-14T14:56:32.013566624+05:30
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1699953992
+curl: |-
+ curl --request POST \
+ --url http://127.0.0.1:8000/send-sms/ \
+ --header 'User-Agent: PostmanRuntime/7.34.0' \
+ --header 'Accept: */*' \
+ --header 'Postman-Token: c871b715-7aae-46b6-8e0d-1341aa426624' \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Connection: keep-alive' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "+91700004379"
+ }'
+
+```
+
+This is how `mocks.yml` generated would look like:-
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Http
+name: mocks
+spec:
+ metadata:
+ name: Http
+ operation: POST
+ type: HTTP_CLIENT
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: /2010-04-01/Accounts/AC19413687d9ce28c80cda944730f8b286/Messages.json
+ header:
+ Accept: "*/*"
+ Accept-Encoding: gzip, deflate
+ Authorization: Basic QUMxOTQxMzY4N2Q5Y2UyOGM4MGNkYTk0NDczMGY4YjI4NjpjMTc0MDc5YzU2NTA0N2FmYWJmNDk5MWI2ZGQ1MmFiYg==
+ Connection: keep-alive
+ Content-Length: "81"
+ Content-Type: application/x-www-form-urlencoded
+ User-Agent: python-requests/2.31.0
+ body: Body=Test%2C+testtt%2C+testttttttssss+%3A%29&From=%2B16413324066&To=%2B9170000437
+ body_type: ""
+ timestamp: 0001-01-01T00:00:00Z
+ resp:
+ status_code: 400
+ header:
+ Access-Control-Allow-Credentials: "true"
+ Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Idempotency-Key
+ Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
+ Access-Control-Allow-Origin: "*"
+ Access-Control-Expose-Headers: ETag
+ Connection: keep-alive
+ Content-Length: 335,335
+ Content-Type: application/json
+ Date: Tue, 14 Nov 2023 09:27:21 GMT
+ Twilio-Concurrent-Requests: "1"
+ Twilio-Request-Duration: "0.080"
+ Twilio-Request-Id: RQb54d7f05d29e83bc89889cc136bcd99d
+ X-Api-Domain: api.twilio.com
+ X-Home-Region: us1
+ X-Powered-By: AT-5000
+ X-Shenanigans: none
+ body: '{"code": 21608, "message": "The number +917000XXXX is unverified. Trial accounts cannot send messages to unverified numbers; verify +917000XXXX at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers", "more_info": "https://www.twilio.com/docs/errors/21608", "status": 400}'
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ objects: []
+ created: 1699954041
+ reqTimestampMock: 2023-11-14T14:57:20.914415283+05:30
+ resTimestampMock: 2023-11-14T14:57:21.298027703+05:30
+
+```
+
+Want to see if everything works as expected?
+
+### Run Tests [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#run-tests-1 "Direct link to Run Tests")
+
+Time to put things to the test 🧪
+
+```codeBlockLines_e6Vv
+keploy test -c "uvicorn application.main:app --reload" --delay 10
+
+```
+
+> The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+Final thoughts? Dive deeper! Try different API calls, tweak the Twilio response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+### Wrapping it up 🎉 [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#wrapping-it-up--1 "Direct link to Wrapping it up 🎉")
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/quickstart/samples-fastapi-twilio/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#get-started-)
+- [Setup the Twilio Account 💬](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#setup-the-twilio-account-)
+- [Clone the Sample App 🧪](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#clone-the-sample-app-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#lights-camera-record-)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#generate-testcases)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#run-tests)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#wrapping-it-up-)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#running-app-locally-on-linuxwsl-)
+ - [📼 Roll the Tape - Recording Time!](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#-roll-the-tape---recording-time)
+ - [Generate testcases](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#generate-testcases-1)
+ - [Run Tests](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#run-tests-1)
+ - [Wrapping it up 🎉](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#wrapping-it-up--1)
+- [Contact Us](https://keploy.io/docs/quickstart/samples-fastapi-twilio/#contact-us)
+
+## Movie Management API
+[Skip to main content](https://keploy.io/docs/quickstart/sanic-mongo/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/sanic-mongo/\#introduction "Direct link to Introduction")
+
+This application is a simple movie management API built using Python's Sanic framework and MongoDB for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on Movie records.
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/sanic-mongo/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/sanic-mongo/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/sanic-mongo/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/sanic-mongo/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/sanic-mongo/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/sanic-mongo/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/sanic-mongo/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/sanic-mongo/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/sanic-mongo/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+# Get Started! 🎬 [](https://keploy.io/docs/quickstart/sanic-mongo/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone the app 🧪 [](https://keploy.io/docs/quickstart/sanic-mongo/\#clone-the-app- "Direct link to Clone the app 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/sanic-mongo
+
+```
+
+## Download the requirements.txt file and DB setup [](https://keploy.io/docs/quickstart/sanic-mongo/\#download-the-requirementstxt-file-and-db-setup "Direct link to Download the requirements.txt file and DB setup")
+
+Head to the folder of the application and run
+
+```codeBlockLines_e6Vv
+pip3 install -r requirements.txt
+
+```
+
+Open a different terminal and setup your MongoDB through docker
+
+```codeBlockLines_e6Vv
+sudo docker network create keploy-network
+
+```
+
+```codeBlockLines_e6Vv
+docker run -p 27017:27017 -d --rm --name mongoDB --net keploy-network mongo
+
+```
+
+## Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/sanic-mongo/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "python3 server.py"
+
+```
+
+You should be able to see this in your terminal
+
+
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+## Generate testcases [](https://keploy.io/docs/quickstart/sanic-mongo/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+1. **Make a POST request:**
+
+```codeBlockLines_e6Vv
+ curl -X "POST" "http://127.0.0.1:8000/add_movie" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8' \
+ -d '{
+ "name": "Whiplash"
+ }'
+
+```
+
+2. **Make a GET request:**
+
+```codeBlockLines_e6Vv
+ curl -X "GET" "http://127.0.0.1:8000/movies" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8'
+
+```
+
+3. **Make a DELETE request:**
+
+```codeBlockLines_e6Vv
+ curl -X "DELETE" "http://127.0.0.1:8000/movies" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8'
+
+```
+
+And once you are done, you can stop the recording and give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **keploy** directory and you'll discover your handiwork in `tests` directory and `mocks.yml`.
+
+This is an example of what your mocks would look like
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo|Motor","version": "4.6.3|3.4.0"},"os": {"type": "Linux","name": "Linux","architecture": "x86_64","version": "5.15.146.1-microsoft-standard-WSL2"},"platform": "CPython 3.10.12.final.0|asyncio"}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 303
+ requestId: 1804289383
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo|Motor","version":"4.6.3|3.4.0"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"5.15.146.1-microsoft-standard-WSL2"},"platform":"CPython 3.10.12.final.0|asyncio"}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 13
+ responseTo: 1804289383
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344783026"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"4"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 560917
+ created: 1719344783
+ reqTimestampMock: 2024-06-26T01:16:23.025984506+05:30
+ resTimestampMock: 2024-06-26T01:16:23.026710262+05:30
+
+```
+
+## **Time to put things to the test 🧪:** [](https://keploy.io/docs/quickstart/sanic-mongo/\#time-to-put-things-to-the-test- "Direct link to time-to-put-things-to-the-test-")
+
+```codeBlockLines_e6Vv
+ keploy test -c "python server.py"
+
+```
+
+This is how your terminal would look like :
+
+
+
+You can experiment with different API calls, modify the database response in mocks.yml, or adjust the request or response in test-x.yml. Then, run the tests again to see the change in response
+
+- [Introduction](https://keploy.io/docs/quickstart/sanic-mongo/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/sanic-mongo/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/sanic-mongo/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/sanic-mongo/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/sanic-mongo/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/sanic-mongo/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/sanic-mongo/#setting-up-the-docker-desktop-for-wsl-2)
+- [Clone the app 🧪](https://keploy.io/docs/quickstart/sanic-mongo/#clone-the-app-)
+- [Download the requirements.txt file and DB setup](https://keploy.io/docs/quickstart/sanic-mongo/#download-the-requirementstxt-file-and-db-setup)
+- [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/sanic-mongo/#lights-camera-record-)
+- [Generate testcases](https://keploy.io/docs/quickstart/sanic-mongo/#generate-testcases)
+- [**Time to put things to the test 🧪:**](https://keploy.io/docs/quickstart/sanic-mongo/#time-to-put-things-to-the-test-)
+
+## Flask and Redis Setup
+[Skip to main content](https://keploy.io/docs/quickstart/flask-redis/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/flask-redis/\#introduction "Direct link to Introduction")
+
+🪄 Dive into the world of Student CRUD Apps and see how seamlessly Keploy integrated with Flask and Redis. Buckle up, it's gonna be a fun ride! 🎢
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/flask-redis/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/flask-redis/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/flask-redis/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/flask-redis/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/flask-redis/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/flask-redis/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/flask-redis/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/flask-redis/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/flask-redis/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/flask-redis/\#get-started- "Direct link to Get Started! 🎬")
+
+## Clone the application 🧪 [](https://keploy.io/docs/quickstart/flask-redis/\#clone-the-application- "Direct link to Clone the application 🧪")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-python.git && cd samples-python/flask-redis
+
+```
+
+## Installation Keploy [](https://keploy.io/docs/quickstart/flask-redis/\#installation-keploy "Direct link to Installation Keploy")
+
+Depending on your OS, choose your adventure:
+
+We are going to run the application the following way
+
+- [Using Docker compose : running application as well as Mongo on Docker container](https://keploy.io/docs/quickstart/flask-redis/#using-docker-compose-)
+
+## Using Docker Compose 🐳 [](https://keploy.io/docs/quickstart/flask-redis/\#using-docker-compose- "Direct link to Using Docker Compose 🐳")
+
+We will be using Docker compose to run the application as well as Mongo on Docker container.
+
+### Lights, Camera, Record! 🎥 [](https://keploy.io/docs/quickstart/flask-redis/\#lights-camera-record- "Direct link to Lights, Camera, Record! 🎥")
+
+Capture the test-cases-
+
+```codeBlockLines_e6Vv
+keploy record -c "docker compose up" --container-name "flask-web" --buildDelay 50
+
+```
+
+🔥 **Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases [](https://keploy.io/docs/quickstart/flask-redis/\#generate-testcases "Direct link to Generate testcases")
+
+To generate testcases we just need to **make some API calls.**
+
+1. **Make a POST request:**
+
+```codeBlockLines_e6Vv
+curl -X POST http://localhost:5000/books/ \
+-H "Content-Type: application/json" \
+-d '{"title": "1984", "author": "George Orwell"}'
+
+```
+
+2. **Make a GET request:**
+
+```codeBlockLines_e6Vv
+curl -X GET "http://localhost:5000/books/?page=1&limit=10"
+
+```
+
+3. **Make a PUT request:**
+
+```codeBlockLines_e6Vv
+curl -X PUT http://localhost:5000/books/1 \
+-H "Content-Type: application/json" \
+-d '{"title": "1984 - Updated", "author": "George Orwell"}'
+
+```
+
+4. **Make a DELETE request:**
+
+```codeBlockLines_e6Vv
+curl -X DELETE http://localhost:5000/books/1
+
+```
+
+And once you are done, you can stop the recording and give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **keploy** directory and you'll discover your handiwork in `tests` directory and `mocks.yml`.
+
+```codeBlockLines_e6Vv
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-0
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$6\r\nCLIENT\r\n$7\r\nSETINFO\r\n$8\r\nLIB-NAME\r\n$8\r\nredis-py\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:10.6084523Z
+ restimestampmock: 2024-08-02T22:15:10.608930466Z
+---
+
+```
+
+### **Time to run the testcases** [](https://keploy.io/docs/quickstart/flask-redis/\#time-to-run-the-testcases "Direct link to time-to-run-the-testcases")
+
+```codeBlockLines_e6Vv
+keploy test -c 'sudo docker compose up' --containerName "flask-web" --delay 10
+
+```
+
+You can also check the test summary from your cli
+
+```codeBlockLines_e6Vv
+<=========================================>
+ COMPLETE TESTRUN SUMMARY.
+ Total tests: 11
+ Total test passed: 10
+ Total test failed: 1
+ Total time taken: "15.13 s"
+
+ Test Suite Name Total Test Passed Failed Time Taken
+
+ "test-set-0" 6 6 0 "5.06 s"
+ "test-set-1" 1 1 0 "5.02 s"
+ "test-set-2" 4 3 1 "5.04 s"
+<=========================================>
+
+```
+
+## Some errors you may run into ? [](https://keploy.io/docs/quickstart/flask-redis/\#some-errors-you-may-run-into- "Direct link to Some errors you may run into ?")
+
+1. While running the application you might have some ports up and running that you are trying to access again. This would throw a EBPF error
+
+You can check the ports from the below command and
+
+```codeBlockLines_e6Vv
+sudo lsof -p
+
+```
+
+If you want to check which process is using a specific port (e.g., port 5000), use:
+
+```codeBlockLines_e6Vv
+sudo lsof -i :5000
+
+```
+
+Once you have identified the PID of the process using the port you need, you can terminate the process with the kill command:
+
+```codeBlockLines_e6Vv
+sudo kill -9
+
+```
+
+2. ERROR: for redis 'ContainerConfig'
+
+The KeyError: 'ContainerConfig' issue you're encountering with Docker Compose is indicative of a problem with the Docker Compose file or its version compatibility.
+
+Here’s how you can address and troubleshoot this error:
+
+```codeBlockLines_e6Vv
+sudo apt-get update
+sudo apt-get install docker-compose
+
+```
+
+Check your compose file's permissions
+
+```codeBlockLines_e6Vv
+ls -l docker-compose.yml
+
+```
+
+Re-run the record or test command from above
+
+- [Introduction](https://keploy.io/docs/quickstart/flask-redis/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/flask-redis/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/flask-redis/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/flask-redis/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/flask-redis/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/flask-redis/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/flask-redis/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/flask-redis/#get-started-)
+- [Clone the application 🧪](https://keploy.io/docs/quickstart/flask-redis/#clone-the-application-)
+- [Installation Keploy](https://keploy.io/docs/quickstart/flask-redis/#installation-keploy)
+- [Using Docker Compose 🐳](https://keploy.io/docs/quickstart/flask-redis/#using-docker-compose-)
+ - [Lights, Camera, Record! 🎥](https://keploy.io/docs/quickstart/flask-redis/#lights-camera-record-)
+ - [Generate testcases](https://keploy.io/docs/quickstart/flask-redis/#generate-testcases)
+ - [**Time to run the testcases**](https://keploy.io/docs/quickstart/flask-redis/#time-to-run-the-testcases)
+- [Some errors you may run into ?](https://keploy.io/docs/quickstart/flask-redis/#some-errors-you-may-run-into-)
+
+## Rust CRUD API
+[Skip to main content](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## Introduction [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#introduction "Direct link to Introduction")
+
+This is a sample CRUD REST API application to showcase Keploy integration capabilities using Rust and MongoDB. Let's get started! 🚀
+
+## 🛠️ Platform-Specific Requirements for Keploy [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#%EF%B8%8F-platform-specific-requirements-for-keploy "Direct link to 🛠️ Platform-Specific Requirements for Keploy")
+
+Below is a table summarizing the tools needed for both native and Docker installations of Keploy on MacOS, Windows, and
+Linux:
+
+| Operating System | Without Docker | Docker Installation | Prerequisites |
+| --- | --- | --- | --- |
+| **MacOS** |  |  | \- Docker Desktop version must be 4.25.2 or above
\- For running Keploy on MacOS natively, refer to [Guide](https://keploy.io/docs/keploy-explained/mac-linux/) |
+| **Windows** |  |  | \- Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command) `wsl --install`
\- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 |
+| **Linux** |  |  | Linux kernel 5.15 or higher |
+
+On MacOS and Windows, additional tools are required for Keploy due to the lack of native eBPF support.
+
+## Quick Installation Using CLI [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#quick-installation-using-cli "Direct link to Quick Installation Using CLI")
+
+Let's get started by setting up the Keploy alias with this command:
+
+```codeBlockLines_e6Vv
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+
+```
+
+You should see something like this:
+
+```codeBlockLines_e6Vv
+ ▓██▓▄
+ ▓▓▓▓██▓█▓▄
+ ████████▓▒
+ ▀▓▓███▄ ▄▄ ▄ ▌
+ ▄▌▌▓▓████▄ ██ ▓█▀ ▄▌▀▄ ▓▓▌▄ ▓█ ▄▌▓▓▌▄ ▌▌ ▓
+ ▓█████████▌▓▓ ██▓█▄ ▓█▄▓▓ ▐█▌ ██ ▓█ █▌ ██ █▌ █▓
+ ▓▓▓▓▀▀▀▀▓▓▓▓▓▓▌ ██ █▓ ▓▌▄▄ ▐█▓▄▓█▀ █▓█ ▀█▄▄█▀ █▓█
+ ▓▌ ▐█▌ █▌
+ ▓
+
+Keploy CLI
+
+Available Commands:
+ example Example to record and test via keploy
+ config --generate generate the keploy configuration file
+ record record the keploy testcases from the API calls
+ test run the recorded testcases and execute assertions
+ update Update Keploy
+
+Flags:
+ --debug Run in debug mode
+ -h, --help help for keploy
+ -v, --version version for keploy
+
+Use "keploy [command] --help" for more information about a command.
+
+```
+
+🎉 Wohoo! You are all set to use Keploy.
+
+## Other Installation Methods [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#other-installation-methods "Direct link to Other Installation Methods")
+
+Install using Docker
+
+### Downloading and running Keploy in Docker [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#downloading-and-running-keploy-in-docker "Direct link to Downloading and running Keploy in Docker")
+
+#### On macOS [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#on-macos "Direct link to On macOS")
+
+Note : Keploy is not supported natively on MacOS, so you can follow the below method to run with docker
+
+1. Open up a terminal window.
+
+2. Create a bridge network in Docker using the following docker network create command:
+
+
+```codeBlockLines_e6Vv
+docker network create keploy-network
+
+```
+
+3. Run the following command to start the Keploy container:
+
+```codeBlockLines_e6Vv
+alias keploy="docker run --name keploy-v2 -p 16789:16789 --network keploy-network --privileged --pid=host -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy"
+
+```
+
+Downloading and running Keploy in Native
+
+### Downloading and running Keploy in Native [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#downloading-and-running-keploy-in-native "Direct link to Downloading and running Keploy in Native")
+
+**Prequisites:**
+
+- Linux Kernel version 5.15 or higher
+- Run `uname -a` to verify the system architecture.
+- In case of Windows, use WSL with Ubuntu 20.04 LTS or higher.
+
+Downloading and running Keploy On WSL/Linux AMD
+
+#### On WSL/Linux AMD [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#on-wsllinux-amd "Direct link to On WSL/Linux AMD")
+
+1. Open the terminal Session.
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+#### On WSL/Linux ARM [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#on-wsllinux-arm "Direct link to On WSL/Linux ARM")
+
+1. Open the terminal Session
+2. Run the following command to download and install Keploy:
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz --overwrite -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploy
+
+```
+
+> Note: Keploy is not supported on MacOS natively.
+
+### Setting up the Docker Desktop for WSL 2 [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#setting-up-the-docker-desktop-for-wsl-2 "Direct link to Setting up the Docker Desktop for WSL 2")
+
+1. Install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/windows/install/).
+
+When developing on Windows with Docker Desktop and WSL 2, it's crucial to configure Docker Desktop to allow WSL 2 distributions to access the Docker daemon. This setup enables seamless integration between your Windows environment, WSL 2 Linux distros, and Docker.
+
+By default, Docker Desktop may not be configured to work with all WSL 2 distros out of the box. Proper configuration ensures that you can run Docker commands from within your WSL 2 environment, allowing for a more native Linux development experience while leveraging the power of Windows.
+
+> This setup is essential for Keploy to function correctly in a WSL 2 environment, as it needs to interact with the Docker daemon to manage containers and networks effectively.
+> For detailed instructions on how to configure `Docker Desktop` for WSL 2, please refer to the [official Docker documentation](https://docs.docker.com/desktop/wsl/).
+
+## Get Started! 🎬 [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#get-started- "Direct link to Get Started! 🎬")
+
+### Setup app [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#setup-app "Direct link to Setup app")
+
+Now that we have Keploy installed, let's set up our application.
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/samples-rust
+cd samples-rust/CRUD-rust-mongo
+
+```
+
+## Running App Locally on Linux/WSL 🐧 [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#running-app-locally-on-linuxwsl- "Direct link to Running App Locally on Linux/WSL 🐧")
+
+We will be using Docker compose to run Mongo on Docker container.
+
+### Let's start the MongoDB Instance [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#lets-start-the-mongodb-instance "Direct link to Let's start the MongoDB Instance")
+
+Open the root directory path in your terminal and then execute the following command:
+
+```codeBlockLines_e6Vv
+docker-compose up -d
+
+```
+
+### Run the app [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#run-the-app "Direct link to Run the app")
+
+```codeBlockLines_e6Vv
+cargo r -r
+
+```
+
+The app will be running on port 8000.
+
+#### Capture testcase [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#capture-testcase "Direct link to Capture testcase")
+
+On same terminal execute the following command:
+
+```codeBlockLines_e6Vv
+keploy record -c 'cargo r -r'
+
+```
+
+The output will be as follows:
+
+
+### Generate testcase [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#generate-testcase "Direct link to Generate testcase")
+
+Open Postman or any other tool, or utilize the Postman VSCode extension. Click on the import icon (shown below):
+
+
+
+Import the file named: `Note App.postman_collection.json`
+
+After that, Postman will display a similar window:
+
+
+
+Hit the Create Note Request with the available data and you will get the following output in your terminal:
+
+```codeBlockLines_e6Vv
+🐰 Keploy: 2024-08-27T21:06:57+05:30 t 8INFO
+🟠 Keploy has captured test cases for the user's application. {"path": "/root/samples-rust/CRUD-rust-mongo/keploy/test-set-3/tests", "testcase name": "test-1"}
+
+```
+
+
+
+Afterward, create a GET all request, and you will get the following output in your terminal:
+
+```codeBlockLines_e6Vv
+🐰 Keploy: 2024-08-27T21:13:41+05:30 INFO 🟠 Keploy has captured test cases for the user's application. {"path": "/root/samples-rust/CRUD-rust-mongo/keploy/test-set-3/tests", "testcase name": "test-3"}
+
+```
+
+
+
+We peformed two requests, one to create a note and one to get all notes. These requests are captured as testcases by Keploy.
+
+### Run the testcases [](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/\#run-the-testcases "Direct link to Run the testcases")
+
+Now, let's start keploy in test mode to run our test cases :
+
+```codeBlockLines_e6Vv
+keploy test -c 'cargo r -r'
+
+```
+
+We get the following output in the terminal -
+
+_Voila!! Our testcases has passed 🌟_
+
+- [Introduction](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#introduction)
+- [🛠️ Platform-Specific Requirements for Keploy](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#%EF%B8%8F-platform-specific-requirements-for-keploy)
+- [Quick Installation Using CLI](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#quick-installation-using-cli)
+- [Other Installation Methods](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#other-installation-methods)
+ - [Downloading and running Keploy in Docker](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#downloading-and-running-keploy-in-docker)
+ - [Downloading and running Keploy in Native](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#downloading-and-running-keploy-in-native)
+ - [Setting up the Docker Desktop for WSL 2](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#setting-up-the-docker-desktop-for-wsl-2)
+- [Get Started! 🎬](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#get-started-)
+ - [Setup app](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#setup-app)
+- [Running App Locally on Linux/WSL 🐧](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#running-app-locally-on-linuxwsl-)
+ - [Let's start the MongoDB Instance](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#lets-start-the-mongodb-instance)
+ - [Run the app](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#run-the-app)
+ - [Generate testcase](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#generate-testcase)
+ - [Run the testcases](https://keploy.io/docs/quickstart/sample-rust-crud-mongo/#run-the-testcases)
+
+## Keploy Documentation Guide
+[Skip to main content](https://keploy.io/docs/keploy-explained/docs-dev-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+We encourage contributions from the community.
+
+**Create a [GitHub issue](https://github.com/keploy/docs/issues) for any changes beyond typos and small fixes.**
+
+If you do create a pull request (PR), please follow our style guidance.
+
+We review GitHub issues and PRs on a regular schedule.
+
+To ensure that each change is relevant and properly peer reviewed, please adhere to best practices for open-source contributions.
+This means that if you are outside the Keploy organization, you must fork the repository and create PRs from branches on your own fork.
+The README in GitHub's [first-contributions repo](https://github.com/firstcontributions/first-contributions) provides an example.
+
+## How to set up the docs website locally? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-set-up-the-docs-website-locally "Direct link to How to set up the docs website locally?")
+
+The Keploy documentation site uses Docusaurus 2 which is a static website generator.
+
+You can make changes locally without previewing them in the browser.
+However, if you want to build the site and preview changes in the browser, you need to have Docusaurus 2 dependencies installed.
+
+Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) or [`npm`](https://docs.npmjs.com/cli/v10) once in the root directory of the repo.
+
+Now you can build and view the site locally:
+
+```codeBlockLines_e6Vv
+npm start
+
+```
+
+or
+
+```codeBlockLines_e6Vv
+npm start
+
+```
+
+or
+
+```codeBlockLines_e6Vv
+yarn start
+
+```
+
+The command starts a local development server and opens a browser window.
+
+## Prettier [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#prettier "Direct link to Prettier")
+
+**Note: The website has been migrated to use `npm` for building, testing, and deploying.**
+
+Steps 1 to 3 are the same for both `yarn` and `npm`
+
+1. Fork the repository
+
+2. Clone the repository with the following command. Replace the with your username
+
+
+```codeBlockLines_e6Vv
+git clone https://github.com//docs.git
+
+```
+
+3. Go into the directory containing the project
+
+```codeBlockLines_e6Vv
+cd docs
+
+```
+
+### Using `npm` [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#using-npm "Direct link to using-npm")
+
+4. Install all the dependencies
+
+```codeBlockLines_e6Vv
+npm install
+
+```
+
+5. Start the development server.
+
+```codeBlockLines_e6Vv
+npm start
+
+```
+
+6. To reformat:
+
+```codeBlockLines_e6Vv
+npm prettier --write '**/*.{js,md}'
+
+```
+
+### Using `yarn` (Legacy) [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#using-yarn-legacy "Direct link to using-yarn-legacy")
+
+4. Install all the dependencies
+
+```codeBlockLines_e6Vv
+yarn
+
+```
+
+5. Start the development server.
+
+```codeBlockLines_e6Vv
+yarn start
+
+```
+
+6. To reformat:
+
+```codeBlockLines_e6Vv
+yarn prettier --write '**/*.{js,md}'
+
+```
+
+When we merge your PR, a new build automatically occurs and your changes publish to [https://docs.keploy.io](https://docs.keploy.io/).
+
+## How to Contribute Code? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-contribute-code "Direct link to How to Contribute Code?")
+
+Bug fixes, performance improvements, code formatting, ...
+There are a lot ways in which you can contribute code!
+The issues list of a project is a great place to find something that you can help us with.
+
+To increase the chances of your code getting merged, please ensure that:
+
+- You satisfy our contribution criteria
+- Your pull request:
+ - Passes all checks and has no conflicts.
+ - Has a well-written title and message that briefly explains your proposed changes.
+
+## How to Report Bugs, Provide Feedback or Request Features? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-report-bugs-provide-feedback-or-request-features "Direct link to How to Report Bugs, Provide Feedback or Request Features?")
+
+We welcome all kinds of bug reports, user feedback and feature requests! We've created some issue templates to assist you in this. Please use them to create a new issue in the relevant project's repository. If you are not sure how to create an issue, here are the steps:
+
+1. Navigate to the main page of the documentation website repository
+
+2. Click `Issues`
+
+3. Click `New issue`
+
+4. Our repository uses issue templates, click `Get started` next to the type of issue you'd like to open
+
+5. Type a title for your issue. We advise you to stick to the issue template to describe the issue
+
+6. After you are finished, click `Submit new issue`
+
+
+## How to Open a Pull Request to Add New Documentation or Fix Bugs? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-open-a-pull-request-to-add-new-documentation-or-fix-bugs "Direct link to How to Open a Pull Request to Add New Documentation or Fix Bugs?")
+
+After you have cloned the documentation repo to your computer locally, edit the files that you wish to change and follow the steps to open a pull request.
+
+1. `add` and `commit` your changes to your repository
+
+2. Git push your changes to your fork on Github
+
+3. On Github, click on the `Create a new Pull Request` button.
+
+4. Use a succinct title and descriptive comments to describe your Pull Request. Also Ensure maintainers can understand your proposed changes from the description
+
+
+## How to Suggest UI/UX Improvements? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-suggest-uiux-improvements "Direct link to How to Suggest UI/UX Improvements?")
+
+One of the most important areas of improvement to our software Keploy UI. We really need your help with this!
+
+If you have ideas on how we can improve, please share them with us by creating a [new issue](https://github.com/keploy/keploy/issues/new/choose).
+
+## How to Contribute Translations? [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#how-to-contribute-translations "Direct link to How to Contribute Translations?")
+
+Right now our interfaces do not support translations and we also don't have a translation strategy in place. But we want to change this. We want our projects to be accessible to non-English speakers. If you have any ideas then please share them with us by creating a \[new issue\].
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/docs-dev-guide/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [How to set up the docs website locally?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-set-up-the-docs-website-locally)
+- [Prettier](https://keploy.io/docs/keploy-explained/docs-dev-guide/#prettier)
+ - [Using `npm`](https://keploy.io/docs/keploy-explained/docs-dev-guide/#using-npm)
+ - [Using `yarn` (Legacy)](https://keploy.io/docs/keploy-explained/docs-dev-guide/#using-yarn-legacy)
+- [How to Contribute Code?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-contribute-code)
+- [How to Report Bugs, Provide Feedback or Request Features?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-report-bugs-provide-feedback-or-request-features)
+- [How to Open a Pull Request to Add New Documentation or Fix Bugs?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-open-a-pull-request-to-add-new-documentation-or-fix-bugs)
+- [How to Suggest UI/UX Improvements?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-suggest-uiux-improvements)
+- [How to Contribute Translations?](https://keploy.io/docs/keploy-explained/docs-dev-guide/#how-to-contribute-translations)
+- [Contact Us](https://keploy.io/docs/keploy-explained/docs-dev-guide/#contact-us)
+
+## Keploy Debugger Guide
+[Skip to main content](https://keploy.io/docs/keploy-explained/debugger-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+In this blog, we will learn how to debug keploy using Visual Studio Code integrated debugger.
+
+## Setting Up Configuration File [](https://keploy.io/docs/keploy-explained/debugger-guide/\#setting-up-configuration-file "Direct link to Setting Up Configuration File")
+
+To bring up the **Run and Debug** view, select the **Run and Debug** icon in the **Activity Bar** on the side of VS Code. You can also use the keyboard shortcut `Cmd + Shift + D` for MacOS and `Ctrl + shift + D` for Windows.
+
+If running and debugging is not yet configured (no `launch.json` has been created), VS Code shows the Run start view.
+
+Click on **create a launch.json file** 👉 **Go** 👉 **Go: Launch Package**
+
+Navigate to `launch.json` to begin crafting JSON objects.
+
+```codeBlockLines_e6Vv
+{
+ "version": "0.2.0",
+ "configurations": [\
+ {\
+ "name": "Record",\
+ "type": "go",\
+ "request": "launch",\
+ "mode": "auto",\
+ "asRoot": true,\
+ "console": "integratedTerminal",\
+ "program": "main.go",\
+ "args": ["record", "-c", ""],\
+ "env": {\
+ "PATH": "${env:PATH}"\
+ }\
+ },\
+ {\
+ "name": "Test",\
+ "type": "go",\
+ "request": "launch",\
+ "mode": "auto",\
+ "asRoot": true,\
+ "console": "integratedTerminal",\
+ "program": "main.go",\
+ "args": ["test", "-c", ""],\
+ "env": {\
+ "PATH": "${env:PATH}"\
+ }\
+ }\
+ ]
+}
+
+```
+
+## Retrieving the PATH Environment Variable [](https://keploy.io/docs/keploy-explained/debugger-guide/\#retrieving-the-path-environment-variable "Direct link to Retrieving the PATH Environment Variable")
+
+### macOS/ Linux [](https://keploy.io/docs/keploy-explained/debugger-guide/\#macos-linux "Direct link to macOS/ Linux")
+
+- Terminal:
+
+
+
+
+
+```codeBlockLines_e6Vv
+echo $PATH
+
+```
+
+
+### Windows [](https://keploy.io/docs/keploy-explained/debugger-guide/\#windows "Direct link to Windows")
+
+- Command Prompt (CMD):
+
+
+
+
+
+```codeBlockLines_e6Vv
+echo %PATH%
+
+```
+
+
+Let's take a closer look at some important key-value pairs in our JSON file:
+
+- The `"name"` parameter can be anything, but for convenience, consider using the keploy command name (e.g., `Record` and `Test`).
+- The `args` parameter represents the entire keploy command to run your application. For example, in [Gin + Mongo](https://keploy.io/docs/quickstart/samples-gin/), on Linux, it's `record -c "go run main.go handler.go"`, and for MacOS, it's `record -c "docker compose up" --containerName "ginMongoApp"`.
+
+You can either add more objects in the "configurations" array or modify the "args" property within a single object to add more commands.
+
+> **Note**: By default, the keploy tests and reports will be generated in the keploy directory. You can change this by creating the [generate-config](https://keploy.io/docs/running-keploy/cli-commands/#generate-config) and specifying the desired path.
+
+## Running the Debugger [](https://keploy.io/docs/keploy-explained/debugger-guide/\#running-the-debugger "Direct link to Running the Debugger")
+
+Click the **Start Debugging** button to witness the magic of debugging unfold seamlessly.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/debugger-guide/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Setting Up Configuration File](https://keploy.io/docs/keploy-explained/debugger-guide/#setting-up-configuration-file)
+- [Retrieving the PATH Environment Variable](https://keploy.io/docs/keploy-explained/debugger-guide/#retrieving-the-path-environment-variable)
+ - [macOS/ Linux](https://keploy.io/docs/keploy-explained/debugger-guide/#macos-linux)
+ - [Windows](https://keploy.io/docs/keploy-explained/debugger-guide/#windows)
+- [Running the Debugger](https://keploy.io/docs/keploy-explained/debugger-guide/#running-the-debugger)
+- [Contact Us](https://keploy.io/docs/keploy-explained/debugger-guide/#contact-us)
+
+## Keploy Testing Guide
+[Skip to main content](https://keploy.io/docs/keploy-explained/testing-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+In this blog, we will learn how test bench of keploy works and how you can contribute to keploy's code coverage.
+
+## Keploy test Keploy? [](https://keploy.io/docs/keploy-explained/testing-guide/\#keploy-test-keploy "Direct link to Keploy test Keploy?")
+
+- Keploy's test bench is built on the principle that Keploy can test itself, operating in two distinct modes: `RECORD` and `TEST`. Each mode activates different sections of the codebase, with some overlap between the two. These modes can be executed concurrently to enhance testing efficiency.
+
+- `keployR` & `keployT` are similar binaries just the name is different for readability.
+
+- For example, if you have recorded tests and mocks for a Go + MongoDB application [keploy/samples-go/gin-mongo](https://github.com/keploy/samples-go/tree/native-linux/gin-mongo), the test bench allows you to run Keploy in test mode ( `keployT`) from within Keploy in record mode ( `keployR`) using the following pseudo command: `keployR record -c "keployT test -c ./gin-mongo-app`. This command initiates Keploy in record mode, which in turn launches Keploy in test mode to run the application. As `keployT` executes the test sets, it simulates API calls for each test case. These simulated API calls are then recorded as tests by `keployR`, along with any external calls from the application being captured as mocks. Meanwhile, `keployT` generates a final report of the test runs. This approach allows for the simultaneous execution of both Keploy's record and test flows.
+
+- One significant benefit of this method is that it eliminates the need to set up external dependencies in the CI pipeline for testing. `KeployT` acts as a virtual database, with its calls being recorded by `keployR`, streamlining the testing process.
+
+
+## Running Guide [](https://keploy.io/docs/keploy-explained/testing-guide/\#running-guide "Direct link to Running Guide")
+
+This guide includes the recording and testing of tests and mocks with the help of keploy test-bench.
+
+### Setup [](https://keploy.io/docs/keploy-explained/testing-guide/\#setup "Direct link to Setup")
+
+- Get the latest version of keploy by following [this](https://github.com/keploy/keploy?tab=readme-ov-file#-quick-installation). And rename the binary to `keployR` (released) using `sudo mv usr/local/bin/keploy /usr/local/bin/keployR`
+
+- Get the current version of keploy by building the binary with current changes using
+
+
+```codeBlockLines_e6Vv
+go build -tags=viper_bind_struct -cover -o keployB . && sudo mv keployB /usr/local/bin/keployB
+
+```
+
+- You will now have built and released binary of keploy as `keployB` and `keployR` respectively.
+
+- Take any application, I've tested for the gin-mongo sample app so you can take that one as of now. And record test some cases, make at least two sessions of recording. Use the below command to record tests and mocks via the released binary of keploy
+
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keployR record -c ""
+
+```
+
+- You will also be requiring [pilot](https://github.com/keploy/pilot) to assert tests and prepare mocks for assertion, you can get the latest pilot using:
+
+```codeBlockLines_e6Vv
+curl --silent -o pilot --location "https://github.com/keploy/pilot/releases/latest/download/pilot_linux_amd64" &&
+ sudo chmod a+x pilot && sudo mkdir -p /usr/local/bin && sudo mv pilot /usr/local/bin
+
+```
+
+- To enable testing mode of keploy, `--enableTesting` flag is required.
+
+### Why both released and built keploy binaries? [](https://keploy.io/docs/keploy-explained/testing-guide/\#why-both-released-and-built-keploy-binaries "Direct link to Why both released and built keploy binaries?")
+
+Note: Here `keployR` is released binary and `keployB` is built binary.
+The idea is that there will be two cases:
+
+1. The latest released version of keploy will be used for recording the tests & mocks using and built version of keploy will be used for testing.
+i.e. `keployR record -c "keployB test -c ./gin-mongo-app`.
+
+2. The latest released version of keploy will be used for testing and built version of keploy will be used for recording tests & mocks.
+i.e. `keployB record -c "keployR test -c ./gin-mongo-app`.
+
+
+These two scenarios are designed to ensure the detection of changes, including any potential breaking changes or adjustments that may affect backward compatibility.
+
+### Recording and testing of tests and mocks via test-bench [](https://keploy.io/docs/keploy-explained/testing-guide/\#recording-and-testing-of-tests-and-mocks-via-test-bench "Direct link to Recording and testing of tests and mocks via test-bench")
+
+Right now, in this guide i am only showing the first scenario, to run the second scenario you just need to replace the binaries as mentioned in the **4th** step.
+
+#### Recording Phase 🎥 [](https://keploy.io/docs/keploy-explained/testing-guide/\#recording-phase- "Direct link to Recording Phase 🎥")
+
+1. Since you now already have some recorded tests and mocks of gin-mongo application, let's call it **pre-recorded** tests.
+
+2. To record tests and mocks via test-bench, you need to run this command to record test cases (for each test-set you have to run this command):
+
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keployR record -c "sudo -E env PATH=$PATH keployB test -c '' --proxyPort 56789 --dnsPort 46789 --delay= --testsets --configPath '' --path '' --enableTesting --generateGithubActions=false" --path "./test-bench/" --proxyPort=36789 --dnsPort 26789 --configPath '' --enableTesting --generateGithubActions=false
+
+```
+
+3. This above command will generate new tests and mocks from your existing **pre-recorded** tests and mocks.
+
+4. For second scenario, you just need to use `keployB` for recording and `keployR` for testing.
+
+
+#### Testing Phase 🧪 [](https://keploy.io/docs/keploy-explained/testing-guide/\#testing-phase- "Direct link to Testing Phase 🧪")
+
+1. **_Assert the tests_**
+
+With this step, your tests undergo validation as the pilot compares HTTP requests and responses from both the **pre-recorded** and **test-bench-recorded** tests. This comparison considers noisy fields, utilizing the configuration file for accuracy.
+
+```codeBlockLines_e6Vv
+pilot -test-assert -preRecPath -testBenchPath ./test-bench -configPath
+
+```
+
+2. **_Prepare mock assertions_**
+
+By feeding the mocks from the newly recorded test cases into the pre-recorded ones (and vice versa), and observing if the results match those obtained with the original mocks, you can confirm the validity of the new mocks. This reciprocal testing ensures the integrity and reliability of the newly generated test data.
+
+However, Keploy uniquely incorporates the timestamps of each request and response in the tests (ingress) and compares these with the timestamps in the mocks (egress). This method significantly reduces the chances of mismatches by selectively retaining only the mocks that come under the request and response time of the test case.
+
+Directly incorporating mocks recorded through the testing approach into pre-recorded test cases could lead to failures, as these were initially recorded at much earlier times. To overcome this issue, we swap the timestamps of the request and response between the pre-recorded and newly recorded test cases. This adjustment ensures that the mocks are compatible and can be effectively utilized without disrupting the natural workflow of Keploy. Thus, this strategy allows us to use the mocks correctly and ensures the accuracy of our test validations.
+
+```codeBlockLines_e6Vv
+pilot -mock-assert -preRecPath -testBenchPath ./test-bench -configPath
+
+```
+
+3. **_Do the actual mock assertion_**
+
+You just need to run test mode for both the **pre-recorded** and newly **test-bench-recorded** tests and mocks via the released binary of keploy.
+
+- For **pre-recorded**:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keployR test -c "" --delay --path "" --generateGithubActions=false
+
+```
+
+- For **test-bench-recorded**:
+
+```codeBlockLines_e6Vv
+sudo -E env PATH=$PATH keployR test -c "" --delay --path "./test-bench" --generateGithubActions=false
+
+```
+
+If both scenarios yield a "passed" result, it signifies that this approach mirrors the standard recording and testing process via Keploy. In that case, you're all set to proceed, and your tests and mocks are considered legitimate.
+
+## Running the setup in CI (Github Actions) [](https://keploy.io/docs/keploy-explained/testing-guide/\#running-the-setup-in-ci-github-actions "Direct link to Running the setup in CI (Github Actions)")
+
+- Implementing this setup in CI will enhance Keploy's testing by incorporating various sample applications with different supported dependencies. This comprehensive testing will thoroughly assess Keploy's major components, including the proxy and parsers.
+
+- To achieve this, you'll need to add two workflows for each sample application, covering both recording and testing scenarios.
+
+
+## Limitations ⚠️ [](https://keploy.io/docs/keploy-explained/testing-guide/\#limitations-%EF%B8%8F "Direct link to Limitations ⚠️")
+
+- Port Configuration: The ports for Keploy Record ( `keployR`) and Keploy Test ( `keployT`) need to be hardcoded. You can't change the ports and run this entire setup properly.
+- Sequential Test Sets: Only one test set can be run at a time.
+- Limited Environment Support: This feature is currently available only for native binary environments and not for Docker environments.
+- Recording Delay: After the test runs, there is a waiting period of 1 second to ensure proper recording of test cases. (related to implementation)
+- Process Filtering: Internally, Keploy Record ( `keployR`) should handle only application-related calls and not Keploy Test ( `keployT`) related calls. To achieve this, `keployT` waits for `keployR` to retrieve the PID before starting the test run. This ensures that `keployR` can filter out `keployT` related calls based on the PID. (related to implementation)
+- As of now, running this setup on `WSL` is not handled.
+- Don't rename the **test-sets** or **test-cases** while running this setup.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/testing-guide/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [Keploy test Keploy?](https://keploy.io/docs/keploy-explained/testing-guide/#keploy-test-keploy)
+- [Running Guide](https://keploy.io/docs/keploy-explained/testing-guide/#running-guide)
+ - [Setup](https://keploy.io/docs/keploy-explained/testing-guide/#setup)
+ - [Why both released and built keploy binaries?](https://keploy.io/docs/keploy-explained/testing-guide/#why-both-released-and-built-keploy-binaries)
+ - [Recording and testing of tests and mocks via test-bench](https://keploy.io/docs/keploy-explained/testing-guide/#recording-and-testing-of-tests-and-mocks-via-test-bench)
+- [Running the setup in CI (Github Actions)](https://keploy.io/docs/keploy-explained/testing-guide/#running-the-setup-in-ci-github-actions)
+- [Limitations ⚠️](https://keploy.io/docs/keploy-explained/testing-guide/#limitations-%EF%B8%8F)
+- [Contact Us](https://keploy.io/docs/keploy-explained/testing-guide/#contact-us)
+
+## Keploy Architecture Overview
+[Skip to main content](https://keploy.io/docs/keploy-explained/how-keploy-works/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+## 🌟 Keploy V2 Architecture 🌟 [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-keploy-v2-architecture- "Direct link to 🌟 Keploy V2 Architecture 🌟")
+
+### 🎯 Goals [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-goals "Direct link to 🎯 Goals")
+
+- 🛠 **Automatic instrumentation:** No code changes required.
+- 📡 **Automatic traffic capture:** Both incoming and outgoing traffic is captured and manipulated.
+- ✍️ **Readable and Editable:** Tests and stubs are easy to understand and modify.
+- 🔒 **TLS Support:** Secure connections in HTTPS or databases are supported.
+- 🔄 **Request Matching:** Mocking responses during testing by matching requests.
+
+## 🏗 High-level architecture [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-high-level-architecture "Direct link to 🏗 High-level architecture")
+
+Keploy uses eBPF to instrument applications without code changes. Key components include:
+
+- **eBPF hooks loader**
+- **Network Proxy**
+- **API server**
+
+
+
+### 🪝 eBPF hooks loader [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-ebpf-hooks-loader "Direct link to 🪝 eBPF hooks loader")
+
+The eBPF hooks loader handles the Ingress and Egress Interceptor logic.
+
+- **Ingress Interceptor:** Captures incoming HTTP calls and stores them in YAML format. It intercepts system calls related to incoming HTTP request connections.
+- **Egress Interceptor:** Forwards TCP and certain UDP connections to the proxy for interception. Applications are unaware of this transparent process.
+
+### 🌐 Network Proxy [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-network-proxy "Direct link to 🌐 Network Proxy")
+
+The Network Proxy acts as a transparent proxy for recording or mocking outgoing network calls. It processes TCP streams, matching the protocol and using the appropriate [integration packages](https://github.com/keploy/keploy/tree/main/pkg/core/proxy/integrations).
+
+- **Readability:** To maintain readability in tests and mocks, Keploy converts binary streams from TCP connections into well-structured YAMLs, covering outgoing calls like databases, caches, and API calls
+- **Support for Unknown Dependencies:** Keploy can handle unknown dependencies by recording binary data as base64 in YAML and using fuzzy matching to correlate incoming requests during testing and mocking.
+- **TLS Interception:** For TLS-based connections like HTTPS, Keploy intercepts traffic by inserting a fake certificate chain between the application and itself. The specific method varies with the language and runtime.
+
+### 🖥 API server [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-api-server "Direct link to 🖥 API server")
+
+The API server manages commands for start/stop and resource management (e.g., testicles, stubs). It's evolving to enable full agent mode, beyond just CLI.
+
+## 🧪 Example [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#-example "Direct link to 🧪 Example")
+
+Consider an application server serving HTTP APIs for clients like web/mobile apps, postman, or curl, and depending on a database and another API.
+
+- **Record Mode:** Keploy injects eBPF hooks to capture incoming HTTP traffic and redirects outgoing TCP/UDP traffic to its proxy server. The proxy server captures packets asynchronously and saves them in YAML files.
+- **Test Mode:** Keploy reads the YAML files for test cases and stubs/mocks. It starts the application, sends recorded HTTP test cases, and mocks responses for outgoing calls. This ensures no side effects due to non-idempotency.
+
+Hope this helps you out, if you still have any questions, reach out to us .
+
+## Contact Us [](https://keploy.io/docs/keploy-explained/how-keploy-works/\#contact-us "Direct link to Contact Us")
+
+If you have any questions or need help, please feel free to reach out to us at [hello@keploy.io](mailto:hello@keploy.io) or reach out us on
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg) or open a discussion on
+[](https://github.com/keploy/keploy)
+
+- [🌟 Keploy V2 Architecture 🌟](https://keploy.io/docs/keploy-explained/how-keploy-works/#-keploy-v2-architecture-)
+ - [🎯 Goals](https://keploy.io/docs/keploy-explained/how-keploy-works/#-goals)
+- [🏗 High-level architecture](https://keploy.io/docs/keploy-explained/how-keploy-works/#-high-level-architecture)
+ - [🪝 eBPF hooks loader](https://keploy.io/docs/keploy-explained/how-keploy-works/#-ebpf-hooks-loader)
+ - [🌐 Network Proxy](https://keploy.io/docs/keploy-explained/how-keploy-works/#-network-proxy)
+ - [🖥 API server](https://keploy.io/docs/keploy-explained/how-keploy-works/#-api-server)
+- [🧪 Example](https://keploy.io/docs/keploy-explained/how-keploy-works/#-example)
+- [Contact Us](https://keploy.io/docs/keploy-explained/how-keploy-works/#contact-us)
+
+## API Concepts Glossary
+[Skip to main content](https://keploy.io/docs/concepts/general-glossary/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+Version: 3.0.0
+
+On this page
+
+### 1\. **API data mocking** [](https://keploy.io/docs/concepts/general-glossary/\#1-api-data-mocking "Direct link to 1-api-data-mocking")
+
+API mocking is a simulation of real APIs and is performed when the production API is not ready. You may come across a
+situation where you cannot send an API request to the server because it is not prepared. In such cases, you can mock a
+chunk of data from the response and eventually, when you make requests the mocked data will be returned.
+
+### 2\. **Idempotency** [](https://keploy.io/docs/concepts/general-glossary/\#2-idempotency "Direct link to 2-idempotency")
+
+An API is idempotent when the outcome of a successful request remains unchanged on making the same request frequently.
+
+### 3\. **Noisy field** [](https://keploy.io/docs/concepts/general-glossary/\#3-noisy-field "Direct link to 3-noisy-field")
+
+Noisy field refers to the random data whose value changes each time you make a request.
+
+For example, a Timestamp is one such property that returns the time when the request is made. Its value is not fed
+manually but is automatically recorded therefore, at every call it differs.
+
+### 4\. **Interoperability** [](https://keploy.io/docs/concepts/general-glossary/\#4-interoperability "Direct link to 4-interoperability")
+
+Interoperability refers to the situation when the behavior of the data is in its original (native) format when
+transferred from one platform to other. It reduces the dependency of files by replacing them with optimized code giving
+the same result.
+
+### 5\. **Deduplication Algorithm** [](https://keploy.io/docs/concepts/general-glossary/\#5-deduplication-algorithm "Direct link to 5-deduplication-algorithm")
+
+Deduplication is a data compression technique wherein redundant copies of the same data are identified and eliminated.
+This process involves hash functions or similarity analysis to compare data chunks, enabling the storage system to store
+only one instance of each unique data segment, thereby optimizing storage efficiency and reducing redundancy.
+
+- [1\. **API data mocking**](https://keploy.io/docs/concepts/general-glossary/#1-api-data-mocking)
+- [2\. **Idempotency**](https://keploy.io/docs/concepts/general-glossary/#2-idempotency)
+- [3\. **Noisy field**](https://keploy.io/docs/concepts/general-glossary/#3-noisy-field)
+- [4\. **Interoperability**](https://keploy.io/docs/concepts/general-glossary/#4-interoperability)
+- [5\. **Deduplication Algorithm**](https://keploy.io/docs/concepts/general-glossary/#5-deduplication-algorithm)
+
+## How Keploy Works
+[Skip to main content](https://keploy.io/docs/1.0.0/keploy-explained/how-keploy-works/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/keploy-explained/how-keploy-works/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+Keploy is added as a middleware to your application that captures and replays all network interaction served to application from any source.
+
+### Step 1 : Record Unique Network Interactions as Test Case [](https://keploy.io/docs/1.0.0/keploy-explained/how-keploy-works/\#step-1--record-unique-network-interactions-as-test-case "Direct link to Step 1 : Record Unique Network Interactions as Test Case")
+
+Once you start the application in record mode to capture API calls as test cases.
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="record"
+
+```
+
+Now, when the application serves an API, all the unique network interactions are stored within Keploy server as a test-case.
+
+
+
+### Step 2 : Replay Test-Cases [](https://keploy.io/docs/1.0.0/keploy-explained/how-keploy-works/\#step-2--replay-test-cases "Direct link to Step 2 : Replay Test-Cases")
+
+Let's say you developed new application version(v2). To test locally, start the application after setting Keploy SDK mode to test mode to replay all recorded API calls/test cases.
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="test"
+
+```
+
+Now, when the application starts:
+
+- Keploy will download all the previously recorded test-cases/API calls with a 5 sec delay(configurable application build time).
+- When the application will try to talk to any dependencies like DBs, Routers, vendor services, Keploy will intercept and provide the previously recorded dependency response.
+
+> **Note:** You didn't need to setup test-environment here. 🙅🏻♀️
+
+- Keploy will compare the API response to the previously captured response and a report will be generated on the Keploy console.
+
+You can test with Keploy locally or can integrate Keploy with popular testing-frameworks and existing CI pipelines.
+
+> **Note:** You can generate test cases from any environment which has all the infrastructure dependencies setup. Please consider using this to generate tests from low-traffic environments first. The deduplication feature necessary for high-traffic environments is currently experimental.
+
+
+
+- [Step 1 : Record Unique Network Interactions as Test Case](https://keploy.io/docs/1.0.0/keploy-explained/how-keploy-works/#step-1--record-unique-network-interactions-as-test-case)
+- [Step 2 : Replay Test-Cases](https://keploy.io/docs/1.0.0/keploy-explained/how-keploy-works/#step-2--replay-test-cases)
+
+## Keploy Server Installation
+[Skip to main content](https://keploy.io/docs/1.0.0/server/server-installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+The [Keploy Server](https://github.com/keploy/keploy) can be installed and run locally. To quickly install and run the Keploy Server download binary depending on your OS platform:
+
+## Install Binary [](https://keploy.io/docs/1.0.0/server/server-installation/\#install-binary "Direct link to Install Binary")
+
+### MacOS [](https://keploy.io/docs/1.0.0/server/server-installation/\#macos "Direct link to MacOS")
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_darwin_all.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+### Linux [](https://keploy.io/docs/1.0.0/server/server-installation/\#linux "Direct link to Linux")
+
+Linux
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+Linux ARM
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+The UI can be accessed at [http://localhost:6789](http://localhost:6789/)
+
+### Windows [](https://keploy.io/docs/1.0.0/server/server-installation/\#windows "Direct link to Windows")
+
+Windows
+
+- Download the [Keploy Windows AMD64](https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_windows_amd64.tar.gz), and extract the files from the zip folder.
+
+- Run the `keploy.exe` file.
+
+
+Windows ARM
+
+- Download the [Keploy Windows ARM64](https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_windows_arm64.tar.gz), and extract the files from the zip folder.
+
+- Run the `keploy.exe` file.
+
+
+Voilà! 🧑🏻💻 We have the server running!
+
+- [Install Binary](https://keploy.io/docs/1.0.0/server/server-installation/#install-binary)
+ - [MacOS](https://keploy.io/docs/1.0.0/server/server-installation/#macos)
+ - [Linux](https://keploy.io/docs/1.0.0/server/server-installation/#linux)
+ - [Windows](https://keploy.io/docs/1.0.0/server/server-installation/#windows)
+
+## Keploy SDK Installation
+[Skip to main content](https://keploy.io/docs/1.0.0/server/sdk-installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+A Keploy SDK is a language-specific library that offers APIs to do the following:
+
+1. Capture all the network calls like
+ - API Request
+ - Dependency calls
+ - API Response
+2. Replay the API request with captured dependency mocks to identify noisy fields.
+
+3. Replay all the test-cases captured and mock the dependencies for the application
+
+
+Comparing the expected and actual responses for an API call happens at the [Keploy Server](https://keploy.io/docs/1.0.0/go/installation/).
+
+A Keploy SDK mocks the external dependencies while testing APIs, eliminating the need to setup test-environment.
+This allows the application to isolate itself from external dependencies.
+
+### **Choose programming language to integrate [Keploy SDK](https://keploy.io/docs/application-development/).** [](https://keploy.io/docs/1.0.0/server/sdk-installation/\#choose-programming-language-to-integrate-keploy-sdk "Direct link to choose-programming-language-to-integrate-keploy-sdk")
+
+- [**Choose programming language to integrate Keploy SDK.**](https://keploy.io/docs/1.0.0/server/sdk-installation/#choose-programming-language-to-integrate-keploy-sdk)
+
+## Keploy Testing Toolkit
+[Skip to main content](https://keploy.io/docs/1.0.0/concepts/what-is-keploy/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/concepts/what-is-keploy/)** (3.0.0).
+
+Version: 1.0.0
+
+Keploy is functional testing toolkit for developers.
+It **generates E2E tests for APIs (KTests)** along with **mocks or stubs(KMocks)** by
+recording real API calls.
+
+KTests can be imported as mocks for consumers and vice-versa.
+
+
+
+Merge KTests with unit testing libraries(like Go-Test, JUnit..) to **track combined test-coverage**.
+
+KMocks can also be referenced in existing tests or use anywhere (including any testing framework).
+KMocks can also be used as tests for the server.
+
+## Keploy Features Overview
+[Skip to main content](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/concepts/what-are-keploy-features/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+### 1\. Convert API calls from anywhere to Test-Case [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/\#1-convert-api-calls-from-anywhere-to-test-case "Direct link to 1. Convert API calls from anywhere to Test-Case")
+
+Keploy captures all the API calls and subsequent network traffic served by the application. You can use any existing API management tools like [Postman](https://www.postman.com/), [Curl](https://curl.se/) to generate test-case.
+
+
+
+### 2\. Automatically mock Mutations [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/\#2-automatically-mock-mutations "Direct link to 2. Automatically mock Mutations")
+
+Keploy automatically [mocks](https://keploy.io/docs/1.0.0/concepts/general-glossary/#1-api-data-mocking) network/external dependencies for **all CRUD operations** with correct responses.
+
+Data dumps, stubs or mocks for dependencies like DBs, internal services, or third party services like twilio, shopify or stripe are **not required**.
+
+
+
+Please check list of currently supported dependencies in [Go, Java and Node](https://keploy.io/#integrations).
+
+Keploy can safely replay writes or mutations by capturing from local or other environments and replaying without API chaining.
+
+
+
+[Idempotency](https://keploy.io/docs/1.0.0/concepts/general-glossary/#2-idempotency) guarantees are also **not required** in the application. Multiple Reads after write operations can be replicated automatically too.
+
+### 3\. Accurate Noise Detection [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/\#3-accurate-noise-detection "Direct link to 3. Accurate Noise Detection")
+
+Keploy identifies [noisy fields](https://keploy.io/docs/1.0.0/concepts/general-glossary/#3-noisy-field) in the responses accurately like (timestamps, random values) to ensure high quality tests.
+
+As the application serves the API, Keploy re-run that API request with the captured dependency mocks.
+
+Keploy then compares if the responses of the API requests disagree with each other.
+If any of the fields of the API responses are different they are marked as random/non-deterministic fields.
+
+### 4\. Native interoperability [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/\#4-native-interoperability "Direct link to 4. Native interoperability")
+
+Keploy has [native integrations](https://keploy.io/docs/1.0.0/concepts/general-glossary/#4-interoperability) with popular testing libraries like `go-test`, `jUnit`, `jest`.
+Code coverage will be reported with existing and Keploy recorded test cases and can also be integrated in
+existing CI pipelines easily.
+
+
+
+### 5\. Easy Integration Framework for new Libraries [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/\#5-easy-integration-framework-for-new-libraries "Direct link to 5. Easy Integration Framework for new Libraries")
+
+Keploy has Instrumentation/Integration framework to easily add the new libraries/drivers within ~100 lines of code.
+Please check-out the [contribution guide](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/).
+
+- [1\. Convert API calls from anywhere to Test-Case](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#1-convert-api-calls-from-anywhere-to-test-case)
+- [2\. Automatically mock Mutations](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#2-automatically-mock-mutations)
+- [3\. Accurate Noise Detection](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#3-accurate-noise-detection)
+- [4\. Native interoperability](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#4-native-interoperability)
+- [5\. Easy Integration Framework for new Libraries](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-features/#5-easy-integration-framework-for-new-libraries)
+
+## Keploy SDK Overview
+[Skip to main content](https://keploy.io/docs/1.0.0/concepts/what-is-keploy-sdk/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+A Keploy SDK is a language-specific library that offers APIs to do the following:
+
+1. Capture all the network calls like
+ - API Request
+ - Dependency calls
+ - API Response
+2. Replay the API request with captured dependency mocks to identify noisy fields.
+
+3. Replay all the test-cases captured and mock the dependencies for the application
+
+
+Comparing the expected and actual responses for an API call happens at the [Keploy Server](https://keploy.io/docs/1.0.0/go/installation/).
+
+A Keploy SDK mocks the external dependencies while testing APIs, eliminating the need to setup test-environment.
+This allows the application to isolate itself from external dependencies.
+
+## Keploy SDK Modes
+[Skip to main content](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-sdk-modes/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+### SDK Modes [](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-sdk-modes/\#sdk-modes "Direct link to SDK Modes")
+
+The Keploy SDKs modes can operated by setting ` KEPLOY_MODE` environment variable. There are 3 Keploy SDK modes:
+
+1. **Off** : In the off mode the Keploy SDK will turn off all the functionality provided by the Keploy platform.
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="off"
+
+```
+
+2. **Record mode** :
+ - Record requests, response and all external calls and sends to Keploy server.
+ - After keploy server removes duplicates, it then runs the request on the API again to identify noisy fields.
+ - Sends the noisy fields to the keploy server to be saved along with the testcase.
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="record"
+
+```
+
+3. **Test mode** :
+ - Fetches testcases for the app from keploy server.
+ - Calls the API with same request payload in testcase.
+ - Mocks external calls based on data stored in the testcase.
+ - Validates the responses and uploads results to the keploy server
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="test"
+
+```
+
+- [SDK Modes](https://keploy.io/docs/1.0.0/concepts/what-are-keploy-sdk-modes/#sdk-modes)
+
+## Keploy Operation Guide
+[Skip to main content](https://keploy.io/docs/1.0.0/operation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/operation/)** (3.0.0).
+
+Version: 1.0.0
+
+- [How to Record](https://keploy.io/docs/operation/record-operations/)
+- [How to Test](https://keploy.io/docs/operation/test-operations/)
+- [Web UI](https://keploy.io/docs/operation/web-ui-operations/)
+
+## Record API Calls
+[Skip to main content](https://keploy.io/docs/1.0.0/operation/record-operations/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/operation/record-operations/)** (3.0.0).
+
+Version: 1.0.0
+
+> Note that Testcases are exported as files in the project directory by default
+
+To record API calls as test cases set `KEPLOY_MODE` environment variable to `record`.
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="record"
+
+```
+
+That's it! 🔥 As you make API calls to your application, new test-cases are being generated locally in `keploy-tests` directory.
+
+> > KTest directory path ( `KEPLOY_TEST_PATH`) is configurable.
+
+
+
+> > KMock directory path ( `KEPLOY_MOCK_PATH`) is configurable.
+
+## KTests and KMocks Guide
+[Skip to main content](https://keploy.io/docs/1.0.0/operation/test-operations/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/operation/test-operations/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+To run KTests and KMocks you can follow any one of these methods:
+
+### Method 1 [](https://keploy.io/docs/1.0.0/operation/test-operations/\#method-1 "Direct link to Method 1")
+
+Set Environment Variable `KEPLOY_MODE`
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="test"
+
+```
+
+Run application and find test report summary on the Keploy Server Logs and detailed test report
+in directory where Keploy Server is running.
+
+
+
+- [Method 1](https://keploy.io/docs/1.0.0/operation/test-operations/#method-1)
+
+## Keploy Browser Extension Guide
+[Skip to main content](https://keploy.io/docs/1.0.0/operation/browser-extension-operations/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/operation/browser-extension-operations/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+## Prerequisites [](https://keploy.io/docs/1.0.0/operation/browser-extension-operations/\#prerequisites "Direct link to Prerequisites")
+
+1. [Golang](https://go.dev/dl/)
+2. [Docker](https://docs.docker.com/get-docker/)
+3. [Selenium IDE extension](https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd?hl=en)
+4. [Keploy](https://github.com/keploy/keploy)
+5. GCC compiler
+
+## Install Keploy on PC [](https://keploy.io/docs/1.0.0/operation/browser-extension-operations/\#install-keploy-on-pc "Direct link to Install Keploy on PC")
+
+```codeBlockLines_e6Vv
+git clone https://github.com/keploy/keploy.git
+
+```
+
+Now come inside this directory and run this project in docker by putting the command mentioned below.
+
+```codeBlockLines_e6Vv
+docker-compose -f docker-compose-dev.yaml up
+
+```
+
+Install the Keploy browser extension from the link: [https://github.com/keploy/browser-extension/releases](https://github.com/keploy/browser-extension/releases)
+
+After installing the browser extension go inside your extension manager and switch to the developer mode.
+
+
+
+After that go on the load unpacked button, which appears just after switching on the developer mode and import your extension file from the expected location.
+
+
+
+Now we have:
+
+- Selenium extension installed
+
+- Keploy extension installed
+
+- Keploy tool is installed and running in docker
+
+
+Let's start front-end testing using selenium IDE extension.
+The Keploy extension will keep running in the background once keploy server is up.
+
+**Step-1**: Create a new project and rename it, or you can also open an existing project
+
+
+
+
+
+**Step-2**: Give a title to your 1st test case
+
+
+
+**Step-3**: Put the URL of the desired website for testing.
+
+
+
+**Step-4**: Press on the record button present in the top right corner.
+
+
+
+**Step-5**: Now default browser will open, In our case, it’s the chrome browser.
+
+**Step-6**: Perform your desired actions and selenium will start recording the positions and actions along with the data present at that place.
+
+**Step-7**: In our case we are doing a google search with the keyword oss. We can see many search results present in the suggestion but we will go with the 1 st option.
+
+
+
+**Step-8**: We know that our keploy server is already running in the background and keploy extension is present in the chrome browser. In the background, our keploy server is recording all the data coming from APIs on the front end in mongo DB. Let’s see inside mongo DB using mongo compass.
+
+
+
+**Step-9**: Now we will replay the recorded data in selenium, but this time data will not come from live servers of google, instead of that data will come from the moc database made by keploy
+
+
+
+**Step-10**: Now because of the static database all the selenium test cases will pass.
+
+
+
+- [Prerequisites](https://keploy.io/docs/1.0.0/operation/browser-extension-operations/#prerequisites)
+- [Install Keploy on PC](https://keploy.io/docs/1.0.0/operation/browser-extension-operations/#install-keploy-on-pc)
+
+## Keploy Go Quickstart
+[Skip to main content](https://keploy.io/docs/1.0.0/go/quickstart/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+- [URL Shortener with Echo-SQL](https://keploy.io/docs/1.0.0/go/quickstart/echo-sql/) \- A sample URL Shortener app that responds with a shortened URL of the URL sent as a request. The application tests Keploy integration capabilities using Echo and [PostgreSQL](https://www.postgresql.org/).
+- [URL Shortener with Gin-Mongo](https://keploy.io/docs/1.0.0/go/quickstart/gin-mongo/) \- A sample application that does CRUD (get, create, update, and delete) operations on a user profile in mongoDB
+- [User Profile with Gin-Mongo](https://keploy.io/docs/1.0.0/go/quickstart/gin-mongo-2/) \- A sample URL Shortener app that responds with a shortened URL of the URL sent as a request. The application tests Keploy integration capabilities using Gin and mongoDB
+- [Contact Keeper with Gorilla/Mux-Redis](https://keploy.io/docs/1.0.0/go/quickstart/gorillamux-redis/): A sample contact keeper app that stores and views a person's name and email. The application tests Keploy integration capabilities using Gorilla/Mux and Redis.
+
+## Keploy Java Quickstart
+[Skip to main content](https://keploy.io/docs/1.0.0/java/quickstart/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+- [Employee Management App with SpringBoot-Postgres](https://keploy.io/docs/1.0.0/java/quickstart/spring-sql/) \- A sample Employee-Manager app fetches the employee details based on the id set while making a POST request. The application tests Keploy integration capabilities using SpringBoot and [PostgreSQL](https://www.postgresql.org/).
+
+## Keploy Typescript SDK
+[Skip to main content](https://keploy.io/docs/1.0.0/typescript/installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+## Requirements [](https://keploy.io/docs/1.0.0/typescript/installation/\#requirements "Direct link to Requirements")
+
+- npm 8+
+- yarn
+
+## Keploy Typescript-SDK [](https://keploy.io/docs/1.0.0/typescript/installation/\#keploy-typescript-sdk "Direct link to Keploy Typescript-SDK")
+
+[Keploy](https://keploy.io/) is a no-code testing platform that generates tests from API calls. This is the Typescript client SDK for recording and replaying the API Calls. There are 2 modes:
+
+1. **Record mode**
+1. Record requests, response and sends to Keploy server.
+2. After keploy server removes duplicates, it then runs the request on the API again to identify noisy fields.
+3. Sends the noisy fields to the keploy server to be saved along with the testcase.
+2. **Test mode**
+1. Fetches testcases for the app from keploy server.
+2. Calls the API with same request payload in testcase.
+3. Validates the respones and uploads results to the keploy server.
+
+## Installation [](https://keploy.io/docs/1.0.0/typescript/installation/\#installation "Direct link to Installation")
+
+```codeBlockLines_e6Vv
+npm i https://github.com/keploy/typescript-sdk
+
+```
+
+## Usage [](https://keploy.io/docs/1.0.0/typescript/installation/\#usage "Direct link to Usage")
+
+```codeBlockLines_e6Vv
+require("typescript-sdk/dist/integrations/express/register");
+
+```
+
+The require statement should be at the top of your main file (server.js).
+
+Example :
+
+```codeBlockLines_e6Vv
+require("typescript-sdk/dist/integrations/express/register");
+var express = require("express");
+var app = express();
+app.get("/", function (req, res) {
+ res.send("Hello World!\n");
+});
+var server = app.listen(3000, () =>
+ console.log(`Example app listening on port 3000!`)
+);
+module.exports = server;
+
+```
+
+## Configure [](https://keploy.io/docs/1.0.0/typescript/installation/\#configure "Direct link to Configure")
+
+```codeBlockLines_e6Vv
+export KEPLOY_MODE="test"
+export KEPLOY_APP_NAME="my-app"
+export KEPLOY_APP_HOST="localhost"
+export KEPLOY_APP_PORT=5050 # port on which server is running
+export KEPLOY_APP_DELAY=5 # time delay before starting testruns(in seconds)
+export KEPLOY_APP_TIMEOUT=100 # should be number
+# export KEPLOY_APP_FILTER={"urlRegex":"*"} # should be json not to capture for certain url's
+
+export KEPLOY_SERVER_URL="http://localhost:6789/api" # self hosted keploy running server
+# export KEPLOY_SERVER_LICENSE="XXX-XXX-XXX" # hosted keploy server api key
+
+```
+
+### KEPLOY\_MODE [](https://keploy.io/docs/1.0.0/typescript/installation/\#keploy_mode "Direct link to KEPLOY_MODE")
+
+There are 3 modes:
+
+- **Record**: Sets to record mode.
+- **Test**: Sets to test mode.
+- **Off**: Turns off all the functionality provided by the API
+
+**Note:** `KEPLOY_MODE` value is case sensitive.
+
+- [Requirements](https://keploy.io/docs/1.0.0/typescript/installation/#requirements)
+- [Keploy Typescript-SDK](https://keploy.io/docs/1.0.0/typescript/installation/#keploy-typescript-sdk)
+- [Installation](https://keploy.io/docs/1.0.0/typescript/installation/#installation)
+- [Usage](https://keploy.io/docs/1.0.0/typescript/installation/#usage)
+- [Configure](https://keploy.io/docs/1.0.0/typescript/installation/#configure)
+ - [KEPLOY\_MODE](https://keploy.io/docs/1.0.0/typescript/installation/#keploy_mode)
+
+## API Concepts Glossary
+[Skip to main content](https://keploy.io/docs/1.0.0/concepts/general-glossary/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/concepts/general-glossary/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+### 1\. **API data mocking** [](https://keploy.io/docs/1.0.0/concepts/general-glossary/\#1-api-data-mocking "Direct link to 1-api-data-mocking")
+
+API mocking is a simulation of real APIs and is performed when the production API is not ready. You may come across a situation where you cannot send an API request to the server because it is not prepared. In such cases, you can mock a chunk of data from the response and eventually, when you make requests the mocked data will be returned.
+
+### 2\. **Idempotency** [](https://keploy.io/docs/1.0.0/concepts/general-glossary/\#2-idempotency "Direct link to 2-idempotency")
+
+An API is idempotent when the outcome of a successful request remains unchanged on making the same request frequently.
+
+### 3\. **Noisy field** [](https://keploy.io/docs/1.0.0/concepts/general-glossary/\#3-noisy-field "Direct link to 3-noisy-field")
+
+Noisy field refers to the random data whose value changes each time you make a request.
+
+For example, a Timestamp is one such property that returns the time when the request is made. Its value is not fed manually but is automatically recorded therefore, at every call it differs.
+
+### 4\. **Interoperability** [](https://keploy.io/docs/1.0.0/concepts/general-glossary/\#4-interoperability "Direct link to 4-interoperability")
+
+Interoperability refers to the situation when the behavior of the data is in its original (native) format when transferred from one platform to other. It reduces the dependency of files by replacing them with optimized code giving the same result.
+
+### 5\. **Deduplication Algorithm** [](https://keploy.io/docs/1.0.0/concepts/general-glossary/\#5-deduplication-algorithm "Direct link to 5-deduplication-algorithm")
+
+Deduplication is a data compression technique wherein redundant copies of the same data are identified and eliminated. This process involves hash functions or similarity analysis to compare data chunks, enabling the storage system to store only one instance of each unique data segment, thereby optimizing storage efficiency and reducing redundancy.
+
+- [1\. **API data mocking**](https://keploy.io/docs/1.0.0/concepts/general-glossary/#1-api-data-mocking)
+- [2\. **Idempotency**](https://keploy.io/docs/1.0.0/concepts/general-glossary/#2-idempotency)
+- [3\. **Noisy field**](https://keploy.io/docs/1.0.0/concepts/general-glossary/#3-noisy-field)
+- [4\. **Interoperability**](https://keploy.io/docs/1.0.0/concepts/general-glossary/#4-interoperability)
+- [5\. **Deduplication Algorithm**](https://keploy.io/docs/1.0.0/concepts/general-glossary/#5-deduplication-algorithm)
+
+## Keploy SDK Contribution Guide
+[Skip to main content](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+### HLD for Java SDK [](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/\#hld-for-java-sdk "Direct link to HLD for Java SDK")
+
+The following contains the HLD for Java SDK demonstrating all important components:
+
+## Record Mode [](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/\#record-mode "Direct link to Record Mode")
+
+
+
+## Test Mode [](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/\#test-mode "Direct link to Test Mode")
+
+
+
+We held a session explaining every core-concept of Keploy-SDK
+
+- [HLD for Java SDK](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/#hld-for-java-sdk)
+- [Record Mode](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/#record-mode)
+- [Test Mode](https://keploy.io/docs/1.0.0/devtools/sdk-contrib-guide/#test-mode)
+
+## Keploy Server Installation
+[Skip to main content](https://keploy.io/docs/1.0.0/go/installation/#__docusaurus_skipToContent_fallback)
+
+⭐️ If you like Keploy, give it a star on [GitHub](https://github.com/keploy/keploy) and follow us on [Twitter](https://twitter.com/keployio) ❤️
+
+This is documentation for Keploy Documentation **1.0.0**, which is no longer actively maintained.
+
+For up-to-date documentation, see the **[latest version](https://keploy.io/docs/running-keploy/api-test-generator/)** (3.0.0).
+
+Version: 1.0.0
+
+On this page
+
+The [Keploy Server](https://github.com/keploy/keploy) can be installed and run locally. To quickly install and run the Keploy Server download binary depending on your OS platform:
+
+## Install Binary [](https://keploy.io/docs/1.0.0/go/installation/\#install-binary "Direct link to Install Binary")
+
+### MacOS [](https://keploy.io/docs/1.0.0/go/installation/\#macos "Direct link to MacOS")
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_darwin_all.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+### Linux [](https://keploy.io/docs/1.0.0/go/installation/\#linux "Direct link to Linux")
+
+Linux
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+Linux ARM
+
+```codeBlockLines_e6Vv
+curl --silent --location "https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+
+```
+
+The UI can be accessed at [http://localhost:6789](http://localhost:6789/)
+
+### Windows [](https://keploy.io/docs/1.0.0/go/installation/\#windows "Direct link to Windows")
+
+Windows
+
+- Download the [Keploy Windows AMD64](https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_windows_amd64.tar.gz), and extract the files from the zip folder.
+
+- Run the `keploy.exe` file.
+
+
+Windows ARM
+
+- Download the [Keploy Windows ARM64](https://github.com/keploy/keploy/releases/tag/v0.9.1/download/keploy_windows_arm64.tar.gz), and extract the files from the zip folder.
+
+- Run the `keploy.exe` file.
+
+
+Voilà! 🧑🏻💻 We have the server running!
+
+- [Install Binary](https://keploy.io/docs/1.0.0/go/installation/#install-binary)
+ - [MacOS](https://keploy.io/docs/1.0.0/go/installation/#macos)
+ - [Linux](https://keploy.io/docs/1.0.0/go/installation/#linux)
+ - [Windows](https://keploy.io/docs/1.0.0/go/installation/#windows)