Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Soft Assert and returning whether it passes or not

View previous topic View next topic Go down

Soft Assert and returning whether it passes or not

Post by wilnicm on 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

wilnicm

Posts : 1
Join date : 2014-08-18

Back to top Go down

Re: Soft Assert and returning whether it passes or not

Post by nabhanya.varma on 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.

nabhanya.varma
Active particpant
Active particpant

Posts : 13
Join date : 2014-03-02

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum