No video

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

Hello :), In this video, we'll learn how to execute the tests in parallel, How to rerun the failed scenarios & how to create the test-results folder in the run time with the help of fs-extra package.
Timestamp:
0:00 Playwright Cucumber - Part 6
0:19 Parallel
2:38 Rerun
11:60 Retry
12:10 Report
Code: github.com/ort...
Reference: github.com/cuc...
---------------------------------------------------------------------
Tamil KZread Channel:
@kurimurai
---------------------------------------------------------------------
🎁Just in case you want to support me ☺️ donation might be helpful.
BuyMeCoffe: www.buymeacoff...
GPay: koushik350-1@okaxis
-------------------------Thank you--------------------------
Thanks for watching, if you like the video, give it a thumbs up 👆.
Sharing is caring, kindly share the video with your friends and colleagues.
Don't forget to subscribe and hit the bell 🔔 notification.
-------------------------------SOCIAL-------------------------------
📝Test Practice Site: letcode.in/
🐦Discord: / discord
📸Instagram: / letcode.in
🎓 LinkedIn: / ortoni
⛳️ XPath Extension: bit.ly/2T5EUCu
Join our WhatsApp group (Only for Channel Members)
bit.ly/3cSPCpm
Zerodha referral link: zerodha.com/?c...
#letcode #playwright #cucumber

