-
Notifications
You must be signed in to change notification settings - Fork 314
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
Partial characteristic value assertion in macros #131
Labels
Comments
That is true with some buts:
|
|
Implemented internally. You'll be able to provide any Java-compatible regex in both "value" and "valueString" fields of AssertValue. E.g. <wait-for-notification description="Wait for notification to SMP Characteristic" characteristic-uuid="da2e7828-fbce-4e01-ae9e-261174997c48" service-uuid="8d53dc1d-1db7-4cd3-868b-8a527460aa84">
<assert-value description="Assert value matches regex" value="0300[0-9A-F]{4}00000000BF61726[0-9A-F]48656C6C6F20[A-F0-9]*FF"/>
</wait-for-notification> |
Regex matching has also been added to Automated Tests to AssertValue tag to "value" attribute. It was there for "valueString" already. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently the assert-value macro command has to match the entire characteristic value. This can be problematic if it also contains a non-deterministic field, e.g. time.
Describe the solution you'd like
Some form of partial value assertion (e.g. regex, wildcard character or mask) could be useful if you only want to match specific characters in the characteristic value.
Describe alternatives you've considered
I'm not aware of any alternative if you don't have control over the characteristic contents.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: