6. Extent Report With Multiple Classes
Автор: Krishna Sakinala (Automation Testing)
Загружено: 2017-03-26
Просмотров: 24980
Please use the following link to install the Katalon Studio:
https://katalon.com/sign-up?getr=kris... Check Tubebuddy Features Here:
https://www.tubebuddy.com/krishnasaki... Facebook : / automationtesting2016
Linkedin : / krishnasakinala
Google+ : https://plus.google.com/1052863009260...
Twitter : https://www.linkedin.com/feed/?trk=hb...
http://automationtesting.in/extent-re...
Extent Report with Multiple classes will discuss about how to create a single report when you have multiple classes. Usually people will face issue that they will get the report with single class as all the extent reports related classes will be in the same class but when they have multiple classes then they might not get the single report for all the methods which are there in the different classes.
To overcome this issue, we need to create a separate class to declare the extent reports related classes and need to extend that class to access the object of those classes in each class where we need to generate the report for the test methods.
To show this, here we will create a class(i.e. BaseTest) to declare the extent reports related classes and will create 2 more classes(i.e. Functionality1 and Functionality2) to access these objects and will create a single report from these two classes.
The most important thing here is, once you create an object to the extent report classes we need to access the same object in different classes for this we have declare these variables as static then all the instances share the same copy of that variable. And a class variable can be accessed directly with the class, without the need to create an instance.
Below is the BaseTest class where we can declare the classes which are required to generate the extent reports and will configure the basic information for the report how it should generate. As we know that extent reports will use TestNG to generate the reports. Basic configuration is single time activity so we will put that code in @BeforeSuite and @AfterSuite annotations. And will run the code using testng.xml file as we need to run multiple classes at a time.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: