Migration to AndroidX
- Update to API level 29
- Update Java sourcecode and xml import statements
- Upgrade Butterknife Version 10 AndroidX support
- Set Java 8 compile options due Butterknife needs it
Added support for handling multiple playlists in the Mock TCP server.
Refactored SlideUpPanelTests to support the new playlist handler.
Some code cleanup and enhancements
- Removed throw exception declarations from methods that never throw the exception.
- Changed deleting the test database on the test device to delete all databases.
The former method of only deleting the test database resulted in many old databases
that were not removed when the test run crashed.
- Enhanced robustness of testing async code by explicitly waiting for a view
to reach a certain state.
* Removed redundant configureHostInfo
It was only used to set the Kodi backend version which is also
set using setKodiMajorVersion.
* Removed unused annotations and throwables
* Improved robustness of SlideUpPanelTests
Replaced explicit sleeps with the waitForView action.
Fixed issue in waitForView action as it required the UI
to be idle which is mostly not the case for the bottom
panel with the progress indicator.
* Improved robustness of eventserver
When eventserver handles a wrong payload this should not crash
but simply show a log message and let the actual test fail.
* Fixed Espresso not waiting on ViewPager switching
* Removed BaseMediaActivityTests abstract class.
Unfortunately the click action on list items now requires
a unique item to be able to select the item to click.
Therefore the tests from BaseMediaActivityTests have been
moved to the specific test classes. This made the
BaseMediaActivityTests class obsolete.
* Removed dependency on Context class in AddonsHandler and inlined
the json data to allow the AddonsHandler to be initialized before
the test activity is started. This was needed to have the
AddonsActivityTests directly start the AddonsActivity, instead of
first starting MoviesActivity and from there start the AddonsActivity.
During tests, activities were not closed properly causing increasing
memory usage, which resulted in failing tests because of
out of memory errors.
This has been fixed by using the test orchestrator which runs
each test in its own instrumentation instance.
Removed the instrumentationTest flavor and replaced it by using the
default debug build type. The flavor was used to keep the required
permissions during testing separate from release versions. This can
also be accomplished using the debug build type.
The PagerSlidingTabStrip from astuetz doesn't work with the new
android build tools. As the project seems dead, I replaced it with
PagerTabStrip from the support library.
Refactored MusicListFragment and PVRListFragment to use AbstractTabsFragment
Fixed scrolling in a nested scroll view using espresso
Fixed issue with setting and checking Kodi major version
* Added two abstract methods setSharedPreferences and
configureHostInfo to allow test classes extending
AbstractTestClass to set preferences or change the host info.
* Implemented a mock event server to test event server commands
* Implemented a handler to handle JSON input events over HTTP
* Fixed issue with selecting tabs
* Fixed issue with switching host on other thread than UI thread
* Fixed concurrent modification exception in JSONConnectionHandlerManager
* Fixed issue with drawer not closing
* Fixes issue with running method only supported on API 21 and higher
* Fixed issue with opening drawer and Espresso not waiting for
when drawer was actually opened.
* Implemented new handlers for MockTcpServer to test
media control functions.
* Decreased delay for sending reponses in MockTcpServer from
1 sec to 100 ms. This was needed to prevent race conditions with
the progress bar that increases automatically once per second.
* 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
* Updated travis build to include running local tests for each PR
* Removed unused methods from Utils.java
* Moved all resources required by both local and instrumentation tests
to testUtils
* Added proguard rules for the test builds to prevent proguard from discarding
the junit classes
This applies the fix for issue #219 Incomplete libraries for movies and
TV shows.
For music items this was already fixed in PR #236
See commit 7330f85241
* Added perl tools to generate json files for music and movie data
* Upgraded build tools version, sdk compile version, and support libraries
as this is required by the test packages.
* Added new product flavor instrumentationTest to make sure assets and settings
required for testing do not also ship with a release version of Kore