How to parameterize and configure your custom Playwright fixtures

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

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

  • @ChecklyHQ
    @ChecklyHQ  2 หลายเดือนก่อน +1

    🦝If you have any questions or comments, drop them below, and if you're looking for the example code, you can find it on GitHub: github.com/checkly/playwright-examples/

  • @DJ_Locks
    @DJ_Locks 2 หลายเดือนก่อน +2

    This needs to be better outlined in the documentation... I've been trying to work around not having this for the last 11 months. THANK YOU!

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน +1

      Wooohoooo! Happy this video resolves a year-lasting problem. 🎉

  • @yurademchenko9924
    @yurademchenko9924 2 หลายเดือนก่อน +1

    Greetings from Ukraine
    I have 7+ years of C# experience in UI, API testing.
    But now the market has changed and I have to learn new languages ​​and technologies. Thank you for the videos.

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน

      Welcome to the channel! If you have any questions or comments, just leave a comment. I love to create follow ups. :)

  • @3VAudioVideo
    @3VAudioVideo 2 หลายเดือนก่อน

    Awesome video! Glad that great question was asked! Always something new and cool to learn from you. What I would really like to know is how to run tests as a Playwright job on Jenkins, where more than once PC is running Playwright tests. I got it to run on a single PC, the same PC that is hosting Jenkins. But how do I tell it to run the same job (or multiple jobs?) concurrently on remote PCs? Maybe you could do a series on Jenkins, covering all the basics leading up to this? If not, just one video for this scenario? Your videos Rock!

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน

      Great question! 💯 Did you discover this video? th-cam.com/video/fG0YePSS5iA/w-d-xo.html Generally what you describe should be possible with a bit of Playwright config. :)

  • @ICIC-cl4qk
    @ICIC-cl4qk 2 หลายเดือนก่อน +1

    Can you build an example to show how multiple test data fixture files could be used along with page fixtures in a test?

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน

      Thanks for providing a video idea! It should work similar to what I showed in the video minus the `option` params. You could provide multiple JavaScript object or data fixtures the same way and I infact do this all the time. :) Does this help?

  • @ppp.1334
    @ppp.1334 5 วันที่ผ่านมา +1

    any example how to use it to
    mantain browser session between tests?
    i have the playwright.config.ts -> with order config,
    But unfortunately i m loosing the context and my browser gets closed,

    • @ChecklyHQ
      @ChecklyHQ  8 ชั่วโมงที่ผ่านมา

      If I understand you question correctly, Playwright offers `storageState` and `setup` steps for this case. You can find more info on the blog and here on YT.
      th-cam.com/video/nSHPCLUwwVk/w-d-xo.html
      www.checklyhq.com/blog/speed-up-playwright-tests-with-storage-state/

  • @alexanderkomanov4151
    @alexanderkomanov4151 2 หลายเดือนก่อน

    Wow! So cool!!!

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน

      Thanks for watching! 🦝

  • @YenovSegal
    @YenovSegal 2 หลายเดือนก่อน +1

    test.use only affects a test.describe or whole test file, what I can do if I want only affect on one test from the test file?

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน +1

      Great question! 💯 It's written in the Playwright docs: "[test.use] specifies options or fixtures to use in a single test file or a test.describe() group". I have to research if you can do only one test, but I think this is not possible right now.

    • @YenovSegal
      @YenovSegal 2 หลายเดือนก่อน

      @@ChecklyHQ OK, I really hope you find it

  • @AKHILDABRAL
    @AKHILDABRAL 2 หลายเดือนก่อน

    Can u guys make playwright-bdd library videos ??

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน +1

      Thanks for the question. :) I don't have much experience with playwright-bdd so I'm not sure if we'll cover this topic. Is there anything particular you'd like to see?

    • @AKHILDABRAL
      @AKHILDABRAL 2 หลายเดือนก่อน +1

      @@ChecklyHQ I would like to see how to use multiple projects with multiple dependencies using different credentials and saving them to different auth file. Currently when I am trying to pass the auth file name from metadata using project dependencies it is giving file error for page.context(). storageState(path : passed filename);

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน +1

      @@AKHILDABRAL Thanks I'll add it to the list. :)

  • @manuQAE
    @manuQAE 2 หลายเดือนก่อน

    Cool!

  • @rafaeldanelogomez
    @rafaeldanelogomez 2 หลายเดือนก่อน +1

    Which method is best for you in this user credentials scenario? .env or parameterized fixtures?

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน

      I personally prefer to only have flags or single values in `.env`. For example, a base URL is something where I set a sane default, but make it possible to overwrite via .env.
      For user creds, I usually setup a single user fixture with multiple levels (user.admin, user.customer, etc.) or go with multiple ones. It depends a bit on the scenario. :)

    • @dadslife2464
      @dadslife2464 2 หลายเดือนก่อน

      @@ChecklyHQ Can you pls make a short video of above solution, i have the same question .env or parameterized fixtures for user credentials scenario?

    • @ChecklyHQ
      @ChecklyHQ  2 หลายเดือนก่อน +1

      @@dadslife2464 I'll put it on the list, but just so I understand your question. You're looking for pros/cons of each approach?