IntelliJ IDEA Beginner Tutorial | How to use TestNG

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 91

  • @jiveshchandsharma5279
    @jiveshchandsharma5279 3 ปีที่แล้ว +17

    @Raghav You are the most humble youtuber I have ever found.. You are a real gem

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Thanks a lot Jivesh, humbled

    • @SoyJavero
      @SoyJavero 2 หลายเดือนก่อน

      indeed

  • @arpitabiswas8477
    @arpitabiswas8477 หลายเดือนก่อน

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

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      So glad to know this Arpita.. keep learning

  • @dnya4512
    @dnya4512 7 หลายเดือนก่อน

    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.

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      So happy to know this Dnyanraj
      Can check my lectures here - automationstepbystep.com/

  • @pot_of_greed2414
    @pot_of_greed2414 3 ปีที่แล้ว +1

    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 .

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Great to know

  • @spiritNmind
    @spiritNmind 2 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      All the best

  • @arr09322
    @arr09322 ปีที่แล้ว +3

    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

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Most welcome Bob

  • @SoyJavero
    @SoyJavero 2 หลายเดือนก่อน

    Perfect, I learnt something new today thanks to you! bleesings to you bro

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน +1

      Glad to hear it

  • @HatTrick4030
    @HatTrick4030 ปีที่แล้ว

    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

  • @nessyw9120
    @nessyw9120 3 ปีที่แล้ว +2

    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?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Most welcome Nessy, I will plan on this

  • @adityashastri9864
    @adityashastri9864 ปีที่แล้ว

    Thanks raghav, last part of create testng file was helpful for me save my time

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      You're most welcome

  • @SLiu-gj9yv
    @SLiu-gj9yv 7 หลายเดือนก่อน

    Thank you Raghav for this nice and helpful tutorial!

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Glad it was helpful

  • @govindkumar-pr9th
    @govindkumar-pr9th ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Great suggestion!

  • @devanshprataptiwari5804
    @devanshprataptiwari5804 ปีที่แล้ว

    Thank you so much for the video sir....spent lots of hours seeking help for this....thank you again for your help

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      You are most welcome Devansh

  • @hemalakshmi7168
    @hemalakshmi7168 2 ปีที่แล้ว +1

    Thank you so much...

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome Hema

  • @bhavyasrichundru1875
    @bhavyasrichundru1875 2 ปีที่แล้ว +1

    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.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      I will need to check on that Bhavyasri. Meanwhile get some online help

  • @gurpreetkaursarwara5869
    @gurpreetkaursarwara5869 2 ปีที่แล้ว

    THANK YOU THANK YOU THANK YOU SOOOOO MUCH .... u r awesome thanks a lot very helpful.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome

  • @divakardiva2924
    @divakardiva2924 ปีที่แล้ว

    Please tell me. How to debug and how to figure out error in intellji

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      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!

  • @CristianParadacmpmendoza
    @CristianParadacmpmendoza 2 ปีที่แล้ว

    @Raghav Thank you for a create video so very learning and good explain grettings from El Salvador.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome Cristian

  • @busragert
    @busragert ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      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.

  • @auwalkaz
    @auwalkaz 2 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      HI Auwal, not sure on flutter side, will need to check online

  • @vanichitraju6180
    @vanichitraju6180 3 ปีที่แล้ว

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

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      You should be able to use it. This can help www.jetbrains.com/help/idea/migrating-from-eclipse-to-intellij-idea.html

  • @sonalirahangdale4326
    @sonalirahangdale4326 2 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Sonali, will need to check the logs

  • @florbelindapaucarsilva9759
    @florbelindapaucarsilva9759 ปีที่แล้ว

    What version java are you using? ... Thanks

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      will have to revisit to confirm. Most probably it would be JDK 8

  • @i4iirfan
    @i4iirfan ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      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.

    • @i4iirfan
      @i4iirfan ปีที่แล้ว

      @@RaghavPal Thanks for this!

  • @arulventhan641
    @arulventhan641 2 ปีที่แล้ว

    Thank you Raghav, very useful 👍

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Glad it was helpful Arul

  • @aliyayousuf3437
    @aliyayousuf3437 10 หลายเดือนก่อน

    "test framework quit unexpectedly" after running java test case i am getting this error.

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      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

  • @brindhashekar1839
    @brindhashekar1839 2 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Brindha, will need to check logs in detail

  • @yumeable
    @yumeable 10 หลายเดือนก่อน

    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.

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      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

    • @yumeable
      @yumeable 10 หลายเดือนก่อน

      @@RaghavPal thank you for the help, i will try and let you know at the earliest.

  • @jkv24
    @jkv24 2 ปีที่แล้ว

    Hi Raghav, can u say wat can we do when it says "class not found exception"?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      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

  • @user-ir2zv1xx5q
    @user-ir2zv1xx5q 3 ปีที่แล้ว

    You used JAR file because you didn't used maven(POM file)?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      the TestNG plugin needs to be added, the library can be added from JAR or as a dependency in pom.xml

  • @WolfMacedon
    @WolfMacedon 2 ปีที่แล้ว

    I add the jcommander too but still don't working !!...any tips ?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      I will need to know the details of the issue

    • @WolfMacedon
      @WolfMacedon 2 ปีที่แล้ว

      @@RaghavPal no its ok now, good old restart fix everything..Thanks 😊..

  • @sagarsagu8031
    @sagarsagu8031 2 ปีที่แล้ว

    Thank you Raghav😊

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome Sagar

  • @asifshaik1038
    @asifshaik1038 2 ปีที่แล้ว

    Hi Raghav sir, You know about both Eclipse IDE & IntellJ, which one will you prefer? don't say both 😁

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +2

      I have personally worked more with Eclipse, so that comes natural choice, When I worked with IntelliJ IDEA I found it very interactive.

    • @asifshaik1038
      @asifshaik1038 2 ปีที่แล้ว

      Thank you so much for your reply Raghav ❤️ sir.

  • @karibays
    @karibays ปีที่แล้ว

    Thank u broooo

  • @lamamotion-9713
    @lamamotion-9713 2 ปีที่แล้ว

    Thank you a lot for your videos

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      You are welcome!

  • @bluicreative5606
    @bluicreative5606 2 ปีที่แล้ว

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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi, something is missing, will need to check the setup

  • @soumyajyotiseth9719
    @soumyajyotiseth9719 2 ปีที่แล้ว

    hey, i run the same thing but it shows exception in main noclassdeffound
    can anyone help me

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Saoumya, will need to check the logs and details

  • @shailymalviya
    @shailymalviya 2 ปีที่แล้ว

    Thanks so much for video

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome

  • @abhishekkodakandla6649
    @abhishekkodakandla6649 2 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Abhishek, this can help stackoverflow.com/questions/28180915/class-file-has-wrong-version-52-0-should-be-50-0

  • @sawanisasanka1299
    @sawanisasanka1299 3 ปีที่แล้ว

    Can you please do a junit tutorial as well?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Sure I will do Sawani

  • @barragek0402
    @barragek0402 2 ปีที่แล้ว

    TY