lrs-conformance-test-suite
lrs-conformance-test-suite copied to clipboard
XAPI-00146/XAPI-1047 - Tests only validate single statement, no test for array of statements
The Spec here: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#212-post-statements
States the statement resource should accept "An array of Statements or a single Statement to be stored."
The tests only test a single statement payload: XAPI-00147 - https://github.com/adlnet/lrs-conformance-test-suite/blob/14778f9e8950a422ddc1d607416b1c484f1921d1/test/v1_0_3/H.Communication2.1-StatementResource.js#L246
XAPI-00146 - https://github.com/adlnet/lrs-conformance-test-suite/blob/14778f9e8950a422ddc1d607416b1c484f1921d1/test/v1_0_3/H.Communication2.1-StatementResource.js#L265
The tests should be duplicated and tests with payloads of:
- Single statement as an array
- Multiple statements as an array
I saw the GitHub notification over the weekend and initially ignored it tbh, thinking "this is probably the most common use case for an LRS, there's absolutely no way it's not being tested".
Surprisingly, we can't find a statement array payload test anywhere, making this quite the oversight. 😬
Introducing a new test atm would be a little awkward with the 2.0.0 changes rolling out sometime over the next few months, so I am going to suggest we introduce this into the 2.0.0 branch soon and update the 1.0.3 suite during the 2.0.0 release -- as folks will already be re-testing their LRS's.
I'll look over the style and whatnot to make sure everything jives with the existing setup and then hopefully get this into 2.0.0 soon-ish.
Thanks!