You are doing great work , please dont stop it, now a days people want to watch entertainment videos , but some people also there who are waiting for your coding videos. Thank you so much for comeback.
Just want say, may God bless you Koushik matey, for your youtube videos on MS Playwright, Type Scripts and Cucumber. It has been a great help for one of my University project.
hi koushik excellent videos all of them learnt so much is it possible to add a couple of api tests to playwright cucumber framework that would really complete it.
Hi Koushik, Thanks for the detailed info. Could you create a video tutorial on setting up a configuration file? I want to include settings such as tags, retries, parallel count, and environment in this file, so that these values can be utilized in `package.json`. Additionally, I want to set `process.env.BROWSER` and `process.env.ENV` using this configuration file. This setup will finalize my framework. Also, I want to be able to pass these configuration values as parameters in Jenkins if not the config file data will be utilised when I run in local.
Hi Koushik, Thanks for tutorials. One thing I would like to ask you. when i execute npm run test --TAGS="@TagName" => all tests run, I followed step by step and in cucumber.js used tags: process.env.npm_config_TAGS || "", command line argument concept is not working for me... Could you please help
Hi Koushik, Thanks for tutorials. One thing I would like to ask you. After run this npm run test --TAGS="@fail" => all tests run, I followed step by step but i don't know why i can't passing command line arguments(using bash terminal). Hope you reply!!!
@@letcode yes, I have used tags: process.env.TAGS || "" in cucumber.js file, and it only works when i add --TAGS="@fail" in package.json "test": "cross-env ENV=prod TAGS=@fail cucumber-js --config=config/cucumber.js || true ", but not work when run this npm run test --TAGS="@fail" :(
@@letcode same is the issue for me. It doesnt work even if I specify it in package.json "test": "cross-env ENV=prod TAGS=@fail cucumber-js --config=config/cucumber.js || true "
Hi Koushik, This is really great video.this helped me lot but I have one question. If I want to pass more then one tag then how to achieve that. As in my project requirement is where I need to run multiple scenarios with different tag Can you please help with that Thank you
Hi Kaushik, Thank you this information and it is really helpful. I want to know how can we use different devices in cucumber to perform the testing instead of browsers. It will be really helpful if you provide any information on that.
@letcoce Hello Koushik, thank you for the complete playlist on Playwright cucumber framework. I am using your code but I am not able to run specific tests using tags, instead, it runs all the tests. Can you please help with this?
Hi Koushik, one question I am passing env, browser, headless (true/false) from the CLI. I want to put all this metadata in the report. how can I get this data from the main command?
Nice video Koushik. Good job ! I have few questions here. Q1. How do you pass the --headless or --headed from command line? like this: npm run test --TAGS="@fail" --BROWSER="firefox" --headed (I tried but it does not work in this way :( ) Q2. Where and how to configure the mobile devices viewport?
Hi Koushik, I already had exp in Playwright Java but the new company i am joining asked for a ts framework. Your timing could not be better for me.. thank you!
Hello Koushik, Thanks for sharing this video. it's really useful. Just wanted to mention if you want to run with TAGS or BROWSERS from CLI it's not working in your code. I have pulled the latest code and it's the same. I tried to debug but I cannot see any issue could you please help to fix this. example used {npm test --TAGS="@auth"} or {npm test --BROWSER=firefox}
Hi Brother , I was facing the issue like no tests run when passing tags and browser from CLI and found that it is due to the cucumber.js not getting exported. I modified as below and it is working fine , can you tell me why when i use export in the begining of the file it is not working? Is that something becuase of node.js version used? const config = {
@letcode - The command line argument working in VS Code, if I pass particular tag then working fine, but it is not worked in azure pipeline, In pipeline execute all the scenarios, could you please help me how to solve that issue. package.json "testQA": "cross-env ENV=qa FORCE_COLOR=0 cucumber-js --config=apps/sos-e2e/Configuration/Cucumber.js" cucumber.js tags: process.env.npm_config_TAGS || "" command: npm run testQA --TAGS="@RegressionDealerTest" 5/6 steps [======================================================================================================= ]P ass 1 scenario (1 passed) 6 steps (6 passed) 0m42.963s (executing steps: 0m23.138s)
Source code:
github.com/ortoniKC/Playwright_Cucumber_TS
You are doing great work , please dont stop it, now a days people want to watch entertainment videos , but some people also there who are waiting for your coding videos. Thank you so much for comeback.
I won't stop 🛑
Just want say, may God bless you Koushik matey, for your youtube videos on MS Playwright, Type Scripts and Cucumber. It has been a great help for one of my University project.
Thank you 😊
hi koushik excellent videos all of them learnt so much
is it possible to add a couple of api tests to playwright cucumber framework that would really complete it.
Thanks, sure I'll do it.
looking forward to it thanks
@@letcode
Thnx ,I thought monochrome was going to be used but it was FORCE_COLOR
Yes, that's the change, found in the GitHub documentation but not on the guide docs
Awesome tutorial bro
Thanks 😊
Hi Koushik, Thanks for the detailed info.
Could you create a video tutorial on setting up a configuration file? I want to include settings such as tags, retries, parallel count, and environment in this file, so that these values can be utilized in `package.json`. Additionally, I want to set `process.env.BROWSER` and `process.env.ENV` using this configuration file.
This setup will finalize my framework. Also, I want to be able to pass these configuration values as parameters in Jenkins if not the config file data will be utilised when I run in local.
In this video I explained the same, apart from Jenkins everything is covered in the playlist.
Hi Koushik, Thanks for tutorials. One thing I would like to ask you. when i execute npm run test --TAGS="@TagName" => all tests run, I followed step by step and in cucumber.js used tags: process.env.npm_config_TAGS || "", command line argument concept is not working for me... Could you please help
Hi,
Is the tag name specified within the feature files?
Lower case and upper case both can be used but have to use the same in cmd and within the script.
@@letcode Hello Koushik, I have cloned your repo and trying to run specific tag but it runs all the tests. Same issue as mentioned above.
That's right I'm facing the same issue, tried both cloning your repo as well implementing it in my existing repo but it's running all the tests
try with lower case process.env.npm_config_tags.
In a few system it accepts lower case.
10:28 I used both:) const browserType = process.env.npm_config_BROWSER || process.env.BROWSER;
Great 😃
Hi Koushik, Thanks for tutorials. One thing I would like to ask you. After run this npm run test --TAGS="@fail" => all tests run, I followed step by step but i don't know why i can't passing command line arguments(using bash terminal). Hope you reply!!!
I hope in the cucumber.js file u have used the process.env.TAGS in the tags line.
@@letcode yes, I have used tags: process.env.TAGS || "" in cucumber.js file, and it only works when i add --TAGS="@fail" in package.json "test": "cross-env ENV=prod TAGS=@fail cucumber-js --config=config/cucumber.js || true ", but not work when run this npm run test --TAGS="@fail" :(
@@letcode same is the issue for me. It doesnt work even if I specify it in package.json "test": "cross-env ENV=prod TAGS=@fail cucumber-js --config=config/cucumber.js || true "
@@P-nf7vl is @fail is mentioned in the scenario - cucumber files
@@vothiminhngoc9743 @letcode any luck on this I am facing same issue when i am trying to over wright from terminal its not working
Hi Koushik,
This is really great video.this helped me lot but I have one question. If I want to pass more then one tag then how to achieve that. As in my project requirement is where I need to run multiple scenarios with different tag Can you please help with that
Thank you
Yes you can pass, space then followed by another tag.
Hi, thanks for the tutorial. I tried the same and all the test are running still, not sure what is the issue I have everything the same way as you do.
Are the tags placed on top of the scenario?
Hi Kaushik,
Thank you this information and it is really helpful. I want to know how can we use different devices in cucumber to perform the testing instead of browsers. It will be really helpful if you provide any information on that.
Hi.
Thanks, I will add a video about it.
Anyone have a idea how to pass the path for the test from the CLI ? Instead of tags i want to run a specific test only.
You can pass the feature= feature file name.
How do I add headless or browser parameters from command line?
You can use the same concept with node params.
@letcoce Hello Koushik, thank you for the complete playlist on Playwright cucumber framework. I am using your code but I am not able to run specific tests using tags, instead, it runs all the tests. Can you please help with this?
Hi, if tags are passed correctly I guess it should work. I don't see any changes in the repo.
Same problem.
@@letcode hi, I have the same issue about this. I'm sure the tag I provided is correct. but still run all the tests.
@piarus3179 please watch the next video, I have clarified.
Hi Koushik, one question
I am passing env, browser, headless (true/false) from the CLI.
I want to put all this metadata in the report. how can I get this data from the main command?
Not sure if the report allows meta data, I'll check..
If I pass command line arguments as in the video ,it will not run in the github actions am I correct or is there a way,please guide me
You can pass environment variables from GitHub actions also, I do in circle CI but GitHub actions are not yet used.
@@letcode Hi I will watch your circle CI video soon hope there you covered
Nice video Koushik. Good job ! I have few questions here. Q1. How do you pass the --headless or --headed from command line? like this: npm run test --TAGS="@fail" --BROWSER="firefox" --headed (I tried but it does not work in this way :( )
Q2. Where and how to configure the mobile devices viewport?
Like browser headless should also work fine.
For device config, I'll make a video
@@letcode Thanks Koushik. I am eagerly waiting for video in device config 😃
Hi Koushik, I already had exp in Playwright Java but the new company i am joining asked for a ts framework. Your timing could not be better for me.. thank you!
Cool 😎
@Koushik want pass multiple tags and trying run below command
npm run test --TAGS="[@test,@fail]"
but no test cases are running
Replied in WhatsApp group, hope that helps
@@letcode Hi Bro, how to join whatsapp group?
@letcode can we use cucumber tags in github workflow ?
I received your mail too, I will check.
@@letcode we need to set "TAGS" in .yml file as well like
name: Set npm_config_TAGS
run: echo "npm_config_TAGS=@TAGS" >> $GITHUB_ENV
Hello Koushik, Thanks for sharing this video. it's really useful. Just wanted to mention if you want to run with TAGS or BROWSERS from CLI it's not working in your code. I have pulled the latest code and it's the same. I tried to debug but I cannot see any issue could you please help to fix this. example used {npm test --TAGS="@auth"} or {npm test --BROWSER=firefox}
I was working on the latest code to make some changes, that might be the reason.
I'll check..
@shivaKumar-oy7ty hello, how you are debugging in vs code with cucumber ... can you help me with that ?
Page.pause will work..
I have managed to work this. If you want to run Node, then use tags in the pre-script, i.e., 'TAGS=@auth npm test' or 'BROWSER=firefox npm test'
@@shivaKumar-oy7ty do you mean to use the tags in the pre-test script in the package.json rather than using the tags runtime?
Hi Brother , I was facing the issue like no tests run when passing tags and browser from CLI and found that it is due to the cucumber.js not getting exported. I modified as below and it is working fine , can you tell me why when i use export in the begining of the file it is not working? Is that something becuase of node.js version used?
const config = {
tags : process.env.npm_config_TAGS || "@Login",
formatOptions : {
"snippetInterface" : "async-await"
},
"paths" : [
"src/test/features/*.feature"
],
"dryRun" : false,
"require" : ["src/test/steps/*.ts","src/hooks/hooks.ts"],
"requireModule" : ["ts-node/register"],
"format" :[
"progress-bar",
"html:test-results/cucumber-report.html",
"json:test-results/cucumber-report.json",
"rerun:@rerun.txt"
],
"parallel" : 2,
"retry" : 1
}
module.exports = {
default: config
}
As u r using const, you cannot use it before initialisation.
@@letcode if i am using module.exports = in the begining it is not getting exported, so i changed to const config = { and then exported at the last
@letcode - The command line argument working in VS Code, if I pass particular tag then working fine, but it is not worked in azure pipeline, In pipeline execute all the scenarios, could you please help me how to solve that issue.
package.json
"testQA": "cross-env ENV=qa FORCE_COLOR=0 cucumber-js --config=apps/sos-e2e/Configuration/Cucumber.js"
cucumber.js
tags: process.env.npm_config_TAGS || ""
command:
npm run testQA --TAGS="@RegressionDealerTest"
5/6 steps [======================================================================================================= ]P
ass
1 scenario (1 passed)
6 steps (6 passed)
0m42.963s (executing steps: 0m23.138s)
Azure pipeline has a different mechanism to read the variables so you have to use that.
You'll find in their documentation.