java - Differ behavior of a junit-test based on success or no success -


this question has answer here:

i have unit-tests setup @before-method , cleaned @after-method. want @after-method different if test succeed if failed. how can this?

you need use boolean flag in @after method decide want in case of success or failure. can define flag ispassed in test class, turn true if test case passed or turn false in case of failure. read variable in @after method , decide need do.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -