Skip to content

Testing

Dag Wieers edited this page Jul 6, 2019 · 21 revisions

Testing the latest code

It is not that hard to test the latest master branch code for testing or when improving the VRT.NU add-on.

Test the master branch (or any other branch)

By far the easiest way to test the latest and greatest code is by downloading the master branch ZIP archive. You can do this from the GitHub project page using the Clone or download button and clicking Download ZIP.

This also works for other branches, just switch to the user and branch you are interested in, and download the ZIP file using the same process and button as above.

Test from your local tree (with changes)

If you have the project cloned locally, like this:

$ git clone git@github.com:pietje666/plugin.video.vrt.nu.git
$ cd plugin.video.vrt.nu/

First make sure you have the latest copy in your cloned directory.

$ git checkout master
$ git pull --rebase origin master

Make a zip package on Linux

If you made any changes and you want to test those (on Linux), you can make a zip package by doing:

$ make

This will perform some basic sanity checks of your (modified) code and then creates a new zip package.

Make a zip package on Windows

If you made any changes and you want to test those (on Windows), you can make a zip package by doing:

> powershell Build-Zip.ps1

or

> pwsh Build-Zip.ps1

Transfer, install and test

Finally you can transfer this zip package to your Kodi system (if needed).

$ scp -rp plugin.video.vrt.nu-1.6.0-fd627b8.zip root@kodi01:

And install it in Kodi:

Settings » Add-ons » Install from zip file

Tip: Semi-automating zip package installation

An easy way to install a zip file on a remote Kodi system is by running:

$ ssh root@kodi01 kodi-send -a InstallFromZip

This will pop up the "Install from zip file" window so you can select the right zip package and install it with ease.

Reloading the VRT NU add-on before testing

In Kodi the best way to test a new version of the add-on is by loading another add-on first, and then return to the VRT.NU add-on. This guarantees the add-on is started afresh.

Testing on the command-line

Our testing-suite also includes a command-line utility that can run any API call directly.

Show main menu

$ ./test/run.py /
** Running URI: plugin://plugin.video.vrt.nu/
Debug: [plugin.video.vrt.nu][routing] Dispatching to 'main_menu', args: {}
* A-Z -> /programs
* Categories -> /categories
* Channels -> /channels
* Live TV -> /livetv
* Most recent -> /recent
* Soon offline -> /offline
* Featured content -> /featured
* TV guide -> /tvguide
* Search VRT NU -> /search

Show program listing

$ ./test/run.py /programs/buck
** Running URI: plugin://plugin.video.vrt.nu/programs/buck
Debug: [plugin.video.vrt.nu][routing] Dispatching to 'programs', args: {u'program': u'buck'}
Notice: [plugin.video.vrt.nu] URL get: https://vrtnu-api.vrt.be/search?i=video&facets[programUrl]=//www.vrt.be/vrtnu/a-z/buck/&size=300
* 03/07 - Katrien onderzoekt Buck in het ziekenhuis -> /play/id/vid-e1a59c6f-49eb-43f6-95c6-1fde47b55950/pbs-pub-98650577-63c2-4dcc-b8ae-ea84cc82aacc
* 02/07 - Buck leert als een mens te leven -> /play/id/vid-e11ba6ff-259f-46d0-ae61-2bbb60a720e7/pbs-pub-f61cabb6-adc6-424a-a3bd-b094f22f9242
* 01/07 - Hanne en Katrien houden een 'ladies night' -> /play/id/vid-7faef97a-5b49-4e4c-8167-6c255b45b6f0/pbs-pub-56532a92-6df1-4b69-b0ca-c0b8789e78bf
* 30/06 - Elias ontdekt Buck in zijn kleerkast -> /play/id/vid-450e8d44-f6f0-4ae3-9e89-4e3524fe0a0f/pbs-pub-647cf2b7-c478-44df-95be-44aa89dcb622
* 29/06 - Tijdens een onweer kruipt Buck uit een game -> /play/id/vid-99ae77f8-980c-43cd-90b1-f3b2a32c544d/pbs-pub-e389c3a8-ba3e-43fb-80bd-bf8c7febd878
Clone this wiki locally