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

How to update ListView in Android?
How print or debug chef attributes?
Java: Other possible forms for return statement
Android NullPointerException on button click [duplicate]
Writing a JerseyTest for an external tomcat server
Android action overflow drawn on top of ActionBar
I couldn't get correct answer for my code [closed]
Android Mysql get specific data from table
Java 8 TYPE_USE annotations not behaving if array is annotated inside List or Map
From LoginActivity to HomeActivity (Android/Java)
Using a pre-made C++ library in Java using JNI
JPanel/JButtons disappear after JFrame addition of background image
How is RecordReader initialize invoked in MapReduce API?
Multiple Word Highlighting in Java
Multiple keybindings on one key?
Trouble passing parameters

Categories

HOME
hive
testng
listview
hook
proxy
server
homebrew
iterator
office365api
session
vmware
sd-card
octobercms
analysis
frameworks
blueprintjs
in-app-purchase
ssl-client-authentication
offline
imacros
php-7.1
windows-azure-storage
timeout
decimal
carthage
lombok
uitypeeditor
dosgi
fatal-error
angular-ui
evopdf
excel-vba-mac
beyondcompare
nhibernate-envers
abi
mustache.php
java-7
tdd
centos6.5
traffic
maquette
saas
large-file-upload
srcset
nouislider
fabric8
pdb
scorm2004
column-family
calibre
mozilla
streamsets
webdriver-manager
avro4s
google-closure
bootstrap-dialog
outlook-api
import-from-excel
avconv
worksheet
aurelia-validation
ifs
mcafee
dynamics-sl
django-scheduler
account-kit
smart-table
rotativa
azure-virtual-network
database-optimization
phishing
testng-dataprovider
energy
wso2cloud
lib.web.mvc
feedback
wireshark-dissector
splash
sortedlist
dd
tablelayout
asp.net-dynamic-data
phalanger
internet-connection
valuechangelistener
ms-project-server-2010
cdc
dexterity
dataservice
ora-00911
hungarian-algorithm
chronoforms
seed
sqlperformance
sharp-repository
distutils
nsnetservice
pysimplesoap
parametric-equations
punbb
custom-backend
gnu-prolog
libc++
subgurim-maps
xfbml
visitor-statistic
digest-authentication
forums
ext3
multi-tier
backcolor
spec#
genealogy
uiq3

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