Repository navigation
Description
The checks that play real content types pass on ready, and nothing checks what the content then does.
- The verifier fails a package on an error while booting or an empty frame.
- The weekly sweep plays the pack's 55 content types and reports what each sends, without judging it.
design/testing.mdsays so: "whether a type's result is right, which the report shows and nothing checks". - Two false passes are on record in
design/security.md: AR Scavenger passes and shows no scene, and a Vimeo video passed while it ended in its loading error. - The player's tests of
finishedandresumeplay a fixture content type made for them. - One real content type is answered and scored: the demo's quiz, in the embed package's SCORM tests and the skills' playback test.
So a change that breaks a score, a finished or a saved state in Course Presentation or Interactive Video passes every check. With Question Set they are the three most used types: 13.8%, 12.3% and 9.8% of all content on H5P.com in H5P Group's count of December 2022.
Proposal: learner journeys. A test project of its own, apps/journeys, as apps/skills is for the skills. A journey:
- builds a real package of a content type with h5p-author, from a short source whose right answers the test knows;
- plays it in the element, served as the verifier serves a package, against the repository's copy of the library pack, with no network;
- answers it as a learner does, with the browser's own clicks and keys;
- checks the result: the score in
finished, the statements, and after a reload withresumethe state the content comes back with.
How a journey is written (the owner's rule): one content type at a time. First its own script is read for what the type can do: what it scores, what a wrong answer costs, when it offers Retry and Show solution, what it saves. Then each of those becomes a case.
To do
- The harness:
apps/journeys(test(journeys): real content types answered as a learner, with what they then do checked (#314) #315). - Multiple Choice, True/False, Fill in the Blanks, Drag the Words, Question Set: 33 cases (test(journeys): real content types answered as a learner, with what they then do checked (#314) #315).
- Course Presentation (test(journeys): Course Presentation, as its script runs it (#314) #321).
- Interactive Video (test(journeys): Interactive Video, as its script runs it (#314) #322).
- Then, each read first: Drag and Drop, Column, Interactive Book, Image Hotspots, Accordion, Dialog Cards (test(journeys): the six remaining content types, as their scripts run them #342).
- They run on a pull request in Chromium when a package they play changes (test(journeys): real content types answered as a learner, with what they then do checked (#314) #315), and in Firefox and WebKit with the weekly run.
-
design/testing.md: the rules (test(journeys): real content types answered as a learner, with what they then do checked (#314) #315).
Found on the way
- An Interactive Video built by h5p-author reports no result: it sends
completedonly from a submit screen, which H5P's editor gives a new video and a source lacks: h5p-author: an Interactive Video it builds never sends a score #317, fixed in fix(author): an Interactive Video ends with a submit screen, from which it sends its score #318. - In Firefox a second word does not drag in Drag the Words: the first drag leaves text selected, and a press on a word inside it starts the browser's own text drag. Not known whether a person's Firefox does the same; the 12 cases that drag words are not run there.
Later: the sweep held to a recorded result for each type, so a change in what any of the 55 sends fails it. Moved to #345.
Activity
Merge pull request #315 from missing-elements/test/learner-journeys
test(journeys): a deck with no task, and each override, Cancel and sa…
Merge pull request #321 from missing-elements/test/course-presentatio…
test(journeys): Interactive Video review fixes (#314)
Merge pull request #322 from missing-elements/test/interactive-video-…
test(journeys): Column, as its script reports (#314)
test(journeys): Interactive Book, as its script runs it (#314)
test(journeys): Image Hotspots, as its script runs it (#314)
test(journeys): Accordion, as its script runs it (#314)
test(journeys): Dialog Cards, as its script runs it (#314)
test(journeys): the Column case requires the page's id to be an addre…
test(journeys): the Column case parses the page's id, so an address w…
alekswebnet commentedon Dec 3, 2026
Done: 13 content types in 95 cases, the last six in #342 and one more case in #344. The Later item, the sweep held to recorded results, is #345.