Best tutorials, I have come across so far. Thank You So Much for your amazing contribution to the QA Community. Hoping to learn alot more in the times to come :) :)
Hello Raghav..hope you are doing well My biggest question is - how does one come to know all the reserved keywords used in karate testcases [apart from BDD syntax] Is there official documentation available ? i could not find something easily on Karate API official webpage and to understand different concepts 1) are we allowed to code alike "glue code for feature files step definitions in cucumber ?" 2) Example + examples we use in cucumber ? 3) how to parameterize JSON payload and referring to the payload in the project folder structure 4) Adding authorization tokens just pointed out few that stroked me ...but theoretically i think my mind is on restAssured library I am using free version Any inputs would be really a valuable insight for me to explore this tool ?
Hi Raghav. Please let me know even now in 2024 can we follow your videos on Karate like this version or using format is same as now or have you uploaded any new videos regarding Karate ?
Hi Raghav. Thanks for starting this series. Would appreciate if you can cover and mention API and UI testing via Karate ( i.e. Karate DSL and Karate UI )
Hi Prem, Both Karate and Postman are great tools for API testing, and the choice between them depends on your specific needs and preferences. Here are some factors to consider: Test case management: Karate provides a built-in test report and a mechanism to group tests and execute them in parallel. Postman allows for the creation of test collections, but you will need to integrate with external tools for more advanced reporting and test management Test script development: Karate uses a BDD-style syntax, which can be more intuitive for non-technical stakeholders to read and understand. Postman uses a JavaScript-based scripting language, which can be more familiar for developers Support for advanced scenarios: Karate has built-in support for mocking, performance testing, and API contract testing. Postman has some similar features, but you will need to use additional tools or write custom scripts to achieve the same level of functionality Integration with other tools: Postman has a large and active user community and supports a wide variety of integrations with other tools, such as CI/CD platforms and issue trackers. Karate also has a growing community and supports integrations with popular tools like Maven and Jenkins Ultimately, the best tool for API testing depends on your specific needs and preferences. If you are looking for a tool with a built-in test report and a BDD-style syntax, Karate may be the better choice. If you need more advanced features or strong integrations with other tools, Postman may be the better choice
Raghav one query I want to know for any project, which one is the best choice/approach for automation either api automation or web UI automation or both?
Hi Suhas, if you have the option to cover most of your functionality using API tests, then you must plan to cover as much functional testing as possible with API tests, as they are quick, less brittle, more durable and can check a lot of functionality very quickly and then you can plan for covering the rest with UI testing. And can also focus your UI testing with a more closer user experience
Hi Prajakta, Sure, I can help you install the Cucumber plugin for Karate. Here are the steps you can follow: Open the command prompt or terminal and navigate to your Karate project directory. Run the following command to install the Cucumber plugin: mvn com.github.temyers:cucumber-jvm-parallel-plugin:5.0.0:download This will download the Cucumber plugin to your project's "target" directory. Next, add the following plugin configuration to your project's "pom.xml" file:
Replace "com.your.package" with the package name that contains your step definitions. Run the following command to generate the Cucumber runner classes: mvn generate-test-sources This will generate the Cucumber runner classes in the "target/generated-test-sources/cucumber" directory. Finally, run your Karate tests using the generated Cucumber runner classes. You can do this by running the following command: mvn test -Dtest=YourCucumberRunnerClass Replace "YourCucumberRunnerClass" with the name of the generated Cucumber runner class that you want to run. That's it! You should now be able to use the Cucumber plugin with Karate for your API testing. Let me know if you have any further questions.
Hi Miguel, added, when you will click on the cc icon on the player, it will show subtitles in english, You can goto settings > sub titles > auto translate and select your language
Hi Farhan, In Karate API testing framework, you can handle Two Factor Authentication (One Time Password) using the following steps: First, you need to make a request to the server to initiate the Two Factor Authentication process, typically by sending a request to an endpoint that triggers the sending of the One Time Password to the user's phone or email In the response, you can extract the required parameters such as the session ID, token, or any other information that is required to complete the authentication process In the next step, you can use the extracted parameters to make another request to the server to complete the authentication process by sending the One Time Password along with the required parameters After the successful validation of the One Time Password, the server will return a new token that can be used for further requests To automate this process in Karate, you can use the karate.call() method to make the initial request, extract the required parameters, and then use them in the next request
Thought you got tired from doing the IT stuff and moved to do Karate (martial arts) lessons now.
But all good. Thanks for the tutorial!
Most welcome Kalnish
Best tutorials, I have come across so far.
Thank You So Much for your amazing contribution to the QA Community.
Hoping to learn alot more in the times to come :) :)
Most welcome Yogita
This is for an occasion when your IT knowledge is not enough. :D
Keep going, Raghav
Thanks for watching
wonderful training and thanks for your efforts for detail step by step explanation with example for all the test case scenarios :)
Glad it was helpful Hareesh
Thanks & easy understandable....
Glad it's easy to understand Srikanth
Thanks for starting Raghav
Most welcome Bhasker
Finally. I was asking this 2 months ago! Thanks man
I am glad, I could start on this
@@RaghavPal Thank you
Hello Raghav..hope you are doing well
My biggest question is - how does one come to know all the reserved keywords used in karate testcases [apart from BDD syntax]
Is there official documentation available ? i could not find something easily on Karate API official webpage
and to understand different concepts
1) are we allowed to code alike "glue code for feature files step definitions in cucumber ?"
2) Example + examples we use in cucumber ?
3) how to parameterize JSON payload and referring to the payload in the project folder structure
4) Adding authorization tokens
just pointed out few that stroked me ...but theoretically i think my mind is on restAssured library
I am using free version
Any inputs would be really a valuable insight for me to explore this tool ?
Harish
This will help you
Find Reserved Keywords:
Check the Karate Syntax Guide.
Key keywords: Given, When, Then, *, call, def, match, etc.
Glue Code:
No glue code like Cucumber.
Use call or callonce for Java methods
Examples (Data-Driven Testing):
Use Scenario Outline with Examples:
cucumber
Examples:
| url |
| site1.com |
Parameterizing JSON:
Define inline or use read() for external JSON:
cucumber
Copy code
* def payload = { "key": "#(value)" }
* def payload = read('payload.json')
Add Authorization Tokens:
Set headers:
cucumber
Copy code
* header Authorization = 'Bearer YOUR_TOKEN'
Learn Karate:
Refer to Karate Wiki and demo projects
Was waiting for this, thank you!!!
Most welcome Jorge
Eagerly waiting for this session raghav. Thanks a lot..
Most welcome Madhu
Hi Raghav could you please do a tutorial on K6 TOOL
I will check
Hi Raghav.
Please let me know even now in 2024 can we follow your videos on Karate like this version or using format is same as now or have you uploaded any new videos regarding Karate ?
Yes Nikitha, you can follow this.. let me know if you face any issues
Thanks @Raghav for starting the Karate Series 😊
You're welcome Sarang
Hi Raghav. Thanks for starting this series. Would appreciate if you can cover and mention API and UI testing via Karate ( i.e. Karate DSL and Karate UI )
Noted Gaurav
Hi Raghav, karate or postman, which is best tool for api testing ?
Hi Prem,
Both Karate and Postman are great tools for API testing, and the choice between them depends on your specific needs and preferences. Here are some factors to consider:
Test case management: Karate provides a built-in test report and a mechanism to group tests and execute them in parallel. Postman allows for the creation of test collections, but you will need to integrate with external tools for more advanced reporting and test management
Test script development: Karate uses a BDD-style syntax, which can be more intuitive for non-technical stakeholders to read and understand. Postman uses a JavaScript-based scripting language, which can be more familiar for developers
Support for advanced scenarios: Karate has built-in support for mocking, performance testing, and API contract testing. Postman has some similar features, but you will need to use additional tools or write custom scripts to achieve the same level of functionality
Integration with other tools: Postman has a large and active user community and supports a wide variety of integrations with other tools, such as CI/CD platforms and issue trackers. Karate also has a growing community and supports integrations with popular tools like Maven and Jenkins
Ultimately, the best tool for API testing depends on your specific needs and preferences. If you are looking for a tool with a built-in test report and a BDD-style syntax, Karate may be the better choice. If you need more advanced features or strong integrations with other tools, Postman may be the better choice
@@RaghavPal Thanks for your Excellent replay !
Raghav one query I want to know for any project, which one is the best choice/approach for automation either api automation or web UI automation or both?
Hi Suhas, if you have the option to cover most of your functionality using API tests, then you must plan to cover as much functional testing as possible with API tests, as they are quick, less brittle, more durable and can check a lot of functionality very quickly and then you can plan for covering the rest with UI testing. And can also focus your UI testing with a more closer user experience
@@RaghavPal Thank you Raghav for the clarification 👍
Raghav, please suggest me CORBA API automation framework
I will check on this Swaroopa
Hi raghav, please suggest how setup and run karate framework in linux vm with commands.
I will try to do a session on this Swaroopa
Please make a video on how to integrate karate with testrail
i will check on this Viram
I am unable to install cucumber plugin plz can u help me in that
@raghavpal
Hi Prajakta,
Sure, I can help you install the Cucumber plugin for Karate. Here are the steps you can follow:
Open the command prompt or terminal and navigate to your Karate project directory.
Run the following command to install the Cucumber plugin:
mvn com.github.temyers:cucumber-jvm-parallel-plugin:5.0.0:download
This will download the Cucumber plugin to your project's "target" directory.
Next, add the following plugin configuration to your project's "pom.xml" file:
com.github.temyers
cucumber-jvm-parallel-plugin
5.0.0
generateRunners
generate-test-sources
generateRunners
classpath:com.your.package
${project.build.directory}/generated-test-sources/cucumber
${project.basedir}/src/test/resources/features
${project.build.directory}/cucumber-parallel
1
Replace "com.your.package" with the package name that contains your step definitions.
Run the following command to generate the Cucumber runner classes:
mvn generate-test-sources
This will generate the Cucumber runner classes in the "target/generated-test-sources/cucumber" directory.
Finally, run your Karate tests using the generated Cucumber runner classes. You can do this by running the following command:
mvn test -Dtest=YourCucumberRunnerClass
Replace "YourCucumberRunnerClass" with the name of the generated Cucumber runner class that you want to run.
That's it! You should now be able to use the Cucumber plugin with Karate for your API testing. Let me know if you have any further questions.
Please make a series for mocha- chai framework as well.
I will do Aditi
What is the scope for this tool in future.?
It is good. and having a skill on Karate can help
Thank u sir👍
Most welcome Krishna
Wtf I thought you are starting a playlist of real karate. 🤣🤣
May be some day
Bro i thaught the same
I thought the same dude 😅
Please , enable subtitles in spanish for karate videos . Thanks you.
Hi Miguel, added, when you will click on the cc icon on the player, it will show subtitles in english, You can goto settings > sub titles > auto translate and select your language
Kindly help me Two Factor Autheticater (One Time Password) problem solution. prepare video Two factor Authenticater
Hi Farhan, In Karate API testing framework, you can handle Two Factor Authentication (One Time Password) using the following steps:
First, you need to make a request to the server to initiate the Two Factor Authentication process, typically by sending a request to an endpoint that triggers the sending of the One Time Password to the user's phone or email
In the response, you can extract the required parameters such as the session ID, token, or any other information that is required to complete the authentication process
In the next step, you can use the extracted parameters to make another request to the server to complete the authentication process by sending the One Time Password along with the required parameters
After the successful validation of the One Time Password, the server will return a new token that can be used for further requests
To automate this process in Karate, you can use the karate.call() method to make the initial request, extract the required parameters, and then use them in the next request
@@RaghavPal sir kindly help me UI 2factor authenticator vide
will need to check on this
what is karate intuit???
Although I am not completely sure if its someway related to the intuit software company but as per github it is the name of the maven repository group
@@RaghavPal thx for information, one interviewer was ask this question to me.
Okay, in case you get any more information, do post here for others
@@RaghavPal yes I will post definitely
Please implement karate framework for api from scratch...Thanks in advance
Yes Suhas, as always it will start from scratch
Hi
Have u done anything like mocking by using karate....
Like I want to mock JMS queue can we do using karate
Hi Mazhar, not yet
I dont know what it is , but the name sounds familiar🎉
Yeah, just have a look
Are u covered from scratch to advance ..with out. Fail
I will start from scratch Siva and go up Step-by-Step
Appo ithu njan udesicha karate allale😅
did not get you, hope this was helpful
@@RaghavPal bro I was looking for martial arts tutorial
ok