adlnet / lrs-conformance-test-suite

A NodeJS project that tests the MUST requirements of the xAPI Spec and is based on the ADL testing requirements repository. The test suite website can be found here: https://lrstest.adlnet.gov/. The adopters website can be found here: https://adopters.adlnet.gov/
https://adlnet.gov/projects/xapi/
MIT License
67 stars 42 forks source link

No tests for empty statement arrays #274

Open kelvinqian00 opened 2 months ago

kelvinqian00 commented 2 months ago

An edge case that was noticed that is not covered in the conformance test suite (as of version 1.0.3) is that of empty statement arrays. There are no tests for POSTing empty statement arrays, nor are there any for GET requests after such a POST. The xAPI spec implies that these empty statement array insertions are actually valid, as it is not one of the cases explicitly mentioned as invalid in the spec, so there should be an additional test case to assert that POSTing empty statement arrays is valid.

While this does fall under #254 (as there are no tests for statement arrays in general), it is a distinct enough edge case that I believe warrants its own issue.

vbhayden commented 1 month ago

Hmm just now seeing this, good eye @kelvinqian00.

I'm not entirely sure what the test would look like though, as the specifics aren't stated anywhere as you mentioned. I am gonna defer to @andyjohnson on this one.

kelvinqian00 commented 1 month ago

Hi @vbhayden,

I imagine such a test would be similar to the statement array tests PR #255, however where that PR tests 1 and 2-item arrays, this test case would test when an array of length zero is inserted into the LRS.