Some thoughts on a chromecast connected test runner
Our go to architecture is often a ports and adapters (hexagonal) architecture where we have a plain old code application core and technology specific adapters around the edge glueing our app into the real world. We are very comfortable testing technology specific adaptors on other systems like s3, android views, most of the ios bits, crud operations on databases etc etc; but when it comes to chromecast we are seriously lacking.
Our chromecast receiver still conforms to a hexagonal design but in the case of the cast sdk adapters we have gone down the path of “mock classes you dont own”. So its all just a little bit risky, it gave us confidence at the time — but with a half life.
One thought Ive had is around using the sender sdk in a headless chrome coupled with a “test runner” receiver. I think i could serialise commands and responses over the wire using custom message channel. Therefor we could load tests into the reciever, execute them and report results back to the client.
If I have time, or I can inspire anyone out there to have a go, ill report back with results.
I think the first thing to try would be boot strapping a simple test with one assertion in it.
Then next up would be actually sending through normal media style commands like a load operation.
Anyway, if you want to give this a go, drop me a line!