Is go test the wrong tool to use for a pure test harness?

108 views
Skip to first unread message

dave bronte

unread,
Aug 13, 2023, 1:28:54 PM8/13/23
to golang-nuts
Forgive me for what might at first glance look like a provocative subject line - it's not meant to be.

The team that I work in has been asked to develop a system that will test a web service. We won't have access to the source for the web service so we're going to need to test it in its deployed state.

For a number of reasons, Go would probably be a first choice for the team but 
it's my understanding that if we use "go test" then the code will only get built as a precursor to running the tests.

As I currently see it, this would mean we couldn't have the benefit of a CI build without also  incurring the penalty of running a (potentially very slow) set of tests.

Note that I'm not suggesting that we don't automate the running of the tests too, just that we'd like to decouple that from the check-in/build process.

I may be missing something glaringly obvious to others but are Go and Go Test just the wrong tools for this problem?

Sean Liao

unread,
Aug 13, 2023, 1:37:29 PM8/13/23
to golang-nuts
you can compile a test binary with `go test -c` and execute it later

- sean

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/67481799-1f2c-47af-b242-446fe32d651bn%40googlegroups.com.

dave bronte

unread,
Aug 13, 2023, 4:50:51 PM8/13/23
to golang-nuts
I didn't know that.

That's the glaringly obvious thing that I was looking for that wasn't obvious to me!

Thank you! 
Reply all
Reply to author
Forward
0 new messages