Commit Graph

7 Commits

Author SHA1 Message Date
DoomMortal 5299e8e607 Migration Tests to AndroidX
Fix import statements to AndroidX
2020-04-26 19:13:07 +02:00
Francesco Bonazzi b14524963f Stream local files with NanoHTTPD server (#681)
Added local file browser. NanoHTTPD is used to create a local HTTP server to allow to stream files stored on in Android device to Kodi. Added support for multiple local files streaming.
2019-12-03 18:17:19 +00:00
Martijn Brekhof f024c13ca5 Implemented UI tests for PlaylistFragment (#658) 2019-09-30 12:35:17 +01:00
Martijn Brekhof 3b2447607b Implemented support for handling multiple playlists in tests (#657)
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.
2019-07-03 18:54:51 +01:00
Martijn Brekhof d1d8412654 Refactored unit tests (#643)
* 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.
2019-06-11 08:47:11 +01:00
Martijn Brekhof d634d9455e Refactored instrumentation tests to support RecyclerViews
* 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.
2018-09-09 14:09:59 +01:00
Martijn Brekhof f631efeca9 Fixed issue with running many instrumentation tests (#536)
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.
2018-05-03 11:04:04 +01:00