Which is the best assertion to be used Soft or Hard assertions?

50 просмотров
Перейти к первому непрочитанному сообщению

Gumpalli Prasanna

не прочитано,
13 янв. 2022 г., 22:24:1213.01.2022
– testng-users
Hi Team,
Please can you help me understand which is the best assertion to be used ?

Soft or Hard assertions?

Here are few factors i would like to understand about the soft and hard assertions:
1. Execution time
2. Space constraint.
3. Test coverage 


Regards,
Prasanna

Krishnan Mahadevan

не прочитано,
13 янв. 2022 г., 22:34:1113.01.2022
– testng...@googlegroups.com
None of the factors you listed are applicable for both soft and hard asserts. 

Soft asserts - record failures but dont fail the test right away but do it at the end of the test ( when assertAll() is invoked )

Hard asserts - record a failure and break the test execution right at that point itself. 

A quick search on the internet should give you more elaborate tutorials documents regarding hard and soft asserts. 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

From: testng...@googlegroups.com <testng...@googlegroups.com> on behalf of Gumpalli Prasanna <gnlpr...@gmail.com>
Sent: Friday, January 14, 2022 4:22:01 AM
To: testng-users <testng...@googlegroups.com>
Subject: [testng-users] Which is the best assertion to be used Soft or Hard assertions?
 
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/d4119a42-7335-4228-bb8f-d29ccbd98c0an%40googlegroups.com.
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений