IntelliJ IDEA. Writing Tests with Spock

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 50

  • @theLoneCodesman
    @theLoneCodesman 3 роки тому +13

    This is very helpful. I haven’t heard anything about Spock before, but this looks very interesting to try to incorporate into our development process.

  • @CarlMarcum
    @CarlMarcum 3 роки тому +10

    Thanks ! This was a great introduction to Spock.

  • @tylersharpe3600
    @tylersharpe3600 3 роки тому +4

    Thanks Trisha. We've been using spock as our primary testing framework at work for years now, but I still learned some new things from this video (particularly the verifyAll() API and multi-cursor feature)!

  • @brianjohnsen3992
    @brianjohnsen3992 3 роки тому +5

    Absolutely brilliant!
    I've been using (and teaching) Spock for years, and your video is beautifully precise and to the point.
    One itsy bitsy thing: at 32:15 you reintroduce the renderer (line 98) in the verifyAll-block, but since it has the same name as the variable (line 89) it will only assert that the variable is equal to itself. IDEA actually recognises that by highliting renderer.

    • @TrishaGee
      @TrishaGee 3 роки тому

      Yes!! Someone spotted the error! I didn't introduce it on purpose, I noticed it after I finished the screencast and published the code. But I was waiting to see who would spot it first. You win!

  • @wmv1990
    @wmv1990 2 роки тому +1

    If you are not able to view separately every test case run for a Data table or Data pipe created for a test method. Please add annotation @Unroll on top of the test method, so that feature gets activated for you by spock. This feature by default is present in newer spock versions but not in old ones.
    Thanks for the superb video!

  • @DJMightyChip
    @DJMightyChip 3 роки тому +1

    Oh my gods, Spock is still going strong?! Excellent. Hands down, my favourite testing framework. JUnit is trustworthy and dependable... but Spock lets you write tests in an intelligible way. Even non-technical people can understand many of these tests.

  • @Greatfulone
    @Greatfulone 3 роки тому +2

    I love some of the features like access to private fields, and the creating parametrized tests a lot easier. I feel my Groovy project is a bit slower in compiling and running then Maven. I don't have the fastest pc, but it is current. Oh, and thank you for content. It was exactly what I need to start and some more to work on for future.

  • @mayurravindra9433
    @mayurravindra9433 2 роки тому

    Simply loved the tutorial! Very useful even to experienced devs. Kudos👍

  • @davidhsv2
    @davidhsv2 3 роки тому +1

    This is great, way better than junit giant method names. Thank you for showing that

  • @cvetkovicslobodan
    @cvetkovicslobodan Рік тому

    Amazing presentation...nice job 👍

  • @axelbrugger9944
    @axelbrugger9944 Рік тому

    Nice. But you forgot to mention that when you first opened the Java project, you were showing the build.gradle file instead of the 'src' folder (there was bno way to see that you had the build.gradle file open)

  • @Greatfulone
    @Greatfulone 2 роки тому

    Thank you so much for the content. Can you do a follow up on debugging the unit tests. It seems like debugging and setting break points need a bit more code.

  • @sergiopuccini
    @sergiopuccini 2 роки тому

    Great video. Saved my ass at new job :) Thanks!

  • @mohsinraza3913
    @mohsinraza3913 3 роки тому

    Great video (y) had this feeling right from the start :)

  •  3 роки тому

    Great presentation!
    Is there a way to annotate, it some other trick for the setup/cleanup methods to indicate they're part of spock? Right now IntelliJ gray them out like they're never called.

    • @TrishaGee
      @TrishaGee 3 роки тому

      Hmmm, interesting, IntelliJ IDEA should recognise them as test methods. Which version of IntelliJ IDEA are you using?

    •  3 роки тому

      @@TrishaGee I'm on the latest and greatest 2020.3.1(Ultimate) but it's always been that way. It doesn't recognize any of the setup/cleanup methods as part of the spock infrastructure. They are all considered never called and grayed out.

  • @shankarsg1405
    @shankarsg1405 3 роки тому

    Thank you for the video 😊

  • @fabasoad
    @fabasoad 3 роки тому

    Haven't heard about Spock before. I would like to try it in a real world project.

  • @TheGuroguro12
    @TheGuroguro12 2 роки тому

    thank u

  • @StephanStan
    @StephanStan 3 роки тому +2

    To complete the tutorial - I need to add module that includes awt.Polygon, Using Openjdk11.

    • @TrishaGee
      @TrishaGee 3 роки тому

      You shouldn't have to, it shouldn't require any awt. You need to create a brand new Polygon class. See the code here: github.com/trishagee/spock-testing-demo/

    • @StephanStan
      @StephanStan 3 роки тому +1

      @@TrishaGee Thank you.

  • @shawnmofid7131
    @shawnmofid7131 3 роки тому

    How does Spock work with CI/CD? Does it work like Junit and maven sure fire?

  • @mikeCavalle
    @mikeCavalle 3 роки тому

    what a great tutorial -- regards

  • @ankxy1
    @ankxy1 3 роки тому

    thanks this helps a lot

  • @m1k0register
    @m1k0register 2 роки тому

    How to add more moving parts to a project? Swap JUnit for Spock ;)

  • @TheMateuszNH
    @TheMateuszNH 2 роки тому

    is there some other good materials ? This one is very good but doesn't help writing hard tests.

  • @cya3mdirl158
    @cya3mdirl158 3 роки тому +3

    Please add better formatting support test method.

    • @TrishaGee
      @TrishaGee 3 роки тому

      Please feel free to request improvements/new features in the issue tracker: youtrack.jetbrains.com/issues/idea

  • @momos2899
    @momos2899 3 роки тому

    is there a code Competition in java

  • @SharebookBR
    @SharebookBR Рік тому

    Excelent. Thanks!

  • @郭牧野
    @郭牧野 Рік тому

    建议添加spring spock的使用章节

  • @cya3mdirl158
    @cya3mdirl158 3 роки тому

    We are waiting for Spock 2.0...

  • @davidwidner8258
    @davidwidner8258 2 роки тому

    Could not create the "polygon" object :\

    • @tharakakushan
      @tharakakushan 2 роки тому

      Polygon Has been created as concreate class inside the code base, the code base git link attached to the description also.
      Good Luck! @Neo.

  • @asit2303
    @asit2303 3 роки тому

    😂

  • @strekozuka
    @strekozuka Рік тому

    Hi, I have 'CannotCreateMockException' error and can't solve it. I'm doing everything for the tutorial. How does it solve?

  • @nikolaykaradzhov449
    @nikolaykaradzhov449 3 роки тому

    Thank you, great video