Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
wilnicm
Posts : 1
Join date : 2014-08-18

Soft Assert and returning whether it passes or not Empty Soft Assert and returning whether it passes or not

Mon Aug 18, 2014 8:26 pm
Hi i've been trying to find a way to implement soft assert that returns something so i can tell whether it passed or fail

Currently i'm using the

import org.testng.asserts.SoftAssert;
import org.testng.Assert;

I don't really want to use the hard assert since i don't want my test to stop when fail, I only want to use the hard
assert in certain situations where i feel like its feasible.  I'd like to use the soft assert for atleast 70% of my situation. I want to have a return
value. 

Almost all of the return value in this import org.testng.asserts.SoftAssert; class returns void.
Is there is something i'm not thinking about or using.  I'd like something that have some type of return value that i can use
to distinguish whether the test passed or failed.

When using those soft assert the only thing i see when i hover over the soft assert code i'm doing is.

LinkedHashMap - Type
Name m_errors - Name
"size=0" - Value

I dont know if i can even use that.
I"m currently using the ieWebdriver to do my automation testing.

Any help would be greatly apprecieated. Thanks
avatar
nabhanya.varma
Active particpant
Active particpant
Posts : 13
Join date : 2014-03-02

Soft Assert and returning whether it passes or not Empty Re: Soft Assert and returning whether it passes or not

Tue Dec 16, 2014 12:19 am
Asserts are to Say if the test is PASS or FAIL. To make them more meaning full you can have Loggers or Update TestListeners based on your needs.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum