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

Write a script to run e2e test #237

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

nprizal
Copy link
Contributor

@nprizal nprizal commented Dec 10, 2024

Description

We now have four runners supported in bktec. Since we have sample projects for each test runner that we use for unit and integration tests, I thought it would be great to use those sample projects to run end-to-end tests. This PR adds a script that runs bktec (using go run …) against a sample project located in internal/runner/testdata.

To run the e2e test:

#.bin/e2e <runner> <parallel-job>
.bin/e2e rspec 0

@nprizal nprizal requested a review from a team as a code owner December 10, 2024 22:03
@nprizal nprizal self-assigned this Dec 10, 2024
@@ -0,0 +1,5 @@
# frozen_string_literal: true
Copy link
Contributor Author

@nprizal nprizal Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this so we can run bktec from this project using the default command bundle exec rspec ...

@nprizal nprizal force-pushed the create_script_for_e2e_test branch from 93a3c59 to 6c9f25f Compare December 10, 2024 22:09
@nprizal nprizal requested review from wooly and niceking December 17, 2024 04:18
Copy link
Contributor

@wooly wooly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been testing this this morning and think it could maybe use some automation/instruction around bootstrapping.

I'm getting an error relating to bundle install not being run for the rspec test suite, and a module not found error when trying to run it for playwright.

@niceking
Copy link
Collaborator

niceking commented Jan 6, 2025

I like this! This just enables running the tests for each language in the bktec repo yeah?

One comment on the usage interface:

#.bin/e2e <runner> <parallel-job>
.bin/e2e rspec 0

I understand why we'd wanna specify the framework as a top level argument into the script here, but I'm less convinced that the script should mandate passing in a parallel job? What possible variance do you see in this argument? IMO if parallel job count has a default then its fine that parallel job has one too

@nprizal nprizal force-pushed the create_script_for_e2e_test branch from 6c9f25f to 86eb84d Compare January 6, 2025 23:03
@nprizal
Copy link
Contributor Author

nprizal commented Jan 6, 2025

I like this! This just enables running the tests for each language in the bktec repo yeah?

Yes, that's right

One comment on the usage interface:

#.bin/e2e <runner> <parallel-job>
.bin/e2e rspec 0

I understand why we'd wanna specify the framework as a top level argument into the script here, but I'm less convinced that the script should mandate passing in a parallel job? What possible variance do you see in this argument? IMO if parallel job count has a default then its fine that parallel job has one too

That's a good point. I've removed parallel job from the arg. You can still set that variable manually as

BUILDKITE_PARALLEL_JOB=1 bin/e2e

@nprizal
Copy link
Contributor Author

nprizal commented Jan 6, 2025

I've been testing this this morning and think it could maybe use some automation/instruction around bootstrapping.

I'm getting an error relating to bundle install not being run for the rspec test suite, and a module not found error when trying to run it for playwright.

@wooly I created a bin/setup to install all dependencies for sample projects. This will be useful for engineers contributing to this repo as well.

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