vcr
DeepfakeHTTP
Our great sponsors
vcr | DeepfakeHTTP | |
---|---|---|
20 | 34 | |
5,747 | 502 | |
0.4% | - | |
6.4 | 1.8 | |
about 1 month ago | over 1 year ago | |
Ruby | Java | |
Hippocratic License 2.1 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vcr
-
Creating integration tests for a backend legacy codebase
Basically, it's a record/replay tool, similar to VCR for Ruby, but on steroids and powered by AI (khm GPT khm).
-
I isolated the entire codebase from external data sources and made a generator of automated tests
I don't think it's right to say "pythagora generates integration tests". It's more of a "replay manual tests as fixtured unit tests," which makes it similar to (but more powerful than) VCR for Ruby HTTP. What I've always wanted for these kinds of "request recorders" is a way to re-validate the test fixtures over time.
-
Write SDK “base” in Rust, wrap in other languages?
For example, they might expect to be able to mock calls to your API with something like VCR or Responses.
-
How to unit test your database interactions with Docker
I also started from the same starting point but then discovered and started using VCR for creating http stubs - https://github.com/vcr/vcr. It allowed me to write against more realistic and complex test scenarios but didn't support databases.
-
When to mock and what to mock in a Web API?
If you had bit more complex workflows or less time - you could start using a VCR library to mock out API interactions and then continue with your dockerised DBs.
-
Ask HN: When an API is down, what do you usually do?
I generally will use vcr[0] or something similar to record requests and then I write tests and code against that.
3rd parties go down, it happens. In general a system that is dependent on a third party should have some non exceptional behavior when that happens.
So if I’m not setup with vcr, and 3rd party is down- I would on the behavior for what happens when it’s down.
[0] https://github.com/vcr/vcr
-
Are there any testing frameworks to intercept HTTP and Database calls?
With external APIs, you can also make use of a gem like VCR. I prefer mocks (plus unit tests around the actual deserialization of the response) to VCR in most cases, but the end result is about the same.
-
Configure VCR with RSpec
A way to avoid this is using the VCR gem.
-
Testing Dependencies: Fake It While You Make It
We'll use a tool called vcr to capture real HTTP requests and responses, storing and using them from then on. VCR's language and terminology leans heavily into its real-world analogue. If you don't know what a VCR is, it's a box we used to hook up to TVs to watch movies before DVD players. If you don't know what a DVD player is, it's a box we used to hook up to TVs to watch movies before streaming.
-
New grad job as Quality Engineer and seeing only negativity about it
[1] https://github.com/vcr/vcr
DeepfakeHTTP
-
DeepfakeHTTP v6.3.1
A new version of DeepfakeHTTP is out! I decided to add a new --dir option, allowing to host static content as static servers do. However, unlike regular static servers, DeepfakeHTTP can also host executable stuff, such as shell scripts or JavaScript. In order to have JavaScript executed on the server side you need to specify 'use server' at the beginning of the code (similar to the well-known 'use strict').
-
DeepfakeHTTP v6.1.1
The new release of DeepfakeHTTP brings new features.
-
DeepfakeHTTP v5.1.1 released!
https://github.com/xnbox/DeepfakeHTTP From the README.md.
-
I would like to get feedback on my open source project
DeepfakeHTTP is a web server that uses HTTP dumps as a source for responses.
- The web server that uses HTTP dumps as a source for responses
-
Rapid REST API prototyping using a dump server
Download the latest release of df.jar
-
What is a DUMP SERVER and what are its advantages over a static server
View on GitHub
-
Mom. Dad. Grandma. Everyone is happy!
When I told them that I created DeepfakeHTTP, no one really reacted. Dad said: – Son, I understand that the idea of simulating an HTTP server is interesting, but what am I going to do with this simulator you created?... Will he fix the engine from the hay mower for me, or what?! Daddy took his oil-soaked, frayed-in-time notebook, and went to assemble the engine parts. – No, Dad, my server sure can't fix your motor, I replied sadly and went to bed. At night I dreamed that I was wandering through a junkyard of old, abandoned engines and shouting: – Maybe someone needs an open source mock server, with HTTP dumps under the hood? But there was such a silence around, you could hear the tedious flapping of the wings of a butterfly slowly flying past my eyes... But the engines must have heard me and some kind of switch turned, as I woke up in the morning in a very different mood! I remembered that Dad was always looking for some kind of tool for his technical notes. He had tried Word and LibreOffice Calc and Excel... But something would drift to the side, or go into a different column, or jump to a new page when there was still enough space on this one... Anyway, the oily notebook continued to take its honorable place in Dad's workshop. No, don't get me wrong, I suggested that he do all his business in a text file, but that didn't work out either. "There's no clarity", - Dad said, I want me to put in bolts for KR-18, and all my bolts for KR-18 show up right away. And Uncle Jerry's bolts, too. And that I can see what bolts Uncle Jerry has, and he can see what I have. And that Uncle Jerry and I could both see and update, him at his house and me at mine. It became clear to me that he wanted something like ERP. I thought, what if you don't write any ERP, but simulate it. Simulate it with the hands of Dad and Uncle Jerry. So, let's get down to business! We take a text file, we call it john.txt, and we write:
- A web server that uses HTTP dumps as a source for responses
What are some alternatives?
Parallel Tests - Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber
castlemock - Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services.
Knapsack - Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time.
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Spring - Rails application preloader
request - 🤖 Minimal http client for api development and testing
timecop - A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
request-baskets - HTTP requests collector to test webhooks, notifications, REST clients and more ...
Ruby-JMeter - A Ruby based DSL for building JMeter test plans
tommy - Tommy is Apache Tomcat, bundled as a single executable jar.
httparty - :tada: Makes http fun again!
Apache Tomcat - Apache Tomcat