I have done HybridFramework using Extentmanager report facility.
It running but not creating log details.
please advice..
Even I am unable to toggle Theme plus not able to go on Dashboard
Instructor
Ashish Thakur Replied on 23/04/2020
have you given test.log messages in test cases?
Yes Still Not displaying logs and one more thing not able to toggle theme even not able to go on dashboard
please advise
package testcases;
import org.testng.annotations.Test;
import com.aventstack.extentreports.ExtentReports;
import com.aventstack.extentreports.ExtentTest;
import com.aventstack.extentreports.Status;
import com.qtpselenium.driver.DriverScript;
import com.qtpselenium.util.ExtentManager;
import com.qtpselenium.util.Xls_Reader;
public class LoginTest {
Xls_Reader xls=new Xls_Reader(System.getProperty("user.dir")+ "//TestCases3.xlsx");
String reportPath=System.getProperty("user.dir")+"//reports//";
@Test
public void loginTest() {
ExtentReports rep = ExtentManager.getInstance(reportPath);
ExtentTest test =rep.createTest("LoginTest");
test.log(Status.INFO, "Starting Login Test");
DriverScript app=new DriverScript(test);
test.log(Status.INFO, "Login Test Executed ");
app.executeTest("LoginTest", xls);
test.log(Status.PASS, "Login Test Passed");
rep.flush();
}
}
Yes Still Not displaying logs and one more thing not able to toggle theme even not able to go on dashboard
please advise
package testcases;
import org.testng.annotations.Test;
import com.aventstack.extentreports.ExtentReports;
import com.aventstack.extentreports.ExtentTest;
import com.aventstack.extentreports.Status;
import com.qtpselenium.driver.DriverScript;
import com.qtpselenium.util.ExtentManager;
import com.qtpselenium.util.Xls_Reader;
public class LoginTest {
Xls_Reader xls=new Xls_Reader(System.getProperty("user.dir")+ "//TestCases3.xlsx");
String reportPath=System.getProperty("user.dir")+"//reports//";
@Test
public void loginTest() {
ExtentReports rep = ExtentManager.getInstance(reportPath);
ExtentTest test =rep.createTest("LoginTest");
test.log(Status.INFO, "Starting Login Test");
DriverScript app=new DriverScript(test);
test.log(Status.INFO, "Login Test Executed ");
app.executeTest("LoginTest", xls);
test.log(Status.PASS, "Login Test Passed");
rep.flush();
}
}
Instructor
Ashish Thakur Replied on 29/04/2020
Please make sure that you have specified all the dependencies correctly.
This usually happens when the dependencies are not added properly.
One ore thing. also mane ure that project is using JDK8 by default.
My project is using JDK12 so it wont create logs in the reports?
And even look at the dependencies I am attching file herewith
Instructor
Ashish Thakur Replied on 04/05/2020
1) Please use JDK 8
2) Latest version of extent report is 4. Please use that. Extent manager file will also be changed. Please refer this link for the latest video on extent reports:
https://www.qtpselenium.com/selenium-tutorial/testng-selenium-framework-part-4
But with earlier version of extent report it should work i mean below 4
according to earlier videos ??