Firebase Test Lab Step

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.
https://github.com/TestArmada/flank/tree/master/cloud_testing

Thanks.

1 Like

Awesome, thanks for sharing @bootstraponline!

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

I think @tamaspapik is well aware :wink:

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()

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:

1 Like

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)

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.

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.

2 Likes

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.

2 Likes

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

2 Likes