Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

In my click UI Action I have Assert type as Form Submitted to Server. Try setting it to None and see what happens.

BrianLancaster_0-1666807371344.png

 

I set it to None and tried, same result Brian.

API6.PNG

Have you tried Form submission canceled in browser. Maybe it has to do with a UI Policy generating the error. Where mine is a Business rule that stops the form submission. Other than that I'm note sure what else it would be.

I have no idea about that Brian.

Regards

Suman P.

I will give them a suggestion to make the fields mandatory so that I can validate them.

Regards

Suman P.