Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go test runner #231

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Go test runner #231

wants to merge 2 commits into from

Conversation

lox
Copy link

@lox lox commented Nov 30, 2024

Description

Implement a go test runner

Changes

Adds a go test runner, with test listing, splitting, etc.

Testing

Pretty extensive go tests.

@lox lox requested a review from a team as a code owner November 30, 2024 20:52
@lox lox marked this pull request as draft November 30, 2024 20:52
@niceking niceking requested a review from DrJosh9000 December 2, 2024 00:54
@niceking
Copy link
Collaborator

niceking commented Dec 2, 2024

Hey @lox! Thanks for this 😁 We'll give it a go (🥁 ) locally and send back any thoughts!

@lox
Copy link
Author

lox commented Dec 2, 2024

I ran into all sorts of problems getting it to actually run and lack of viz into the current pipelines, etc. Lemme know if there is interest over there for a chat, I'm happy to keep contributing on the go side.

@wooly
Copy link
Contributor

wooly commented Dec 10, 2024

Hi @lox

Thanks again for submitting this PR!

We had a small mobbing session today to see if we could get it running with the tests in this repository but ran into a few problems. We tried running the client against a local server (with the Go support change outlined below), but were unable to get things working. The command we used was go run main.go with the relevant environment variables configured.

I ran into all sorts of problems getting it to actually run and lack of viz into the current pipelines

We've added support server-side for Go runners, so you should be able to run this on your prod pipelines shortly to verify that everything is working.

Would you be able to give this a try and report back if things are working?

If you want a hand getting set up then we can schedule a call.

Cheers!

@lox
Copy link
Author

lox commented Dec 11, 2024

We've added support server-side for Go runners, so you should be able to run this on your prod pipelines shortly to verify that everything is working.

Thanks, can you help me understand what this means?

@wooly
Copy link
Contributor

wooly commented Dec 11, 2024

Thanks, can you help me understand what this means?

If you have a test suite collecting Go test results (using gotestsum or some other means to send JUnit data to Test Engine), you can run bktec locally or in a pipeline (you'll have to build your own bktec binary for this) to run an end-to-end test of Go support in bktec. If you want to run things in a pipeline, then this guide should help you get started.

To run this locally, you could export the following env vars after substituting <some-org-slug>, <some-access-token>, and <some-suite-slug> with your own values from Buildkite production:

BUILDKITE_BUILD_ID=1234
BUILDKITE_STEP_ID=5678
BUILDKITE_ORGANIZATION_SLUG=<some-org-slug>
BUILDKITE_PARALLEL_JOB=0
BUILDKITE_PARALLEL_JOB_COUNT=2
BUILDKITE_TEST_ENGINE_API_ACCESS_TOKEN=<some-access-token>
BUILDKITE_TEST_ENGINE_DEBUG_ENABLED=true
BUILDKITE_TEST_ENGINE_RESULT_PATH=results.json
BUILDKITE_TEST_ENGINE_SUITE_SLUG=<some-suite-slug>
BUILDKITE_TEST_ENGINE_TEST_RUNNER=go
BUILDKITE_TEST_ENGINE_RETRY_COUNT=0

NB You'll need to change the BUILDKITE_STEP_ID each time you run go run main.go to ensure unique plans are generated with each run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants