Contents

Integration Test Cases

MementoTest.testDirectMementoResponse

TestDescription: Ensure that the oldid (URI-M) page has the correct Memento headers.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response contains Memento-Datetime header
  4. response's Link header contains a timegate relation
  5. response's Link header's timegate relation contains the correct URI
  6. response's Link header contains a original latest-version relation
  7. response's Link header's original latest-version relation contains the correct URI
  8. response's Link header contains a timemap relation
  9. response's Link header's timemap relation contains the correct URI
  10. response contains no PHP errors, notices, or warnings

MementoTest.testDirectMementoResponseWithRecommendedHeaders

TestDescription: Ensure that the oldid (URI-M) page has the correct Memento headers. Ensure that when recommended relations are turned on, those additional entries in the Link header show up and are correct.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response contains Memento-Datetime header
  4. response's Link header contains a timegate relation
  5. response's Link header's timegate relation contains the correct URI
  6. response's Link header contains a original latest-version relation
  7. response's Link header's original latest-version relation contains the correct URI
  8. response's Link header contains a timemap relation
  9. response's Link header's timemap relation contains the correct URI
  10. response contains no PHP errors, notices, or warnings
  11. depending the number of mementos for this resource

MementoTest.testDirectOriginalResourceResponse

TestDescription: Ensure that the article (URI-R) page has the correct Memento headers.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response's Link header contains a timegate relation
  4. response's Link header's timegate relation contains the correct URI
  5. response's Link header contains a original latest-version relation
  6. response's Link header's original latest-version relation contains the correct URI
  7. response's Link header contains a timemap relation
  8. response's Link header's timemap relation contains the correct URI
  9. response contains no PHP errors, notices, or warnings

MementoTest.testDirectOriginalResourceWithRecommendedHeaders

TestDescription: Ensure that the article (URI-R) page has the correct Memento headers. Ensure that when recommended relations are turned on, those additional entries in the Link header show up and are correct.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response's Link header contains a timegate relation
  4. response's Link header's timegate relation contains the correct URI
  5. response's Link header contains a original latest-version relation
  6. response's Link header's original latest-version relation contains the correct URI
  7. response's Link header contains a timemap relation
  8. response's Link header's timemap relation contains the correct URI
  9. response contains no PHP errors, notices, or warnings
  10. depending the number of mementos for this resource

MementoTest.test302StyleTimeGateResponse

TestDescription: Ensure that the TimeGate (URI-G) response has the correct Memento headers.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 302 status code
  2. response contains Link header
  3. response contains Vary header
  4. response contains Location header
  5. Location header contains correct oldid page URI (URI-M)
  6. Vary header contains the entry Accept-Datetime
  7. response's Link header contains a original latest-version relation
  8. response's Link header's original latest-version relation contains the correct URI
  9. response's Link header contains a timemap relation
  10. response's Link header's timemap relation contains the correct URI
  11. response contains no PHP errors, notices, or warnings
  12. response contains no entity

MementoTest.test302StyleTimeGateResponseWithRecommendedHeaders

TestDescription: Ensure that the TimeGate (URI-G) response has the correct Memento headers. Ensure that when recommended relations are turned on, those additional entries in the Link header show up and are correct.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 302 status code
  2. response contains Link header
  3. response contains Vary header
  4. response contains Location header
  5. Location header contains correct oldid page URI (URI-M)
  6. Vary header contains the entry Accept-Datetime
  7. response's Link header contains a original latest-version relation
  8. response's Link header's original latest-version relation contains the correct URI
  9. response's Link header contains a timemap relation
  10. response's Link header's timemap relation contains the correct URI
  11. response contains no PHP errors, notices, or warnings
  12. response contains no entity
  13. depending the number of mementos for this resource

MementoTest.test200StyleTimeGateMementoResponse

TestDescription: Ensure that the TimeGate (URI-G) response has the correct Memento headers when the original resource and TimeGate are the same URI.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response contains Memento-Datetime header
  4. response contains Vary header
  5. response contains Content-Location header
  6. Content-Location header contains correct oldid page URI (URI-M)
  7. response's Link header contains a original latest-version relation
  8. response's Link header's original latest-version relation contains the correct URI
  9. response's Link header contains a timemap relation
  10. response's Link header's timemap relation contains the correct URI
  11. Vary header contains the entry Accept-Datetime
  12. response contains no PHP errors, notices, or warnings

MementoTest.test200StyleTimeGateMementoResponseWithRecommendedHeaders

