* Added JSON datafiles for TV shows and music videos * Implemented instrumentations tests for MoviesActivity, MusicActivity, TVShowActivity, and AddonsActivity. * Moved RestoreSearchQueryViewPagerTest to music package as it uses the MusicActivity * Moved RestoreSearchQueryListFragmentTest to movies packages as it uses the MoviesActivity * Added scripts to get JSON data for music videos, addons, and TV shows * Added sequence diagram for BaseMediaActivity to clarify new setup * Refactored BaseMediaActivity to comply with diagram * Refactored SyncMusicVideos and SyncTVShows so we can use the same code for adding test data as we use for adding real data. * Removed unused StringBuffer and synchronize block in MockTcpServer
|6 years ago|
|.gitignore||7 years ago|
|JsonTools.pm||7 years ago|
|README.md||7 years ago|
|gentestnumbers.pl||7 years ago|
|getaddons.pl||6 years ago|
|getmovies.pl||7 years ago|
|getmusic.pl||7 years ago|
|getmusicvideos.pl||6 years ago|
|gettvshows.pl||6 years ago|
Here you will find perl scripts that can be used to retrieve JSON responses from a Kodi instance. The scripts are primarily used to create the JSON source files needed by the instrumentation tests.
Getting json responses
Currently there are two scripts available to get media details from a Kodi instance.
getmovies.pl: retrieves movie details
getmusic.pl: retrieves music details
By default the scripts connect to Kodi running on the same machine (
127.0.0.1) on port
If you need to contact a Kodi instance on a different port and/or IP-address change the
following line in each script:
my $url = "http://127.0.0.1:8080/jsonrpc";
Generating test values
The instrumentation tests require some values such as "total number of songs", "list of artistids", "genre ids", etc. etc.
To generate these values from the JSON files, you can run
gentestnumbers.pl. This script expects the JSON files to be located in the same directory you execute the script.
It also assumes the names of the JSON files are the same as generated by