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/

Home Page:https://adlnet.gov/projects/xapi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid test in Communication 3.3.s3.b4 "should not convert newer version format to prior version format"

Cyronius opened this issue · comments

The test is using activity with iri "http://www.example.com/meetings/occurances/34534". It expects the activity to deeply equal what it passed in on the statement POST. For reference, that statement is something like

{"actor":{"objectType":"Agent","name":"xAPI mbox","mbox":"mailto:xapi@adlnet.gov"},"verb":{"id":"http://adlnet.gov/expapi/verbs/attended","display":{"en-GB":"attended","en-US":"attended"}},"object":{"objectType":"Activity","id":"http://www.example.com/meetings/occurances/34534"},"id":"018f3ae6-85f6-4467-95c4-1b24c4348ccc"}

I'm failing the test when I run the suite as a whole because other statements are using this activity and adding extra information to the activity, which appears to be required by the spec. If I run the test in isolation, it passes. Here's what my LRS is returning for the statement query (note the object's activity definition enriched with additional extensions, language maps, etc):


{
  "actor": {
    "objectType": "Agent",
    "name": "xAPI mbox",
    "mbox": "mailto:xapi@adlnet.gov"
  },
  "verb": {
    "id": "http://adlnet.gov/expapi/verbs/attended",
    "display": {
      "en-GB": "attended",
      "en-US": "attended"
    }
  },
  "object": {
    "objectType": "Activity",
    "id": "http://www.example.com/meetings/occurances/34534",
    "definition": {
      "type": "http://adlnet.gov/expapi/activities/meeting",
      "name": {
        "en-GB": "example meeting",
        "en-US": "example meeting",
        "zh-Hans-CN": "例如会议",
        "de-DE": "Beispiel Treffen"
      },
      "description": {
        "en-GB": "An example meeting that happened on a specific occasion with certain people present.",
        "en-US": "An example meeting that happened on a specific occasion with certain people present.",
        "ase": "An example meeting that happened on a specific occasion with certain people present.",
        "zh-Hant": "所發生的與目前某些人特定場合的一個例子會議。",
        "de-DE": "Ein Beispiel Sitzung, die auf einem bestimmten Anlass mit bestimmten Personen zufällig anwesend."
      },
      "moreInfo": "http://virtualmeeting.example.com/345256",
      "extensions": {
        "http://example.com/null": null
      },
      "interactionType": "fill-in",
      "correctResponsesPattern": [
        "Bob\"s your uncle"
      ]
    }
  },
  "timestamp": "2023-04-18T17:57:21.3230000+00:00",
  "id": "018f3ae6-85f6-4467-95c4-1b24c4348ccc",
  "stored": "2023-04-18T17:57:21.467+00:00",
  "authority": {
    "objectType": "Agent",
    "account": {
      "homePage": "https://www.learnermobile.com/"
    }
  },
  "version": "1.0.3"
}

I think the activity iri used in this test should be made to be unique so that the success or failure does not depend on the rest of the test suite.

In addition, I'm not sure the test is even covering what it's aiming to. At no point does it pass a version other than 1.0.3 in either the statement or the request headers. So I'm not sure how to test for the 'prior version' to modify my behavior to pass the test.

If I'm misreading the spec or the purpose of this test, it would help me quite a bit if you could point me in the right direction.

Good point. We've had LRS's being marked as conformant for awhile now, so it doesn't seem to be a guaranteed thing that the IRI's transience will cause an issue, but consistency is usually a good thing regardless.

I'll mark this as a potential issue as we go through the 2.0 work, thanks!

I'm thinking other LRS implementations pass the test because for statement queries they always return the original activity, and only return activities "enriched" with extra information when responding to queries of the activity api. But the spec specifically allows for statements to be returned with this enriched activity info as outlined in the 'exceptions to statement immutability' part of the spec, in section 2.3.1.

I don't want to remove that feature in our LRS, but I do want to pass the conformance test, obviously. I'll probably go down the path of hardcoding around it for our development deployment so we can achieve conformance, unless there's a better solve.

Thanks for getting back to me so quickly!