[vdr] VDR unit testing setup
dvb at flensrocker.de
Tue Jul 30 19:07:12 CEST 2013
Am 30.07.2013 18:37, schrieb Malte Forkel:
> Am 30.07.2013 09:44, schrieb Gerald Dachs:
>> No, it was not misleading, I understood your intention. I wrote it only,
>> because I am sure that you shouldn't user svdrp for your library.
>> Instead you should use the restfulapi or the vdr2dbus-plugin.
> Ah, ok. Thanks for your suggestions.
> I started with those two connection types for the following reasons:
> - They are available with every VDR installation,
> - they promised to provide the most complete and up-to-date access
> because they are included with VDR and the plugins, respectively, and
> - they are supported by the plugins I was most interested in (mostly
> Fortenately, I havn't experienced any conflicts when using SVDRP
> connections in the library. I understand that there can be only one
> active SVDRP connection at any time, potentially causing timeouts. But
> that restriction could be an advantage, too, because it might protect
> against at least some inconsistencies caused by two or more clients
> accessing VDR's data at the same time.
> The library is designed to be extensible with other connection types,
> like those you mention. But unless my scripts run into problems (and
> they havn't so far), I'd rather add some unit tests to what I already
> have first and extend the set of connection types after that (actually,
> the stubs for restful and dbus have already been there for a while :-).
If you want to unit-test your library, wouldn't it be the right way to write an vdr-mockup which returns expected
values for different scenarios so that the behaviour of your library is tested? A "real-life" vdr wouldn't be a good
test case because you never know if you cover all cases.
BTW, my plugin is called dbus2vdr. :)
I maintain a lib with a GDBus/GIO binding (actually just a written-down wrapper for gdbus-codegen and a bunch of
examples as documentation how to us it):
Someone actually has started a Python binding for it:
and a binding for restfulapi:
More information about the vdr