Firebase Test Lab Step


#1

As part of a migration from Fastlane to Golang Steps, I have ported our Ruby FTL integration to a Bitrise step.

This is my first step so I’m very open to feedback. Currently we’re using the step to run tests successfully on Firebase Test Lab. As we’re using this in production, it’s not an issue for me to spend time fixing up the code.

Also you might not be aware, FTL has an API. For advanced use cases, this is more flexible than wrapping the python CLI.

Thanks.


#2

Awesome, thanks for sharing @bootstraponline!

@tamaspapik check this thread when you have some time :wink:

I think @tamaspapik is well aware :wink:


#3

Go code note:

Here, the idiomatic Go solution is to just use the import, instead of

. "github.com/bootstraponline/bitrise-step-firebase-test-lab/utils"

just

"github.com/bootstraponline/bitrise-step-firebase-test-lab/utils"

and then in your code reference the functions from github.com/bootstraponline/bitrise-step-firebase-test-lab/utils like:

utils.RandomInt()

#4

Hey @bootstraponline!

Good job, and thank you for the share. Yes, we started to develop the new integration with 100% rest API requests straight to the TestLab API.

I think this is simply “utils”. As it is beside of the main package, in a utils folder, and with the package name of utils. (Maybe I am wrong, but worth to check) :grinning:


#5

Trust me, it’s not :wink:

./utils works in e.g. go run and at a couple of other places AFAIK, but only the full path works with every tool (e.g. go get)


#6

Cool. What API lib are you using? The google-api-services-testing.jar which I decompiled for flank?[quote=“viktorbenei, post:5, topic:2269”]
./utils works in e.g. go run and at a couple of other places AFAIK, but only the full path works with every tool (e.g. go get)
[/quote]

Thanks for the info. I will fix.


#7

I think I’ve addressed all the feedback. Let me know if there’s anything else.

I’ve opened a feature request to add retry. FTL is experiencing a large amount of infrastructure failures which require a retry.

Update: I added this feature on master.


#8

As far as I see the endpoints are the same, but using them as clean requests written in our own go api, w/o any 3rd party lib or wrapper.


#9

FYI Firebase TestLab v0.9.0 is an even better option than this step I wrote. :slight_smile: