Wednesday, August 8, 2018

Need help unit testing

So I have a function that literally queries a url for all the load balanced IP addresses so I can get the required logging from each web server in a dmz locally.

How do I unit test something like this? I'm new to unit testing In general and have a bunch of functions that do different stuff like this. Is my code just not written in a testable way or am I just not getting it.

Basically I know I can validate if the values in my return are the correct format with an assertion but I dont know how to get those values to begin with since they come from a source on the internet.

Any help or direction appreciated.

Need help unit testing Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team