Git Product home page Git Product logo

Comments (4)

hhdqirui avatar hhdqirui commented on September 28, 2024 1

An alternative is to use an embedded PostgreSQL database for unit testing.
Pros: It seems that it is relatively easier to set up the entire testing framework. It can be installed and managed by Gradle. It can used to write JUnit tests.
Cons: This library seems to be less well-known. Moreover, since it is not a real PostrgreSQL instance, the behaviour might be different from a real PostgreSQL instance.
https://github.com/opentable/otj-pg-embedded
https://github.com/zonkyio/embedded-postgres

from teammates.

jianhandev avatar jianhandev commented on September 28, 2024 1

There are two options we can consider:

  • Option A: OpenTable Embedded PostgreSQL Component

    • This library is maintained by OpenTable, Inc. It uses TestContainers under the hood, but adds value with builders, the api compatibility, the wrapping around Flyway to allow users to adopt a smooth transition to a Docker-based test approach.
  • Option B: TestContainers

    • We can also directly use TestContainers, a well-known Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases
    • We will need to integrate Flyway with TestContainers ourselves

@hhdqirui would you like to work on this? I think either option might work for us, OpenTable Embedded PostgreSQL Component would be easier to get started with. We also need to explore how to integrate it successfully in our CI/CD pipeline.

from teammates.

jianhandev avatar jianhandev commented on September 28, 2024

Currently focusing on issue #16, if anyone has time to explore this feel free to reassign this to yourself.

from teammates.

jianhandev avatar jianhandev commented on September 28, 2024

An alternative is to use an embedded PostgreSQL database for unit testing.

Thanks for suggesting the alternatives. Let's consolidate out findings in this google doc, I did some quick research there could be many approaches to this.

https://docs.google.com/document/d/1OATm_5TuzpFQPJ6uor2J4MbHRL5-Zg9hCV3rnbcCm3I/edit

from teammates.

Related Issues (16)

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.