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

Add tests for hardware components exception handling #1530

Open
bmagyar opened this issue May 8, 2024 · 5 comments
Open

Add tests for hardware components exception handling #1530

bmagyar opened this issue May 8, 2024 · 5 comments
Assignees

Comments

@bmagyar
Copy link
Member

bmagyar commented May 8, 2024

          > Is it possible to test this in any other way then defining a whole bunch of new test classes?

I'm thinking about setting up a mocker that throws on every call: https://stackoverflow.com/a/61899414

@bmagyar It's a very nice idea. do you want me to do it in this PR, or can I add it in a separate PR in the upcoming days, in the meantime, we can create an issue from your comment and I can assign it to me.

Originally posted by @saikishor in #1508 (comment)

@saikishor saikishor self-assigned this May 8, 2024
@saikishor
Copy link
Member

Address tests of #1730 in the future when adding tests for the exception handling cases.

@christophfroehlich
Copy link
Contributor

And for #1729

@SantoshGovindaraj
Copy link
Contributor

Hello @saikishor, Is this issue open for non-member contributors?
I would like to contribute to this PR.

@saikishor
Copy link
Member

Hello @SantoshGovindaraj

If you are confident to handle this, go ahead. Try to do it using a mocker, so we don't have to create multiple test classes.

Thank you for taking care of this :)

@SantoshGovindaraj
Copy link
Contributor

Hello @saikishor, apologies, I took some time to understand the codebase and starting the work small and slow.
While I was working, I had a few questions to ensure I proceed in the right direction:

  • Is there a preferred location within the codebase where I should add these exception handling tests? Should I modify an existing test file (e.g., for hardware components) or create a new test file dedicated to these scenarios?
  • Are there any specific hardware components or failure cases you’d like me to prioritise when testing exception handling (e.g., initialisation failures, runtime command failures, shutdown issues)?
  • Are there any existing mocking classes or utilities I could reuse for simulating hardware components and their exceptions, or would you recommend creating new mocks from scratch?

Thanks in advance. 🙌 Happy to move forward with your guidance.

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

No branches or pull requests

4 participants