How to validate Discovery patterns (and their results) with ATF?

lucascd
Giga Contributor

Hello guys.

I am working on the creation of test suite to validate as much as possible of the Discovery feature in ServiceNow. I was wondering if anyone has created tests to validate the Discovery Patterns and how these tests could be done.

It would also be nice to validate the CI record is being updated correctly with the values coming from pattern after a successful discovery execution. Any way to do this comparison?

 

Thank you in advance.

 

1 REPLY 1

Jace Benson
Mega Sage

I have this in a backlog of things I want to include for tests on https://atf.jace.pro but the problem is, you can't control when the stuff processes on what mid it processes and such.

Personally, I'd try as part of your test, creating a mid, validating the mid, creating a discovery schedule, creating a set of dockerized things on the new mid and then build schedule with those things.  run the schedule with those things.  wait some duration, verify the discovery found it. 

 

How to do this is beyond me at the moment.