nowfound

Dev tools · February 9, 2023

PA

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 →

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • 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

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, February 2023

the whole month →
  • Bento1,373

    A link in bio, but rich and beautiful

    Dev tools · 2023 · linktr.ee

  • Jitter 1.01,020

    A fast and simple animation tool on the web 💫

    Work · 2023 · jitter.video

  • Twinr 2.0961

    Convert any website to mobile apps in minutes

    Dev tools · 2023 · twinr.dev

  • Your on-demand presentation generator

    AI · 2023 · decktopus.com

  • Aaply812

    Make your mobile app happen

    Dev tools · 2023 · aaply.app

  • Scalenut783

    AI that powers your entire content lifecycle

    AI · 2023 · scalenut.com