Why JUnit's Dynamic Tests ARE SO GOOD

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

ความคิดเห็น • 14

  • @gerhardat7244
    @gerhardat7244 ปีที่แล้ว +2

    Great tutorial, as always. Thank you!

  • @prometheusj5586
    @prometheusj5586 ปีที่แล้ว +2

    Took forever to get to the topic itself. Going to find other resources on this topic.

  • @pad5724
    @pad5724 ปีที่แล้ว +1

    Thank you!

  • @tipazas
    @tipazas ปีที่แล้ว

    Very interesting, please keep it up 👍🏻

  • @Renis1235
    @Renis1235 ปีที่แล้ว +2

    Great Video as always!
    Why can't we pass an InputStream to the MetadataReader?

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +1

      We need the file reference as a "backup" for the origin datetime (we read last modified, if for whatever reason we don't find anything in the file's metadata). Hence I just re-used the file reference for reading the metadata + lastmodified, instead of using the inputstream - but it would in fact just work as well.

  • @БогданЗараник
    @БогданЗараник ปีที่แล้ว +3

    Well, we do have already Parametrized tests which allow us to do the same, but a bit reversed. DynamicTest API is less-known. Do we really need it? Thnx)

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +2

      I'm a big believer in "whatever works, works", as in, I have no preference towards either one. Just felt like making it a dynamic test :)

    • @alexismanin5239
      @alexismanin5239 ปีที่แล้ว

      I think it depends on your need. If your list of parameters fits in a CSV, then ParameterizedTest is enough. But being able to provide you own tests based on arbitrary logic can be useful for test automation in more complex environments (like, if resources must be fetched across network, depends on some system spec, etc.).

  • @alexandrosvangelatos9979
    @alexandrosvangelatos9979 ปีที่แล้ว

    First!!! 🍻