Commit dcc9452
IS-12 Test Suites (#810)
* [IS-12] Initial Commit for IS-12 Test Suite (#800)
* Initial commit
* Added IS-12 spec to Config
* Updated specs for IS-12-01 test suite
Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
Co-authored-by: lo-simon <simon.lo@sony.com>
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
* [IS-12] Check Root Block and ClassManager (#814)
* Initial commit
* Added IS-12 spec to Config
* Updated specs for IS-12-01 test suite
* Implement NCP endpoint and create WebSocket tests
* Updated API name
* Updated test definition.
* Improve control endpoint checking
* Use of compare_urls to test Control Protocol `href`
* Corrected formatting. Improved WebSocket handling
* Refactored control API checking
* Corrected failure case in test_02
* Use NMOSUtils.do_test_device_control
* Test WebSocket services and controls are as secure as HTTP endpoints
* Fix protocol bug, remove stripping of trailing slash
* Add is_message_received to WebsocketWorker
* Added IS12Utils
* Add Root Block tests
* Check Root Block and check Class Manager OID and Role
---------
Co-authored-by: lo-simon <simon.lo@sony.com>
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
* [IS-12] Add auto tests for validating MS-05 standard class and datatype definitions (#819)
Auto validation of classes and datatypes
Testing of error conditions
Validation of device model against advertised classes and datatypes
Checking of Managers
Checking that roles are unique within a block
Checking that oids are unique
Co-authored-by: lo-simon <simon.lo@sony.com>
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
* Merge pull request #812 from AMWA-TV/zeroconf-marmoset
[IS-04-01] Much smaller zeroconf monkey patch
(cherry picked from commit aa58b5e)
* [IS 12] Add Get/Set/Add/Remove/Find methods (#822)
* Fixed error reporting
* Added Set user label test
* Validate touchpoints
* Validate NcTouchpointNmos or NcTouchpointNmosChannelMapping depending on contextNamespace
* Sequence command JSON helper functions
* Build device model object tree when validating device model
* Check FindMembersByRole
* Recursively check each block's role paths
* find members by role test
* Find members by class id test
* GetMemberDescriptors test
* removed protocolVersion
* GetSequenceLength test
* Subscribe to all objects and test changing all user labels
* Add Class Manager method tests
* Added illegal command handle test
* IndexOutOfBounds test. WebSocket kept open test
* Updated comments and links to specification
---------
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
* [IS-12] Specify explicit URL path for WebSocket endpoint (#827)
* Specify explicit URL path for WebSocket endpoint
* Default to array, not dict
* Linting tweaks
* Handle leading slash on URL path parameter
* Update comment. Rename helper function
* Rollback tentative changes
* Check response from Find methods is an array
* Handle errors where control classes are not advertised by Class Manager
* Fixed detection of authority keys in non-standard classes
* Handle missing device model properties
* Defend against missing properties or datatype definitions
* Improved error handling,
* Bump Node 12.x to Node 16.x
(cherry picked from commit 4caeca4)
* python-zeroconf 0.75.0 strict=False for _nmos-registration._tcp
(cherry picked from commit bc7e997)
* Python 3.6 (and 3.7!) is End-Of-Life, and so is Node.js 14.x
Libraries like python-zeroconf are starting to depend on more recent Python features
(cherry picked from commit b10ff71)
* Pass IP address of API under test to testssl.sh
So that same one is used by Python tests and testssl.sh tests
Co-authored-by: Simon Lo <simon.lo@sony.com>
(cherry picked from commit 3f10a8d)
* Add MOCK_SERVICES_WARM_UP_DELAY
(cherry picked from commit 796a115)
* Delay running tests until after MOCK_SERVICES_WARM_UP_DELAY
Co-authored-by: Simon Lo <simon.lo@sony.com>
(cherry picked from commit 43a1f76)
* Tweak message
Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
(cherry picked from commit 215f736)
* Fixed send_command function as per suggestion from @alabou
(cherry picked from commit a3df644)
* Add config option to bypass IS12 interactive testing
* Add constraints classes
* added xeger library
* Add IS1202 test suite
* Add primitives to datatype models
* Enhance test_35 (subscription and notification mechanism test) to all… (#839)
* Since jstasiak/zeroconf#666 (0.32.0) it needs a much much smaller monkeypatch to be able to advertise the overlong service type "_nmos-registration._tcp"
* Fix flake8/pycodestyle E721 do not compare types
* Bump Node 12.x to Node 16.x
* python-zeroconf 0.75.0 strict=False for _nmos-registration._tcp
* Python 3.6 (and 3.7!) is End-Of-Life, and so is Node.js 14.x
Libraries like python-zeroconf are starting to depend on more recent Python features
* Pass IP address of API under test to testssl.sh
So that same one is used by Python tests and testssl.sh tests
Co-authored-by: Simon Lo <simon.lo@sony.com>
* Add MOCK_SERVICES_WARM_UP_DELAY
* Delay running tests until after MOCK_SERVICES_WARM_UP_DELAY
Co-authored-by: Simon Lo <simon.lo@sony.com>
* Tweak message
Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
* Enhance test_35 (subscription and notification mechanism test) to allow interference notifications while running test
* Update IS1201Test.py
shorten line for flake8
---------
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
* Tweaked test_35
* Pass **kwargs to ControllerTest
* Pass **kwargs to ControllerTest
* Test sequences; remove non UTF-8 character from comment
* Added constrained sequence tests
* Additional sequence checks
* Add runtime constraints to device model. Fix handling of primitive types in schema generation
* Added property and datatype constraints checking
* Removed disabled tests
* make datatype_schemas an object property
* Check for default value sequences when validating class descriptors
(cherry picked from commit 70f633c56cf55481cf440f4d76ced36b3273cd6e)
* Flake8 formatting
* Cache class_manager. Simplify constraint checking.
* Fix Block object construction. Fix Test_02
* add missing primitive descriptor path
* reorder specs in NMOS Testing interface
* Fix constraint violation error message
* Disable Testing Facade host and port if not interactively testing
* Flake8 formatting
* Fix constraint violation error message
(cherry picked from commit c5d43f7)
* Refactor property testing
* Handle property and method deprecated status codes
* Check deprecated properties
* Report unchecked device model in tests
* Renumbered tests
* updated spec URLs in comments
* Handle property and method deprecated status codes
(cherry picked from commit 5f2cb63)
* Check deprecated properties
(cherry picked from commit 7c93b49)
* Report unchecked device model in tests
(cherry picked from commit 12f556b)
* Renumbered tests
(cherry picked from commit 738021f)
* updated spec URLs in comments
(cherry picked from commit ef33d0f)
* Updated to conform merged branch
* Guard against missing class properties
* Add annotation to check properties test
* Better error reporting for test_22 and test_23
* formatting
* Fix spelling mistake in interactive testing config
* Fixed Blocks with no members being set to None
* Fixed config spelling error
* Rename _execute_command to execute_command
* Test discovered methods in Device Model
* Only test non-standard methods.
* Moved some functions to IS12Utils
* Added more error reporting
* Guard against ControllerTest being run in non-interactive mode
* Added check constraints hierarchy test
* Fixed do_check_property_test
* Add check read only properties and sequences
* Made sequence tests tolerant to empty or null sequences
* Typo and formatting
* Initial add of IS-14-01 test suite
(cherry picked from commit e870bcef1052a0eaea28e54748c6ede52a6e8cce)
* Flake8 formatting
* Added Node API to IS-14 (for testing control endpoint)
* Initial refactoring
* Added additional specs to IS-14-01 test suite definition
* Move common functions from IS12Utils to MS05Utils
* Delegate to MS0501Test for auto tests
* API key now required when loading resources
* Delegate to MS0501Test for auto tests
* flake8 formatting
* Move MS-05 tests into MS0501Test
Move MS-05 utility functions into MS05Utils
* Fixed get_sequence_item
* Refactor IS-14 API utility functions
* generalize get_control_class and get_datatype. Improve error handling.
* Implement IS-14 http request helper functions
* Formatting
* Moved error handling tests to MS0501Test
* Add invoke method utility function.
Added MS0502Test and IS1402Test
* Do not cache spec_branch in construction
* Simplify utilities initialization
* Add reset so that state is reset on set_up_tests
* Initiailize IS-12 websocket on set_up_tests so failure is reported on the UI
* make base class generic
* Updated comments
* Changed " embedd3ed in f-strings to '
* Changed SET to PUT
* Changed " embedded in f-strings to '
* Fix IS-14 utility functions
* Add missing sequence methods
* Add role_path to get_sequence_length call
* Add device-configuration feature set to feature set tests
* Add additional validation of class descriptors
* Add is_block helper.
* Add initial IS-14 tests
* Improve error reporting
* Fix linting errors
* Add testing of enum ans struct sequences
Refactor error message handling
* Moved _get_datatyoe_schema into MS05Utils
* Make TestMetadata an inner class
* Use TestMetadata inner class. Remove unneeded data members.
* Added NcDescriptor and NcPropertyDescriptor classes
* Refactor to use NcPropertyDescriptor class
* Refactored NcPropertyId and NcTouchpoint types
* Refactor dictionaries into classes
* Update formatting of strings
* Consistent quotes
* Renamed test_data directory from IS1201 to MS05
* Refactored names of functions, improved consistency of strings
* Create NcFieldDescriptor, NcParameterDescriptor and NcMethodDescriptor classes
* Introduced constraint domain classes. Refactored test logic.
* Handle 'any' datatype in method descriptors
* Consistent formatting of strings. Refactor to use domain classes
* Utility functions to format class ids and role paths. Create NcMethosId class. Replace "context" parameters with role paths
* Remove context parameter and use role_path instead
* Remove MS-05-02 error handling from IS12Utils
* Add NcMethodResult types
* Remove redundant imports
* Formatting
* Handle MS-05-02 errors
* get_property returns NcMethodResult object
* set_property returns NcMethodResult
* invoke_method returns NcMethodResult
* get_sequence_item returns NcMethodResult
* get_sequence_length returns NcMethodResult
* set_sequence_item returns NcMethodResult
* add_sequence_item returns NcMethodResultId
* remove_sequence_item returns NcMethodResult
* get_member_descriptor returns NcMethodResult
* find_members_by_path returns NcMethodResult
* find_members_by_role returns NcMethodResult
* find_members_by_class_id returns NcMethodResult
* get_control_class returns NcMethodResult
* get_datatype returns NcMethodResult
* Use NcPropertyId and NcMethodId instead of raw dict
* Implement IS12Notification class
* Implement NcPropertyChangedEventData
* Implement IS12CommandResponse class
* Check subscription response
* Refactor checking of Block members
* Formatting
* Implement IS12Error class. Formatting
* Refine IS14Utils error handling
* Fix method invocation JSON
* Simplify property constraints checking
* Fix dicts embedded in f-strings
* Add spec links to test failures
* Fix dicts embedded in f-strings
* Fix embedded code strings in f-strings
* Fix embedded code strings in f-strings
* Format error messages
* Refactored constraints testing
* Improve notifications handling
* Flake8 formatting
* Rename context to error_msg_base
* consistent format of error messages
* Better handling of IS-12 errors
* Add robustness for missing classes and datatype definitions
* Consistent formatting of error messages
* Improve constraints testing
* Add NcEventDescriptor
* Validate parameter constraints. Check for illegal non-standard datatypes
* Minor bug fixes
* Update comments
* Clearly indicate private helper functions
* Simplify constraints checking tests
* Clearly indicate private helper functions
* Improve error message
* Allow calling test to explicitly set test method name reported in Testing Facade
* Fix interaction with Testing Facade
* Format error message
* Remove IS-14 test suites
* Improve descriptor validation error reporting
* Better handling of TestFacade errors. Add config to switch off invasive tests
* Move MS0502 tests to MS0501
* Remove MS0502 and IS1202
* Enable running of auto tests in test suites derived from ControllerTest
* Move auto_tests into MS05Utils
* Removed IS14Utils from IS-12 test
* Fixed typo
* Fixes _get_methods function
* Update documentation
* Typos
* Fix crash when running IS-12 test suite with unicast DNS mode enabled
* Fix linting
---------
Co-authored-by: lo-simon <simon.lo@sony.com>
Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Co-authored-by: alabou <abouchar@matrox.com>1 parent abe4ac4 commit dcc9452
File tree
29 files changed
+5062
-44
lines changed- docs
- nmostesting
- static/js
- suites
- templates
- test_data/MS05/models/datatypes
29 files changed
+5062
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
280 | 287 | | |
281 | 288 | | |
282 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
283 | 321 | | |
284 | 322 | | |
285 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | | - | |
| 250 | + | |
| 251 | + | |
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
| |||
0 commit comments