java


Batch Run does not capture the Exception in Console


Please find the simple program below:
package com.temp.practice;
import org.testng.SkipException;
import org.testng.annotations.Test;
#Test
public class Exp1
{
public void e1()
{
System.out.println("Excpetion Test1");
throw new SkipException("e1--- The test cases is not executed");
}
}
If I execute the above code, I am receiving the SkipException in the console as expected.
But when I have the same kind of code in three different classes and execute them in a batch, the Skip exception is not captured in the console.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="SuiteName" >
<test name="ITest">
<classes>
<class name="com.temp.practice.Exp1"/>
</classes>
</test> <!-- TestB -->
<test name="StroSearch">
<classes>
<class name="com.temp.practice.Exp2"/>
</classes>
</test> <!-- TestB -->
<test name="full">
<classes>
<class name="com.temp.practice.Exp3"/>
</classes>
</test> <!-- TestB -->
</suite> <!-- SuiteName -->
What could be the reason?
The issue is that you haven't specified the verbosity levels in your suite xml. Stacktraces are printed only when there's a verbosity of 2 or more defined in your suite xml. So to see the stacktraces
Change <suite name="SuiteName" >
To <suite name="SuiteName" verbose="2">
and try again. You should see the exception stack-trace on your console.

Related Links

Deserialize list of objects with inner list with Jackson
How to Cast Object in Jpype Python
call jsp for autosuggestion search box by selecting column of database in dropdown list
How to list files and folders from path to tree?
How we click same class name ON button for different field name in selenium webdriver
how to delete padding around image view programmitically in android
How can I pass different length parameter to same class?
Rendering a 1 dimensional array as a grid?
How to get started reading data from magnetic card with a simple bi-direction swipe magnetic card reader?
Reading file in Java Hadoop
javafx NullPointerException with controlsfx Notifications componnets
Mapping a bidirectional One to many relationship with ebean [duplicate]
Java, MongoDB: how to insert into subdocument's empty array
JFrame Displayed Text Won't update
Is it ok to not “join” interrupted threads?
extract multiple columns data from db and write to a file using spark?

Categories

HOME
ibm-bluemix
xamarin
arduino-uno
asp.net-core
coq
image-processing
hashmap
getelementsbytagname
programming-languages
twitter-bootstrap-4
gps
fsm
yum
wamp
webrequest
vault
qt-creator
resize
circular-dependency
n-gram
phaser
clearcase-ucm
foselasticabundle
connection-string
flux
normalizr
interop
grails3
nas
telerik-reporting
php-openssl
emgucv
smb
numerical-methods
qhull
semantic-analysis
virtualdub
fifo
windows-server-2000
c++-amp
preg-match
junit5
textmate
picasso
overriding
ios5
plsql-psp
suricata
qwerty
x11-forwarding
hot-module-replacement
libvpx
hilbert-curve
total-commander
long-polling
smartcontracts
errordocument
pnotify
nstextview
kbuild
sybase-asa
capacity
sqlbulkcopy
gcsfuse
spring-android
skobbler-maps
xml-attribute
storekit
fuzzy-search
firebaseui
captivenetwork
unity-networking
prerequisites
purge
browser-bugs
arcanist
bridge.net
inmobi
device-orientation
fscommand
android-radiobutton
typeof
wp-query
htmlcleaner
typo3-neos
geos
eventlistener
enterprisedb
jelly
unc
cisco-jtapi
automount
tomcat-valve
xmemcached
servicehost
icanhaz.js
forums
castle-monorail
memory-size
javap
sector
putchar
zune
grid-system

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App