Giter Site home page Giter Site logo

Testing Strategy about pggen HOT 3 CLOSED

opendoor avatar opendoor commented on August 18, 2024
Testing Strategy

from pggen.

Comments (3)

ethanpailes avatar ethanpailes commented on August 18, 2024

I haven't really looked for a database testing framework, though I hear sqlite has 300% code coverage, so maybe I should look at how their tests are set up.

I was planning on fleshing out the testing story by writing some failure tests to cover the error cases, testing against multiple postgres versions in ci, and writing more unit tests.

I especially think testing will be important for ensuring the correctness of the association code once that gets more fleshed out. My guess is that could get decently hairy because of cyclic data structures and whatnot.

In terms of automation and fuzz testing it might be cool to try to automatically generate database schemas and assert certain properties about them. That sounds like a pretty big undertaking though. I guess we could try to see if we could hook up go-fuzz to the schema generator in order to fully explore the code paths in pggen.

from pggen.

ethanpailes avatar ethanpailes commented on August 18, 2024

I have now written some cli testing infrastructure which does a pretty good job of allowing us to write tests for error conditions that the code generator could run into.

That means the main outstanding thing for this issue is to test against multiple postgres versions. Docker should help with that.

from pggen.

ethanpailes avatar ethanpailes commented on August 18, 2024

Closing in favor of #14 which is more focused

from pggen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.