paypal / SeLion

Enabling Test Automation in Java

Home Page:http://selion.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exception override by softassertion error stack in SeLionAssertsListener.java

kevinx701 opened this issue · comments

SeLion Version

1.2.0 and 2.0 SNAPSHOT

Component

com.paypal.selion.internal.platform.asserts.SeLionAssertsListener

Expected Behavior

condition:
1.there a soft assertion failed.
2. throw another exception.
e.g.
SeLionAsserts.verifyTrue(false);
throw new ElementNotVisibleException("cannot find element");

if test failed and broke by none SoftAssertion issue, SeLionAssertsListener should not update test result and override it

Actual Behavior

cannot get ElementNotVisibleException in test report, following message overwrite it
"exception": "class java.lang.AssertionError:Multiple (2) soft assertion failures occurred..."

Steps to Reproduce

create a test and add two statements:
SeLionAsserts.verifyTrue(false);
throw new ElementNotVisibleException("cannot find element");
run the case and check report.json, search "testMethods": and check information

This is the intended behavior and limitation. Leaving it open though to track -- perhaps the behavior can be improved.