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

XAPI-00146/XAPI-1047 - Tests only validate single statement, no test for array of statements #254

Open
martinholden-skillsoft opened this issue May 12, 2022 · 1 comment · May be fixed by #255

Comments

@martinholden-skillsoft
Copy link

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 -

describe('An LRS\'s Statement Resource accepts POST requests (Communication 2.1.2.s1, XAPI-00147)', function () {

XAPI-00146 -

describe('An LRS\'s Statement Resource upon processing a successful POST request returns code 200 OK and all Statement UUIDs within the POST **Implicit** (Communication 2.1.2.s1, XAPI-00146)', function () {

The tests should be duplicated and tests with payloads of:

  • Single statement as an array
  • Multiple statements as an array
@vbhayden
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants