Dynamic silent test skipping

123 views
Skip to first unread message

Alexandre Delisle

unread,
Apr 18, 2012, 4:29:33 PM4/18/12
to testng-users
Hi,

I have some complex test methods chaining with conditions and I'm
currently using SkipException as that is the only way to achieve what
I want.

But logs are polluted with SKIPPED tests. Some are supposed to be
skipped and some others I don't want to know about, so I can't just
filter out everything marked as skipped.

I explored IAnnotationTransformer but I can't know which test to
disable before some of them have ran.

Is it possible to disable a test while they all are running, assuming
the particular one hasn't run yet?

I'd do a SilentSkipException but customizing everything looks like a
huge undertaking.

Any suggestions?

Thanks,
Alex

Cédric Beust ♔

unread,
Apr 18, 2012, 5:07:07 PM4/18/12
to testng...@googlegroups.com
How about writing your own IReporter that will present the results the way you want them? For example, you could exclude from the reports all the tests that throw SkipException("Don't show this skip in the report").

-- 
Cédric





--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.


Alexandre Delisle

unread,
Apr 18, 2012, 6:39:57 PM4/18/12
to testng...@googlegroups.com
I'm already doing something like that for my reports.

I could write a custom logger and ignore TestNG logs, seems easier than adding a third result state or an execute-time ignore.

Thanks,
Alex

-- 
Cédric




To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.

Ritu .

unread,
Apr 19, 2012, 3:11:31 AM4/19/12
to testng-users
Hi Cedric,

How to do that , what methods to be used , to check for skipped
exception and removal.

Thanks,
Ritu

On Apr 19, 3:39 am, Alexandre Delisle <delisle.alexan...@gmail.com>
wrote:
> >> testng-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages