How to run an ATF test positively without failing for the negative test

ServiceNow Use6
Tera Guru

Hi All,

 

Good Evening. I have a scenario where I have to show that an error is displayed but the test should not fail. I am not sure if it can be done. I will explain you step by step via pictures. Kindly help.

API1.PNG

 

Now when I click on Release, it will throw an error.

API2.PNG

Is there a way to read the error without failing my ATF Test case? Any ideas please?

 

Regards

Suman P.

10 REPLIES 10

Brian Lancaster
Tera Sage

Can you show your test step config? I didn't do anything special except add test steps after the fact to validate that it failed.

Hi @Brian Lancaster,

I am not doing much at all. Very basic steps. When I click on Release then the error saying that mandatory fields should be filled shows up.

 

API3.PNG

Did you change anything in the click UI Action? All I did on mine was us Assert Text on Page (Custom UI) as the next test step to verify the error message appears.

The problem is, as soon as it clicks on Release, that's the end, right? It won't assert the error anymore. When I try to do as you said, it is saying

API4.PNG

API5.PNG

Regards

Suman P.