Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

cSharp NUnit - Testcase Fail after driver.quite() being called

View previous topic View next topic Go down

cSharp NUnit - Testcase Fail after driver.quite() being called

Post by l3l00 on Sat Feb 28, 2015 4:22 am

I got it to spit out the results I want, however, I need it to not say that the testcase failed. There is a bug on the webpage and I have it assert if the error message appears. Currently it does, so I tell the testcase to driver.quit() if the assert.areequal is true.
I use a bool called passFail that by default is false, if the error message were not there, passFail would equal true.

How do I get it to have NUnit not say the testcase failed?

l3l00
Active particpant
Active particpant

Posts : 11
Join date : 2015-01-06

Back to top Go down

Re: cSharp NUnit - Testcase Fail after driver.quite() being called

Post by l3l00 on Tue Mar 10, 2015 2:34 am

What I am getting at, say you have a Test Case that ran perfectly since last deployment was made, a bug appears. This bug will crash the Test Case forcing it not to continue (Like some weird error message appears even though it should not on the web page).

So I would create a test case targeting that bug specifically, however the original test case. I then would add like a try catch to the area where this bug appears. If it found that the bug is still exsisting, I would need that test case to end.

I essentially have a global Boolean that by default is false until the end of each testcase where I have it give me the results. However, If the testcase does not reach the end, it will error out. I would like it to quite the testcase, have the boolean give the result as false (which it does) but not have it show error in NUnit.



l3l00
Active particpant
Active particpant

Posts : 11
Join date : 2015-01-06

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