2

enter image description here

enter image description here

I have created testcases in eclipse. I am trying to run that using TestNG, it displays output in console for fail and pass testcases, but I have open emailable-report.html from the test-output folder, but it is blank. Please give me reason for why it is display blank?

10
  • What code are you running? What code are you testing? Commented Dec 3, 2016 at 3:22
  • <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "testng.org/testng-1.0.dtd"> <suite name="Report Suite" > <test name="Report Test"> <classes> <class name="com.sevenbits.diecast.AccountPage"/> </classes> </test> <!-- Test --> </suite> <!-- Suite --> i am running report.xml file which i have generate
    – Rutvi Soni
    Commented Dec 5, 2016 at 5:18
  • Edit your question and append this to the description for better readability. Commented Dec 5, 2016 at 5:22
  • with referance of seleniumeasy.com/testng-tutorials/… this url i have try to generate report but it is not working
    – Rutvi Soni
    Commented Dec 5, 2016 at 5:37
  • Hi can I see your testng.xml? Also undo step num 2 and check default listener. and also remove this lines from testng.xml <listeners> <listener class-name="org.uncommons.reportng.HTMLReporter"/> <listener class-name="org.uncommons.reportng.JUnitXMLReporter"/> </listeners> after that run your code and refresh project.
    – Sagar007
    Commented Dec 5, 2016 at 5:53

1 Answer 1

2

As per your configuration link that provided in comment , There is step num 3 is missed.

Please update testng.xml to

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "testng.org/testng-1.0.dtd">; 

<suite name="Report Suite" >
<listeners>
    <listener class-name="org.uncommons.reportng.HTMLReporter"/>
    <listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
</listeners>
    <test name="Report Test">
        <classes>
            <class name="com.sevenbits.diecast.AccountPage"/>
            <!-- <class name="com.sevenbits.diecast.Register"/> -->
            <!-- <class name="com.sevenbits.diecast.LoginPage"/> -->
        </classes>
    </test>
    <!-- Test -->
</suite>
<!-- Suite -->

Now run project from testng.xml :

Right click on testng.xml and run as TestNG.

Please let me know If there is any query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.