-
Notifications
You must be signed in to change notification settings - Fork 48
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
IS-11: Test suites for Stream Compatibility Management #728
base: master
Are you sure you want to change the base?
Conversation
…Interaction with IS-04", and "BCP-005-01 EDID to Receiver Capabilities Mapping", test suites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it out and found minor problems. One of them is caused by https://github.com/AMWA-TV/nmos-testing/blob/master/nmostesting/GenericTest.py#L405: nmos-testing expects 200 from /inputs/{inputId}/edid/base
but the default state is 204.
Merge lastest code from master on is-11
…eivers (4) (#761) Based on IS-11 Test Plan v0.6 Senders contains tests 2.0, 2.1 and 2.2 Receivers contains tests 4.1 and 4.2 Signed-off-by: ggeorgea <[email protected]> Co-authored-by: Gareth Sylvester-Bradley <[email protected]>
# Conflicts: # nmostesting/Config.py
Adding IS-11 in README.md
…return either the pertinent IDs or make the message clearer. All messages were kind of normalized. #793
nmostesting/suites/IS1101Test.py
Outdated
) | ||
state = response.json()["state"] | ||
if state in ["awating_essence", "no_essence"]: | ||
time.sleep(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is maximum 5 x 3 seconds sleep part of the spec? If not, should probably be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This not not part of the IS-11 specification ... just an expectation that the device somehow is responsive within a few seconds.
Check IS-11 control advertisement like other test suites do
Merge pull request #802 from gwgeorgea/is-11-Issues-793
Add usage of STABLE_STATE_DELAY from Config.py A few failure comment clarifications
# Conflicts: # nmostesting/suites/IS1101Test.py
[IS-11] - Fix Test 4.4 to support devices without output
- Fix wrong list of receivers with outputs. Needed to test both audio and video properly. - New 256 byte EDID with CEA extension, prevents audio stream from going down during IS-11 test.
# Conflicts: # nmostesting/IS11Utils.py
[IS-11] Make test cases independent
…S and AUTH support
|
if response.status_code == 422: | ||
print("Device does not accept grain_rate constraint") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code will never be executed
nmostesting/suites/IS1101Test.py
Outdated
""" | ||
Verify for inputs supporting EDID that the version and the effective EDID change when applying constraints | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the same test description as test_02_03_05_01. What's different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe name one with video and the other one with audio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.3.5.1 is video, 2.3.5.2 is audio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""" | |
Verify for inputs supporting EDID that the version and the effective EDID change when applying constraints | |
""" | |
""" | |
Verify for audio inputs supporting EDID that the version and the effective EDID change when applying constraints | |
""" |
Bear in mind that these test descriptions are presented in the NMOS Testing user interface, so by having identical descriptions it makes it difficult for a user to disambiguate one test from the other.
return test.PASS() | ||
return test.UNCLEAR("No resources found to perform this test.") | ||
|
||
def test_02_03_05_02(self, test): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test numbering seems very convoluted. AFAIK test names should be of the form test_XX
. Where they are named test_XX_XX
this is where additional tests have been added at a later date...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A compromise that takes into account the existing sectioning: test_XX: Senders ...
naming (turning subsection numbers into word prefixes).
nmostesting/suites/IS1101Test.py
Outdated
valid, response = TestHelper.do_request( | ||
"GET", self.compat_url + "inputs/" + input_id + "/properties/" | ||
) | ||
if not valid: | ||
return test.FAIL( | ||
"Unexpected response from the streamcompatibility API: {}".format( | ||
response | ||
) | ||
) | ||
if response.status_code != 200: | ||
return test.FAIL( | ||
"The input {} properties streamcompatibility request has failed: {}".format( | ||
input_id, response | ||
) | ||
) | ||
try: | ||
version = response.json()["version"] | ||
except json.JSONDecodeError: | ||
return test.FAIL("Non-JSON response returned from Node API") | ||
except KeyError as e: | ||
return test.FAIL("Unable to find expected key: {}".format(e)) | ||
self.version[input_id] = version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a repeated pattern through this test. Perhaps factoring out a helper function would allow this test to be more compact?
|
||
default_edid = self.get_effective_edid(test, input_id) | ||
|
||
self.another_grain_rate_constraints[sender_id] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another_grain_rate_constraints
only appears to be used locally within this test. Why is it a class variable?
def get_another_grain_rate(self, grain_rate): | ||
numerator = grain_rate["numerator"] | ||
denominator = grain_rate["denominator"] | ||
if (numerator == 30 or numerator == 25) and denominator == 1: | ||
return {"numerator": numerator * 2, "denominator": 1} | ||
if (numerator == 60 or numerator == 50) and denominator == 1: | ||
return {"numerator": numerator / 2, "denominator": 1} | ||
if numerator == 24 and denominator == 1: | ||
return {"numerator": 30, "denominator": 1} | ||
if (numerator == 30000 or numerator == 25000) and denominator == 1001: | ||
return {"numerator": numerator * 2, "denominator": 1001} | ||
if (numerator == 60000 or numerator == 50000) and denominator == 1001: | ||
return {"numerator": numerator / 2, "denominator": 1001} | ||
return "grain_rate not valid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_another_grain_rate
assumes that the Node under test supports all these grain rates.
Similarly get_another_sample_rate
assumes the Node supports all the defined sample rates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the node does not support the grain rate is will refuse the constraint and the test should be skipped (once the implementer fix the previously observed bug when testing the return status :). Note that there is yet no Sender Capabilities in NMOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our experience is that the test aren't being skipped ('Could Not Test') but being failed when the Node doesn't support a particular grain rate...
if response.status_code == 422: | ||
print("Device does not accept grain_rate constraint") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Fix IS-11 test_02_03_04
…ns-fix [IS-11] Fix occasional exceptions caused by undefined variables.
... and BCP-005-01 EDID to Receiver Capabilities Mapping
Replaces #716 with an is-11 activity branch in the AMWA-TV/nmos-testing for simpler collaboration. The group can make PRs to extend the test suites onto this branch, which the activity group can review before merging. Others can use this 'stable' activity branch for testing.