Selenium Framework - Part 23 - Creating Extent Logger - Integration with TestNG Listeners

  Рет қаралды 8,826

Testing Mini Bytes

Testing Mini Bytes

Күн бұрын

Пікірлер: 78
@04IT934
@04IT934 10 ай бұрын
This is some real good tutorial! Crips and to the point.
@rajatt95
@rajatt95 3 жыл бұрын
I've never seen anyone explaining in this way. Your way of creating the framework from scratch and putting each and everything at right place-> AWESOME, Amuthan. We are so lucky to have a talent like you. Thank you so much for all these tutorials.
@SIDDIQ35
@SIDDIQ35 Ай бұрын
Amuthan sir, You are a living legend !!
@AutomationCodeMonkey
@AutomationCodeMonkey Жыл бұрын
This literally just fixed all my reports and integrated my listener for work. You sir are a legend, thank you so much for this series of videos. It truly helped me out, do you have a Patreon account? If not you should look into it, I am sure you are helping a LOT of people.
@mjj3tube
@mjj3tube 2 жыл бұрын
Splendid explanation! This is definitely the go to video for Extent reports.
@tapaskhandai
@tapaskhandai 2 ай бұрын
Excellent teaching. Thank You Amuthan
@rekhadevikondeti5764
@rekhadevikondeti5764 3 жыл бұрын
Thank you so much Amuthan...it was just like a piece of cake with your explanation......optimising the code wherever necessary...clean way of writing code. Anyone can write code as such...but writing it precisely........wow Many thanks to you.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Glad you liked the content. Keep watching and keep learning. 👍
@surajitsarkar59
@surajitsarkar59 3 жыл бұрын
Kept it simple and packed with information. Good job.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Thanks a lot for your feedback :)
@xoda345
@xoda345 2 жыл бұрын
Hi amuthan, how do you remember the steps to create this framework? This is such a vast framework with so many optimisation. I can create the framework when I am watching this series but I should be able to do so without referring the videos like you are doing. You can build the framework without referring to any code or videos. When I am doing it, I forget the steps on what is done as part of the framework and then I have to look into the videos again to remember how it is done. Please suggest how to improve this??
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
You will slowly reach there
@krishanuchakraborty3500
@krishanuchakraborty3500 3 жыл бұрын
I love the fact that you build something with so much passion and then break it by saying "I dont like it"... to again enhance... Man, when is it going to stop !!! :-D
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
It will keep coming. You have many more videos ahead. Enjoy your learning 😄
@Payazee
@Payazee 3 жыл бұрын
8:14 this is super cool
@ashishuniyal3429
@ashishuniyal3429 3 жыл бұрын
Amuthan, Thanks for sharing the knowledge and videos are very helpful. One query : Tests are now running via TestNG.xml using listneres but since initReports() for Extent is now not present in BaseTest class(before Suite), it will never be called while running independent test class. Any way to handle this so that report gets generated by running test case independently or via TestNG.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Though there are ways. But a good framework should have only one entry point.
@abhibhatt5231
@abhibhatt5231 3 жыл бұрын
Nice videos Amuthan. One doubt- is it recommended to pass 3-4 arguments in a method like sendkeys or click(as you are passing locator,wait strategy, value, and now element name)?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Yes Abhi. It is alright to pass three parameters to the send keys method. All three of them have their own role. Instead of writing multiple line to handle wait, then to click, then to write in logs this should be better approach.
@prdp4747
@prdp4747 Жыл бұрын
Hi, Amutan. I have one doubt, In Driver class you have used unload() after DriverManager.getDriver().quit();similarly where are we using ExtentManager.unload()?
@Payazee
@Payazee 3 жыл бұрын
19:49 report will be very big if we insert each actions in reports if we have many field? Is there a way to avoid?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
You can maintain log levels and filter accordingly.
@amolsapakale
@amolsapakale 3 жыл бұрын
Great videos Amuthan, really liked your videos and subscribed your channel :) Also could you please tell me- How can I change names of "Tests with data provider annotations" in the extent reports? All the tests using the same data provider shows the same test names in the extent reports.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Amol., Welcome aboard and I am glad you liked the content. Ha ha, whatever you have asked is a very good requirement. There are multiple ways to achieve this. 1. You can try to use IDataProvider Listener to customise. 2. If you want to append values from the test iteration data to test description then you can watch part 30 and 31 of the selenium framework playlist. 3. Please wait for sometime, i will also include a video about this.
@amolsapakale
@amolsapakale 3 жыл бұрын
@@TestingMiniBytesokay i will try to do that. Thank you🙂
@lka5968
@lka5968 3 жыл бұрын
Amuthan, Somehow after moving the content from ExtentManager to ExtentLogger, and running the testng.xml, I am now having 4 tests running instead of 2, and out of those 4 tests, one test is not having logs, and the other test is having its logs(as you discussed in the previous video by telling the ThreadLocal implementation). I have debugged from my side - Replicated the ThreadLocal implementation as you do - Checked the chrome driver version, Even changed it Still having the same issue. Can you guess where the issue is?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Please reach out to me in my telegram group
@lka5968
@lka5968 3 жыл бұрын
@@TestingMiniBytes what is the telegram group name? How shall I get added into that group?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
@@lka5968 t.me/joinchat/cJX1FmzfntJhMTg9
@lka5968
@lka5968 3 жыл бұрын
@@TestingMiniBytes joined, thanks
@vishalchaudharyvishalchaud7737
@vishalchaudharyvishalchaud7737 2 жыл бұрын
Amuthan, in src/main/java I have created the package for listeners and then class just like you did but I am not getting the ITestListener and ISuiteListener Interface to implement in the Listener class what can be the reason?
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
From testng 7.0 version, those methods are made to be default. So you have to type yourself or copy paste the default methods from itestlistener, isuitelistener
@vishalchaudharyvishalchaud7737
@vishalchaudharyvishalchaud7737 2 жыл бұрын
@@TestingMiniBytes Resolved but now instead of 2, 4 times it is exectuing?
@monikabisht5821
@monikabisht5821 3 жыл бұрын
right now I m working on the extent report part and your videos helped a lot thanks. please attach the code
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Monika, Glad my videos are helpful. I have made an extensive playlist of extent reports. You can also have a look at it. Welcome aboard and have an exciting learning journey:)
@prabhukrishnan6017
@prabhukrishnan6017 2 жыл бұрын
Hi Amuthan this is an excellent content I've one query, so we are using the Listeners for test case executions status but in the test page, the user can access the methods from ExtentReport, example initReports(), flushReports() can we restrict that by inherting the ExtendReport in TestListners class by giving the protected access in ExtentReport, is this the good approach? like below public class ExtentReport { //but we can't make the ExtentReport as final protected static void initReports() //protected access { if(Objects.isNull(extentReports)) { extentReports = new ExtentReports(); ExtentSparkReporter spark = new ExtentSparkReporter(FrameworkConstants.getReportPath()); extentReports.attachReporter(spark); } }} public class TestListener extends ExtentReport implements ITestListener { public void onTestStart(ITestResult result) { //code to handle the report } } But if one extends the ExtentReport class, they can access the methods in ExtentReport class(initReports(),flushReports(),createTest() ) How we can I restrict that or what is the better approach ? And can I move the testListener class to Report class? //to get default access from the package
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
You should only inherit if there is proper IS A relationship. Dog can extend Animal because Dog is An Animal But TestListener is Not A Extent report. Code reusability is not a priority
@prabhukrishnan6017
@prabhukrishnan6017 2 жыл бұрын
@@TestingMiniBytes yes, forgot this one, thanks a lot :)
@VintageVibes
@VintageVibes Жыл бұрын
Hey, Can you send me the link of Listener video
@jagdeep1sohal
@jagdeep1sohal 2 жыл бұрын
Hi Amuthan, You created listeners package in src/main/java but how are you able to find the testng library in main package. Did you add the testng libraries manually apart from using in the pom.xml
@pradheepsivakumar6329
@pradheepsivakumar6329 2 ай бұрын
By default in maven testng dependency test will be there if you remove this, we will be able to add testng dependency in src/main/java as well.
@nayanagopinath669
@nayanagopinath669 2 жыл бұрын
Amuthan, Thanks for sharing the knowledge and videos are very helpful. One Doubt: If the method is failing , how we have to handle with ExtentLogger ? means either it pass or fail with a single line of code how can we handle?
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Continue watching the framework. We wil use listeners to log failure to report
@nayanagopinath669
@nayanagopinath669 2 жыл бұрын
@@TestingMiniBytes sure Thank you 👍
@manasranjan3854
@manasranjan3854 3 жыл бұрын
My extent report is opening in IE by default, what settings do i need to change to open the extent report in chrome browser? please suggest.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
It will open in the default browser in the system. If you want to open it chrome, set chrome as your default browser in your machine.
@manasranjan3854
@manasranjan3854 3 жыл бұрын
@@TestingMiniBytes Thanks
@prashantrajput3989
@prashantrajput3989 2 жыл бұрын
Hi, I have added testng in my pom.xml still getting an error “The import org.testng cannot be resolved”. I have been using testng 6.14.3.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Are you behind corporate proxy
@prashantrajput3989
@prashantrajput3989 2 жыл бұрын
@@TestingMiniBytes How to check that? Also, on adding external testNg jars, issue is resolved but its picking testng from other location. Instead of .m2 repository, its picking it up from .p2 repo.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
@@prashantrajput3989 you can change that location to refer m2
@prashantrajput3989
@prashantrajput3989 2 жыл бұрын
@@TestingMiniBytes not getting an option to do that.
@IS-mb1qj
@IS-mb1qj Жыл бұрын
I am trying to implement the listeners but every time I run the tests after implementing them it returns tests ignored and just keep spinning without executions
@IS-mb1qj
@IS-mb1qj Жыл бұрын
Sorry my bad was a typo, I chose getTestname instead of getName()
@RahulKumar-oe8bh
@RahulKumar-oe8bh 3 жыл бұрын
When i run more than 10 test cases in parallel, I am getting wrong Extent report because, Execution show Test A got fail but in report is show Test B fail with A's screenshot result mismatch can you please guide how to solve this
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
It is not possible as long as you have used Thread local to handle thread safety. I have used the same code to run 100 tests in parallel
@lingeshsd3213
@lingeshsd3213 3 жыл бұрын
Hi Amuthan, is there any way to convert this extent HTML report into a pdf file format. please suggest any solution for this. for cucumber extent to pdf, I saw about this "github.com/grasshopper7/extentreports-cucumber6-adapter". same like for our framework is it possible?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Thats a cucumber plugin to convert cucumber results to pdf. There is no direct way to achieve. But you can try openhtmltopdf, apache fop can convert xml to pdf or wkhtmltopdf libraries to cater your needs.
@lingeshsd3213
@lingeshsd3213 3 жыл бұрын
@@TestingMiniBytes thanks amuthan bro for quick reply. Let me check that above mentioned things... It also nice you make video on this topics... It will be more helpful to understand deeply and for others also who are all looking for same queries.
@lingeshsd3213
@lingeshsd3213 3 жыл бұрын
@@TestingMiniBytes bro also please suggest any other reporting tool that generates results in pdf format.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
@@lingeshsd3213 just give me sometime i will work on this pdf report
@dishankramawat1088
@dishankramawat1088 2 жыл бұрын
Extent reports showing old data tried debugging no success.
@prachijoshiporwal3353
@prachijoshiporwal3353 2 жыл бұрын
How to use Listeners in Junit My project is not using Testng and need to write extent report whenever tests fails along with pass tests too. Its simple junit groovy project .
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
You have after test call back, after each call back
@prachijoshiporwal3353
@prachijoshiporwal3353 2 жыл бұрын
@@TestingMiniBytes thanks for reply really appreciate i tried it but it doenst have ITestresult in junit
@lifeindubaiwithtarang1804
@lifeindubaiwithtarang1804 3 жыл бұрын
Can you share the code or github if possible?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
github.com/amuthansakthivel/SeleniumAutomationFramework_KZbin
@zeck9265
@zeck9265 Жыл бұрын
Thank you so much very help full, can you share the code with us?
@TestingMiniBytes
@TestingMiniBytes Жыл бұрын
Amuthan Sakthivel GitHub selenium framework youtube project
@vmaahe
@vmaahe 3 жыл бұрын
Please create class in udemey
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
I already have must know java libraries sdet essentials free course
@bkumarj6450
@bkumarj6450 3 жыл бұрын
Please do attach code as well
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
I will do that in sometime mate.
Selenium Framework - Part 21 -  Eavesdropping your tests - TestNG Listeners
42:53
One day.. 🙌
00:33
Celine Dept
Рет қаралды 64 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 113 МЛН
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
P25 - TestNG Listeners | TestNG | Testing Framework | ITestListener |
55:35
Selenium Framework - Part 35 - Creating your own Exception
30:49
Testing Mini Bytes
Рет қаралды 5 М.
Integrate Extent Report and Logs in Framework
28:16
Mukesh otwani
Рет қаралды 61 М.
One day.. 🙌
00:33
Celine Dept
Рет қаралды 64 МЛН