PAhelper / PhoenixAdult.bundle

Plex Meta-Data Agent for scene videos from multiple adult sites
354 stars 138 forks source link

Nightly pipeline for quality assurance #34

Open pahelper3 opened 5 years ago

pahelper3 commented 5 years ago

Hi, since all of this whole work depends strictly on the DOM of the network sites, have you ever minded about some nightly pipeline which runs every day (sorry, night) and triggers some test units in order to properly check if some website has changed?

I guess that this could be helpful to avoid random failures.

You could pick 3 or 4 scenes for each network and assert that some selectors work properly by returning the expected results, if not, the pipeline fails and sends you the notification.

PAhelper commented 5 years ago

I had not thought of this. I was relying mostly on bug reports or my own experiences to find when things change / break. I've also been trying to write the code to be more resilient to changes in the DOM.

I will see about setting something like this up to run in cron on my own machine. I wouldn't put a trigger like this in the plugin code for fear of being bombarded with emails or alerts as tens, maybe hundreds, (thousands?!) of pervs that are using this agent all hit a site that's changed :P

PAHelper2 commented 5 years ago

If the code was refactored in a way that you could run it generically against a filename, then it wouldn't be hard to put it into some sort of CI pipeline.

Like:

./patester.py "My Neighbor Affair - Allie Haze.mp4"
Matches:
Foo 
Bar
Baz
Testing grabbing metadata from first match...
Title
Summary
Actors

Success!

Something like that could be used against a list of known good file names, and on commits, could just run the testing.

PAHelper2 commented 5 years ago

Doing some investigation, we could potentially use free version of codeship.com to run the tests, once the refactoring makes it possible.