Pact Contract Testing for Quarkus

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • Every time you change one microservice, others break. But you had unit tests! What’s going on? Unfortunately, unit tests aren’t enough to give system-level confidence, even with a microservices architecture.
    What’s the solution? Integration testing is annoying, expensive, flaky, and fries your laptop.
    Remocal development environments are complex to manage. Testing in production is important, but the feedback loop is longer, so it’s not a substitute for local inner-loop testing.
    This is where contract tests come into play. Contract tests combine the lightness of unit tests with the confidence of integration tests, and they should be part of your development toolkit. This session will demo how to use the Pact contract testing framework to catch integration issues early. The demos will be run on Quarkus, but Pact runs on all Java frameworks. Pact has libraries for almost all of the popular programming languages.
    Speaker: Holly Cummins
    Join us:
    Website: jb.gg/website
    Blog: jb.gg/blog
    Twitter: / intellijidea
    Facebook: / intellijidea
    Download IntelliJ IDEA: jb.gg/download-intellij-idea
    Top 15 IntelliJ IDEA shortcuts: jb.gg/Top15IntelliJIDEAShortcuts
    #contracttesting #microservicetesting #java
  • Розваги

КОМЕНТАРІ • 2

  • @kanaillaurent526
    @kanaillaurent526 10 місяців тому

    I didn't had good experience at all with Spring because all of the magic behind the annotations and there are sooo many annotations and many if them can do actually the same and it's a mess and it's always changing. I really hope quarkus is not going in the same direction. But when I see the exemples in the video I'm afraid it's actually the same problem. @quarkustest, @Pacttestfor @pact.... What does it do? Will I have again to read whole bunch of document? Feels like another trap to me.

    • @marcschlegel713
      @marcschlegel713 10 місяців тому +2

      @PactTestFor and @Pact are Annotations from Pact-JVM, not Quarkus. I havent seen Pact in other languages but Pact-Jvm is in my opinion not very good. For instance in PactTestFor you have to name a method which is then looked up via reflection in order to create the Pact-Contract (which it then tests against). The api is horrible as well: there is for instance an option to pass examples as varargs array to a field definition, but during runtime Pact tells you that you can only pass one example value...why is it a varags array then? By the way, I am using Pact for 2 years now and I can understand why architects like the idea (considering hello world examples) but the technical solution has so many open issues and even if they would be solved you cannot get full confidence in your integration because a tool can never solve human mistakes