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

Use parameterization to simplify tests #1552

Open
hdost opened this issue Feb 17, 2024 · 9 comments
Open

Use parameterization to simplify tests #1552

hdost opened this issue Feb 17, 2024 · 9 comments
Assignees
Labels
good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers/approvers

Comments

@hdost
Copy link
Contributor

hdost commented Feb 17, 2024

Consider the use of parameterized tests for scenarios where only the inputs and expected outputs differ, to reduce redundant test code. Rust doesn't support it directly, but there are external crates providing this option e.g., - https://crates.io/crates/parameterized_test , or we can create a custom macro as suggested here - https://stackoverflow.com/questions/34662713/how-can-i-create-parameterized-tests-in-rust/

Not related to this PR, for future :)

Originally posted by @lalitb in #1516 (comment)

@hdost hdost added good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers/approvers labels Feb 17, 2024
@sg126
Copy link

sg126 commented Mar 16, 2024

Hi, would I be able to take a look at this if that's possible? Don't want to interfere if someone else has already decided to hop on this.

@TommyCpp
Copy link
Contributor

Hi, would I be able to take a look at this if that's possible? Don't want to interfere if someone else has already decided to hop on this.

I don't think anyone else is working on it. Assigned it to you. Thanks for the help!

@sg126
Copy link

sg126 commented Mar 20, 2024

Is there a good place that we could put parametrized tests as a starting point or would it be preferred to have this in all applicable areas?

@cijothomas
Copy link
Member

Is there a good place that we could put parametrized tests as a starting point or would it be preferred to have this in all applicable areas?

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/src/metrics/mod.rs This would be a good place to begin

@sg126
Copy link

sg126 commented Mar 20, 2024

Perfect, thank you. I'll get started there

@cijothomas
Copy link
Member

@sg126 hey just checking if you are still planning to work on this! Let us know if you need help with anything to unblock!

@sg126
Copy link

sg126 commented Sep 12, 2024

Hey! Super sorry for the delay, I've been off due to things taking up my time. I will unassign myself. Sorry for the inconvenience!

@sg126 sg126 removed their assignment Sep 12, 2024
@PvVismitha
Copy link

@cijothomas can I take up this issue

@cijothomas
Copy link
Member

@cijothomas can I take up this issue

Yes sure! Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers/approvers
Projects
None yet
Development

No branches or pull requests

5 participants