Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

Automated tests #6

Open
rla opened this issue Aug 17, 2018 · 3 comments
Open

Automated tests #6

rla opened this issue Aug 17, 2018 · 3 comments
Assignees

Comments

@rla
Copy link
Collaborator

rla commented Aug 17, 2018

It would be nice to have automated tests for the WebAssembly API. This is complicated issue right now as the --preload-file does not support Node.js environment and that an headless browser should be used. Setting up headless browser environment without heavy dependencies is not possible (chrome --headless does not provide enough control without the debug protocol and using the debug protocol requires further dependencies).

At first, the tests will be semi-automatic, requiring a web server (it seems like loading .wasm files is complicated over the file:// protocol).

After loading the test HTML file, it initializes the swi instance, runs some tests, and writes result (PASS/FAIL) to the page. Loading and inspection of results has to be done manually for now.

@rla rla self-assigned this Aug 17, 2018
@JanWielemaker
Copy link
Member

For pengines I used phantomjs, but this is broken and discontinued. I switched to slimerjs, but this node module seems to be hard to synchronise with the latest firefox ... A good, easy to install and robust alternative is more than welcome ...

@rla
Copy link
Collaborator Author

rla commented Sep 12, 2018

@JanWielemaker where could I see the tests? They do not seem to be in swipl-devel nor in the pengines repo. The headless Chrome/Chromium approach will require Node as a dependency (for wasm build I might be able to use one that comes with Emskripten) but if the slimerjs required it as well, it's not a so big deal.

@rla
Copy link
Collaborator Author

rla commented Sep 20, 2018

I have some basic automated test setup working using Puppeteer. After I have some actual tests, I will submit PR to swipl-devel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants