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

Ability to specify expected ATT error code #31

Closed
simonratner opened this issue Feb 24, 2017 · 5 comments
Closed

Ability to specify expected ATT error code #31

simonratner opened this issue Feb 24, 2017 · 5 comments

Comments

@simonratner
Copy link

For read/write ops, in addition to expected="FAIL", it would be great to be able to specify the expected ATT result code, and pass the test only for that result (test should still fails on any other error):

<write ... expected="FAIL" expectedResult="145" />
@philips77
Copy link
Member

Interesting. I'll look into it.

@philips77
Copy link
Member

Hi, I've just released version 4.10.0 on Google Play. It doesn't have the feature you requested for, as I didn't have time ti test it. However, here's you special build:
nRFConnect-4.10.0-expected-error-codes.apk.zip

I hope it works. I changed expectedResult to expectedErrorCode. This is only checked with expected="FAIL" and accepts integer values > 0. Timeout has code 8.
I did not test it AT ALL, but I trust my code ;) If you find some time to check it, feedback would be appreciated.

Also, mark that there are now 2 other operations available in Automated Tests and Macros: sleep-if and sleep-until. They take same attributes as for example write. One sleeps until characteristic value is equal to given value (works when notifications are enabled and value can be changed, or, in case of macros, on server on writable characteristics) or timeout occur. Second one sleep until char value is not equal to given value or timeout occur.

Sorry for the delay, couldn't implement it faster... ;)

@simonratner
Copy link
Author

Seems to work, based on one very quick test. Thanks! ;)

@philips77
Copy link
Member

Hi, did you have some time to test it more precisely?

@simonratner
Copy link
Author

simonratner commented Feb 28, 2017 via email

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

No branches or pull requests

2 participants