Laur's blog
Sign in Subscribe

junit

A collection of 1 post
Access Data Files for Local Tests in Android
android

Access Data Files for Local Tests in Android

TL;DR: Put your data files in test/resources and access it with: InputStream inputStream = this.getClass() .getClassLoader() .getResourceAsStream(path); I've got an android application with a module performing data processing (HTML scraping in fact). This part is pure java and all its tests are in the src/
Mar 9, 2016 1 min read
Page 1 of 1
Laur's blog © 2025
  • Sign up
Powered by Ghost