Parallel, Rerun & Report | Playwright & Cucumber - Typescript | Part 6

Поделиться
HTML-код
  • Опубликовано: 13 дек 2024

Комментарии • 120

  • @andyshort9471
    @andyshort9471 Год назад +4

    Another great video mate. You are a great teacher.

  • @sumitgoyal385
    @sumitgoyal385 6 месяцев назад +1

    whatever doubts I think he already covered those like thinking of emptying dir ,he explained at end good

    • @letcode
      @letcode  6 месяцев назад

      Thanks 👍

  • @lawrencechandrasekar9488
    @lawrencechandrasekar9488 6 месяцев назад +1

    Explained very well, Thank you for the great video

    • @letcode
      @letcode  6 месяцев назад

      Glad you like it 😊

  • @dbn4782
    @dbn4782 2 месяца назад +1

    great video very nice explanation of the concepts...really liked it......Thank you

    • @letcode
      @letcode  2 месяца назад

      Thanks 👍

  • @hernanmoreno6194
    @hernanmoreno6194 11 дней назад +1

    Thanks a lot, I have executed my scripts (03/12/2024 - DD/MM/YYYY) without node-fs-extra and the tests are working fine, maybe we have a new features of cucumber library

    • @letcode
      @letcode  11 дней назад

      It should work fine without fs extra, it is just handy tool

  • @blecomp
    @blecomp Год назад +1

    Thanks my friend, you are the best!

  • @mohiniyerra3818
    @mohiniyerra3818 6 месяцев назад +1

    It is really a great video. Thank you so much

    • @letcode
      @letcode  6 месяцев назад

      Welcome

  • @toanvan2032
    @toanvan2032 Год назад +2

    Thanks for the video. I use Window operation and face the issue when running npm test, the error is "'true' is not recognized as an internal or external command". Could you please help me?

    • @letcode
      @letcode  Год назад +1

      You can use the gitbash terminal

  • @Ankushkumar213
    @Ankushkumar213 4 месяца назад

    fantastic job. :)

    • @letcode
      @letcode  4 месяца назад

      Thanks 👍

  • @shivaKumar-oy7ty
    @shivaKumar-oy7ty Год назад +1

    Hello Koushik, as mentioned earlier, definitely some great videos from you. Quick question: Playwright normally supports parallel test execution, but can you guide me on how to run parallel tests on multiple browsers when integrating with Cucumber?

    • @letcode
      @letcode  Год назад

      I'm not sure as of now, i have to check this.

    • @shivaKumar-oy7ty
      @shivaKumar-oy7ty Год назад +1

      @@letcode thank you

  • @dev1mail508
    @dev1mail508 7 месяцев назад +2

    Hi @Koushik, I tried this to regenerate the report for the failed test case after rerun, but didn't get updated the report, however, report build posttest ran well.
    "postest": "npx ts-node src/helper/report.ts",
    "test:failed": "cucumber-js -p rerun @rerun.txt && npm run posttest"
    Please suggest how to fix the problem.

    • @letcode
      @letcode  7 месяцев назад

      Oh, I have to check this.

    • @dev1mail508
      @dev1mail508 7 месяцев назад

      @@letcode Thank you Koushik

    • @sentyl6131
      @sentyl6131 5 месяцев назад

      @dev1mail508 @letcode I am also facing same issue. Please help me if you find any solution

  • @arunjosh5152
    @arunjosh5152 8 месяцев назад +1

    Hi,
    In your hooks.ts file you are creating browser(chromium.launch) under beforeAll. suppose if you mention the parallel as 2 in cucumber.json, will it execute beforeAll method twice ?
    I tried the same thing and its executing beforeAll twice if the parallel count is mentioned as 2 in cucumber.json.
    Is this an expected behavior of cucumber and is there any way to execute beforeAll only once even if the parallel thread is mentioned as 4 or 5. Please advice.

    • @letcode
      @letcode  8 месяцев назад +1

      It is the behaviour of cucumber, beforall means before all the scenario of a particular future file..

  • @hoilehong7756
    @hoilehong7756 8 месяцев назад +1

    Hi @LetCode with Koushik, how to run test in headless mode using your framework? I set HEAD: false in the env file but it still running headed

    • @letcode
      @letcode  8 месяцев назад

      I believe I have fixed that in the latest version of code.

    • @hoilehong7756
      @hoilehong7756 8 месяцев назад

      @@letcode can you guide me how to fix it

    • @hoilehong7756
      @hoilehong7756 8 месяцев назад +1

      @@letcode thank you, I fixed it

  • @Ajaykumarpottumuthu
    @Ajaykumarpottumuthu Год назад +1

    Hi @Koushik,how can we get the retry count by runtime, once defined in cucumber.js file

  • @chrisbernardo2877
    @chrisbernardo2877 Год назад +1

    hi sir, how can i select and execute the feature i only wanted to run? aside from modifying the path in the cucumber.json file, what are the other way of doing it? thanks

    • @letcode
      @letcode  Год назад

      You can pass the feature file name from the cli or using tags.

  • @luckylakshmi6972
    @luckylakshmi6972 Год назад +1

    Hi @Koushik, how can we execute test cases on mutiple browsers(like chrome and safari) parllelly ?

    • @letcode
      @letcode  Год назад

      I have to check, as of now cross parallel browser is not supporting in this framework.

    • @luckylakshmi6972
      @luckylakshmi6972 Год назад +1

      Thanks alot for quick reply@@letcode

  • @elberthagreda4467
    @elberthagreda4467 7 месяцев назад +1

    excelent!!

    • @letcode
      @letcode  7 месяцев назад

      Thanks 😊

  • @luckylakshmi6972
    @luckylakshmi6972 Год назад +1

    Hello Koushik, how can we update the test reult status on Lambda when the test retry fails.

    • @letcode
      @letcode  Год назад

      If u r asking about LambdaTest, u have to contact them.

  • @anbarasanG-k7p
    @anbarasanG-k7p 24 дня назад +1

    How is npm test runs all the script in series ? I am confused in this part.

    • @letcode
      @letcode  24 дня назад

      I hope you have watched continuously from the first part, it is configured in the package. Json file.

  • @farukhkhan2832
    @farukhkhan2832 Год назад

    Good job @ appreciate 👏

  • @tonyle2511
    @tonyle2511 Год назад +1

    Hi @Koushik, how could I run debug within this framework (I’m using VScode, and doing configuration as your instruction in Part 1)? Thanks and have a great day

    • @letcode
      @letcode  Год назад +1

      Debug is not working properly, i have to look into it.

  • @McTurk100
    @McTurk100 Год назад +1

    Thanks for the helpful videos. Why did you add the '||' in package json - under scripts "test": "cross-env ENV=staging cucumber-js test || true"?

    • @letcode
      @letcode  Год назад +1

      If the script test fails then the posttest won't execute, so to make it execute always i have given that.

  • @vk-ok7hd
    @vk-ok7hd Год назад +1

    Hi @Koushik How to comment a line in JSON file. Ex: i want comment 1st line in below
    {
    "pretest": "npx ts-node src/helper/init.ts",
    "posttest": "npx tsnode src/helper/report.ts"
    }

    • @letcode
      @letcode  Год назад

      // can be used, but commenting on a json file is bad practice

  • @malasriboora5525
    @malasriboora5525 Год назад +1

    Hi, How to give tagname in scripts "test": under package.json. To run scenarios which are tagged in feature file

    • @letcode
      @letcode  Год назад

      That can be configured from the cucumber.json file

    • @malasriboora5525
      @malasriboora5525 Год назад

      @@letcode may I know what is the command line and how to implement

    • @malasriboora5525
      @malasriboora5525 Год назад +1

      Thank you as per your suggestion, I have configured in cucumber.json file by giving the below one and it worked
      "tags": "@tagname",

    • @letcode
      @letcode  Год назад

      Yes, great 😃

  • @kishorenaidu2156
    @kishorenaidu2156 10 месяцев назад +1

    Hi bro.. how to run scripts in sequential order in a fearure file..

    • @letcode
      @letcode  10 месяцев назад

      I don't think there is an option for that

  • @arunbala2805
    @arunbala2805 Год назад +1

    thank you was a big help

  • @deepaksrivastava-25
    @deepaksrivastava-25 Год назад +1

    How are we running all the scripts one after each in a single command?

    • @letcode
      @letcode  Год назад +1

      In the cucumber.json file I have included all the feature files

  • @praneshgaikwad6453
    @praneshgaikwad6453 10 месяцев назад +1

    How to attach logs with some strings in report?

    • @letcode
      @letcode  10 месяцев назад

      From hooks you can do it, from test files also possible I have to take a look.

  • @sumitgoyal385
    @sumitgoyal385 6 месяцев назад +1

    Hi thanku you One more ques : regarding assets and features ,should we delete everytime before we run tests or not ,because it might populate extra results in cucumber-report.html , pls tell

    • @letcode
      @letcode  6 месяцев назад

      It will get deleted

    • @sumitgoyal385
      @sumitgoyal385 6 месяцев назад

      @@letcode Hi As I can see features data keep on adding ,while assets data is overwritten everytime

  • @sahoosatya2239
    @sahoosatya2239 5 месяцев назад +1

    can we use allure report with cucumber ?

    • @letcode
      @letcode  5 месяцев назад

      Yes I guess, but the report I used is better.

  • @anandk-m8e
    @anandk-m8e 3 месяца назад +1

    Hi Koushik,
    Is it possible to run a single test file, instead of only re-running the failed ones?

    • @letcode
      @letcode  3 месяца назад +1

      You have to pass that feature name.

    • @anandk-m8e
      @anandk-m8e 3 месяца назад +1

      @@letcode Do you mean tags?

    • @letcode
      @letcode  3 месяца назад +1

      @user-yv8ik8wv7i yes tags of specific file or feature name

    • @anandk-m8e
      @anandk-m8e 3 месяца назад +1

      ​@@letcodeThanks for the quick response! It worked perfectly.

  • @pranitingole5562
    @pranitingole5562 Год назад +1

    can we run the parallel for Chromium, firefox and Webkit , please replay

    • @letcode
      @letcode  Год назад +1

      Only one browser at a time.

    • @pranitingole5562
      @pranitingole5562 Год назад +1

      @@letcode thanks @koushik , I have another q, when I pull code after environment setup commit, that code I am trying to run it showing 0 scenario 0 step thare is any configurations need to change for staging and prod

    • @letcode
      @letcode  Год назад +1

      @@pranitingole5562 you can remove the tags in the cucumber.json file.

    • @pranitingole5562
      @pranitingole5562 Год назад +1

      @@letcode Thanks @koushik , it's work fine

    • @letcode
      @letcode  Год назад +1

      @@pranitingole5562 cool 😎

  • @ashokjagtap6238
    @ashokjagtap6238 Год назад +1

    how can i send the test report generated in playwright to testrail?

    • @letcode
      @letcode  Год назад

      Not sure, maybe there will be an API

  • @shanmukhasaichilla3310
    @shanmukhasaichilla3310 Год назад

    Error: Cannot find module './init.ts'
    Require stack:
    - C:\Users\Desktop\cucumber-playwright\helper\imaginaryUncacheableRequireResolveScript
    Im getting the above error can you help me her for "init.ts" and "report.ts" file both

    • @letcode
      @letcode  Год назад +1

      File path is wrong

  • @harshtyagi5744
    @harshtyagi5744 10 месяцев назад +1

    How to run only a single feature file out of multiple files?

    • @letcode
      @letcode  10 месяцев назад

      Give the feature file path with in path

  • @KarunyaGowda-w4d
    @KarunyaGowda-w4d Год назад +1

    Can we run parallelly same set of test cases in multiple env?

    • @KarunyaGowda-w4d
      @KarunyaGowda-w4d Год назад +1

      Can you pls include in upcoming sessions

    • @letcode
      @letcode  Год назад

      One environment at a time.

  • @luckylakshmi6972
    @luckylakshmi6972 Год назад +1

    Hello Koushik,
    if(testInfo.retry > 0){
    console.log(`Test is retried ${testInfo.retry} times`);
    }
    how can we achieve this with cucumber... Thank you In advance.

    • @letcode
      @letcode  Год назад

      As for my knowledge, i don't think it's possible.

  • @HariBaabu-dp1mf
    @HariBaabu-dp1mf Год назад

    Can we use the profile concept for one to one mapping ?
    E.g one feature file to one step definition something similar to test runner in Java

    • @letcode
      @letcode  Год назад

      To have different configurations we can use profile.

  • @JigneshWala-nq5rb
    @JigneshWala-nq5rb Год назад +1

    'true' is not recognized as an internal or external command,
    operable program or batch file. and index,html file is also not getting generated

    • @letcode
      @letcode  Год назад +2

      Use the gitbash terminal

  • @KarunyaGowda-w4d
    @KarunyaGowda-w4d Год назад +1

    Can you show How to run parallelly same set of test cases in multiple browsers(like chrome and firefox)?

    • @letcode
      @letcode  Год назад

      I don't think we have a direct option.
      Probably we can have to terminal and execute both at the same time..

    • @KarunyaGowda-w4d
      @KarunyaGowda-w4d Год назад +1

      @@letcode Can you pls include in upcoming sessions

    • @letcode
      @letcode  Год назад +1

      @@KarunyaGowda-w4d I'll check

  • @arunbala2805
    @arunbala2805 6 месяцев назад

    awesome, re-run/parallel worked in 1st attempt, any idea how to re-run config automatically than calling 'npm run test:failed', but thanks a ton

    • @letcode
      @letcode  6 месяцев назад

      Thanks,
      I'm not sure, but you can add in the post test that should work I guess.

  • @Arshadarsh
    @Arshadarsh Год назад

    Can you make parallel testing in Cucumber+ Java + Selenium

    • @letcode
      @letcode  Год назад

      Already covered in this playlist
      Cucumber + Selenium Java: ruclips.net/p/PL699Xf-_ilW6oK3_otMtu7BPqiy0VlkE-

    • @Arshadarsh
      @Arshadarsh Год назад +1

      @@letcode Thanks Koushik i will check it

  • @samiullah2039
    @samiullah2039 Год назад

    Please add intergration of logger with cuucmber js. Logs shd attach with each scenario

  • @sentyl6131
    @sentyl6131 5 месяцев назад +1

    Great video & helpful. Can we run feature files in Parallel ? @letcode

    • @letcode
      @letcode  5 месяцев назад

      Thanks, this video explains how to run in parallel only.

    • @sentyl6131
      @sentyl6131 5 месяцев назад +1

      @@letcode Thank you for the reply! Yes bro, I want to run features in parallel. But this video is on running scenarios in parallel. The reason is in my case scenarios in same feature file has data dependency so scenarios should run in sequence in other way feature files should run in parallel.

    • @letcode
      @letcode  5 месяцев назад

      Oh ok got it , that I'm not sure, I'll check the docs.

  • @ghummakad_premi
    @ghummakad_premi Год назад +1

    When running this on a Mac, I keep getting this error--->
    ENOENT: no such file or directory, open /fullpath/Playwright_Cucumber_TS/@rerun.txt'
    even when the file is present in the root of the project

    • @letcode
      @letcode  Год назад

      In mac, use copy relative path, don't change the slash.

  • @KuldeepRuletiya
    @KuldeepRuletiya 4 месяца назад +1

    Hi, I added in package json file - "test:failed": "cucumber-js @rerun.txt --fail-fast" . in cucmber json i have only default .i am not using rerun:{
    } in cucumber json file . my failed test case running only with success mode .

    • @letcode
      @letcode  4 месяца назад +1

      You should have another configuration to run only the failed tests,

  • @ajayprasanthr4601
    @ajayprasanthr4601 Год назад +1

    bdd-cucumber-playwright@1.0.0 failed
    > cucumber-js -p rerun @rerun.txt
    Error: ENOENT: no such file or directory, open 'D:\Git\BDD-Cucumber-Playwright\@rerun.txt'
    Here Getting this issue mate ensured that @rerun.txt file is there in project directory. How to resolve this?

    • @letcode
      @letcode  Год назад

      I guess you are executing from the wrong directory.