I am here just to mention how beautifully you take one task , one agenda in hand and explain it without deviating from the topic. I always search for your videos if I am not clear about any concept. Thanks for your efforts .
@RaghavPal3 жыл бұрын
Hi Sameer, most welcome
@atulmhatre68773 жыл бұрын
ye itna easy nahi hai jitna apne easy karke bataya..expalain very well Thank You
@yogeesh86375 ай бұрын
You always explain wat it's required..I could see some channel explained same concepts in 1 hour..but you covered in 13 mints ..so our time also saved 😍
@RaghavPal5 ай бұрын
Glad to see this Yogeesh.. keep learning
@Master_Udvith_Shorts Жыл бұрын
Searched this solution for long finally got the solution from your video. Thanks!!
@RaghavPal Жыл бұрын
Glad it helped Uday
@vamshivishwanath6 ай бұрын
Hi Sir How many diffrent testcases can we ran at a time?
@RaghavPal6 ай бұрын
It will depend on your infrastructure... how many parallel threads can it handle for your tests
@vamshivishwanath6 ай бұрын
@@RaghavPal Thanks for replay and also please make vedio on take screen shot of each web element(action) and save it to word document with headings
@RaghavPal5 ай бұрын
Sure
@debashishhota62133 жыл бұрын
Thank you Sir.. you really explain very nicely..
@RaghavPal3 жыл бұрын
You are most welcome Debashish
@hayaulislam4 жыл бұрын
helo raghav, will you please describe how to run test case in safari browser?
@RaghavPal4 жыл бұрын
You will need to add Safari Driver. Check this www.javatpoint.com/selenium-webdriver-running-test-on-safari-browser
@dushananuradha10982 жыл бұрын
Yet another great and concise explanation from you, sir. Highly appreciate it !!
@RaghavPal2 жыл бұрын
Glad it was helpful!
@kumare39883 жыл бұрын
Excellent video mate. Really great, Just clean and simple
@RaghavPal3 жыл бұрын
Thanks Kumar
@vimalmishra86936 жыл бұрын
Hi Raghav its my privilege to watch your video ! You really make things easy to learn .
@RaghavPal6 жыл бұрын
Glad to know this Vimal
@automation4u9689 ай бұрын
Excellent efforts Sir... Plz share your details to connect
@RaghavPal9 ай бұрын
can send me your query here..
@brian_m18923 жыл бұрын
Thank you very much for making an excellent tutorial ... the best I found and perfect for understanding. Namaste
@RaghavPal3 жыл бұрын
So happy to know this Brian
@s.k.obidulkadir23826 ай бұрын
Sir i have a question. Suppose, in a real life project we have to generate the report as well so when we run the project in parallel, how will it work? They will generate the report for multiple browser separately or how it will works? Thank you sir for your wonderful video that is really helpful for me.
@RaghavPal6 ай бұрын
When running Selenium tests in parallel, generating reports can be a bit tricky, but it's definitely doable Let me guide you through the process. 1. Parallel Execution Basics: - When you run tests in parallel, each test runs independently in its own thread or process. - For example, if you're testing multiple browsers simultaneously, each browser instance runs as a separate test. - The challenge is to collect and organize the test results from all these parallel executions. 2. Extent Reports: - Extent Reports is a popular reporting library for Selenium. - It provides detailed HTML reports with rich visuals, including test status, logs, screenshots, and more. - To generate separate reports for each browser, follow these steps: 3. Implementation Steps: - Configure Maven Plugins: - In your project's `pom.xml`, add the following plugins: ```xml com.github.temyers cucumber-jvm-parallel-plugin 2.2.0 generateRunners validate generateRunners src/test/java/stepDefinition/baseDefinition src/test/resources target/cucumber-parallel json,html "~@ignored" org.apache.maven.plugins maven-surefire-plugin 2.19 10 true /Parallel*IT.class ``` - Adjust the configuration according to your project structure. - Add Extent Reports: - In your test code, initialize Extent Reports and create a report for each browser. - You can use `@BeforeClass` and `@AfterClass` hooks to set up and finalize the reports. - Example: ```java @BeforeClass public void setUp() { // Initialize Extent Reports ExtentReports extent = new ExtentReports("target/reports/report.html", true); ExtentTest test = extent.startTest("Test Name", "Test Description"); // Set up other configurations (e.g., system info, categories, etc.) // ... } @AfterClass public void tearDown() { // Finalize the report extent.endTest(test); extent.flush(); } ``` 4. Result: - When you run your tests in parallel, each browser will generate its own Extent Report. - The reports won't overwrite each other, and you'll have separate HTML files for each browser's test results. Remember to adapt the above steps to your specific project structure and requirements --
@ankitrastogi61135 жыл бұрын
Hi Raghav, You have provided example with one class in each .can you please let me help how we can run multiple class files in each by running parallel in tests as i am running but get nullpointer exception as driver is not found by other class
@RaghavPal5 жыл бұрын
Hi Ankit, you can use testng.xml file and then add all the classes/tests you want to run and can also run in parallel. there are videos in this playlist for that.
@ankitrastogi61135 жыл бұрын
@@RaghavPal Hi Raghav, Thanks for reply ..i am already using testng.xml file and added two class in each .But when i am running test in larallel then each threaf assigned to each test but each test have two classes so when second class running then null pointer exceprtion is coming on driver instance.I am initiating driver by @BeforeTest throgh another class that called TestBaseClass..so please help me it is most urgent for my project i am stuck from couple of days
@ankitrastogi61135 жыл бұрын
Please let me know if i can connect with you personally
@RaghavPal5 жыл бұрын
Hi Ankit, you can also have multiple testng.xml and make them run in parallel from command line. ( in diff cmd windows). It will be difficult for me now to take out extra time. I will try to help you online.
@ankitrastogi61135 жыл бұрын
@@RaghavPal Thanks a lot Raghav, Actually i am confused to use multiple testng.xml file as in my framework there are multiple classes and issue comes from second class file on driver instance. Yes Raghav,Please help me online..we can do through webex or as you comfort
@sai-gd6hzАй бұрын
Nice explanation
@RaghavPalАй бұрын
Thanks Sai
@nayeemsayyad55593 жыл бұрын
Hi Raghav as you have many testng.xml files created on project level but for automating at project level should we maintain a single XML file?
@RaghavPal3 жыл бұрын
Hi Nayeem, you can have multiple testng.xml files with diff configurations as needed and can run a specific file based on the need
@meherprasadpalaskar86014 жыл бұрын
Hi sir, how can I apply parallel testing project level
@RaghavPal4 жыл бұрын
Hi Meherprasad, you can do that if you have required infrastructure. Usually multiple systems will be required for running lots of instances in parallel. You can also take help from cloud services like Saucelabs, Browserstack
@ciscolopez204 жыл бұрын
Hi Raghav, is there a video that shows how to use selenium webdriver with appium client on virtual device? use case is interaction between mobile device and desktop browser.
@RaghavPal4 жыл бұрын
Hi Francisco, you can check appium series here - automationstepbystep.com/
@3VAudioVideo2 жыл бұрын
Another great video! I hope you read my previous post on your other video where I requested if you could create a video on thread local/safe. Parallel execution has issues on anything but these super simple test cases. So such a video would help solve lots of these issues. Thanks in advance!
@RaghavPal2 жыл бұрын
Will do!
@3VAudioVideo2 жыл бұрын
@@RaghavPal Thanks again!
@fabqa-d5s2 жыл бұрын
Thanks for the video. How can we do this cross browser testing with cucumber framework?
@RaghavPal2 жыл бұрын
The process remains same for cucumber, the script to use browser based on options can be given in a common class, can also use cloud service providers like SauceLabs, Browserstack etc
@shruthim9843 жыл бұрын
Hi Raghav, i need to run cross browser testing using parallel method in cucumber-junit. Can you guide me
@RaghavPal3 жыл бұрын
Hi Shruthi, I will try and plan a session, try some online examples meanwhile
@srivenkat90993 жыл бұрын
Hi Raghav, one doubt..whats the use of using thread count to 5 here in this video..whats the purpose of threads in general?
@RaghavPal3 жыл бұрын
its like saying run 5 executions in parallel, So its like 5 users running the test at the same time
@ravishsingh62744 жыл бұрын
Hi, How can create common library class to launch multiple browser .I have multiple test class , I am looking common method to call in my each class .can you plz share video on this?
@RaghavPal4 жыл бұрын
I will try to do a session Ravish
@shafiqurrehman85163 жыл бұрын
Hi Raghav, Can we use Parallel testing in Page Object Model. As I am getting null pointer exception. As browser is initiated before class method.
@RaghavPal3 жыл бұрын
Hi Shafiq, we can do, but will need to ensure that we have single browser instance created
@tasmitamanna85023 жыл бұрын
Hi Raghav thanks for the video.I have a question, can we do same thing in pytest?
@RaghavPal3 жыл бұрын
Yes, you can do
@rebekamontana76565 жыл бұрын
Hello my beloved, can you help me ?. When I put @Parameters ("browserName") I get the following message: The annotation @Parameters is disallowed for this location.
@RaghavPal5 жыл бұрын
Hi Rebeka, Saw your other message, hope this is fine now.
@bartomiejkmita51184 жыл бұрын
I have one question sir. How can I inject parameter to field using testng.xml. I have created dependency injection using google Guice and using annotation @Named("name here") in Webdriver field. Now by changing name I can inject whatever driver I want. Question is How can I sent name to @Named("name from properties file here") from properties or testng.xml file? Is it possible? Of course if you never used that approach nevermind me :)
@RaghavPal4 жыл бұрын
Hi Bartłomiej, I will want to answer this after doing some analysis, So for now pls try online help
@poojajain89414 жыл бұрын
how can we run different test methods belonging to same/different class in parallel? i.e. 3 tests in parallel, which opens browser and actually do something
@RaghavPal4 жыл бұрын
You can use testng.xml for that, Pls check the videos here - kzbin.info/aero/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
@rajatshandilya12034 жыл бұрын
I have my browsers initialised in base class. So can we get browserName from that base class instead of initialising them in @BeforeTest . ?
@RaghavPal4 жыл бұрын
Hi Rajat, you can do that
@poojapatange95202 жыл бұрын
Hi Raghav Sir, Thank you so much for your tutorials its very useful. Please can you give me sample script how to run same test cases on multiple envi like QA, Prod and demo using command promt
@RaghavPal2 жыл бұрын
Hi Pooja, I do not have anything handy with me right now, In general, you will put your env dependent parameters in variables and get the values of these variables externally, from a config file or properties file and the same can be used from command line
@AhmedAli-zc3me5 жыл бұрын
Hi Raghav There's problem occurs with me when I put parameter tag inside test tag --> Parameter 'browserName' is required by @Configuration on method startDriver but has not been marked @Optional or defined
@RaghavPal5 жыл бұрын
Pls show your code, any detailed error you have ?
@AhmedAli-zc3me5 жыл бұрын
---------------- @Parameters({ "browserName" }) @BeforeSuite public void startDriver(String browserName) { if (browserName.equalsIgnoreCase("chrome")) { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "/drivers/chromedriver.exe"); driver = new ChromeDriver(chromeOption()); } else if (browserName.equalsIgnoreCase("firefox")) { System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "/drivers/geckodriver.exe"); driver = new FirefoxDriver(firefoxOption()); } else if (browserName.equalsIgnoreCase("ie")) { System.setProperty("webdriver.ie.driver", System.getProperty("user.dir") + "/drivers/IEDriverServer.exe"); driver = new InternetExplorerDriver(); } else if (browserName.equalsIgnoreCase("safari")) { driver = new SafariDriver(); } } --------------- FAILED CONFIGURATION: @BeforeSuite startDriver org.testng.TestNGException: Parameter 'browserName' is required by @Configuration on method startDriver but has not been marked @Optional or defined in F:\eclipse-workspace\2D-3D-Analysis\testng.xml at org.testng.internal.Parameters.createParameters(Parameters.java:159) at org.testng.internal.Parameters.createParameters(Parameters.java:372) at org.testng.internal.Parameters.createConfigurationParameters(Parameters.java:90) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:199) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1200) at org.testng.TestNG.runSuitesLocally(TestNG.java:1125) at org.testng.TestNG.run(TestNG.java:1033) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
@RaghavPal5 жыл бұрын
Hi Ahmed, are you running the base class file or testng.xml file
@tarikgulsever51915 жыл бұрын
Great explanation
@RaghavPal5 жыл бұрын
Thanks for watching
@vamshivishwanath6 ай бұрын
Hi sir @Parameters("browsername") is showing error like attribute value is undefined for annotation type paramatarized.Parameters if know the solutiion please help
@RaghavPal5 ай бұрын
Vamshi The error message "The attribute value is undefined for the annotation type Parameters" usually occurs when the import statement is incorrect. Here's how you can fix it: 1. Check Your Import Statements: - Make sure you're importing the correct `@Parameters` annotation from TestNG. - Use this import statement: ```java import org.testng.annotations.Parameters; ``` - Remove any other conflicting import statements related to parameters (e.g., `import com.beust.jcommander.Parameters;`). 2. Update Your Code: - Replace the existing import with the correct one: ```java import org.testng.annotations.Parameters; ``` 3. Example Usage: - Here's how you can use `@Parameters` in your TestNG class: ```java import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; public class MyTestClass { @BeforeTest @Parameters("browsername") public void setUp(String browser) { // Your setup logic here based on the browser parameter System.out.println("Running test on " + browser); } } ``` Make sure you've corrected the import statement, and your `@Parameters` annotation should work as expected -
@vamshivishwanath5 ай бұрын
@@RaghavPal thanks very much
@rajsharma6523 жыл бұрын
Sir do u have birds around you while recording... a beautiful environment around you !
@RaghavPal3 жыл бұрын
Yes, many, thanks for watching Raj
@neerajbakhtani4 жыл бұрын
Hi , Appreciate your effort for the wonderful videos. I have implemented the same. Can you let me know how can we implement Logging for all the test cases executed here parallely? I tried logging but all logs of different test cases mixed into one. How can we create seperate logging for all test case that execute in parallel?
@RaghavPal4 жыл бұрын
Hi Neeraj, I will try to add a session on that. Pls take online help meanwhile
@fakkireshvasanad2577 Жыл бұрын
how to fix that last configuration failure while i am running please provide the solution for that
@RaghavPal Жыл бұрын
Need more details and examples
@apekshadangi65494 жыл бұрын
Hi Raghav, I was running my testng.xml file.In that file I have added two tests that is one test on chrome and other on firefox with same class and the class has only one method and I run them in parallel mode, so according to that in testng report it should show one method of one test and one method of other test but for one test it is showing the same method run twice and for other test it is showing only one method which is working fine..The firefox browser is working fine but for the chrome the execution is stopping after sometime without completion .Can you help me with that.
@RaghavPal4 жыл бұрын
Hi Apeksha, I will need error details and logs to troubleshoot this. You can try some online help as well
@sumanghosh11134 жыл бұрын
@@RaghavPal Hi Raghav, I am having the same issue. After doing some research, I found that it may get solved if we Initialize the WebDriver object as a Thread Local for Parallel Test Execution. ThreadLocal driver = new ThreadLocal(); Can you help us on this? And thanks a lot for your videos, it helps me a lot.
@iamthekd076 жыл бұрын
Hi Raghav, I am getting error when i put @parameters("browserName") i.e the attribute value is undefined for the annotation type parameterized.parameters testng. Please help me out !!
@RaghavPal6 жыл бұрын
Hi Kuldeep, just check you imported Parameters from TestNG lib and not any other lib. Also check this stackoverflow.com/questions/47612476/the-attribute-value-is-undefined-for-the-annotation-type-parameters-error-is-d
@iamthekd076 жыл бұрын
I was not able to import it so alternatively used this @org.testng.annotations.Parameters("browserName") and now its worked. Thank you again
@RaghavPal6 жыл бұрын
Great to know this Kuldeep
@puneetoist19873 жыл бұрын
Hi Raghav, I used the same to run on chrome and edge, but it is not running in parallel - it is executing one after other. What may be the reason. And how to resolve that.
@RaghavPal3 жыл бұрын
will need to check your setup Puneet, Try some online examples
@MrRanjitray4 жыл бұрын
Hi Raghav, Great explanation,. Thanks a lot. I have one doubt, I have browser invoke script base class( initialize function) and test script( here i am also extends the base class) in another class. But while executing testng.xml , its not picking the browsers browser returns null. .Can you advise how to do that. or can you share your mail id so that i can mailed my code.
@RaghavPal4 жыл бұрын
Hi Ranjit, can you recheck all the steps from the video. I believe something is missing.
@MrRanjitray4 жыл бұрын
@@RaghavPal Hi Raghav, Thanks for your reply. Its working fine when i have Browser Setup and test in single file. My issue is Browser setup(BaseCalss.java-initialize(String Browser) function)) in one file and test is in another file. While running Testng.xml file its failing there. I have to call the browser setup(-initialize(String Browser) function) file in testscript file. Browser value have to be passed to the test script file.
@RaghavPal4 жыл бұрын
Okay, may be I will need to have a session on this. For now you can continue with the concepts and revisit this later
@dalerbekov27234 жыл бұрын
Gracias hermano
@RaghavPal4 жыл бұрын
Most welcome Daler
@staslocovai2 жыл бұрын
Thanks a lot Sir . But in my case near my @Parameters annotation - it just gives me the error " Parameters is disallowed in this location" . After i copied everything as in the video . Anyone ? Any ideas?) Thanks..
@RaghavPal2 жыл бұрын
Hi Stas, will need to see the details, can check some online examples
@satyanarayanpanigrahi3386 Жыл бұрын
@RaghavPal How to achieve this using testng with cucumber BDD framework. Kindly through some light.
@RaghavPal Жыл бұрын
Hi Satyanarayan Here are the steps on how to achieve multiple browser testing in parallel using TestNG with Cucumber BDD framework: 1. Create a Maven project in your favorite IDE adding Cucumber dependencies to the POM as detailed here and TestNG dependencies here. 2. Add the two feature files (scenarios.feature and scenario-outlines.feature) and step definition class as described in the JUnit section. 3. Create a TestNG XML file and add the following configuration: ```xml ``` This configuration will create two tests, one for Chrome and one for Firefox. The `browser` parameter will be passed to the CucumberTest class, which will use it to initialize the appropriate browser driver. 4. Run the TestNG XML file using the following command: ``` mvn test -DsuiteXmlFile=testng.xml ``` This will run the two tests in parallel, one for Chrome and one for Firefox. Here are some additional things to keep in mind when achieving multiple browser testing in parallel using TestNG with Cucumber BDD framework: * You need to have the correct browser drivers installed on your machine. * You need to specify the browser name in the TestNG XML file. * You need to create a separate step definition class for each browser. * You need to make sure that your code is thread-safe
@satyanarayanpanigrahi3386 Жыл бұрын
@@RaghavPal How to make the cucumber test runner class as @Test annotation of TestNG. So that it will execute from TestNG xml suite
@satyanarayanpanigrahi3386 Жыл бұрын
@RaghavPal could you please make video on that. It will be really helpful.
@minakshipanchal88112 жыл бұрын
I have write same code but getting error in Test Method for void Test1() as invalid type .same error for void Teardown method (). Plz help for solving these errors.
@RaghavPal2 жыл бұрын
Hi Minakshi, will need to check the error and logs, Try to check all required libraries are added
@minakshipanchal88112 жыл бұрын
Thank you for reply .plz help me to solve below error In testng.xml file I enter @para & press ctrl+spacebar but it shows message like no default proposals . On other way I enter the parameter syntax manually but shows error like "parameters" must be declared. I followed same step given by u . Any suggestion how to solve this error plz help.
@TheUnboxingJourney4 жыл бұрын
Thanks for the tutorial. But you did not even bother to solve the IE issue. What was the actual issue? for IE? My Chrome and Firefox opened but not IE. I will really appreciate if you reply with an answer.
@RaghavPal4 жыл бұрын
Hi, I covered IE separately in this video - kzbin.info/www/bejne/jqO0ZZmnnJ5qfas You can also check complete playlist here - automationstepbystep.com/
@sandeepdevadas71423 жыл бұрын
I would like to help you out . Would it be possible for you to answer my questions? How can I help your cause?
@RaghavPal3 жыл бұрын
Hi Sandeep, how exactly do you wish to help
@sandeepdevadas71423 жыл бұрын
@@RaghavPal Financially I can spare a bit. not too much though. A little bit.
@sandeepdevadas71423 жыл бұрын
I want my questions answered too.
@sandeepdevadas71423 жыл бұрын
@@RaghavPal Raghav?
@RaghavPal3 жыл бұрын
Hi Sandeep, the best help for now can be to spread this free education to all who may need it, Share in all your groups - automationstepbystep.com/ Also if people can help in answering comments and helping users, it will be a great help
@ManishYadav-in7ml6 жыл бұрын
👍
@deepakMCA2009knit5 жыл бұрын
my tearDown() is not quitting IE browser in either case, parallel or multi :(
@RaghavPal5 жыл бұрын
Hi Deepak, I will need to see code and logs for troubleshooting
@rebekamontana76565 жыл бұрын
Excuse me, I discovered my mistake.
@RaghavPal5 жыл бұрын
Glad to know this Rebeka
@UmairKhan01564 жыл бұрын
facing same whats the solution
@Deniz-ss1sv3 жыл бұрын
:)
@boshaaj5 жыл бұрын
This is video is really not that helpful as you've already created most crucial aspect of the framework off-camera.
@RaghavPal5 жыл бұрын
Hi Joshua, I think you did not see earlier videos. Pls check here - kzbin.info/aero/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa You can find all playlists here - automationstepbystep.com/online-courses/