Thread
#feed
    Kyle Roe

    Kyle Roe

    9 months ago
    Hey everyone 👋 While working at different places on different projects its always been interesting how developers choose to go about creating models for unit tests. I’ve seen some projects redundantly create new models for each and every test, and some projects create factories, with static models that they then use everywhere. Long story short, at work we wanted to clean up some of these tests so two of us started working on a library that would automat this for us and generate random models with actual data. The fruits of our labor can be found below 🤓 We have been using it in production for about 6 months now 🚀 We would be eternally grateful for any feedback you might have 🙏 and to see wether it potentially fits your use cases as well. Please take a look, try it out and let us know what you think 🙌 Collaboration welcome 👩‍💻 👨‍💻 https://github.com/HelloCuriosity/model-forge
    Joakim Forslund

    Joakim Forslund

    9 months ago
    Cool concept, something that is not very clear while reading the documentation is what/if any default values are generated and how they behave for each different type.
    Kyle Roe

    Kyle Roe

    9 months ago
    @Joakim Forslund Thanks for the feedback and that is very true. Feel free to create an issue 🙌 alternatively I can add it too, but I’m a firm advocate of giving credit where its due, so I wouldn’t like to claim your feedback as my own 😅
    Joakim Forslund

    Joakim Forslund

    9 months ago
    Kyle Roe

    Kyle Roe

    9 months ago
    Thanks 🙌
    dave08

    dave08

    9 months ago
    Did you have a look at KotlinFixture?
    Yours is much simpler for basic needs though... sometimes over-complex frameworks are overkill.
    Kyle Roe

    Kyle Roe

    9 months ago
    I didn’t know about KotlinFixtures 😅 but I will take a look at it 🙌
    m

    Matteo Mirk

    9 months ago
    very nice!