vendredi 5 mai 2017

Testing site crawler

I have a certain code which is a E-Commerce Site crawler,
it browsing some products from different sites, and returns the price and availability.

Through the time, the sites change their layout,
what in some cases breaks my crawler.

I wanted to make an automated tests:

  1. to notice when i need to update my code (to match the new layout)
  2. to test when my code change (standard UnitTests)

My problem, is that i am having trouble realizing how to test something that i don't have control over (the content of the tested site).

e.g. I can't set for sure I am expecting a product to be 10$ and 5 item left.

Aucun commentaire:

Enregistrer un commentaire