TestDescription: Ensure that the TimeGate (URI-G) response has the correct Memento headers when the original resource and TimeGate are the same URI. Ensure that when recommended relations are turned on, those additional entries in the Link header show up and are correct.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test Verification Steps

  1. response contains 200 status code
  2. response contains Link header
  3. response contains Memento-Datetime header
  4. response contains Vary header
  5. response contains Content-Location header
  6. Content-Location header contains correct oldid page URI (URI-M)
  7. response's Link header contains a original latest-version relation
  8. response's Link header's original latest-version relation contains the correct URI
  9. response's Link header contains a timemap relation
  10. response's Link header's timemap relation contains the correct URI
  11. Vary header contains the entry Accept-Datetime
  12. response contains no PHP errors, notices, or warnings
  13. depending the number of mementos for this resource

MementoTest.testEditPage

Test Description: Regression Test to ensure given Edit Page generates 200 status code and entity contains no PHP errors.

Requirements Source Mediawiki Default Behavior (Regression)

Test Data File: memento-editpage-testdata.csv

Memento Mediawiki Extension Settings Required

Test verification steps

  1. Given URI response contains 200 status code
  2. Response entity body contains no PHP errors, notices, or warnings

MementoTest.testDiffPage

Test Description: Regression Test to ensure given Diff Page contains no errors

Requirements Source

Test Data File: memento-diffpage-testdata.csv

Memento Mediawiki Extension Settings Required

Test Verification Steps

  1. Given URI response contains 200 status code
  2. Response entity body contains no PHP errors, notices, or warnings

ErrorStateTest.test400TimeGateTraditionalError

Test Description: Ensure that an incorrect Accept-Datetime value sent to a TimeGate generates a 400 status response with the correct error message.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test verification steps

  1. Given URI response contains 400 status code
  2. response contains Vary header
  3. Vary header contains the entry Accept-Datetime
  4. response contains no PHP errors, notices, or warnings
  5. response contains the correct error message for an invalid Accept-Datetime

ErrorStateTest.test400TimeGateFriendlyError

Test Description: Ensure that an incorrect Accept-Datetime value sent to a TimeGate generates a 200 status response with the correct error message.

Test Data File: time-negotiation-testdata.csv

Memento MediaWiki Extension Settings Required

Test verification steps

  1. Given URI response contains 200 status code
  2. response contains Vary header
  3. Vary header contains the entry Accept-Datetime
  4. response contains no PHP errors, notices, or warnings
  5. response contains the correct error message for an invalid Accept-Datetime

ErrorStateTest.test404TimeMapTraditionalError

Test Description: Ensure that an incorrect article name generates a 404 status response with the correct error message.

Test Data File: timemap-dneurls-testdata

Memento MediaWiki Extension Settings Required

Test verification steps

  1. Given URI response contains 404 status code
  2. response contains no PHP errors, notices, or warnings
  3. response contains the correct message for an invalid article name

ErrorStateTest.test404TimeMapFriendlyError

Test Description: Ensure that an incorrect article name generates a 200 status response with the correct error message.

Test Data File: timemap-dneurls-testdata

Memento MediaWiki Extension Settings Required

Test verification steps

  1. Given URI response contains 404 status code
  2. response contains no PHP errors, notices, or warnings
  3. response contains the correct message for an invalid article name

Test Dataset Documentation

time-negotiation-testdata.csv

Fields:

  1. Identifier - Identifier for the test data entry
  2. Accept-Datetime - value passed in Accept-Datetime header for requests
  3. URI-R - original resource URI value
  4. original latest-version - expected value of the URI reference from the original latest-version relation in the Link header
  5. first memento - expected value of the URI reference from the first memento relation in the Link header
  6. last memento - expected value of the URI reference from the last memento relation in the Link header
  7. prev predecessor-version memento - expected value of the URI reference from the prev predecessor-version memento relation in the Link header
  8. next successor-version memento - expected value of the URI reference from the next successor-version memento relation in the Link header
  9. URI-M - expected URI value for the memento relation
  10. URI-G - expected URI value for the timegate relation (only used for tests with 302-style negotiation)
  11. Comment - comment on row in dataset indicating why it was chosen

memento-diffpage-testdata.csv

This dataset just contains a newline-separated list of diff pages to use for regression testing.

memento-editpage-testdata.csv

This dataset just contains a newline-separated list of edit pages to use for regression testing.

timegate-dneurls-testdata.csv

This dataset contains a newline-separated list of TimeGate URIs that should not exist on the wiki for 404 testing.

timemap-dneurls-testdata.csv

This dataset contains a newline-separated list of URIs that should generate 404 errors.