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
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?
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?
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.
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.
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
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
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" }
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 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
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
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 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.
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
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 .
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?
Another great video mate. You are a great teacher.
Thanks 👍
whatever doubts I think he already covered those like thinking of emptying dir ,he explained at end good
Thanks 👍
Explained very well, Thank you for the great video
Glad you like it 😊
great video very nice explanation of the concepts...really liked it......Thank you
Thanks 👍
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
It should work fine without fs extra, it is just handy tool
Thanks my friend, you are the best!
Cool 😎
It is really a great video. Thank you so much
Welcome
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?
You can use the gitbash terminal
fantastic job. :)
Thanks 👍
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?
I'm not sure as of now, i have to check this.
@@letcode thank you
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.
Oh, I have to check this.
@@letcode Thank you Koushik
@dev1mail508 @letcode I am also facing same issue. Please help me if you find any solution
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.
It is the behaviour of cucumber, beforall means before all the scenario of a particular future file..
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
I believe I have fixed that in the latest version of code.
@@letcode can you guide me how to fix it
@@letcode thank you, I fixed it
Hi @Koushik,how can we get the retry count by runtime, once defined in cucumber.js file
Yes, using cli.
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
You can pass the feature file name from the cli or using tags.
Hi @Koushik, how can we execute test cases on mutiple browsers(like chrome and safari) parllelly ?
I have to check, as of now cross parallel browser is not supporting in this framework.
Thanks alot for quick reply@@letcode
excelent!!
Thanks 😊
Hello Koushik, how can we update the test reult status on Lambda when the test retry fails.
If u r asking about LambdaTest, u have to contact them.
How is npm test runs all the script in series ? I am confused in this part.
I hope you have watched continuously from the first part, it is configured in the package. Json file.
Good job @ appreciate 👏
Thanks a lot
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
Debug is not working properly, i have to look into it.
Thanks for the helpful videos. Why did you add the '||' in package json - under scripts "test": "cross-env ENV=staging cucumber-js test || true"?
If the script test fails then the posttest won't execute, so to make it execute always i have given that.
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"
}
// can be used, but commenting on a json file is bad practice
Hi, How to give tagname in scripts "test": under package.json. To run scenarios which are tagged in feature file
That can be configured from the cucumber.json file
@@letcode may I know what is the command line and how to implement
Thank you as per your suggestion, I have configured in cucumber.json file by giving the below one and it worked
"tags": "@tagname",
Yes, great 😃
Hi bro.. how to run scripts in sequential order in a fearure file..
I don't think there is an option for that
thank you was a big help
Great 😃
How are we running all the scripts one after each in a single command?
In the cucumber.json file I have included all the feature files
How to attach logs with some strings in report?
From hooks you can do it, from test files also possible I have to take a look.
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
It will get deleted
@@letcode Hi As I can see features data keep on adding ,while assets data is overwritten everytime
can we use allure report with cucumber ?
Yes I guess, but the report I used is better.
Hi Koushik,
Is it possible to run a single test file, instead of only re-running the failed ones?
You have to pass that feature name.
@@letcode Do you mean tags?
@user-yv8ik8wv7i yes tags of specific file or feature name
@@letcodeThanks for the quick response! It worked perfectly.
can we run the parallel for Chromium, firefox and Webkit , please replay
Only one browser at a time.
@@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
@@pranitingole5562 you can remove the tags in the cucumber.json file.
@@letcode Thanks @koushik , it's work fine
@@pranitingole5562 cool 😎
how can i send the test report generated in playwright to testrail?
Not sure, maybe there will be an API
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
File path is wrong
How to run only a single feature file out of multiple files?
Give the feature file path with in path
Can we run parallelly same set of test cases in multiple env?
Can you pls include in upcoming sessions
One environment at a time.
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.
As for my knowledge, i don't think it's possible.
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
To have different configurations we can use profile.
'true' is not recognized as an internal or external command,
operable program or batch file. and index,html file is also not getting generated
Use the gitbash terminal
Can you show How to run parallelly same set of test cases in multiple browsers(like chrome and firefox)?
I don't think we have a direct option.
Probably we can have to terminal and execute both at the same time..
@@letcode Can you pls include in upcoming sessions
@@KarunyaGowda-w4d I'll check
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
Thanks,
I'm not sure, but you can add in the post test that should work I guess.
Can you make parallel testing in Cucumber+ Java + Selenium
Already covered in this playlist
Cucumber + Selenium Java: ruclips.net/p/PL699Xf-_ilW6oK3_otMtu7BPqiy0VlkE-
@@letcode Thanks Koushik i will check it
Please add intergration of logger with cuucmber js. Logs shd attach with each scenario
Ok
Great video & helpful. Can we run feature files in Parallel ? @letcode
Thanks, this video explains how to run in parallel only.
@@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.
Oh ok got it , that I'm not sure, I'll check the docs.
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
In mac, use copy relative path, don't change the slash.
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 .
You should have another configuration to run only the failed tests,
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?
I guess you are executing from the wrong directory.