Skip to content

Js test puppeteer - #15503

Merged
alalek merged 9 commits into
opencv:3.4from
cancerberoSgx:js-test-puppeteer
Nov 16, 2019
Merged

alalek merged 9 commits into
opencv:3.4from
cancerberoSgx:js-test-puppeteer

Conversation

@cancerberoSgx

@cancerberoSgx cancerberoSgx commented Sep 12, 2019 •

Copy link
Copy Markdown
Contributor
  • js - tests and docs only
  • adds support to run js tests with puppeteer (headless chrome - with a single command)
  • didn't modify the tests at all, just infer from output page
  • small section about running the tests
  • important since executing tests with node didn't seem to be working (at least for me node 12)....
    • if somebody thumbs up I could fix that too.
force_builders=Custom
buildworker:Custom=linux-1,linux-2,linux-4
build_image:Docs=docs-js
build_image:Custom=javascript

@cancerberoSgx
cancerberoSgx changed the base branch from master to 3.4 September 12, 2019 01:51
@asmorkalov

Copy link
Copy Markdown
Contributor

@cancerberoSgx Thanks for the patch. Please take a look on CI status: Docs build is broken.

@asmorkalov
asmorkalov self-requested a review October 14, 2019 08:53
@asmorkalov

Copy link
Copy Markdown
Contributor

@cancerberoSgx According to CI log, there are a lot of trailing white spaces. Could you look at it ad fix: https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/22543/steps/whitespace%20opencv/logs/stdio. git diff --check can help you before commit.

@alalek

alalek commented Nov 9, 2019

Copy link
Copy Markdown
Member

@cancerberoSgx Thank you for contribution!

I pushed updates to test infrastructure.
I made an attempt to exclude puppeteer installation through default "npm install". Its default dependencies it large enough (it downloads Chromium, 100Mb). Please take a look on corresponding commit.


executing tests with node didn't seem to be working

I can confirm that with latest node.
We have found that tests work with lts/carbon (8.x) node.js. In case of nvm manager you can try this:

nvm install lts/carbon
nvm exec lts/carbon node tests.js

But it could used to debug the tests in the browser, take screenshots, global tool or
targeting external servers exposing the tests.

TIP: you could install the tool globally (npm install --global build_js/bin) to execute it from any local folder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify how this can be used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will be reviewing this these days and come back to you, thanks!

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! Thank you for contribution 👍

@alalek
alalek merged commit 955b202 into opencv:3.4 Nov 16, 2019
@alalek alalek mentioned this pull request Nov 17, 2019
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
Js test puppeteer

* run_puppeteer.js / tests

* js run test section

* rollback html

* whitespace

* js: update OpenCV.js tests infrastructure

* js: exclude puppeteer from default 'npm install'

* js: update notes

* js: more fixes in run_puppeteer

* fix build folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants