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

refactor(anta.tests): Nicer result failure messages hardware test module #1044

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

Conversation

geetanjalimanegslab
Copy link
Collaborator

@geetanjalimanegslab geetanjalimanegslab commented Feb 17, 2025

Nicer result failure messages for following test module.

  1. Hardware

Note: Test with the Unit tests only, not able to test on ATD lab.

Fixes #587

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Copy link

codspeed-hq bot commented Feb 17, 2025

CodSpeed Performance Report

Merging #1044 will not alter performance

Comparing geetanjalimanegslab:fix_hardware_module_failure_msg (dccc1aa) with main (7c9bef4)

Summary

✅ 22 untouched benchmarks

@geetanjalimanegslab geetanjalimanegslab marked this pull request as ready for review February 20, 2025 14:18
"{'DomTemperatureSensor54': "
"{'hwStatus': 'ko', 'alertCount': 0}}",
],
"messages": ["Sensor: DomTemperatureSensor54 - Invalid Hardware State - Expected: ok Actual: ko"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Hardware State, does that mean temperature range like it was previously mentionned? I feel like it is not the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @carl-baillargeon ,
Here , We are validating the same parameter as earlier validation {'hwStatus': 'ko', 'alertCount': 0}}
I have divided this check into two separate messages.,

1. Check for 'hwStatus': 'ok' am updating it as
Sensor: DomTemperatureSensor54 - Invalid Hardware State - Expected: ok Actual: ko

1. Check for 'alertCount': 0' am updating it as
Sensor: DomTemperatureSensor54 - Non-zero alert counter - Actual: 1
Can you please guide me here? Do we need to update the message or validation?

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.

Have nicer result failure messages
3 participants