No error message displayed in to newly created TestNG report | Selenium Forum
M
Posted on 13/01/2016
I would like to see exception for the skip test case but it is not showing me in to newly created Test NG report.

Is it suppose to be displayed in to report for any test case which is skipped by user ?

package test;

import org.testng.SkipException;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

public class YahooNewsTest {


@BeforeTest
public void xyz()
{
System.out.println("Before Executing Yahoo News test");
throw new SkipException("Skiping this test case because of some reason"); //To Skip Test case.
}

M
Replied on 13/01/2016

is it skipping when you run the project and can you upload a screen shot.


M
Replied on 16/01/2016

YahooNewsTest.java
------------------------

public class YahooNewsTest {


@BeforeTest
public void xyz()
{
System.out.println("Before Executing Yahoo News test");
throw new SkipException("Skiping this test case because of some reason"); //To Skip Test case.
}


Result.
---------------

Before Executing Yahoo News test
SKIPPED CONFIGURATION: @BeforeTest xyz
SKIPPED: testnews

===============================================
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 0, Skips: 1
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 0, Skips: 1

Responsive image

M
Replied on 17/01/2016

[quote:11xio0u7]Is it suppose to be displayed in to report for any test case which is skipped by user ?
[/quote:11xio0u7]

yes it is supposed to show it in reports.