Пікірлер: 109

  • @sumitgoyal385
    @sumitgoyal3852 ай бұрын

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

  • @letcode

    @letcode

    2 ай бұрын

    Thanks 👍

  • @mohiniyerra3818
    @mohiniyerra38182 ай бұрын

    It is really a great video. Thank you so much

  • @letcode

    @letcode

    2 ай бұрын

    Welcome

  • @andyshort9471
    @andyshort9471 Жыл бұрын

    Another great video mate. You are a great teacher.

  • @letcode

    @letcode

    Жыл бұрын

    Thanks 👍

  • @lawrencechandrasekar9488
    @lawrencechandrasekar94882 ай бұрын

    Explained very well, Thank you for the great video

  • @letcode

    @letcode

    2 ай бұрын

    Glad you like it 😊

  • @blecomp
    @blecomp Жыл бұрын

    Thanks my friend, you are the best!

  • @letcode

    @letcode

    Жыл бұрын

    Cool 😎

  • @arunjosh5152
    @arunjosh51524 ай бұрын

    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

    4 ай бұрын

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

  • @Ankushkumar213
    @Ankushkumar21311 күн бұрын

    fantastic job. :)

  • @letcode

    @letcode

    11 күн бұрын

    Thanks 👍

  • @chrisbernardo2877
    @chrisbernardo28778 ай бұрын

    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

    8 ай бұрын

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

  • @luckylakshmi6972
    @luckylakshmi69729 ай бұрын

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

  • @letcode

    @letcode

    9 ай бұрын

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

  • @hoilehong7756
    @hoilehong77564 ай бұрын

    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

    4 ай бұрын

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

  • @hoilehong7756

    @hoilehong7756

    4 ай бұрын

    @@letcode can you guide me how to fix it

  • @hoilehong7756

    @hoilehong7756

    4 ай бұрын

    @@letcode thank you, I fixed it

  • @dev1mail508
    @dev1mail5083 ай бұрын

    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

    3 ай бұрын

    Oh, I have to check this.

  • @dev1mail508

    @dev1mail508

    3 ай бұрын

    @@letcode Thank you Koushik

  • @sentyl6131

    @sentyl6131

    2 ай бұрын

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

  • @toanvan2032
    @toanvan2032 Жыл бұрын

    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

    Жыл бұрын

    You can use the gitbash terminal

  • @vk-ok7hd
    @vk-ok7hd9 ай бұрын

    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

    9 ай бұрын

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

  • @praneshgaikwad6453
    @praneshgaikwad64536 ай бұрын

    How to attach logs with some strings in report?

  • @letcode

    @letcode

    6 ай бұрын

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

  • @luckylakshmi6972
    @luckylakshmi69729 ай бұрын

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

  • @letcode

    @letcode

    9 ай бұрын

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

  • @luckylakshmi6972

    @luckylakshmi6972

    9 ай бұрын

    Thanks alot for quick reply@@letcode

  • @deepaksrivastava-25
    @deepaksrivastava-2510 ай бұрын

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

  • @letcode

    @letcode

    10 ай бұрын

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

  • @harshtyagi5744
    @harshtyagi57446 ай бұрын

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

  • @letcode

    @letcode

    6 ай бұрын

    Give the feature file path with in path

  • @sumitgoyal385
    @sumitgoyal3852 ай бұрын

    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

    2 ай бұрын

    It will get deleted

  • @sumitgoyal385

    @sumitgoyal385

    2 ай бұрын

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

  • @shivaKumar-oy7ty
    @shivaKumar-oy7ty9 ай бұрын

    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

    9 ай бұрын

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

  • @shivaKumar-oy7ty

    @shivaKumar-oy7ty

    9 ай бұрын

    @@letcode thank you

  • @kishorenaidu2156
    @kishorenaidu21566 ай бұрын

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

  • @letcode

    @letcode

    6 ай бұрын

    I don't think there is an option for that

  • @sahoosatya2239
    @sahoosatya2239Ай бұрын

    can we use allure report with cucumber ?

  • @letcode

    @letcode

    Ай бұрын

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

  • @elberthagreda4467
    @elberthagreda44674 ай бұрын

    excelent!!

  • @letcode

    @letcode

    4 ай бұрын

    Thanks 😊

  • @arunbala2805
    @arunbala2805 Жыл бұрын

    thank you was a big help

  • @letcode

    @letcode

    Жыл бұрын

    Great 😃

  • @Ajaykumarpottumuthu
    @Ajaykumarpottumuthu9 ай бұрын

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

  • @letcode

    @letcode

    9 ай бұрын

    Yes, using cli.

  • @tonyle2511
    @tonyle251111 ай бұрын

    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

    11 ай бұрын

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

  • @McTurk100
    @McTurk100 Жыл бұрын

    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

    Жыл бұрын

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

  • @shanmukhasaichilla3310
    @shanmukhasaichilla331011 ай бұрын

    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

    11 ай бұрын

    File path is wrong

  • @malasriboora5525
    @malasriboora5525 Жыл бұрын

    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

    Жыл бұрын

    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 😃

  • @luckylakshmi6972
    @luckylakshmi69729 ай бұрын

    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

    9 ай бұрын

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

  • @JigneshWala-nq5rb
    @JigneshWala-nq5rb10 ай бұрын

    '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

    10 ай бұрын

    Use the gitbash terminal

  • @farukhkhan2832
    @farukhkhan2832 Жыл бұрын

    Good job @ appreciate 👏

  • @letcode

    @letcode

    Жыл бұрын

    Thanks a lot

  • @KuldeepRuletiya
    @KuldeepRuletiya24 күн бұрын

    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

    23 күн бұрын

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

  • @ashokjagtap6238
    @ashokjagtap6238 Жыл бұрын

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

  • @letcode

    @letcode

    Жыл бұрын

    Not sure, maybe there will be an API

  • @user-co6nc5ll2t
    @user-co6nc5ll2t Жыл бұрын

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

  • @user-co6nc5ll2t

    @user-co6nc5ll2t

    Жыл бұрын

    Can you pls include in upcoming sessions

  • @letcode

    @letcode

    9 ай бұрын

    One environment at a time.

  • @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.

  • @user-co6nc5ll2t
    @user-co6nc5ll2t Жыл бұрын

    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..

  • @user-co6nc5ll2t

    @user-co6nc5ll2t

    Жыл бұрын

    @@letcode Can you pls include in upcoming sessions

  • @letcode

    @letcode

    Жыл бұрын

    @@user-co6nc5ll2t I'll check

  • @arunbala2805
    @arunbala28052 ай бұрын

    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

    2 ай бұрын

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

  • @pranitingole5562
    @pranitingole5562 Жыл бұрын

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

  • @letcode

    @letcode

    Жыл бұрын

    Only one browser at a time.

  • @pranitingole5562

    @pranitingole5562

    Жыл бұрын

    @@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

    Жыл бұрын

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

  • @pranitingole5562

    @pranitingole5562

    Жыл бұрын

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

  • @letcode

    @letcode

    Жыл бұрын

    @@pranitingole5562 cool 😎

  • @Arshadarsh
    @Arshadarsh Жыл бұрын

    Can you make parallel testing in Cucumber+ Java + Selenium

  • @letcode

    @letcode

    Жыл бұрын

    Already covered in this playlist Cucumber + Selenium Java: kzread.info/head/PL699Xf-_ilW6oK3_otMtu7BPqiy0VlkE-

  • @Arshadarsh

    @Arshadarsh

    Жыл бұрын

    @@letcode Thanks Koushik i will check it

  • @samiullah2039
    @samiullah2039 Жыл бұрын

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

  • @letcode

    @letcode

    Жыл бұрын

    Ok

  • @sentyl6131
    @sentyl61312 ай бұрын

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

  • @letcode

    @letcode

    2 ай бұрын

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

  • @sentyl6131

    @sentyl6131

    2 ай бұрын

    @@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

    Ай бұрын

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

  • @ajayprasanthr4601
    @ajayprasanthr46018 ай бұрын

    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

    8 ай бұрын

    I guess you are executing from the wrong directory.

  • @ghummakad_premi
    @ghummakad_premi Жыл бұрын

    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.