Pythagora – auto generated integration tests for Node.js API servers
Hi HN, I just released my first npm package so wanted to share it here. Pythagora is a Node.js module that creates automated integration tests for MERN/MEAN apps by recording server activity. To integrate Pythagora, you need to paste one line of code to your repository and run the Pythagora capture CLI command. Then, just play around with your app and from all API requests and database queries Pythagora will generate integration tests. When running tests, it doesn’t matter what database is your Node.js connected to or what is the state of that database. Actually, that database is never…
What it does
In the maker’s words, at launch
Hi HN, I just released my first npm package so wanted to share it here. Pythagora is a Node.js module that creates automated integration tests for MERN/MEAN apps by recording server activity. To integrate Pythagora, you need to paste one line of code to your repository and run the Pythagora capture CLI command. Then, just play around with your app and from all API requests and database queries Pythagora will generate integration tests. When running tests, it doesn’t matter what database is your Node.js connected to or what is the state of that database. Actually, that database is never touched or used —> instead, Pythagora creates a special, ephemeral `pythagoraDb` database, which it uses to restore the data before each test is executed, that was present at the time when the test was recorded. Because of this, tests can be run on any machine or environment. Also, *if the request updates the database, after the API returns the response, Pythagora checks the database to see if it was updated correctly*. Finally, Pythagora tracks (using istanbul/nyc) lines of code that were triggered during tests, so you know how much of your code is covered. Our goal is to help teams that don’t have time to properly manage their test suite to cover their entire codebase with as little as 1 hour of their time. We tested Pythagora on open source clones of apps like Reddit, IG, etc. and we were able to get to 50% of code coverage within 10 minutes and to 90% within 1 hour of playing around these apps. Feel free to try out the Pythagora npm package - https://www.npmjs.com/package/pythagora And the source code on Github - https://github.com/Pythagora-io/pythagora We’re excited to hear what you think. How do you write integration tests for an API server? Would you consider using Pythagora instead/along with your system? If not, we would love to hear what are your concerns and why this wouldn’t work for you?
Does the same job
all alternatives →
Pythagora - automated integration tests2023 · ▲141Save 30% of dev time - generate tests without writing code


Simple API Generator (Rest + GraphQL)2019 · ▲121Instantly generate openapi (OAS) 3.0.0 REST + GraphQL APIs


More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com
