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

chore: test harness interface #7248

Merged
merged 2 commits into from
Jan 20, 2025
Merged

chore: test harness interface #7248

merged 2 commits into from
Jan 20, 2025

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Jan 20, 2025

Extract common logic across Terraform and AWS CDK targets when running tests. This is an initial step towards allowing custom platforms to provide test running capabilities.

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

Extract common logic across Terraform and AWS CDK targets when running tests. This is an initial step towards allowing custom platforms to provide test running capabilities.
@eladb eladb requested a review from a team as a code owner January 20, 2025 13:32
Copy link

Thanks for opening this pull request! 🎉
Please consult the contributing guidelines for details on how to contribute to this project.
If you need any assistance, don't hesitate to ping use over Discord.

return executeTestInHarness(harness, synthDir, options);
}

function createTestHarness(target: string, options: TestOptions) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is to move this to the platform provider in a subsequent commit.

@eladb eladb requested review from skyrpex and ShaiBer January 20, 2025 13:35
@monadabot
Copy link
Contributor

Benchmarks

Comparison to Baseline ⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 56ms±0.65 55ms±0.44 0ms (-0.88%)⬜
functions_10.test.w -t sim 478ms±12.43 508ms±21.43 +31ms (+6.41%)🟥
functions_10.test.w -t tf-aws 2151ms±26.69 2181ms±15.67 +31ms (+1.43%)⬜
empty.test.w -t sim 374ms±10.83 365ms±3.07 -9ms (-2.31%)⬜
empty.test.w -t tf-aws 586ms±3.38 592ms±4.14 +5ms (+0.94%)⬜
jsii_small.test.w -t sim 368ms±3.39 375ms±3.42 +7ms (+1.86%)⬜
jsii_small.test.w -t tf-aws 595ms±2.49 599ms±4.25 +4ms (+0.62%)⬜
functions_1.test.w -t sim 400ms±3.42 400ms±3.33 +0ms (+0.11%)⬜
functions_1.test.w -t tf-aws 830ms±6.95 836ms±6.01 +6ms (+0.69%)⬜
jsii_big.test.w -t sim 2934ms±11.74 2943ms±11.7 +10ms (+0.33%)⬜
jsii_big.test.w -t tf-aws 3120ms±8.78 3129ms±14.86 +10ms (+0.31%)⬜
hello_world.test.w -t sim 402ms±4.68 399ms±2.87 -3ms (-0.7%)⬜
hello_world.test.w -t tf-aws 1496ms±7.27 1485ms±6.42 -11ms (-0.74%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 55ms 54ms 56ms 0ms 1ms
functions_10.test.w -t sim 508ms 482ms 588ms 21ms 30ms
functions_10.test.w -t tf-aws 2181ms 2142ms 2217ms 16ms 22ms
empty.test.w -t sim 365ms 358ms 371ms 3ms 4ms
empty.test.w -t tf-aws 592ms 581ms 599ms 4ms 6ms
jsii_small.test.w -t sim 375ms 366ms 381ms 3ms 5ms
jsii_small.test.w -t tf-aws 599ms 589ms 607ms 4ms 6ms
functions_1.test.w -t sim 400ms 393ms 405ms 3ms 5ms
functions_1.test.w -t tf-aws 836ms 825ms 847ms 6ms 8ms
jsii_big.test.w -t sim 2943ms 2919ms 2970ms 12ms 16ms
jsii_big.test.w -t tf-aws 3129ms 3092ms 3152ms 15ms 21ms
hello_world.test.w -t sim 399ms 395ms 407ms 3ms 4ms
hello_world.test.w -t tf-aws 1485ms 1471ms 1503ms 6ms 9ms
Last Updated (UTC) 2025-01-20 13:43

@eladb eladb merged commit 0dca2e2 into main Jan 20, 2025
13 checks passed
@eladb eladb deleted the eladb/harness branch January 20, 2025 13:49
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.85.47.

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.

2 participants