dimanche 31 janvier 2016

e2e or Unit Test a Chrome Plugin that reads live website data

I have a contact scraper chrome extension that works with a few different target websites allowing the user to extract structured data for further processing.

It modifies the DOM of the target website and injects a data collection button that pushes into an angular form running in the chrome extension.

Everything works fine, but my problem is that the underlying websites sometimes change their structures and I would like to run a test regularly against the target sites to pickup any issue.

I have used some Javascript Unit Test environments before such as mocha, should and would like to use a something like these for this inside of the chrome extension.

The articles I've currently read, talk about mocking out chrome api's which is fine for just testing your functions, but not so good about testing against the target websites.

What I want to do is set the current address bar to a specific URL, wait for that DOM to load, then iterate over the DOM searching for expected content selectors.

I'm wondering if anyone has any guidance towards solving this problem?

Contact Scraper

Aucun commentaire:

Enregistrer un commentaire