java - How to handle system.exit in the cucumber test case -
newbie cucumber , selenuim in java
i calling method in cucumber test case , there if goes else part send mail , exit system.when running method cucumber send mail , exit test case. how resolve that
and after using selenium want open browser , check mailbox check mail has sent code or not.
you can use runtime.getruntime().addshutdownhook(hook);
when invoke method, thread hook
called whenever vm wants shutdown (including when system.exit()
called). can add validation in hook
thread.
check java doc more information shutdown hook.
Comments
Post a Comment