Fork me on GitHub
#cljsrn
<
2018-04-14
>
chris_johnson13:04:16

At Centriq we use Appium to drive integration tests and the way we automate them is to run scripts in CI - just for one scheduled “nightly build” run - that build an APK and IPA and the test-runner package, and then upload all three to AWS Device Farm and run the tests on a pool of ~10 devices. Very much a golden-path smoke test today, but for $500/month (one unmetered “slot” for iOS and one for Android) I feel it’s good value for money to see test runs once a day.

thheller13:04:23

are there any "recent" open source ClojureScript + Expo apps? need something I can use to test my build stuff with

pesterhazy15:04:21

@chris_johnson interesting. AWS Device Farm seems cool, but my reaction is, wow, 500 USD/month

chris_johnson15:04:01

well, yeah, it’s not super cheap but you get a lot for your money

chris_johnson15:04:30

arbitrary code/tests run on real devices, with MP4 video of the test run and screenshots/data output optionally stored alongside the test runs

chris_johnson15:04:52

and if you are careful about how much you use, of course it can be cheaper than that

chris_johnson15:04:27

500 USD/month gets you one “slot” for each platform that you can use 24/7 to run tests

chris_johnson15:04:19

you can also pay by the hour - for us, we hit the breakeven point where 500/month was cheaper than our metered usage, but we are running some double-digit number of integration tests against both platforms and on ~ten devices each platform every day

chris_johnson15:04:59

you could certainly get reasonable confidence in your system at a much lower volume of testing, but we’ve had lots of reports from the field that seem consistent but that we can’t repro locally (for example, lots of weirdness around app loading at all on Galaxy S5s), so for us it’s worth it to see those things exercised every nightly build just in case we finally see the problem and can figure it out

chris_johnson15:04:20

(aside: Android is such a tire fire to support 😐 )

pesterhazy16:04:04

@chris_johnson very valuable information, thanks for sharing!

dilin16:04:09

has anyone used the js fetch api to load local json files? trying to do it but no luck so far

pesterhazy16:04:14

I wouldn't have thought that would be supported. What's your use case @dilin?

pesterhazy16:04:00

I think you can just js/require JSON files, which will then get added to your bundle

dilin16:04:05

i'd like to load the local json files for dev build but use an external api for prod

pesterhazy16:04:52

@dilin have you checked out something like this? https://github.com/typicode/json-server

pesterhazy16:04:00

or I guess pretty much any http server running on localhost will do (I recommend https://github.com/indexzero/http-server)

dilin16:04:36

oh wow that's really cool. that will work for me

dilin16:04:40

thank you @pesterhazy

thheller22:04:01

probably not the best time to post this but if anyone is interested. I made a thing for react-native in shadow-cljs. https://clojureverse.org/t/exploring-react-native-expo-with-shadow-cljs/1969?u=thheller

chris_johnson22:04:08

@thheller I am going to take a very close look at that example project. We are making extensive use of shadow-cljs for our web-facing SPAs and I find the promise of just cutting Metro out of the picture entirely to be very intriguing

chris_johnson22:04:19

I will certainly report anything I find re: final packaging for distribution, runtime issues, etc. once I have had a chance to play around. Our RN project is about the ugliest path of which I am currently aware - we started off using expo but then needed some native capabilities that it doesn’t cover, so now we are running in “detached” mode. This means that we still use lots of ExpoKit libs but actually have to build/launch the native shim layer “by hand” in Xcode or Android Studio. I suspect that this means we are dependent on parts of the exp tooling that aren’t covered by your POC

chris_johnson22:04:21

but if we aren’t

chris_johnson22:04:44

if we could just start using shadow-cljs to build and serve our project? mmmm, delicious