Not Creating Logs in a report | Selenium Forum
C
Chandrakant Sontakke Posted on 23/04/2020

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

 


A
Ashish Thakur Replied on 23/04/2020

have you given test.log messages in test cases?


C
Chandrakant Sontakke Replied on 24/04/2020

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();
}

}

 


C
Chandrakant Sontakke Replied on 24/04/2020

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();
}

}

 


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


C
Chandrakant Sontakke Replied on 02/05/2020

My project is using JDK12 so it wont create logs in the reports?

And even look at the dependencies I am attching file herewith


A
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


C
Chandrakant Sontakke Replied on 04/05/2020

But with earlier version of extent report it should work i mean below 4 

according to earlier videos ??


Related Posts