Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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