Now don't worry if I'm not educated on IT, script writing etcetera ,but I'm not fully aware of what's being explained about this topic until later on in the years to come, I'll be able to better understand the complexity of your knowledgeable teachings when I make a decision to attempt to enter a IT institution. But for now I'm learning new things from your tutorial videos and appreciate it's content .
Thanks for putting this together, this was my first video on TestNG I've watched, I subscribed to you, looks like you have a lot of videos out there. Nice work
It is very helpful tutorial for me which gives me complete guidance I got in this single video whatever I needed and with very clear step by step guidance. Thanks a lot!!
Amazing!! I was always loved to see a demo on on test cases and to be able to do it myself. now I can do the tests easily. thank you very much for the video. so simple and clearly understandable
Hello Raghav Sir, thank you so much for this video. I started with JUnit 5 and could not generate reports as I was expecting. I searched a lot but couldn't do it. This simple video resolved my issue. I moved to TestNG and continuing my other development. I can't thank you enough how your videos have helped me. Thank you so much. Humble request-> Can you please add you tube or Udemy course for Plawright and JS.
Finally i found this on your youtube channel, thanks raghav. Can you make allure report tutorial in intellij use java maven, if the test fails it will show a screenshot like Katalon TestOps?
@Rahav - Thanks for your knowledge sharing. Its really heling me I am using eclipse for existing Automation framework. Can i pull the existing framework in IntelliJ Idea and Can be executed right. Please let me know if any other plugins to be added.
Hi Raghav.. I have a issue that... I have 2 java classes and while running one after the other, the reports are getting over-ridded. I would like to get 2 reports (1 for each java class) in test-output >> e-mailable-reports. Please help with that.
Thanks for great video series sir. I have "SLF4J: No SLF4J providers were found." error. I added "slf4j-api-2.0.7.jar" and logback-classic-1.4.6.jar" module but doesnt work. What should I do?
Hi Büşra The "SLF4J: No SLF4J providers were found." error indicates that the SLF4J logging framework is missing a logging implementation. You have added the slf4j-api and logback-classic modules, which provide the SLF4J API and a logging implementation, respectively. However, you need to make sure that these modules are included in your classpath and configured correctly. Here are some steps you can follow to resolve this error: Make sure that the slf4j-api and logback-classic modules are included in your project's classpath. You can check this by looking at your project's build file (e.g. pom.xml for Maven projects). Make sure that the logging configuration file is properly set up. In the case of logback-classic, the configuration file should be named logback.xml or logback-test.xml and should be located in the classpath root. Verify that the logging configuration file is being loaded. You can add the following system property -Dlogback.configurationFile= to specify the location of the configuration file. Check that there are no conflicts with other logging frameworks in your classpath. Make sure that you are not including any other logging implementations that may conflict with SLF4J. If you are using an IDE, make sure that the classpath is configured correctly. For example, if you are using Eclipse, go to the "Build Path" settings and verify that the slf4j-api and logback-classic modules are included in the "Libraries" tab. If you have followed these steps and are still experiencing issues, you can try enabling debug logging for SLF4J by adding the following system property -Dorg.slf4j.simpleLogger.defaultLogLevel=debug. This should provide more information about what is causing the error.
thank you for your tutorial, when i install flutter and run flutter doctor is saying the cannot determine if intellJ has been Installed"Directory not listing, please help me with the solution of this problem
Thank you so so much ...😊it's helful But for maven when I clicked on code then genrate then getting option as dependacy when I searched as testng am not getting any result ..whats the issue could you please help me sir or I can add manually
when working with cucumber-BDD approach, I have enabled create testng xml installed and added the dependency, Now i wanted to ask how to execute scenario file or the scenarios in feature file using testng.xml file.. could you help me with this linking.
To execute a scenario file or the scenarios in a feature file using a TestNG.xml file, you can follow these steps: 1. Create a TestNG.xml file in the same directory as your feature file(s). 2. In the TestNG.xml file, add the following elements: ```xml
``` Replace `com.example.MyTestRunner` with the name of your test runner class and `features/my_feature_file.feature` with the path to your feature file. 3. Save the TestNG.xml file. 4. Run the TestNG.xml file using a TestNG runner. For example, if you are using Eclipse, you can right-click on the TestNG.xml file and select "Run As" > "TestNG Suite". Your test runner class will then execute the scenarios in the feature file. Here is an example of a simple test runner class: ```java package com.example; import io.cucumber.testng.AbstractTestNGCucumberTests; public class MyTestRunner extends AbstractTestNGCucumberTests { @Override public String[] getFeatures() { return new String[]{parameter("featureFile")}; } } ``` This test runner class will execute the feature file specified by the `featureFile` parameter. You can also use TestNG to execute specific scenarios in a feature file. To do this, you can use the `tags` parameter to specify the tags of the scenarios that you want to execute. For example, the following TestNG.xml file will execute all of the scenarios in the `my_feature_file.feature` feature file that have the tag `@smoke`: ```xml
Hi Divakar Here are the steps on how to debug and figure out errors in IntelliJ: 1. **Set a breakpoint.** A breakpoint is a line of code that will cause the debugger to stop execution. To set a breakpoint, click on the line of code where you want the debugger to stop. A red dot will appear on the line of code. 2. **Run the program in debug mode.** To run the program in debug mode, click on the green arrow in the toolbar or press `Shift`+`F9`. The program will start executing, and it will stop at the breakpoint you set. 3. **Inspect the variables.** Once the program has stopped at the breakpoint, you can inspect the variables in the debugger window. To do this, click on the variable in the debugger window, and the value of the variable will be displayed. 4. **Step through the code.** You can step through the code one line at a time to see how the program is executing. To do this, click on the `Step Over` button in the toolbar or press `F8`. 5. **Use the debugger's features.** The debugger has a number of features that can help you debug your code. For example, you can use the debugger to watch variables, set breakpoints on conditions, and step into methods. Here are some additional tips for debugging your code in IntelliJ: * **Use the debugger's documentation.** The debugger's documentation has a lot of information on how to use the debugger's features. You can find the documentation by clicking on the `Help` menu and selecting `Documentation`. * **Use the debugger's keyboard shortcuts.** The debugger has a number of keyboard shortcuts that can help you debug your code more quickly. You can find a list of the keyboard shortcuts in the debugger's documentation. * **Ask for help.** If you are stuck, you can ask for help from the IntelliJ community. There are a number of forums and communities where you can ask for help. I hope this helps!
Hi Delna, although I have not see the logs, I believe this can help stackoverflow.com/questions/25543910/error-org-testng-testngexception-cannot-find-class-in-classpath-empclass we check the logs and then troubleshoot
When I start adding new tests to the test package in my project I get testing exception that class not found in classpath..but the old tests are fine and working...how to resolve this
sir how to set whole package instead of class so that we dont need to run and add configurations for each individual scripts for generating emailable reports
Hi Irfan To set up TestNG to run all tests within a package instead of individual classes in IntelliJ IDEA, follow these steps: Open IntelliJ IDEA and navigate to the Project tab on the left side of the window. Right-click on the package containing your TestNG tests and select "Run 'All Tests' with Coverage" or "Run 'All Tests'" depending on whether you want to generate coverage reports. IntelliJ IDEA will automatically create a run configuration for your TestNG tests based on the package name. To generate an emailable report, you can use the TestNG XML report generated by the IDE. To do this, add the following attribute to the TestNG XML file: Run the tests by selecting the run configuration you created in step 2, and an emailable report will be generated after the tests finish running. Note: The TestNG XML report generated by IntelliJ IDEA may not include all the details that you require in an emailable report. In this case, you can use a third-party reporting tool such as ExtentReports to generate a more detailed emailable report.
I done all the steps properly.but i face one issue when I run that method with annotations that is "Java:cannot access org.testng.annotations.Test bad class file ". It show an error like this. What to do.can you plzzzz help me..
Getting java: cannot access org.testng.annotations.test Bad class file Class file has wrong version 55.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath How can I resolve above issue plz help me
The error message "test framework quit unexpectedly" in TestNG on IntelliJ IDEA can be caused by a number of factors, including: *Incompatible dependencies:* If you are using incompatible dependencies in your project, such as different versions of the TestNG library, this can cause the test framework to quit unexpectedly. *Incorrect test configuration:* If your TestNG test configuration is incorrect, such as specifying the wrong test class or test method, this can also cause the test framework to quit unexpectedly. *Bugs in the TestNG library:* In some cases, bugs in the TestNG library itself can cause the test framework to quit unexpectedly. To resolve this error, you can try the following: 1. *Check your dependencies:* Make sure that you are using compatible dependencies in your project. You can use a dependency management tool such as Maven or Gradle to help you manage your project's dependencies. 2. *Check your test configuration:* Make sure that your TestNG test configuration is correct. You can verify your test configuration by opening the *Run/Debug Configurations* window in IntelliJ IDEA and selecting your TestNG test configuration. 3. *Update the TestNG library:* If you are using an older version of the TestNG library, try updating to the latest version. You can download the latest version of the TestNG library from the TestNG website. 4. *Report a bug:* If you have tried the above steps and are still getting the error, you can report a bug to the TestNG team. Here are some additional tips for avoiding "test framework quit unexpectedly" errors in TestNG on IntelliJ IDEA: * Make sure that you are using the latest version of the TestNG library. * Avoid using incompatible dependencies in your project. * Make sure that your TestNG test configuration is correct. * Use a dependency management tool such as Maven or Gradle to help you manage your project's dependencies. I hope this helps
@Raghav You are the most humble youtuber I have ever found.. You are a real gem
Thanks a lot Jivesh, humbled
indeed
im now directing my career to become QA engineer and hope your channel will be of a great support. thank you and God bless you....love from Ghana
All the best
Now don't worry if I'm not educated on IT, script writing etcetera ,but I'm not fully aware of what's being explained about this topic until later on in the years to come, I'll be able to better understand the complexity of your knowledgeable teachings when I make a decision to attempt to enter a IT institution. But for now I'm learning new things from your tutorial videos and appreciate it's content .
Great to know
Thanks for putting this together, this was my first video on TestNG I've watched, I subscribed to you, looks like you have a lot of videos out there. Nice work
Most welcome Bob
It is very helpful tutorial for me which gives me complete guidance I got in this single video whatever I needed and with very clear step by step guidance. Thanks a lot!!
So glad to know this Arpita.. keep learning
Thanks so much! I was so confused and my professor never explained it to us.
Glad to know this helped
Amazing!! I was always loved to see a demo on on test cases and to be able to do it myself. now I can do the tests easily. thank you very much for the video. so simple and clearly understandable
Most welcome
Hello Raghav Sir, thank you so much for this video. I started with JUnit 5 and could not generate reports as I was expecting. I searched a lot but couldn't do it. This simple video resolved my issue. I moved to TestNG and continuing my other development. I can't thank you enough how your videos have helped me. Thank you so much. Humble request-> Can you please add you tube or Udemy course for Plawright and JS.
So happy to know this Dnyanraj
Can check my lectures here - automationstepbystep.com/
Thank you so much for the video sir....spent lots of hours seeking help for this....thank you again for your help
You are most welcome Devansh
Thank you Raghav for this nice and helpful tutorial!
Glad it was helpful
Thanks raghav, last part of create testng file was helpful for me save my time
You're most welcome
Perfect, I learnt something new today thanks to you! bleesings to you bro
Glad to hear it
Very well explained ..although I am new to IntelliJ Idea and comparing with eclipse. I wish you give some online courses ..Love to join .Many Thanks
Great suggestion!
Finally i found this on your youtube channel, thanks raghav. Can you make allure report tutorial in intellij use java maven, if the test fails it will show a screenshot like Katalon TestOps?
Most welcome Nessy, I will plan on this
@Raghav Thank you for a create video so very learning and good explain grettings from El Salvador.
Most welcome Cristian
THANK YOU THANK YOU THANK YOU SOOOOO MUCH .... u r awesome thanks a lot very helpful.
Most welcome
Thank you Raghav, very useful 👍
Glad it was helpful Arul
Thank you so much...
Most welcome Hema
@Rahav - Thanks for your knowledge sharing. Its really heling me I am using eclipse for existing Automation framework. Can i pull the existing framework in IntelliJ Idea and Can be executed right. Please let me know if any other plugins to be added.
You should be able to use it. This can help www.jetbrains.com/help/idea/migrating-from-eclipse-to-intellij-idea.html
Thank you Raghav😊
Most welcome Sagar
Hi Raghav..
I have a issue that... I have 2 java classes and while running one after the other, the reports are getting over-ridded. I would like to get 2 reports (1 for each java class) in test-output >> e-mailable-reports. Please help with that.
I will need to check on that Bhavyasri. Meanwhile get some online help
What version java are you using? ... Thanks
will have to revisit to confirm. Most probably it would be JDK 8
Thanks for great video series sir. I have "SLF4J: No SLF4J providers were found." error. I added "slf4j-api-2.0.7.jar" and logback-classic-1.4.6.jar" module but doesnt work. What should I do?
Hi Büşra
The "SLF4J: No SLF4J providers were found." error indicates that the SLF4J logging framework is missing a logging implementation. You have added the slf4j-api and logback-classic modules, which provide the SLF4J API and a logging implementation, respectively. However, you need to make sure that these modules are included in your classpath and configured correctly.
Here are some steps you can follow to resolve this error:
Make sure that the slf4j-api and logback-classic modules are included in your project's classpath. You can check this by looking at your project's build file (e.g. pom.xml for Maven projects).
Make sure that the logging configuration file is properly set up. In the case of logback-classic, the configuration file should be named logback.xml or logback-test.xml and should be located in the classpath root.
Verify that the logging configuration file is being loaded. You can add the following system property -Dlogback.configurationFile= to specify the location of the configuration file.
Check that there are no conflicts with other logging frameworks in your classpath. Make sure that you are not including any other logging implementations that may conflict with SLF4J.
If you are using an IDE, make sure that the classpath is configured correctly. For example, if you are using Eclipse, go to the "Build Path" settings and verify that the slf4j-api and logback-classic modules are included in the "Libraries" tab.
If you have followed these steps and are still experiencing issues, you can try enabling debug logging for SLF4J by adding the following system property -Dorg.slf4j.simpleLogger.defaultLogLevel=debug. This should provide more information about what is causing the error.
Thank you a lot for your videos
You are welcome!
Thanks so much for video
Most welcome
thank you for your tutorial, when i install flutter and run flutter doctor is saying the cannot determine if intellJ has been Installed"Directory not listing, please help me with the solution of this problem
HI Auwal, not sure on flutter side, will need to check online
Thank you so so much ...😊it's helful
But for maven when I clicked on code then genrate then getting option as dependacy when I searched as testng am not getting any result ..whats the issue could you please help me sir or I can add manually
Hi Sonali, will need to check the logs
when working with cucumber-BDD approach, I have enabled create testng xml installed and added the dependency, Now i wanted to ask how to execute scenario file or the scenarios in feature file using testng.xml file.. could you help me with this linking.
To execute a scenario file or the scenarios in a feature file using a TestNG.xml file, you can follow these steps:
1. Create a TestNG.xml file in the same directory as your feature file(s).
2. In the TestNG.xml file, add the following elements:
```xml
```
Replace `com.example.MyTestRunner` with the name of your test runner class and `features/my_feature_file.feature` with the path to your feature file.
3. Save the TestNG.xml file.
4. Run the TestNG.xml file using a TestNG runner. For example, if you are using Eclipse, you can right-click on the TestNG.xml file and select "Run As" > "TestNG Suite".
Your test runner class will then execute the scenarios in the feature file.
Here is an example of a simple test runner class:
```java
package com.example;
import io.cucumber.testng.AbstractTestNGCucumberTests;
public class MyTestRunner extends AbstractTestNGCucumberTests {
@Override
public String[] getFeatures() {
return new String[]{parameter("featureFile")};
}
}
```
This test runner class will execute the feature file specified by the `featureFile` parameter.
You can also use TestNG to execute specific scenarios in a feature file. To do this, you can use the `tags` parameter to specify the tags of the scenarios that you want to execute. For example, the following TestNG.xml file will execute all of the scenarios in the `my_feature_file.feature` feature file that have the tag `@smoke`:
```xml
```
I hope this helps
@@RaghavPal thank you for the help, i will try and let you know at the earliest.
Please tell me. How to debug and how to figure out error in intellji
Hi Divakar
Here are the steps on how to debug and figure out errors in IntelliJ:
1. **Set a breakpoint.** A breakpoint is a line of code that will cause the debugger to stop execution. To set a breakpoint, click on the line of code where you want the debugger to stop. A red dot will appear on the line of code.
2. **Run the program in debug mode.** To run the program in debug mode, click on the green arrow in the toolbar or press `Shift`+`F9`. The program will start executing, and it will stop at the breakpoint you set.
3. **Inspect the variables.** Once the program has stopped at the breakpoint, you can inspect the variables in the debugger window. To do this, click on the variable in the debugger window, and the value of the variable will be displayed.
4. **Step through the code.** You can step through the code one line at a time to see how the program is executing. To do this, click on the `Step Over` button in the toolbar or press `F8`.
5. **Use the debugger's features.** The debugger has a number of features that can help you debug your code. For example, you can use the debugger to watch variables, set breakpoints on conditions, and step into methods.
Here are some additional tips for debugging your code in IntelliJ:
* **Use the debugger's documentation.** The debugger's documentation has a lot of information on how to use the debugger's features. You can find the documentation by clicking on the `Help` menu and selecting `Documentation`.
* **Use the debugger's keyboard shortcuts.** The debugger has a number of keyboard shortcuts that can help you debug your code more quickly. You can find a list of the keyboard shortcuts in the debugger's documentation.
* **Ask for help.** If you are stuck, you can ask for help from the IntelliJ community. There are a number of forums and communities where you can ask for help.
I hope this helps!
Hi Raghav, can u say wat can we do when it says "class not found exception"?
Hi Delna, although I have not see the logs, I believe this can help stackoverflow.com/questions/25543910/error-org-testng-testngexception-cannot-find-class-in-classpath-empclass
we check the logs and then troubleshoot
You used JAR file because you didn't used maven(POM file)?
the TestNG plugin needs to be added, the library can be added from JAR or as a dependency in pom.xml
Hi Raghav sir, You know about both Eclipse IDE & IntellJ, which one will you prefer? don't say both 😁
I have personally worked more with Eclipse, so that comes natural choice, When I worked with IntelliJ IDEA I found it very interactive.
Thank you so much for your reply Raghav ❤️ sir.
Thank u broooo
Most welcome
When I start adding new tests to the test package in my project I get testing exception that class not found in classpath..but the old tests are fine and working...how to resolve this
Hi Brindha, will need to check logs in detail
sir how to set whole package instead of class so that we dont need to run and add configurations for each individual scripts for generating emailable reports
Hi Irfan
To set up TestNG to run all tests within a package instead of individual classes in IntelliJ IDEA, follow these steps:
Open IntelliJ IDEA and navigate to the Project tab on the left side of the window.
Right-click on the package containing your TestNG tests and select "Run 'All Tests' with Coverage" or "Run 'All Tests'" depending on whether you want to generate coverage reports.
IntelliJ IDEA will automatically create a run configuration for your TestNG tests based on the package name.
To generate an emailable report, you can use the TestNG XML report generated by the IDE. To do this, add the following attribute to the TestNG XML file:
Run the tests by selecting the run configuration you created in step 2, and an emailable report will be generated after the tests finish running.
Note: The TestNG XML report generated by IntelliJ IDEA may not include all the details that you require in an emailable report. In this case, you can use a third-party reporting tool such as ExtentReports to generate a more detailed emailable report.
@@RaghavPal Thanks for this!
I done all the steps properly.but i face one issue when I run that method with annotations that is "Java:cannot access org.testng.annotations.Test bad class file ". It show an error like this. What to do.can you plzzzz help me..
Hi, something is missing, will need to check the setup
TY
WC
Getting java: cannot access org.testng.annotations.test
Bad class file
Class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath
How can I resolve above issue plz help me
Hi Abhishek, this can help stackoverflow.com/questions/28180915/class-file-has-wrong-version-52-0-should-be-50-0
Can you please do a junit tutorial as well?
Sure I will do Sawani
I add the jcommander too but still don't working !!...any tips ?
I will need to know the details of the issue
@@RaghavPal no its ok now, good old restart fix everything..Thanks 😊..
"test framework quit unexpectedly" after running java test case i am getting this error.
The error message "test framework quit unexpectedly" in TestNG on IntelliJ IDEA can be caused by a number of factors, including:
*Incompatible dependencies:* If you are using incompatible dependencies in your project, such as different versions of the TestNG library, this can cause the test framework to quit unexpectedly.
*Incorrect test configuration:* If your TestNG test configuration is incorrect, such as specifying the wrong test class or test method, this can also cause the test framework to quit unexpectedly.
*Bugs in the TestNG library:* In some cases, bugs in the TestNG library itself can cause the test framework to quit unexpectedly.
To resolve this error, you can try the following:
1. *Check your dependencies:* Make sure that you are using compatible dependencies in your project. You can use a dependency management tool such as Maven or Gradle to help you manage your project's dependencies.
2. *Check your test configuration:* Make sure that your TestNG test configuration is correct. You can verify your test configuration by opening the *Run/Debug Configurations* window in IntelliJ IDEA and selecting your TestNG test configuration.
3. *Update the TestNG library:* If you are using an older version of the TestNG library, try updating to the latest version. You can download the latest version of the TestNG library from the TestNG website.
4. *Report a bug:* If you have tried the above steps and are still getting the error, you can report a bug to the TestNG team.
Here are some additional tips for avoiding "test framework quit unexpectedly" errors in TestNG on IntelliJ IDEA:
* Make sure that you are using the latest version of the TestNG library.
* Avoid using incompatible dependencies in your project.
* Make sure that your TestNG test configuration is correct.
* Use a dependency management tool such as Maven or Gradle to help you manage your project's dependencies.
I hope this helps
hey, i run the same thing but it shows exception in main noclassdeffound
can anyone help me
Hi Saoumya, will need to check the logs and details